Skip to main content
Participant
September 28, 2020
Question

error code for 1120: Access of undefined property

  • September 28, 2020
  • 2 replies
  • 579 views

I am new to animate.

 

I have an interactive infographic. 

  1. I have an animation of a rocket launching. works fine
  2. I have a simple click button for a 5 sequence scene

both work fine seperate. When I put the animation infrony of my click sequence and change the frames appropriately I get the code below.

 

scene1, Layer 'actions', Frame 130, Line 4, Column 1 1120: Access of undefined property next_define.

    This topic has been closed for replies.

    2 replies

    Participant
    September 28, 2020

    This is my code.

    stop();

    next_define.addEventListener(MouseEvent.CLICK,fl_ClickToGoToAndStopAtFrame130);

    function fl_ClickToGoToAndStopAtFrame130(event:MouseEvent):void
    {
    gotoAndStop(130);
    }

    I built this section first and added animation infront of it. It works fine unitl I put the animation in and then change my frames in the action setting to match.

     

    kglad
    Community Expert
    Community Expert
    September 28, 2020

    there's no object named next_define on frame 130 (which will look like frame 130 because this is as3, not canvas).

     

    if you thihnk there is an object on stage (that's not part of a tween) named next_define, copy from your code and past into the name property field with the object selected and retest.

    Participant
    September 28, 2020

    next-define is a mouse event button.

    Clicking takes you to the next appopriate frame

    kglad
    Community Expert
    Community Expert
    September 28, 2020

    do you see something that makes you think next_defined actually is defined on frame 130 (which will look like frame 131 to you)?