This content has been marked as final. Show 4 replies
Since the scope at that point is the fileData LoadVars object you could try using "this" to refer to the object. Other than that the only thing I can come up with is that body_text_var is undefined!
Doh on reading it a bit closer I see something else as well.
body_text_var is defined probably on the _root timeline or some such in that case you need to do two things access the value of body_text_var and then retrieve the appropriate value from the LoadVars
So something like this:
This is what is refered to as array notation. That says look on the _root level for the variable/property called body_text_var and then use the value of that to look within "this" object for a varialbe/property with the same name and finally assign that to body_txt's htmlText property. And again "this" in this case is the LoadVars object..
Both return undefined in my text box.
When I run my code and trace(body_text_var); in the onLoad function I get "law1". I am only using this as a local variable and it shouldn't be anywhere else in my file.
If I paste in (hardcode) the line "body_txt.htmlText = fileData.law1;" the script executes and the data shows up...????