-
addItem from external SWF
Hi All.
Perhaps some one can help me out.
I've got my main SWF file which adds items to a list box. I've put this actionscript in the same clip as the drop down:
MLfunction.addItem("FadeOut", "FadeOut");
This works fine and populates the drop down.
Now, I'm trying to addItems to that same drop down from an externally loaded Swf.
I've tried putting the following script in the first frame of the externally loaded clip - but it doesn't add the item to the drop down:
_level0.buttonMC.EditMenu.MLfunction.addItem("Fade Out2", "FadeOut2");
Anyone know why this wouldn't work or if it's possible?
Thanks.
-
Where did u load ur swf to? level or mc (wat is the mc name? is the mc on the main timeline?)?
-
Hello hye,
I've simplified things even farther just for troubleshooting purposes.
Instead of loading an swf I just tried putting this code in the same frame as the drop down inside a Movieclip:
_level0.buttonMC.EditMenu.MLfunction.addItem("Fade Out2", "FadeOut2");
Great - it works fine.
Now I try moving this script (noted above) to another movieclip within the same SWF and it doesn't work.
ANy ideas?
-
Would be much easier if you attached your .fla, rather than me (or any other!), trying to recreate it.
-
Hey Guys,
Thanks for trying to help.
While creating a basic FLA for the forum, I figured out what the problem was. My combo box was located in another MC but wasn't appearing on the first frame. Apparently, even though the combo box is in the Movie, unless it's actually available when the additem script is called, it doesn't seem to work.
I solved the problem by setting the combo box visibility to false in the first frame and then true when I actually need it.
Too bad it doesn't just work.
Perhaps there is another solution that I'm not aware of. Hopefully this will help someone else in a similar situation.
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
|