External flash text
- Started
- Last post
- 2 Responses
- silentseven
I am trying to load a external text file with a css file and the txt field keeps returning "undefined"
the action script is here to load the text into the text box.
// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = "about.txt";
var css_url = "html_styles.css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
myText_txt.styleSheet = styles;
myText_txt.text = storyText;
}
};Please help
- silentseven0
I got it.... damn actionscript 2.0 !!!!
- pushme0
post it if you got it :)