3 Replies Latest reply on Jun 23, 2009 9:32 AM by Ned Murphy

    Issue with duplicated button Flash CS4...help!

    cmoadobe Level 1

      I am relatively new to Flash...I am trying to figure this out.

       

      I have button1_btn on a frame in the beginning of this animation, and on that frame I script it:

       

       

      button1_btn.addEventListener(MouseEvent.CLICK, showimage1);

      function showimage1(event:MouseEvent):void {

      gotoAndPlay("image1");

      }

       

       

      It works great, but I also have other buttons that eventually take a different frame where that button isn't on.  So I add it to the stage in that frame and assume it will gotoAndPlay("image1") again when clicked, but when I test the movie, and click it on the later frame, nothing happens.

       

      I tried maybe adding the original script to that frame as well, but then I test and it says I have duplicated script and doesn't work.

       

      Why does the original script work for that button, no matter where and when it shows up?  It's the same button essentially, no?

       

      Please help!