PDA

View Full Version : A Perfect Fade-In, a Perfect Movie-Style Intro



doctorflash1
May 8th, 2002, 04:04 PM
HI flash_monsters,

-I have in Frame n°1 a MovieClip with this actionscript for a Fade in:


onClipEvent (load) {
_alpha = 0; }
onClipEvent (enterFrame) {
if (_alpha<100) {
_alpha+=2; }
}


-In the Layer 2, I have a "stop".
-In Frame n°2 I have another MovieClip with the same script.



1)In which way can I say to Flash:

WHEN alpha=100 GoToAndStop to Frame 2?


2) In Which way can I obtain a fade-out (after the fade-in) also, at first to pass to Frame 2?


I have a lot of clip in the same number of frame, to make a movie-style intro.

I see "Transition of alpha via Action Script" in the BEST, but nothing Help to me there.

Please, help me!

Many Thanx


Doctor

upuaut8
May 9th, 2002, 12:09 AM
to answer your first question

onClipEvent (load) {
_alpha = 0; }
onClipEvent (enterFrame) {
if (_alpha<100) {
_alpha+=2; }
if (_alpha>=100){
_root.gotoAndStop(2);
}
}

as for a fade in.. you can just reverse the code

onClipEvent (load) {
_alpha = 100; }
onClipEvent (enterFrame) {
if (_alpha>0) {
_alpha-=2; }
}

doctorflash1
May 9th, 2002, 04:26 PM
ManY Thanx upuaut8.

There's a "challenge" for U in "tutorial " section...



cheers,



Doctor