Hi once go through this link http://livedocs.adobe.com/flex/3/html/help.html?content=styles_07.html
loading styles with stylemanager... first convert your styles.css to style.swf and you can load an unload the styles at runtime On Feb 17, 4:13 pm, Rajik Pasha <[email protected]> wrote: > Hi All , > > I have a flex application , which is running fine.Now my requirement is > to apply Themes to application. > I have 3 themes with me , but in application == When i select theme1 in > combo box i have written the code like : > > in action script : > import mx.collections.ArrayCollection; > > [Bindable] > public var cards:ArrayCollection = new ArrayCollection( > [ {label:"Theme 1", data:1}, > {label:"Theme 2", data:2}, > {label:"Theme 3", data:3} ]); > > private var cssLoader:URLLoader; > private var cssRequest:URLRequest; > > private function closeHandler(event:Event):void { > if(event.target.selectedItem.data == 1){ > cssLoader = new URLLoader(); > cssRequest = new > URLRequest("AeonGraphical.css"); > > cssLoader.addEventListener(Event.CHANGE, cssLoaderComplete); > cssLoader.load(cssRequest); > } > if(event.target.selectedItem.data == 2){ > cssLoader = new URLLoader(); > cssRequest = new > URLRequest("Styles.css"); > > cssLoader.addEventListener(Event.CHANGE, cssLoaderComplete); > cssLoader.load(cssRequest); > } > } > > private function cssLoaderComplete(event:Event):void > { > var sheet:StyleSheet = new StyleSheet(); > sheet.parseCSS(cssLoader.data); > Application.application.styleSheet = sheet; > } > > But i didnt see the changed theme in my application. > How to change the theme when i select a value in Combo Box? > > Plzz replyyy > > Thanks in Advance............ > -- > View this message in > context:http://old.nabble.com/Change-theme-in-Flex-Application-when-select-a-... > Sent from the Flex India mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

