Packageasgard.text
Classpublic class StyleSheetLoader
InheritanceStyleSheetLoader Inheritance flash.net.URLLoader

This loader load an external css file to fill the StyleSheet object defines over this loader.

Example :

     import asgard.text.CoreTextField ;
     import asgard.text.StyleSheetLoader ;
     
     import flash.events.Event ;
     import flash.net.URLRequest ;
     
     import vegas.string.HTMLStringFormatter ;
     
     var style:StyleSheet = new StyleSheet() ;
     
     var complete:Function = function( e:Event )
     {
         trace( e ) ;
     }
     
     var loader:StyleSheetLoader = new StyleSheetLoader( style ) ;
     loader.addEventListener( Event.COMPLETE , complete ) ;
     
     var field:CoreTextField = new CoreTextField( null , 150 , 20 ) ;
     field.autoSize   = TextFieldAutoSize.LEFT ;
     field.styleSheet = style ;
     field.x          = 25 ;
     field.y          = 25 ;
     field.htmlText   = HTMLStringFormatter.paragraph("hello world" , "my_style" ) ;
     
     addChild(field) ;
     
     loader.load( new URLRequest( "style/style.css" ) ) ;
     



Public Properties
 PropertyDefined by
  styleSheet : StyleSheet
The StyleSheet reference of this loader.
StyleSheetLoader
Public Methods
 MethodDefined by
  
StyleSheetLoader(styleSheet:StyleSheet = null, request:URLRequest = null)
Creates a new StyleSheetLoader instance.
StyleSheetLoader
Protected Methods
 MethodDefined by
  
complete(e:Event):void
Invoked when the loader process is complete to parse the datas.
StyleSheetLoader
Property detail
styleSheetproperty
styleSheet:StyleSheet  [read-write]

The StyleSheet reference of this loader.

Implementation
    public function get styleSheet():StyleSheet
    public function set styleSheet(value:StyleSheet):void
Constructor detail
StyleSheetLoader()constructor
public function StyleSheetLoader(styleSheet:StyleSheet = null, request:URLRequest = null)

Creates a new StyleSheetLoader instance.

Parameters
styleSheet:StyleSheet (default = null) — The StyleSheet reference to register in this loader.
 
request:URLRequest (default = null) — The URLRequest of this loader to load the external style sheet.
Method detail
complete()method
protected function complete(e:Event):void

Invoked when the loader process is complete to parse the datas.

Parameters
e:Event