Monday, October 22, 2012

Setting an icon on a Spark Button in Flex Hero





Setting an icon on a Spark Button in Flex Hero

by 

The following example shows how you can set the icon on a Spark Button in Flex Hero by setting the iconstyle.

The following example(s) require Flash Player 10 and the beta Adobe Flex Hero SDK. To download the Adobe Flash Builder 4 trial, see http://www.adobe.com/products/flex/. To download the latest nightly build of the Flex Hero SDK, see http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero.
The following example requires Flex SDK 4.5.0.18623 or later.
"1.0"
encoding="utf-8"?> name="Spark_Button_icon_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> > horizontalAlign="center" verticalAlign="middle" /> >   > <![CDATA[ [Embed("assets/asterisk_orange.png")] protected const ICON:Class; ]]> >   label="Spark Button with dynamic icon" icon="assets/asterisk_orange.png" /> label="Spark Button with inline embedded icon" icon="@Embed('assets/asterisk_orange.png')" /> label="Spark Button with metadata [Embed] icon" icon="{ICON}" />   >You can also set the icon style in the

No comments:

Wiredwizrd

Morgan Todd Lewistown, PA

Experienced Information Technology Manager with a strong knowledge of technical guidance, IT best practices, security protocols, team leadership, and analyzing business requirements.
Google