I am trying to get this code to repeat itself
Code:import ascb.util.NumberUtilities; var random_generator:uint = NumberUtilities.random(0,3); //the array: var place_to_put_object=[one,two,three,four]; //number to designate which holder object will be parented to var random_num:Number=random_generator; //place object chosen at random in holder var name_item_and_placeit=place_to_put_object[random_num]; //create the instance of the target_mc movieclip and place it into the now //randomly generated square it should go into stage.addEventListener(MouseEvent.CLICK,fun_with_boxes_woohoo); function fun_with_boxes_woohoo(evt:MouseEvent):void { var target_mc:MovieClip = new Target_mc(); name_item_and_placeit.addChild(target_mc); }




Bookmarks