-
Loading external swf automatically...
hi all,
is there a way to load an external swf into an empty movieclip holder? what i would like to do is, when my main movie plays to a certain point in the timeline, the external swf will automatically load into an empty mc holder; then, when a user clicks on another button on the menu, the external swf gets unloaded and replaced by another swf.
i have tried to use this line of actionscript but it didn't work:
MCcontainer.loadMovie("myexternalmovie.swf");
* The MCcontainer is the name of my empty movieclip holder.*
thanks in advance for your help!
michael
-
Why didn't MCcontainer.loadMovie("myexternalmovie.swf");
work?
If it didn't load, then you probably didn't give it the right URL. If you tried to load more than one movie into the "container" that won't work. Just make more containers. If you wanted the movies to load now and play later, then just put a "stop();" in the first frame of the loaded movie and then "MCcontainer.gotoAndPlay(2);" later on.
If you had some other problem, be specific.
I hope one of these helps.
Thinkerbug
www.thinkerbug.com
-
hi Thinkerbug,
when i tried and assigned the MCcontainer.loadMovie syntax, the following error pops up:
Scene=homepage, Layer=MCcontainer, Frame=10: Line 1: Statement must appear within on/onClipEvent handler
MCcontainer.loadMovie("attractions.swf");
i am not sure what this means but, nothing shows up in the mc holder?
by the way, i selected the mc holder on stage and then open the actionscript panel to assign the syntax. is this the correct way of doing it?
thanks.
michael
-
Post Mo' Bills
did you ensure tha you named MCcontainer in the instance name field?
if so, then make sure you place the actions at the keyframe you want the external .swf to load at.
If you still got probs, maybe post your .fla somewhere then I can have a look at it.
hey, don't laugh. Your daughter may be in here!!!
-
Originally posted by daile
by the way, i selected the mc holder on stage and then open the actionscript panel to assign the syntax. is this the correct way of doing it?
No. Select a frame in the timeline of the parent movie (probably the main timeline) and put this actionscript on that frame. (Select the frame and then open the actions window and then add your actionscript.) Then when the movie enters this frame the holder will load the movie.
Alternatively, you can make a button that has the action:
Code:
on(release){
MCcontainer.loadMovie("myexternalmovie.swf");
}
Thinkerbug
www.thinkerbug.com
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
|