Loading style sheets defined in CSS at run time
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.styles.StyleManager; public function applyRuntimeStyleSheet():void { StyleManager.loadStyleDeclarations("a.swf") } </mx:Script> <mx:Label text="Load a new CSS-based SWF file" /> <mx:Button id="b1" label="Click Me" click="applyRuntimeStyleSheet()" /> </mx:Application>