3 Replies Latest reply on Jan 21, 2011 5:48 AM by Lee Burrows

    Clicktag noob question

    serberfjes

      Hi! My client told me that they need a click tag on their flash banner in order for it to work in their system.

       

      Im working in AS2, and like my client asked, I publish for flash player 8.

       

      They gave me this example code:

       

       

      on (release) {
      getURL (clickTAG, “_blank”);
      }

      Is this AS2 or 3? Or will it work in both? I put their example code

       

       

       

      button1.onRlelease = function(){

       

           getURL (clickTAG, "http://www.purerush.no/");

       

      }

       

      I tried putting this code in the timeline, I get no compiler errors. I get a mouseover pointer when I run the swf, but nothing happens when I click. Why?

        • 1. Re: Clicktag noob question
          robdillon Most Valuable Participant

          Both of these examples are AS2, they are just different ways to say the same thing. In the first case:

           

          on (release) {
          getURL (clickTAG, “_blank”);
          }
          clickTAG would be a variable that holds the actual url that you want to open. So clickTAG needs to be defined somewhere.
          In the second case:

          button1.onRlelease = function(){

               getURL (clickTAG, "http://www.purerush.no/");

          }

           

          there are several problems. The action onRelease is misspelled. The syntax for getURL looks to be incorrect. The action should be written like this:

          getURL(url [, window [, "variables"]])
          
          
          

          if you have a variable named clickTAG, as in the first case, then that will hold the url that will be used. The second argument, is a url. This should be the name of a target window to be used to hold the new url's content. The first case shows "_blank" as the target window.

          • 2. Re: Clicktag noob question
            serberfjes Level 1

            Thanks.

             

            Turned out all I needed was this:

             

             

            knappUno.onRelease = function(){

             

                getURL(clickTAG, "_blank");

             


            }

             

             

            Apparently the _blank thing has some kind of smart behavior that is detected on the clients server. I don't know.

            • 3. Re: Clicktag noob question
              Lee Burrows Level 4

              hi

               

              "_blank" means open link in a new browser window

              1 person found this helpful