PDA

View Full Version : How can I convert this to actionscript 3.0



fs_tigre
June 4th, 2009, 06:10 AM
Hi,

Can someone help me to convert this actionscript 2.0 code to actionscript 3.0?

Hi,
Can someone help me to convert this actionscript 2.0 code to actionscript 3.0?

Or if someone knows of a similar actionscript 3.0 code that loads HTML and at the same time it uses a CSS file to format the text and that can be used to format different text Fields, please let me know.

Thanks

var styles = new TextField.StyleSheet();
styles.load("cssFiles/eventsCSS.css");
theText1.html = true;
theText1.styleSheet = styles;
var lv:LoadVars = new LoadVars();
lv.onData = function(content) {
theText1.text = content;
}
lv.load("events/event1.html");

marspark
June 4th, 2009, 11:23 AM
try this css for as3 tutorial:

http://www.hexosearch.com/se/external.aspx?zqz=as3+css&zlvz=2&zvtz=1&zurlz=http://www.drawlogic.com/2007/06/01/loading-external-css-stylesheets-in-flash9-as3-cs3/&ztz=*drawlogic+%22+Loading+External+CSS+StyleSheet s+in+Flash9+%2f+AS3+%2f+CS3+...

fs_tigre
June 4th, 2009, 09:10 PM
First of all thank you for your reply!

This is nice but I need to externally load the HTML, any other suggestion?

Thanks