7/12/2010 12:41:20 AM
Title:
How to loadd css file at run time
Hi,
How to load css file at runtime?
Regards,
K.V.Ramakrishna
7/12/2010 2:25:14 AM
hi rama,
check this out...
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html
http://stackoverflow.com/questions/204924/how-do-you-dynamically-load-a-css-file-into-a-flex-application
Shawn
Points: 270
Posts:0
7/12/2010 5:31:59 AM
check this thread
http://askmeflash.com/qdetail/860/adding-css-file
7/12/2010 8:31:12 PM
here goes the simple example to load dynamic stylesheet dynamically in flex or flash builder. Remember to right click on css file in flex and select "compile as swf" so that its converted to swf automatically.
<?xml version="1.0"?>
<!-- styles/BasicApp.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.styles.StyleManager;
public function loadStyleSheet():void {
StyleManager.loadStyleDeclarations("dynamicStyleSheet.swf")
}
]]>
</mx:Script>
<mx:Button label="Click Me to load StyleSheet" click="loadStyleSheet()"/>
</mx:Application>