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

1120 error

New Here ,
May 03, 2012 May 03, 2012

Copy link to clipboard

Copied

ahhh someone please help, cant seem to figure out what is wrong here

keep getting the 1120: access of undefined property go1button/go2button/go3button for this code

go1Button.addEventListener(MouseEvent.CLICK, screenOneHandler);

go2Button.addEventListener(MouseEvent.CLICK, screenTwoHandler);

go3Button.addEventListener(MouseEvent.CLICK, screenThreeHandler);

function screenOneHandler(evt:MouseEvent):void {

    gotoAndStop("screenOne");

}

function screenTwoHandler(evt:MouseEvent):void {

    gotoAndStop("screenTwo");

}

function screenThreeHandler(evt:MouseEvent):void {

    gotoAndStop("screenThree");

   

}

TOPICS
ActionScript

Views

374

Translate

Translate

Report

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
Advocate ,
May 03, 2012 May 03, 2012

Copy link to clipboard

Copied

this mean go1Button, go2Button and go3Button don't exist

are these buttons you have added to the stage using CS5 ? if so make sure they have instance names

Votes

Translate

Translate

Report

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
Contributor ,
May 03, 2012 May 03, 2012

Copy link to clipboard

Copied

LATEST

If you added those objects on the stage, once check those instance names. Those instance names should be same as in the code including case sensitivity. If you access those buttons from library, create instances in the code and then apply event.

OR

may be there is another reason for this error. As I expect,

check whether you gave the name for frame or not (as you used in gotoAndStop() function).

Votes

Translate

Translate

Report

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