|
-
targeting and populating dynamic text field
To anyone who's willing to assist. I have a problem with populating a dynamic text field in a loaded movie clip with instance names of "headline" and "templateA", respectively. The loaded movie clip is in _root. Here's what I have but it doesn't work (not sure if it's possible)
loadMovie("skyShell.swf", templateA);
templateA.headline.text = "some text for the text field"
Any assistance is greatly appreciated.
-
Registered User
Should look something like this, assuming templateA is the instance name of an empty movie clip to load skyShell.swf into:
_root.templateA.loadMovie("skyShell.swf");
This line:
_root.templateA.headline.text = "some text for the text field";
Should probably be inside the skyShell movie. It may load if you add it under the line above, when you test the movie, but it probably won't when you put it online.
-
it works!
Many thanks for the help! If you have a sec to spare can you explain why this line:
_root.templateA.headline.text = "some text for the text field";
did not work when placed in the main swf vs it working when placed in the skyShell movie. Is it because the reference to the text field "headline" needs to be in the same movie clip? Thanks in advance.
-
Registered User
It probably would have worked if it were placed somewhere after the movie holding the text box was loaded. Once an external movie is loaded, it becomes as much a part of the main movie as if it were made there. But the call to load the text comes at the same time to load the movie that holds the text box. By the time the text box has loaded, the call to populate it has died.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|