Embedding assets from SWF files : Embed « Development « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Development » EmbedScreenshots 
Embedding assets from SWF files
         
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
        
            [Bindable]
            [Embed('assets/icons.swf', symbol='bulletCheck')]
            private static var BULLET_CHECK:Class;

            [Bindable]
            [Embed('assets/icons.swf', symbol='bulletCritical')]
            private static var BULLET_CRITICAL:Class;

            [Bindable]
            [Embed('assets/icons.swf', symbol='bulletWarning')]
            private static var BULLET_WARNING:Class;
      
    </mx:Script>

    <mx:Button id="checkBtn" label="Check" icon="{BULLET_CHECK}" />
    <mx:Button id="warningBtn" label="Warning" icon="{BULLET_WARNING}" />
    <mx:Button id="critcalBtn" label="Critical" icon="{BULLET_CRITICAL}" />

</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Create a Button control, and sets its icon property by using the @Embed() directiveCreate a Button control, and sets its icon property by using the @Embed() directive
2.Inline embedded Button Icon
3.Using Embedded icon Class for Button iconUsing Embedded icon Class for Button icon
4.Embed a bitmap (.bmp) file and displays its properties when you click the Show Properties button.
5.Use Embed statement with the SWFLoader controlUse Embed statement with the SWFLoader control
6.Embedding resources in style sheetsEmbedding resources in style sheets
7.Use Embed statement directly in the style sheetUse Embed statement directly in the style sheet
8.Embed boldface, oblique, and plain typefaces
9.Examples of embedding assetsExamples of embedding assets
10.Associate the embedded image with a variable by using [Embed] metadata tagAssociate the embedded image with a variable by using [Embed] metadata tag
11.Using the [Embed] metadata tagUsing the [Embed] metadata tag
12.Create and manipulate an object that represents the embedded image before passing it to a controlCreate and manipulate an object that represents the embedded image before passing it to a control
13.Embed image file to Image controlEmbed image file to Image control
14.Assign embedded image file to Image sourceAssign embedded image file to Image source
15.Embedded StylesEmbedded Styles
16.Skin with Embedded ImagesSkin with Embedded Images
17.Like the Image control, use Embed statement with the SWFLoader control to embed the imageLike the Image control, use Embed statement with the SWFLoader control to embed the image
18.Use an embedded image for the InlineGraphicImage object's sourceUse an embedded image for the InlineGraphicImage object's source
19.Embed a small amount of Hebrew text in a text control, and sets the direction style to rtl.Embed a small amount of Hebrew text in a text control, and sets the direction style to rtl.
20.Embed MP3 file
21.Use the Embed statement directly in the style sheetUse the Embed statement directly in the style sheet
22.Embedding Images InlineEmbedding Images Inline
23.Point to the location of the SWF file with the source property in the Embed statement
24.Embedding skin inline
25.Access Embeded Class Object
26.Embed image into html and display it with RichTextEmbed image into html and display it with RichText
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.