Ok im stuck here. im using the “Applying CSS to Externally Loaded Text” method of loading html into my flash movie. i got it to work with 1 text field but i need it to load for 3 text fields. with 3 different external files. i already have 3 different text boxes named differently but i cant get the rest to work. i dont know much about action scripting or flash scripting so i did my cut and paste thing. heres the code:
var format = new TextField.StyleSheet();
var test = new TextField.StyleSheet();
var another = new TextField.StyleSheet();
var path = “whats_gnu_styles.css”;
format.load(path);
format.onLoad = function(success) {
if (success) {
txt.styleSheet = format;
myLoadVar = new LoadVars();
myLoadVar.load(“whatsgnu.txt”);
myLoadVar.onLoad = function(success) {
if (success == true) {
txt.variable = “whatsgnu”;
txt.htmlText = myLoadVar.whatsgnu;
}
};
}
else {
txt.text = “Error loading CSS file!”;
}
};
test.load(path);
test.onLoad = function(success) {
if (success) {
testt.styleSheet = test;
myLoadVar = new LoadVars();
myLoadVar.load(“testtxt.txt”);
myLoadVar.onLoad = function(success) {
if (success == true) {
testt.variable = “testtxt”;
testt.htmlText = myLoadVar.testtxt;
}
};
}
else {
testt.text = “Error loading CSS file!”;
}
};
another.load(path);
another.onLoad = function(success) {
if (success) {
txt.styleSheet = another;
myLoadVar = new LoadVars();
myLoadVar.load(“whatsgnu.txt”);
myLoadVar.onLoad = function(success) {
if (success == true) {
testa.variable = “anothertxt”;
testa.htmlText = myLoadVar.anothertxt;
}
};
}
else {
testa.text = “Error loading CSS file!”;
}
};