Transitions Between External SWFs

I have read the tutorial here for this but have some questions.

what if i want to use one intro animation and exit animation for load and unload of a movie. So if i had a movie with several key frames which load different scrolling text box component with html and some swf files and images and want to have a fade in and out animantion when i click or leave the key frame loading the external files.

How would i do this?

Currently my movie will have around 50 key frames loading seperate files(swf, jpg, text box with html) when you go to them. But i will have buttons on each one to nav to other ones. This is for a virtual tour of a building. It will also have a next and previous button on the bottom. So i guess the next and previous button need to tie into the load and unload animation too.

so is there a way to have one fadein and fade out called for all so if i want to change the animation i do not have to do it in all the swf files and only the main one?

Thanks for all the help!!!
Aaron

[color=black]Good afternoon, aaron353![/color]
[color=black][/color]
[color=black]First off, let me say that Voetsjoeba codes some good stuff. Period.[/color]

As for your question, I think perhaps a simple modification of the code to call the load/unload via a function would suit your needs. Something like:

on(release) {
  myFade(currentMovie, newMovie);
}

…where currentMovie is dynamically referencing the current movie, and newMovie is the movie that you wish to load by clicking the button. Place your fade in/out routines in the code to build the myFade function. I have had good experience with the mx.transitions.easing _alpha routines - you may want to explore that option for your fades.

Hope this helps or at least gives you an idea of what you don’t want…

Happy coding!

Yeah his code is awesome and the tutorial was great help!!! :slight_smile:

so if i use this code

on (load) {
if (_root.currMovie == undefined) {
_root.currMovie = “section1”;
container.loadMovie(“section1.swf”);
} else if (_root.currMovie != “section1”) {
if (container._currentframe >= container.midframe) {
_root.currMovie = “section1”;
container.play();
}
}
}

and wanted to make it exicute on the load of a frame would that be possible?

Also how would i implement what you are saying to do? Sorry about being so ignorant about this but i am just learning and any help is GREATLY appreciated!!! Thanks for the reply! :wink:

Thanks!
Aaron

So basically you want to use one intro and one outro animation for each transition ?

Hmn … then what you’d have to do is, instead of haveing each external swf play it’s specific intro, have it play the global intro by placing a gotoAndPlay and a stop on the first frame of the external swf so that it starts playing the global intro. After the global intro has ended, you return the playhead to the external swf where it shows the content. And then the same thing for the outro animation I guess. This is just though about rapidly, I’m not sure if it’ll work.

Thanks so much for the help but i dont think i quite understand. do you have any examples.

Sorry for being such a noobie but i am trying and all your help is greatly appreciated!

Thanks again you guys for all the help so far. I cant tell you how nice it is that everyone in the forum is so nice and actually helps others out! Once i have some experience under my belt which i will owe alot to this forum and you guys who help me i will try and post helping people out!

It is a breath of fresh air to actually have a forum with cool people! :slight_smile:

Thanks,
Aaron

Actually, no, I don’t have an example like that :frowning: If you could give me the files you’re working on, I’ll have a look at implementing it.

THANKS!!! i have sent you a message!

Thanks again for all the help and you are a real life saver!!! :wink:

I owe you gib time for this!!!

Thanks,
Aaron

voets is it possible if i have a look at the fla as well when it is done to see the difference between the trasitional tut and the one aaron wants implemented. I checked out ultrashocks forum and this guy has one up and it runs very fast and smooth, but I don’t really understand what he is trying to say.

Hey Gupps :slight_smile:

I can send you a link to it now if you want to see what i am trying to do now with the transition on each swf file. I want to either have a action scripted fade or transition for each time you load an external swf but i do not want to have to go in and update 50 external swf files if i want to change the transition or fade effect. I am trying to see if i can have one type or file for the fade and then all i have to do is update that one file and all external swf files will have the same animation when i go through the VR tour. :slight_smile:

I new to this so sorry if i am not explaining it correctly.

Hey also once i call an external swf file if i have a button on it is there any special way i have to make it call a fram from with in the main movie?

Thanks for all the help!
Aaron

I found this photo gallery script that has a cool fade effect on eneter and exit fram event.

Would somthing like this work with loading in new swf files with preloads?

i have attatched the file. The action script looks like this.

on (load) {
display = “04”;
if (picnum eq “four”) {
} else {
oldpicnum = picnum;
picnum = “four”;
}
}

and the main frame has this code. Could i use this fade to make my swf of mc container fade when loading movie and fade out?

onClipEvent (load) {
picnum = “one”;
display = “01”;
}
onClipEvent (enterFrame) {
// Feel free to use. Visit Moseleywebb.com
// find alpha of new pic
picalpha = Math.Round(getProperty(picnum, _alpha));
// find alpha of old pic
oldpicalpha = Math.Round(getProperty(oldpicnum, _alpha));
// If you want to change fade speed, alter + & - amounts below!
// if the new pic alpha is 0, fade it up to 100
if (picalpha <100) {
setProperty(picnum, _alpha, picalpha + 5);
}
// if the old pic alpha is 100, fade it down to 0
if (oldpicalpha >0) {
setProperty(oldpicnum, _alpha, oldpicalpha - 5);
}
}

just trying to find a good fade in and fade out action script to apply to frames and objects. :slight_smile:

Thanks,
Aaron

Hey Voet,

ok i have posted the file at http://www.mojocompany.com/HVTour.zip.

It has the main flash movie and then 3 external flash movies. The external movies i tried to make a fade in and fade out with a mask but it does not seem to be working. The arrows at the bottom will let you move through the frames with next and pevious frame action.

I am also going to put button over the images allowing you to click and move forward and left and right depending on where you are.

the Back and FWRD buttons are just plain next and prev actions. Should i use some other actions?

Also i am going to have a text area that will call html for ech photo aswell and put it in the box to the left of back and fwrd buttons.

Is there a way to have the external swf fade in and fade out with action script from the main movie?

oh also i am going to have a sitemap and they will be able to click in a room to go to the named frame and load the external swf.

Thanks,
Aaron

P.S. if you have any suggestions if i am going somthing wrong feel free to let me know. THANKS!!!

voet would you instead us loadmovie globletransition swf command on the external swf than continue with the external swf when the transition is finished. I can’t seem to get it work.
frame 1 of an external swf
gotoAndPlay(“globletransitionintro.swf”,1)
stop()