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

skip intro button please help

New Here ,
Apr 23, 2013 Apr 23, 2013

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?

TOPICS
ActionScript
939
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
Community Expert ,
Apr 23, 2013 Apr 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);

}

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
New Here ,
Apr 23, 2013 Apr 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.

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
Community Expert ,
Apr 23, 2013 Apr 23, 2013

you're publishing for as2.

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

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
New Here ,
Apr 23, 2013 Apr 23, 2013

This is for as3?

WARNING: Text field variable names are not supported in ActionScript 3.0. The variable 'text' used for an unnamed text field will not be exported.

WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.

ReferenceError: Error #1065: Variable duplicateMovieClip is not defined.

at default_fla::Symbol6_2/frame1()

ReferenceError: Error #1065: Variable duplicateMovieClip is not defined.

at default_fla::Symbol12_4/frame1()

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
Community Expert ,
Apr 23, 2013 Apr 23, 2013

you have a fla that's using some as3 and some as2.  that will not work.

you must decide on as2 or as3.  under no circumstance can one fla contain code from both actionscript versions.

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
New Here ,
Apr 24, 2013 Apr 24, 2013

I do not care if I use as2 or as3.  I just need to add a ship button to my intro so users can bypass the intro.  Any suggestion would be greatly appreicated.

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
Community Expert ,
Apr 24, 2013 Apr 24, 2013
LATEST

remove all your as2 code and convert to as3.

in particular, no code show be attached to any object.  all your code should be attached to a timeline frame.

you should probably start with a new as3 fla and step-by-step add some of the problematic fla's assets/code to the new fla.  test after each step.  correct each error as they occur.

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