Question on Rollover, Rollout
Hi,
I am new to flash. I created a frame in the main time line and in the main timeline I created a movie clips which has two frames.
What my code suppose to do is that when I rollover an object in unit 32, it will move to frame 2 in the movie clip(object with a box beside). When I rollout an object, it will move back to frame 1(object only).
My problem is that the box remains on the stage even though the mouse already rollout of the object. When I click it again, it becomes normal again.
Can someone help me... Many Thanks in advance.
KC
Main Timeline

Frame 1
stop();
--------------------------------------------
Movie Clip

Frame 1:
stop();
addEventListener(MouseEvent.ROLL_OVER, onMouseoverbtn1);
function onMouseoverbtn1(event:MouseEvent) :void {
removeEventListener(MouseEvent.ROLL_OVER, onMouseoverbtn1);
gotoAndPlay("2");
}
Frame 2:
stop();
var link1:URLRequest = new URLRequest("http://www.test.com");
addEventListener(MouseEvent.ROLL_OUT, onMouseoutbtn1);
addEventListener(MouseEvent.CLICK, onMouseclick);
function onMouseoutbtn1(event:MouseEvent) :void {
removeEventListener(MouseEvent.ROLL_OUT, onMouseoutbtn1);
gotoAndStop("1");
}
function onMouseclick(event:MouseEvent) :void {
navigateToURL(link1);
}
