[SIZE=2]Hi, everyone;[/SIZE]
[SIZE=2]Been beating my head against this for a while now and am starting to get down to the wire. I could really urgently use a hand here and would be so appreciative of any help you can offer.[/SIZE]
[SIZE=2]I have a flash site, built in CS4 and AS2, with four textareas that are populated by a LoadVars that is pulling variables from a .txt file. These textareas are unreliable; about 50% of the time, the text displays just as I want, but about 50%, all I get is “undefined.”[/SIZE]
[SIZE=2]Here’s the relevant code, cribbed from elsewhere:[/SIZE]
ta_creative.setStyle("fontFamily","Verdana");
ta_creative.setStyle("fontSize","12");
ta_creative.setStyle("borderStyle", "none");
ta_creative.setStyle("color", "0x000000");
thisText = new LoadVars();
thisText.load("creative.txt");
thisText.onLoad = function(success) {
if (success) {
ta_creative.text = creative;
trace("creative done");
}
};
[SIZE=2]This part:[/SIZE]
thisText.onLoad = function(success) {
if (success) {
ta_creative.text = creative;
trace("creative done");
}
[SIZE=2]…is meant to populate textarea “ta_creative” with variable “creative” ONLY once the variable is loaded, but it doesn’t seem to be working.[/SIZE]
[SIZE=2]How can I get this to work correctly, reliably? I assume I need a better method for populating the textarea only once the variable is loaded, or refreshing the textarea.[/SIZE]
[SIZE=2]the site itself can be found at: [/SIZE][FONT=Times New Roman][SIZE=3]http://tinyurl.com/ydvzfv9 [/SIZE][/FONT][SIZE=2](tinyURL’d to protect search results). The boxes in question are on the four pages beneath the Information option on the navbar.[/SIZE]
[SIZE=2]Help? :*([/SIZE]