Hello. Currently I have a rotating globe with 2 buttons. when i click on “right” button, it will go to next frame. when i click on “left button”, it will go to prev frame. I have no problem making it rotating fully.
But now I’m trying to make the globe rotate itself when I mouse over the button. And globe will stop when I mouse out.
I’ve tried using a Boolean var and a while loop but I cant do it.
this is the current codes that i have.
stop();
import flash.events.MouseEvent;
var mouseover:Boolean = false;
btnRight.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver_next)
btnRight.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut_next)
function onMouseOver_next(evt:MouseEvent):void
{
mouseover = false;
while (mouseover == true){
nextFrame();
}
}
function onMouseOut_next(evt:MouseEvent):void
{
mouseover = false;
stop();
}
Am i doing it the right way? Or how do i go about doing this?