all groups > flash actionscript > september 2007 >
You're in the

flash actionscript

group:

attachMovie issue


attachMovie issue 3-Putt
9/13/2007 9:21:40 PM
flash actionscript:
Here is my code:

stop();

attachMovie_btn.onRelease = function(){
this.attachMovie("pop up", "popup", 1);
};

I have a stop action on frame 10 of mc called "moodboard" in scene 1 and
trying to load a movie called "pop up" into the mc "moodboard.
It's not working...does this script only work when the button is on scene 1
and your attaching a movie into scene 1 or can it be modified to attach a movie
into another movie?

Help,
Brian
Re: attachMovie issue clbeech
9/13/2007 10:39:16 PM
no, attachMovie will function from any place in the timeline provided you have
the correct linkages set.

Do you have a MC in the Library that has a 'Linkage identifier' of 'pop up' ?
(btw you should avoid using spaces in your naming of items, or it may be a
typeo here :) also is the Export in first frame check box set to true?

additionally this code will attach the 'popup' MC to the 'attachMovie_btn'
instance, if you would want this to attach to the main timeline you should
target an MC instance or refer to either '_root' (not my favorite) OR '
_parent' OR '_level0'.
AddThis Social Bookmark Button