5 Replies Latest reply on Jun 7, 2007 6:48 PM by kglad

    clickTAG question

    Mike [ iHeartMedia.239 ]
      I am trying to link a flash banner and enable ad tracking. To do so I am under the impression that you have to add the following clickTAG function Action Script to the banner before publish?

      This is the current code:

      I am placing this code into a button that overlays my entire banner.

      on (release) {
      if(clickTAG.substr(0,4)==" http://www.COMPANY.com") getURL(clickTAG,"_blank");

      Is there any reason the link would not be working??? Appreciate any response in advance.

        • 1. Re: clickTAG question
          hciguy Level 1
          What errors does the compiler throw?
          • 2. Re: clickTAG question
            Mike [ iHeartMedia.239 ] Level 1
            None... the link does not work...

            I am reading something off of the Adobe site that you have to create a button then place this code on the release part of the button...?

            I have created a button on top of the entire banner; selected it; then hit F9; add in the action script from above and nothing... any suggestions?
            • 3. Re: clickTAG question
              hciguy Level 1
              Then I don't know...not sure what clickTAG even is ... lol
              • 4. Re: clickTAG question
                clickTag is how Pointroll and others set links into SWFs through the browser. clickTag is set through flashVars so it exists whenever the SWF is run. To access the value of the clickTag, reference is like _root.clickTag. It's really not that hard, it's just a String that lives at _root. You shouldn't need to change clickTag and test whether you should getURL to it or not, you just should.

                To test it, look into running traces. trace("clickTag: " + _root.clickTag);

                I wouldn't use the substr method on clickTag, though, because it's too specific. Try something like
                if (clickTag.indexOf("COMPANY.com") >= 0) getURL(_root.clickTag);

                For the record, this if Flash--reporting that "the link does not work..." doesn't tell us anything. Do you get a hand cursor? Does it link to the wrong page? Does it link to a blank page? Does it make something else happen? Flash is too multi-faceted for something to simply "not work." HOW does it not work?

                When you run into problems, use your traces and look at similar code that does what you'd like and see where you've gone astray.

                Good luck!
                • 5. Re: clickTAG question
                  kglad Adobe Community Professional & MVP
                  there's sure no reason your link would ever work because that conditional can never resolve to true. use _R_'s suggestion.