[COLOR=black][FONT=Verdana]Hi There,[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]If someone could help me with this problem that would be great.[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Inside a mc on the first frame I have put the following alpha AS fade in;[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=red][FONT=Verdana]this._alpha=0;
this.fader=1;[/FONT][/COLOR]
[COLOR=red][FONT=Verdana]this.onEnterFrame = function(){
if (this.fader==1){
this._alpha+=6;
if (this._alpha>=100){
this.fader=0;
}
}else if (this.fader==2){
this._alpha-=6;
if (this._alpha<=0){
this.fader=0;
}
}
}[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]On the very last frame I would like it to fade out so I thought I would reverse the code?[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=red][FONT=Verdana]this._alpha=100;
this.fader=2;[/FONT][/COLOR]
[COLOR=red][FONT=Verdana]this.onEnterFrame = function(){
if (this.fader==1){
this._alpha+=6;
if (this._alpha>=0){
this.fader=0;
}
}else if (this.fader==2){
this._alpha-=6;
if (this._alpha<=0){
this.fader=0;
}
}
}[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]But this last bit of code gets totally ignored and it doesn’t fade out. I know it works because I have tested it in the first frame. Does the last bit of code in the first frame set the alpha for the rest of the mc and override anything else? [/FONT][/COLOR]
[COLOR=black][FONT=Verdana][/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Cheers for any help? (new to AS)[/FONT][/COLOR]
[COLOR=#22229c]