Playing random movieclips via timeline
i have project 8 frames long on main timeline. on each frame different movieclip nested animation play varying lenghts. want play animation on first frame. then, once button clicked, randomly load 1 of movieclips on frames 1-7. please see following screenshot view of main timeline.
on first frame have writtent actionscript command stop(); have told each movieclip stop on last frame of nested animation , return frame 1 of main timeline process can start on again.
within first movieclip following actionscript define how button behaves , load random animation:
boxbutton.addeventlistener(mouseevent.click, onboxbuttonclick);
var randnum:number=math.floor(math.random()*8)+2;
function onboxbuttonclick(event:mouseevent):void {
{
movieclip(root).gotoandstop(randnum);
}
}
everything works perfectly, how want, except, once button pressed, movieclips seem play @ varying speeds. play perfectly, other times go in blink of eye. idea why happenning , how control it? want play @ 24fps.
la velocidad la que corre un movie clip se debe principalmente la memoria disponible que tiene la maquina, y los elementos usados por la pelicula.
frames 1-7
var randnum:number=math.floor(math.random()*5)+2;
More discussions in ActionScript 3
adobe
Comments
Post a Comment