9 Replies Latest reply on Dec 6, 2018 1:39 PM by kglad

    1120: Access of undefined properties button2

    christophern6788262 Level 1



      I'm hoping for some insight into an issue I am having. I am trying to create a series of buttons, one that sends you to another frame, that has a new button, which then sends you to a third frame. When I say buttons, in reality I am just using AS3 event handlers on movie clip symbols, so they act like buttons.


      When I just have a handler for the first button with the code, and run the file, it works without fail.


      button1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);


      function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void






      But if I add a second movie Clip with a different instance name, and add the action


      button2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);



      function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void





      I get the error on runtime "1120: Access of undefined properties button2".


      I'm not sure when when I effectively duplicate the frames, change the instance name and function name, this does not run. Any insight would be wonderful.


      Thank you!