/ Published in: ActionScript
Expand |
Embed | Plain Text
/************* ActionScript In Flash *************/ //A. Create a new Style Sheet var ss = new TextField.StyleSheet(); var headline:String = "<span class='headline'>Header 1</span><br>"; var p:String = "<p>lorem ipsum.....</p>"; //B. Create a Dynamic Text Field var text_txt:TextField = this.createTextField("text_txt", this.getNextHighestDepth(), 0, 0, 100, 50); text_txt.multiline = true; text_txt.wordWrap = true; //C. Load the external CSS ss.load("./YourExternalFile.css"); ss.onLoad = function(success) { if (success) { text_txt.styleSheet = ss; text_txt.text = headline + p; } };
You need to login to post a comment.
