Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Movies

Status
Not open for further replies.

vivani

Instructor
May 8, 2002
1
US
Hello,

Scenario:

I am developing an elearning course which will be comprised of several modules. Each module will be its own FLA (SWF) file to enable several developers to work on the course at one time.

I need to set up navigation in the course, so that the user can quickly move from a topic (frame) within one module (SWF) to a topic(frame) within another module(SWF).

How can I do this in Flash 5? Previously, I have used LOAD MOVIE action, but this won't take me to a specific frame/label that represents the start of the required topic.

__________

I've tried:

loadmovie "name of .swf", (wherever)
_root.(instance_name).gotoAndPlay (label/frame) ?

However:

Each module is a separate FLA file, so I don't think that I can reference the instance name of a movie clip as suggested. Or can I???

_________

Thanks in advance for your help!
 
I'm sure you must be able to get this to work. I'm having a play with it at the moment but can't seem to get anything to work. This is the code I'm using on my button:

//this should load a movie and goto a specific frame (lable)
on (release) {
loadMovieNum ("Movie2.swf", 1);
_level1.gotoAndStop ("topic1");
}


All I get is a flash of the "topic1" frame. I'm sure I've done this before, oh well, have to keep trying.....
funkymonk2.jpg


rod@sameplanet.co.uk
********************
 
Usually, when loading movies on levels, as opposed to loading them into empty holder clips on stage, you can't alter the properties of the movies and/or levels, until the movie is fully loaded. So your line " _level1.gotoAndStop ("topic1");" in your button script is simply ignored. Thus your movie loads and you probably see a flash frame because you don't have stop actions on that movie, and that it's simply playing when it loads, ignoring your gotoAndStop action.

Regards,

new.gif
 
I do have a stop action on the first frame of the movie but I noticed that it didnt flash anything on the first click, only the second click and all after that.

Does loading a movie into a clip give you more control from the initial link? So doing the above would be posible... Anyway, I'm gonna try it and see.
funkymonk2.jpg


rod@sameplanet.co.uk
********************
 
i had the same problem monk..the only way to fix it that i found is load the movies in a blank clip with a blank first frame with a stop action..on click of button calls the clip to frame 2..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
What I ment was...
To position an external movie for instance, is much more easier using a container clip in the main movie, because the mc is already present on stage. You can thus, on the same button script, position the container clip and then load your movie into it. The movie will then be positioned correctly.

on (press){
_root.containerMC._x = 100;
_root.containerMC._y = 100;
_root.containerMC.loadMovie("your.swf");
}

But when straight loading "your.swf" on level 2 for example, before the movie is loaded, nothing exists on level 2 yet, so you can't position something that doesn't exist.

on (press){
_level2._x = 100;
_level2._y = 100;
loadMovieNum("your.swf",2);
}

The above will not position the movie, and wouldn't do so even if you tried to position it after loading it:

on (press){
loadMovieNum("your.swf",2);
_level2._x = 100;
_level2._y = 100;
}

In other words, only the loadMovie action is performed (other actions are ignored) until the movie is completely loaded, and then your main movie is out of that button script, so other actions are simply skipped!

The way to do it is to allow enough time for the loading movie to completely load, before you can position it or apply any other action to it, in another frame action or button script, further down the road.

You could also use a variable check and/or a preloader on this loaded movie to move the main movie(which was stopped during the loading), to go tho the next frame, where you can then set the position or start the loaded movie playing.

Somewhat clear? Regards,

new.gif
 
There is a way to have the parent movie play while it is still loading the child movie - have the child movie tell the parent movie to play. This will cause the parent movie to continue even though the child hasn't finished loading.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top