Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mouse over and mouse out help

New Here ,
Dec 02, 2015 Dec 02, 2015

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) ;

{

TOPICS
ActionScript
278
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 02, 2015 Dec 02, 2015
LATEST

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);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines