Skip to main content
Known Participant
April 23, 2013
Question

skip intro button please help

  • April 23, 2013
  • 1 reply
  • 1009 views

I have a flash intro to my website and I have (2) buttons one sound one skip intro.  The sound works fine but the skip button will not work.  Here is my code.

skipBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

gotoAndPlay(401);

any suggestions?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 23, 2013

do you see the trace output when you click your button and does that match the name of the movieclip that has 401+ frames:

skipBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

trace(this.name);

gotoAndPlay(401);

}

DerekDAuthor
Known Participant
April 23, 2013

I get these errors when I test.

Scene=Scene 1, layer=Layer 22, frame=18, Line 1 Statement must appear within on handler

Scene=Scene 1, layer=Layer 22, frame=18, Line 2 The class or interface 'MouseEvent' could not be loaded.

kglad
Community Expert
Community Expert
April 23, 2013

you're publishing for as2.

change your publish settings to as3, if you want to use as3 code.