View Single Post
  #1 (permalink)  
Old 04-03-06, 01:32 PM
Flash_Boi Flash_Boi is offline
Newbie Coder
 
Join Date: Mar 2006
Location: WA state
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Textfield, CSS stylesheet external loading

Hi Everyone,

I got this tutorial from the Macromedia FLASH 8 Advanced book at a local library. It has helped me through some stuff. The example of loading external CSS stylesheet into a textfield works lovely, but they don't have an example of loading an external css and external text file into a dynamic text field. I have read numerous tutorials from macromedia's site and a quite a few others from users posting in forums. I seem to still not understand it.

With this actionscript code to load an external css stylesheet. How can I make it so it also loads the external text file dpmoreinfo.txt into the dynamic text field that I render as HTML?

Please incorporate the following ActionScript. Keep in mind to use the dpmoreinfo.txt file in this code.

import TextField.StyleSheet;
var myStyle:StyleSheet = new StyleSheet();
myStyle.load("mystyles.css");
myStyle.onLoad = function(success:Boolean) {
newsLetterTop_txt.styleSheet = myStyle;
newsLetterTop_txt.html = true;
newsLetterTop_txt.text = "<heading>I would like to display my external text file here! How would I do that?</heading>";
};


Thanks for your support!

Flash_Boi
Attached Files
File Type: zip 16externalCSSformat.zip (58.0 KB, 358 views)
File Type: txt dpmoreinfo.txt (1.2 KB, 473 views)
Reply With Quote