Display and play movie clips at random.
Hi adepts!
I am trying to place 6 movie clips in an array and access them in a random manner so that when a button is pressed a movieclip appears and plays randomly.
All MCs are in frame one along with this code:
stop();
blk1._visible=false;
blk2._visible=false;
blk3._visible=false;
ppk1._visible=false;
ppk2._visible=false;
ppk3._visible=false;
storeCartons = new Array();
storeCartons = (blk1, blk2, blk3, ppk1, ppk2, ppk3);
startButton.onMouseUp = function(){
trace(myNumber);
myNumber=Math.floor(Math.random()*7)+ 0;
activeCarton = storeCartons(myNumber);
activeCarton._visible=true;
}
how can I get this to work??