PDA

View Full Version : Alpha fade tween in AS



Digigamer
August 26th, 2003, 08:44 PM
Alright I have boxes and I've put actionscript on them so that when you roll over one of the boxes they go to a certain alpha fade. The thing I want to do though is have it tween to the new alpha setting instead of just going there instantly and I don't know how to do this.

Here is my .fla

grandsp5
August 26th, 2003, 11:45 PM
onClipEvent(enterFrame){
if(rollover == true){
if(this._alpha > 30){
this._alpha -=5;
}
}


something like that

Digigamer
August 28th, 2003, 12:40 AM
hmm, I can't seem to get it to work. I put the script on but when I roll over it nothing happens :(

radicaljugnu
August 28th, 2003, 12:36 PM
on(press){pressed=true}
on(release,releaseOutside){pressed=false}
onClipEvent(enterFrame){
if(pressed){
(_alpha>0)?(_alpha-=2) : (_alpha=0)
}
if(!pressed){
(_alpha<100)?(_alpha+=2) : (_alpha=100)
}
}