randomClips

Vodpod videos no longer available.

more about "randomClips", posted with vodpod

OK – just need the removeEventListener(Event.ENTER_FRAME, onLoop); to work. Right now itdoes nothing:

var flowers:Array=[clip1,clip2,clip3,clip4,clip5,clip6,clip7,clip8,clip9,clip10,clip11,clip12,clip13,clip14,clip15];

rotateBtn.addEventListener(MouseEvent.CLICK, onClick);
rotateBtn.buttonMode = true;

function onClick(evt:MouseEvent):void {
removeEventListener(Event.ENTER_FRAME, onLoop);

var clip:MovieClip = flowers[int(Math.random() * 15)];
addEventListener(Event.ENTER_FRAME, onLoop);

function onLoop(evt:Event):void {
clip.rotation+=6;
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s