jcee
01-18-2003, 03:15 PM
Ok I have a movieclip which i am putting the following script on
onClipEvent (load) {
count = 0
operator = -2;
i = 1;
secs = 5;
down = stop;
}
onClipEvent (enterFrame) {
if (count <= alphaLev && down) {
while(i==1){// this allows the following code to execute once each time
operator = 0;//stop fade
i++;}
if(_alpha<=1){down= false;}//when alpha reaches 1 down is set to false so the count can increase again
}
else if(!down){//run when down is false
if(_alpha >=50){//resets variables when alpha reaches 99%
stop;
alphaLev = 50;
operator = 0;}
else{operator = 2;}
}
count += operator;
this._alpha = count;
_root.test = _alpha;//alpha value
}
I knoe its messy but i just edited a movie from the library.
Anyway the effect i'm after is simply to fade in a clip to specific alpha value. This works ok.
However, when i place the clip in the timline it flashes on and off quickly and then does what its meant to do. If anyone can tell me how to stop the flashy bit i would be eternally grateful. Cheers
onClipEvent (load) {
count = 0
operator = -2;
i = 1;
secs = 5;
down = stop;
}
onClipEvent (enterFrame) {
if (count <= alphaLev && down) {
while(i==1){// this allows the following code to execute once each time
operator = 0;//stop fade
i++;}
if(_alpha<=1){down= false;}//when alpha reaches 1 down is set to false so the count can increase again
}
else if(!down){//run when down is false
if(_alpha >=50){//resets variables when alpha reaches 99%
stop;
alphaLev = 50;
operator = 0;}
else{operator = 2;}
}
count += operator;
this._alpha = count;
_root.test = _alpha;//alpha value
}
I knoe its messy but i just edited a movie from the library.
Anyway the effect i'm after is simply to fade in a clip to specific alpha value. This works ok.
However, when i place the clip in the timline it flashes on and off quickly and then does what its meant to do. If anyone can tell me how to stop the flashy bit i would be eternally grateful. Cheers