Copy link to clipboard
Copied
I'm using a Timer event function to add random MovieClips from an Array, they base class makes them move from right to left.
var theArray:Array = new Array(mc1,mc2,mc3......)
function startIt (event:TimerEvent):void
{
var theMovieClip = new MovieClip();
theMovieClip = theArray[int(Math.random()*theArray.length)];
theMovieClip .x = stage.stageWidth;
addChild(theMovieClip );
}
but sometimes the Movie Clip disappears, so my question is why?
And another Question, how can I remove them once they leave the stage?
Copy link to clipboard
Copied
what base class? is there code in the base class?
Copy link to clipboard
Copied
Yes, they their base class makes the move to the left
Copy link to clipboard
Copied
and what's that code?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now