Return to Snippet

Revision: 40205
at January 27, 2011 14:22 by peterbelsky


Initial Code
var cssLoader:URLLoader = new URLLoader();

var cssRequest:URLRequest = new URLRequest("content.css");

var sheet:StyleSheet = new StyleSheet();

cssLoader.load(cssRequest);

cssLoader.addEventListener(Event.COMPLETE, cssLoadComplete);

 

function cssLoadComplete(event:Event):void

{

    //trace(cssLoader.data);

       sheet.parseCSS(cssLoader.data);

   // Now assign the StyleSheet to a text field for example

    textBox.styleSheet = sheet;

  //textBox.text = styles.texttitle;

 
  // Now you would load any external text or html into

  // the text field

}

Initial URL

                                

Initial Description

                                

Initial Title
add css to flash textfield

Initial Tags

                                

Initial Language
ActionScript 3