Load style from swf file : SWF Style « Style « 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 » Style » SWF StyleScreenshots 
Load style from swf file
             

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initializeHandler(event)">
    <mx:Script>
        
            private var _currentStyle:String;

            private function initializeHandler(event:Event):void {
                StyleManager.loadStyleDeclarations("a.swf");
                _currentStyle = "a.swf";
            }

            private function clickHandler(event:Event):void {
                StyleManager.unloadStyleDeclarations(_currentStyle);
                StyleManager.loadStyleDeclarations(stylesOptions.value.toString(  ));
                _currentStyle = stylesOptions.value as String;
            }
      
    </mx:Script>
    <mx:ComboBox id="stylesOptions" toolTip="Select a Style Sheet">
        <mx:dataProvider>
            <mx:ArrayCollection>
                <mx:String>a.swf</mx:String>
                <mx:String>b.swf</mx:String>
            </mx:ArrayCollection>
        </mx:dataProvider>
    </mx:ComboBox>
    <mx:Button label="Change Style" click="clickHandler(event)" />
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Load three style SWF filesLoad three style SWF files
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
w_w___w___.__ja__v___a__2___s__.___co___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.