How do you style xml with css in Flash AS3
I wanted to know how to link an external css file in your actionscript to style xml data that is being loaded into flash.
I couldn't find anything on this online. Any help would be greatly appreciated.
In Flash 8 with AS2, one could take this approach:
You essentially create a style sheet object.
var ss=new TextField.StyleSheet();
You create an XML object. Though it looks odd to load the xml file after the onload call, it's because action script is asynchronous and events don't always happen sequentially, therefore, you load the xml file outside the onLoad call to ensure there's some data to show in the text box.
var data_xml=new XML();
Path's can get tricky when targeting the XML file for the text boxes, but the code is solid. Whew, it's been awhile for Action script coding.
Thanks for the reply. However I am working with AS3. Could you point me in the right direction with this?
Are there huge syntactical differences b/w AS 2 & 3? The whole reason I posted that was I thought the differences would be minimal and it would work. Have you tried it to see if it even works?
need a help from ryan
i would like to know if i have more than 3 dynamic text field how can i attached CSS Style sheet
Originally Posted by ryanbutler
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)