|
-
fading in/out movies on different levels?
What script would I attach to a button on _level0 to tell a movie on _level1 to goto a frame label (causing it to fade out and unload itself) and then when its faded away, load a new movie into _level1? I'm attempting to have one movie fade into the next when different buttons are clicked.
-
Esquire
To address another level, you put the level in front of the command.
On (release){
_level1.gotoAndPlay("frameLabel" );
}
Frank
-
Thats great, thank you. Now from there, how do I make the movie pause while level 1 fades away and uloads itself, then have a new movie load into level 1?
-
Senior Member
I would load the movie into an empty mc "mcMovie". Then you can do the fading and unloading and loading. Try this or play around if it does not immediately work. Check out my site:
http:can_info_guide.tripod.com/
for fadings using as.
PHP Code:
function fadeOut(){
fadeSpeed=20;
timeSpeed=20;
myPauseOut=new Object();
myPauseOut.interval=function(){
if(mcMovie.newClip._alpha>=100-fadeSpeed){
mcMovie.newClip._alpha-=fadeSpeed;
}else{
mcMovie.newClip._alpha=0;
mcMovie.loadMovie(newMovie.swf");
mcMovie._alpha=0;
clearInterval(myTimerOut);
fadeIn();
}
myTimerOut=setInterval(myPauseOut, "interval", timeSpeed);
}
function fadeIn(){
myPauseIn=new Object();
myPauseIn.interval=function(){
if(mcMovie._alpha<=100-fadeSpeed){
mcMovie._alpha+=fadeSpeed;
}else{
mcMovie._alpha=100;
clearInterval(myTimerIn);
}
myTimerIn=setInterval(myPauseIn, "interval", timeSpeed);
}
On (release){
mcMovie.gotoAndPlay("frameLabel");
}
- The right of the People to create Flash movies shall not be infringed. -
-
Thank you for your time and script. You'll have to excuse my ignorance, but I am suposed to place that script on the button?
-
Senior Member
I just found one mistake in the buttonscript
On (release){
_root.mcMovie.gotoAndPlay("frameLabel");
}
- The right of the People to create Flash movies shall not be infringed. -
-
Senior Member
Although I answered your e-mail I like to answer the question here too. The script for fading (I hope it works!) is best on the main timeline the same framenumber where the button is located though it should work too when the script is in frame 1. The on(release) has to be in the button of course.
- The right of the People to create Flash movies shall not be infringed. -
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
|