I’m trying to do something EXTREMELY simple, but all of my ideas run into dead ends. I simply want to have a box fade in and then fade out. No problem, right? If someone could give me a hand, that would be great.
So far, I can get my box to fade in. The box is a mc on layer 1 and the AS is on an actions layer. My best idea is to run the alpha from 0 to 100, and then at 100% trigger the opposite direction. I thought I could do this in one frame, but it always ends in a loop fading from something like 80%-90%-80%…so on. So then, I come up with at 100% alpha, move to frame 2 and fade out. For some reason, I can get it to stop and fully run frame 1 before jumping to 2.
Here is my code on an actions layer on frame 1:
(stop);
box01._alpha=0
box01.onEnterFrame = function() {
if (this._alpha<=99){
this._alpha+=10;
}
if (this._alpha==100){
gotoAndPlay(2)
}
}
Any brilliant ideas out there to help me out?
Thanks in advance