Hello everyone.

I am trying to make star spinning (mouse cursor rollover the star, it would be change direction. and if click the star, it would spin start spin slowly and getting faster and then it would be easing stop.)

here is the my action script3.0
Please help me and I will really appreciate.

Thank you very much.


stop();

import flash.events.MouseEvent;

star.addEventListener(MouseEvent.MOUSE_DOWN, mouseClick);

function mouseClick (evt:MouseEvent)
{
play();
}

import flash.events.MouseEvent;

stage.addEventListener(MouseEvent.CLICK, clickStage);

function clickStage(event:MouseEvent):void{
star.rotation += rotationSpeed;
}

var rotationSpeed:Number = 10;

stage.addEventListener(Event.ENTER_FRAME, updateMouse);

function updateMouse(event:Event):void {
star.rotation += mouseX;
}

stop();


//mine is never stop... keep spinning...