I am loading a swf file that is in the same location as the swf loading it. The loaded file is a movie clip with a dynamic text box
feedbackHolder_mc._x = 10
feedbackHolder_mc._y = 10
feedback = "hello";
feedbackHolder_mc.feedbackbox_mc.feedback_txt.htmlText = feedback
The text wont populate to Hello. But if I put this on a button click to change the text it works. Not sure what the issue is.I have even tried creating an empty clip into which to load the swf into despite the feedbackHolder_mc being empty.
It's a matter of timing. When you load a movie, it takes time, but your code isn't waiting for that to happen, trying to assign a value to something before it is present. If you need this populated upon loading, then you will need to use the loadClip method of the MovieClipLoader class. That provides for having a listener which you can use to determine when loading is complete, which can be used to fire a function that sets your value(s).
If you look up the addListener method of the MovieClipLoader class, there's an example there.
thanks. That worked great.