1 Reply Latest reply on Apr 11, 2012 7:53 AM by Ned Murphy

    Conditional click in Flash

    Иван Бишевац Level 1

      I have two images (symbols) on the Stage. First image is from 1st frame to 144th frame, second image is from 145th to 288th frame. If I click on the animation while first image is displayed I want it to take me for ex. to http://www.adobe.com, else while second image is displayed on animation I want it to lead me to http://www.google.com.

      Is this possible? Is there any tutorial or some other material to learn from?


      P.S. I am using Flash CS 5.5

        • 1. Re: Conditional click in Flash
          Ned Murphy Adobe Community Professional & MVP

          You can start by searching Google using terms like "AS3 navigateToURL tutorial".  What you need to do is have the symbols be movieclips (or buttons or sprite symbols) so that you can name them and then assign code to them. 


          For instance, if you named your first symbol on the stage in frame as "btn1", then the AS3 code for it in frame 1 could be...


          btn1.addEventListener(MouseEvent.CLICK, gotoURL1);


          function gotoURL1(evt:MouseEvent):void {

               navigateToURL(new URLRequest("http://www.adobe.com"));


          1 person found this helpful