PDA

View Full Version : alpha question



wilma
July 14th, 2003, 01:05 PM
i have this code which brings the alpha value of a mc up to 100, how can it be adapted to bring the alpha down again to 0 once it has hit 100??

any help would be most appreciated.


onClipEvent (load)



{
_alpha = 0;
}

onClipEvent (enterFrame)
if (_alpha < 100) {
_alpha++;
}

radicaljugnu
July 14th, 2003, 01:15 PM
onClipEvent (load) {
_alpha = 0;
reached100=false
}
onClipEvent (enterFrame) {
if ((_alpha<100) and (reached100==false)){
_alpha+=2;
}
else {
if(_alpha!=0){
reached100=true
_alpha-=2;
}

}

}

wilma
July 14th, 2003, 01:42 PM
cheers for that fella, works a treat.

presumambly the most efficient way of slowing down the increase/decrease alpha effect is to play with the '_alpha+=2;' part of the equation......

this stuff is begining to make more sence