Skip navigation
craig.hum
Currently Being Moderated

1120 error

May 3, 2012 3:25 AM

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

   

}

 
Replies
  • Currently Being Moderated
    May 3, 2012 3:38 AM   in reply to craig.hum

    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

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 3:48 AM   in reply to craig.hum

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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points