Skip to main content
Participant
December 2, 2015
Question

Mouse over and mouse out help

  • December 2, 2015
  • 1 reply
  • 292 views

i am trying to make a time line presentation and ive been trying for 2 days now to make a code where i click and hold the button, and it switches to frame -- and when i let go it goes back to the first page. any help please ive tried mouse over and mouse out but it never works!

import flash.events.MouseEvent;

stop();

/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

this is the code im trying with no luck.

//SMW.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);

SMW.addEventListener(MouseEvent.MOUSE_DOWN, MOTO);

SMW.addEventListener(MouseEvent.MOUSE_UP, MOBACK);

function MOTO(event:MouseEvent):void{

  gotoAndStop(2);

}

function MOBACK(event:MouseEvent):void{

gotoAndStop(1) ;

{

This topic has been closed for replies.

1 reply

Inspiring
December 2, 2015

The code should work but it has to be on a separate layer with the "SMW" button to be visible in frame 2, that if you want to use it on the main timeline.

If you want to use it on some movie clip then add the movie clip instance name only: mcName.gotoAndStop(2);