1 Reply Latest reply on Oct 2, 2008 8:09 PM by Newsgroup_User

    Google clicktag question

    mentlity Level 1
      I have a client who needs to have a banner designed with the google click tag activated from an invisible button on the banner. The banner is finished, just have to add the AS to the button and I have 2 questions. The client needs the banner /button when clicked to go to the website of the client. How do I achieve this in the AS as well as the clicktag to work?

      Here is the AS for clicktag
      on (release) {
      if (_root.clickTAG.substr(0,5) == "http:") {
      getURL(clickTAG, "_blank");
      }
      }

      First, in order for clicktag to work do I have to add a url in the first or second line? Or leave it the way it is ?

      second in order to have button click to client's web site do I add another get url command ?

      a bit confused.
        • 1. Re: Google clicktag question
          Level 7
          mentlity,

          > First, in order for clicktag to work do I have to add a
          > url in the first or second line? Or leave it the way it is ?

          The term "clicktag" is an unfortunate one in the Flash world, because it
          gives the impression that clicktags are an actual feature of Flash. In
          reality, the term is nothing more than an arbitrary variable name. That's
          important to know. Some companies call it clicktag, some clickTAG, some
          ClickTag ... it really doesn't matter what the variable's name is (it could
          be pizzaHead!). What matters is that you refer to that variable by the same
          spelling (including capitalization) as used in the HTML file that houses the
          SWF.

          The real feature behind why this works is something called FlashVars,
          which is one of the mechanisms that ushers variables into a SWF from the
          outside (specifically from HTML). You don't have to add a URL to anything
          in your code, because the necessary URL is set as the value of that clickTAG
          variable. The URL is going to be embedded somewhere in your HTML, or it
          might be retrieved by JavaScript and embedded into your HTML dynamically.

          Thanks to FlashVars (an attribute in your <object> and <embed> tags),
          you don't have to worry about the URL. But it's only going to work if the
          value being passed int is also spelled clickTAG.

          > second in order to have button click to client's web site
          > do I add another get url command ?

          If you also want this button to actually go somewhere, in addition to
          triggering whatever URL is in that clickTAG, then yes, you'll add another
          getURL() function. It might look like this.

          on (release) {
          if (_root.clickTAG.substr(0,5) == "http:") {
          getURL(clickTAG);
          }
          getURL(" http://www.someplace.com/", "_blank");
          }

          Note that I took out the "_blank" parameter from the first getURL(),
          because that opens a new browser window. Not sure if you want that to
          happen in the second getURL() or not.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."