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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controll movies in other levels!

Status
Not open for further replies.

HuggerFanta

Technical User
Apr 22, 2002
87
SE
Hello all you flashers out there!

I have som problems with level controlling!

Here is the case:

1. In level0 (_root level) I have a movieClip, containing a few buttons. When clicking on these, I go to a Lable in the root timeline, and load a new movie (containing some info and som pictures! This is no problem!

2. When I click a buttun it gose to a labled frame and stops (becourse I dont want user to click the same button again), Now I´m loading a movie in level1 (above _root), here is where my problem comes.

When clicking a nother buttun (thats not disabled), I want to unload that movie and load anoter movie in the same level (and that is no problem, it unloads it self). But in level1 I have a closing animation that I want to display, and after that load the next movie!

Is there anyone that can help me solve this problem I would be happy, and very thankfull! --------------------------------------
Kind regards;
HuggerFanta
 
Is the closing animation integrated in every movie you'd be loading on level 1? Regards,

oldman3.gif
 
Yes!
The end animation is in _level1 (or what i should use for the best result).

Why are you asking that??? Is it more complicated to solve the problem??? --------------------------------------
Kind regards;
HuggerFanta
 
I'm just trying to figure out all of your design without you giving me a link, something to look at, and not that much info to start with. For instance, can the closing animation which, you say, is integrated to each loaded movie, be called at any time, while that loaded movie is playing?
If so, on your second button, just add a jump to the starting frame of the closing animation - _level1.gotoAndPlay("frame_label"); - and rather than loading the movie in the button script itself, load it on the last frame at the end of the closing animation.

Now if you don't want to load a specific movie at the end of each movie, the order depending on which button was pressed, you could set a variable in the button script, that will be checked at the end of the closing animation, so that the loaded movie would correspond to the selection made...

Something like...

On (press){
_level0.selection = "such_a.swf";
_level1.gotoAndPlay("closing");
}

Then at the end of the closing animation, rather than using...

loadMovieNum("such_a.swf", 1);

Use...

loadMovieNum(_level0.selection, 1);


Thus if on each different button, you set the variable _level0.selection differently, then the appropriate movie should be loaded at the end of the closing animation. Regards,

oldman3.gif
 
Thanks for helping out, but the problems already solved. i found a perfect solution for this project.

But maybe you know how to change image by clicking the same button that loads the external movies???

Here is how i whant it to work:

By clicking a button, i wich to load and animate an external swf, by the same time I whant to load a external jpg image in my container, maybe with an opacity transition.

Do you know how to do this???

Thanks! --------------------------------------
Kind regards;
HuggerFanta
 
No! But I'm sure... you already found a perfect solution for this project.
Regards,

oldman3.gif
 
Yes! For loding external swf into another level and play a closing animation, but not for loading images dynamicly into place.

I know that this is another problem, but you might have a great way to solve it!!!! --------------------------------------
Kind regards;
HuggerFanta
 
Do you know if this script sulotion of yours will work in my script???

button.onPress = function () {
// loding external swf

_root.createEmptyMovieClip("container", 1);
loadMovie("theNewMovie.swf", "container");

// Placeing the swf on stage!

container._x = 20;
container._y = 20;


// loding external jpeg image!
// Size of image always the exact same!

_root.createEmptyMovieClip("image", 2);
loadMovie("theNewImage.jpg", "image");

// Placeing the jpeg on stage!

image._x = 430 ;
image._y = 370 ;
}

Do you think it will work??? --------------------------------------
Kind regards;
HuggerFanta
 
I post you a fla to look at and help with!!!

I hope you got the time to look at it, please!!!

Thank befor helping!!! --------------------------------------
Kind regards;
HuggerFanta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top