Load three style SWF files : SWF Style « Style « Flex






Load three style SWF files

Load three style SWF files
             

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
        
        import mx.styles.StyleManager;
        import mx.events.StyleEvent;
        public function init():void {
            StyleManager.loadStyleDeclarations("a.swf", false);
            var myEvent:IEventDispatcher =StyleManager.loadStyleDeclarations("a.swf", false);
            myEvent.addEventListener(StyleEvent.COMPLETE, doUpdate);
        }
        public function doUpdate(event:StyleEvent):void {
            StyleManager.loadStyleDeclarations("a.swf", true);
        }
      
    </mx:Script>
    <mx:Label text="This is a label" />
    <mx:ApplicationControlBar id="acb" width="100%">
        <mx:Button label="Submit" />
    </mx:ApplicationControlBar>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Load style from swf file
2.Load three style SWF files, but does not apply them until the third one is loaded
3.Load and unload a style SWF when you toggle the check boxLoad and unload a style SWF when you toggle the check box