View Full Version : [FMX] loadMovie
printer
October 15th, 2003, 03:49 PM
I am trying to load a published movie (movieB) into another movie(movieA). I would like movieB when it appears to beging playing at scene 2 frame 1. I can get it to load but it plays at scene 1 frame 1. Here is the code I am using on a button :
on(release){
loadMovie("movieB.swf",empty_mc);
gotoAndStop("Scene2","first");
}
//empty_mc is a blank movieClip on the root timeline of movieA
//first is the frame label of scene 2 of movieB.
Can someone inform me as to what I am doing wrong here or if it is even possible what I am trying to do. If I can get this to work I can link out to different training modules I have already built.
Voetsjoeba
October 15th, 2003, 03:52 PM
Welcome to the forums =)
I've never used scenes in external swfs, but I think it is something like this:
on(release){
empty_mc.loadMovie("movieB.swf");
empty_mc.gotoAndStop("Scene2","first");
}
printer
October 15th, 2003, 03:55 PM
That does not work for whatever reason. Thank you for replying though. I appreciate it.
Voetsjoeba
October 15th, 2003, 04:04 PM
Well are you sure that the path to empty_mc is correct ? Does the swf load ?
printer
October 15th, 2003, 04:06 PM
Yes. The swf loads but it plays scene 1 frame 1.
Voetsjoeba
October 15th, 2003, 04:07 PM
Are you sure you gave the frame label "first" to the first frame of that Scene ?
printer
October 15th, 2003, 04:10 PM
Yes
Voetsjoeba
October 15th, 2003, 04:13 PM
As I said, I don't have experience using scenes, simply because I never use them. I just tested it, and it doesn't work for me either. Maybe someone else can help you out with this.
printer
October 15th, 2003, 04:14 PM
Thanks for trying.
scotty
October 16th, 2003, 10:24 AM
Hi printer,
i've also lost the touch on scenes but i think you can do it with global variables.
in the first frame of your mainmovie you put:
_global.sce = false;
then on your button:
on(release){
empty_mc.loadMovie("movieB.swf");
_global.sce = true;
}
and in the first frame of your movieB:
if(_global.sce = true){
gotoAndPlay("Scene 2", 1)
}
if i've all my typing right, this should work
scotty
printer
October 16th, 2003, 10:39 AM
When I put the code:
if(_global.sce = true){
gotoAndPlay("Scene 2", 1)
}
on the first frame of movieB and play it; it goes straight to scene 2.
scotty
October 16th, 2003, 10:46 AM
i forgot the stop
stop();
if(_global.sce = true){
gotoAndPlay("Scene 2", 1)
}
:smirk:
scotty
printer
October 16th, 2003, 11:00 AM
I didn't. It still goes straight to scene 2. Thanks for trying though.
scotty
October 16th, 2003, 11:13 AM
strange, take a look at this, this is working around here
scotty
printer
October 16th, 2003, 11:47 AM
Your right, yours works. I copied your code into my movie and it works fine. Don't know what I was doing wrong but I thank you for your perseverance and helping me out.
Many Thanks
scotty
October 16th, 2003, 12:10 PM
no problem:thumb:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.