0 Replies Latest reply on May 11, 2007 3:59 AM by Seddon

    Button code problems

    Seddon
      Running CS3. Have menu system with buttons. Click button and it take you to a frame with a label. This I can do but when you click on a button twice the movie goes to the wrong frame.

      Here's my code:

      function homepage(event:MouseEvent):void {
      gotoAndPlay("home");
      }
      function woodpage(event:MouseEvent):void {
      gotoAndPlay("wood");
      }
      function carpetspage(event:MouseEvent):void {
      gotoAndPlay("carpets");
      }
      homebtn.addEventListener(MouseEvent.CLICK, homepage);
      woodbtn.addEventListener(MouseEvent.CLICK, woodpage);
      carpetsbtn.addEventListener(MouseEvent.CLICK, carpetspage);
      stop();

      If I click home twice it goes to wood, if I click wood twice it goes to carpets!

      Whats wrong with the code?