Hello folks,
I have a number of blinking stars in my banner ad, which are all instances of just one movie clip in my library called “star”. Inside the “star” movie clip, I have placed the code below (very kindly supplied by Senocular!), which makes each star “blink” i.e. fade in and out repeatedly.
this._alpha = Math.random()*100;
this.starAlpha = 5;
this.onEnterFrame = function() {
this._alpha += this.starAlpha;
if (this._alpha>=100) {
this.starAlpha = -5;
}
if (this._alpha<0) {
this.starAlpha = 5;
}
};
The problem I have, is that the required length of my banner ad animation is 30 seconds and these stars continue to blink forever. I need them to stop as they are at 30 seconds. I don’t want them to fade away - I want them to stay visible but stop animating. I have tried to insert
[COLOR=#333333][FONT=Courier New]star.stop();[/FONT][/COLOR]
in the main timeline but this doesn’t work. Can anyone help me please…?!