I didn't tried it, but from help, this should work
:
package {
import flash.display.Sprite; import flash.text.StyleSheet; import flash.text.TextField; import flash.text.TextFieldAutoSize; public class StyleSheetExample extends Sprite { public function StyleSheetExample() { var style:StyleSheet = new StyleSheet(); var heading:Object = new Object(); heading.fontWeight = "bold"; heading.color = "#FF0000"; var body:Object = new Object(); body.fontStyle = "italic"; style.setStyle(".heading", heading); style.setStyle("body", body); var label:TextField = new TextField(); label.styleSheet = style; label.htmlText = "<body><span class='heading'>Hello </span>World...</body>"; addChild(label); } } } ******
Of course this is not what you want, as it does not
use an external CSS.
Now, i guess that using the parseCSS Method could
get you where you want to go. Not sure though... :s
This is not dynamically loading CSS at runtime
which is not possible as we speak, as Tom said.
Share your findings on this.
Best,
JL
--
Lancement de la communauté francophone sur Flex
:
http://www.flexeurs.org > rejoignez-nous
!
__._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS
|
- [flexcoders] Loading external css and setting a:hover style... olivierdejonge
- [flexcoders] Loading external css and setting a:hover ... olivierdejonge
- Re: [flexcoders] Loading external css and setting ... Tom Chiverton
- Re: [flexcoders] Loading external css and setting ... Jean-Luc ESSER