3 Replies Latest reply on Jul 13, 2010 4:28 PM by kglad

    Multiple URL within Rotating banner

    orph3n

      I am really stuck here(btw I am quite new to flash). I have a banner that I'm creating, it has 5 images that rotate via motion tweening. I've created an invisibile button (and also attempted to create multiple buttons) so that when you click on a specific image it will bring you to that URL. So far I have only gotten it to work for the final URL. No matter which image I click on, it only brings up that last URL. Any assistance would be very much appreciated. Here is my code:

       

       

       

       

      btn1.addEventListener(MouseEvent.CLICK, buttonClickHandler1);
      function buttonClickHandler1(event:MouseEvent):void {
          navigateToURL(new URLRequest("http://www.google.com"));
      }

       

      btn2.addEventListener(MouseEvent.CLICK, buttonClickHandler2);
      function buttonClickHandler2(event:MouseEvent):void {
          navigateToURL(new URLRequest("http://www.yahoo.com"));

       

      }

       

      btn3.addEventListener(MouseEvent.CLICK, buttonClickHandler3);
      function buttonClickHandler3(event:MouseEvent):void {
          navigateToURL(new URLRequest("http://www.msn.com"));

       

      }

       

      btn4.addEventListener(MouseEvent.CLICK, buttonClickHandler4);
      function buttonClickHandler4(event:MouseEvent):void {
          navigateToURL(new URLRequest("http://www.gmail.com"));

       

      }

       

      btn5.addEventListener(MouseEvent.CLICK, buttonClickHandler5);
      function buttonClickHandler5(event:MouseEvent):void {
          navigateToURL(new URLRequest("http://www.newegg.com"));
      }