Style error event handler : Style Event « 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 » Style EventScreenshots 
Style error event handler
Style error event handler
           

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

  <mx:Script>
    
    import mx.controls.Alert;

    import mx.styles.StyleManager;
    import mx.events.StyleEvent;

    private function changeCSSname:String ):void{
      var styleEvent:IEventDispatcher = StyleManager.loadStyleDeclarationsname, true );
      styleEvent.addEventListenerStyleEvent.ERROR, showError );
    }
    public function showErrorevent:StyleEvent ):void
    {
      Alert.showevent.type );
    }
  
  </mx:Script>

  <mx:Panel id="pnlApp" title="Sample Application" layout="vertical" horizontalAlign="center">
      <mx:Label text="Title" />       
      <mx:Form>
        <mx:FormItem label="Password:">
          <mx:TextInput id="txtPassword" displayAsPassword="true" />
        </mx:FormItem>    
      </mx:Form>
      <mx:Button id="btnTrace" label="Login" styleName="sLogin" />
  </mx:Panel> 
  <mx:HBox>
    <mx:Button id="btnBlue" cornerRadius="0" click="changeCSS( 'a.swf' )" label="Load CSS in SWF"/>
  </mx:HBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.using the setStyle() method from event target to change style for controlsusing the setStyle() method from event target to change style for controls
2.Style complete event handlerStyle complete event handler
3.Styles Event
w___w___w___.__j___a___v___a__2___s__.___c_o___m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.