FlashCanon Flash Platform stuff from Jason Fincanon

ClickTagger

Flash Advertising: Flash Platform Development of Microsites, Advergames and Branded Applications

Pre-order Flash Advertising on Amazon!

*Changelog and download link are at the bottom of this page*

ClickTagger is an ActionScript 3 class that I've written for my upcoming book and it was primarily built to solve for the case sensitivity issue that Flash developers may run into when using the clickTag variable in their banners. Without a current standard in place for ad serving companies, some use clickTag while others use clickTAG and still others use ClickTag or even clicktag. In ActionScript 2 this wasn't/isn't an issue, but as soon as a Flash developer or agency starts creating banners with AS3 they may very quickly encounter the problem by having their ads kicked back for not working correctly.

While writing ClickTagger, I decided to add a bit of functionality to it to allow the developer to not only assign the clickTags to the proper interactive elements, but to assign a fallback url as well. The fallback url works for local testing from the Flash IDE (where clickTags aren't passed in) and is also used in the unfortunate event that there's a problem loading the clickTags at run time. If the clickTags fail to load, at least the user will still be taken to the url you provide.

One more small piece to ClickTagger is the targetWindow property which can be used to set the window in which the destination url will launch. The targetWindow property is defaulted to "_blank".

To instantiate ClickTagger, there is a single required parameter of type LoaderInfo.

Actionscript:
  1. var clickTagger:ClickTagger = new ClickTagger(stage.loaderInfo);

To assign a clickTag to an interactive element, call the assignClickTag method and pass it three parameters: The clickable element (required), the fallback url (required) and the clickTag number (optional).

Actionscript:
  1. clickTagger.assignClickTag(button1,fallback1,1);

Here's an example that assumes you have three buttons named button1, button2, and button3.

Actionscript:
  1. import com.jasonfincanon.utils.ClickTagger;
  2.  
  3. var fallback1:String = "http://www.jasonfincanon.com";
  4. var fallback2:String = "http://www.flashinyourface.com";
  5. var fallback3:String = "http://www.adobe.com";
  6.  
  7. var clickTagger:ClickTagger = new ClickTagger(stage.loaderInfo);
  8. clickTagger.assignClickTag(button1,fallback1,1);
  9. clickTagger.assignClickTag(button2,fallback2,2);
  10. clickTagger.assignClickTag(button3,fallback3,3);

I hope this helps you in your Flash advertising development and please don't hesitate to let me know if you come across any bugs.

*Changelog*

  • 02-14-2010
    - Added a security check for "http://" or "https://" in the clicktag if the swf is being viewed in a browser. If the security test fails, the fallback url is used.
  • 04-13-2010
    - Changed _clickObjects type to Array instead of Vector due to Vector not being available in Flash Player versions less than 10.

*Download ClickTagger here*

*Download a ClickTagger Example here*


Comments (12) Trackbacks (0)
  1. Very nice class, now if only 3rd party tracking will allow player 9.

  2. Thanks Bodie! It’s too bad that they lag behind like they do, but I think there are a few here and there that can be convinced if asked. Hopefully the number of them will start to increase soon.

  3. Thanks for this! It s about time we start using the privileges of AS3 in the banner campaign field.

  4. Just a little thanks, really useful

  5. Dimitree and WCrook,
    You’re very welcome and thank YOU for visiting and using ClickTagger! :)

  6. Thanks for the useful ClickTag example for Actionscript 3! I look forward to reviewing the book.

    By any chance, do you have an Actionscript 2 example that would work with Google and DoubleClick? I did not see one in your earlier book. I think the contrast would be especially nice to highlight the new features.

  7. Hi Kurt.
    You’re welcome for the AS3 ClickTag example and thank you for checking it out.
    You are correct that I didn’t include anything like ClickTagger in the first book and since the second book is AS3, I haven’t built it in AS2 yet.

  8. Great script. Anyone know if this works in Euro, Latin, and Asian markets?

  9. Hey Ryan. Thanks.
    Great question! I’d also be interested in hearing the answer if anyone finds it.

  10. when i put the script on the timeline (frame 1) it worked like a charm, but when I tried using the document class it didn’t go to the url. did I do something wrong?

  11. Hi Lucas. Thanks for checking out ClickTagger!
    I put together a quick example of using it in a document class and added a link to it above. Look for the new link just below “Download ClickTagger Here”

    Hope that helps! :)

  12. Awesome!!! Well thought out clickTag code. I like it…although I work for a rather large advertising agency whom like to see testing results before pushing any creatives into traffic.

    The QA/QC department use this checker: http://www.adopstools.com/?section=links&page=tools
    A this time it appears as if it doesn’t check for clickTags in AS3 units.

    Is there another checker that you might know of, or would recommend, which will be able to handle the clicktag checking interactivity?

    Currently this agency doesn’t do anything outside of the realm of AS2. I do not what to disclose the agency name…but the development of programming standards with AS2 or AS3 is far behind what I would consider NORMAL for this size of agency. Coding juse seems to be a hodge-podge, based entirely on the different individuals whom currently work there and each of THEIR best practices based upon THEIR experience level.

    Trials and tribulations with working with a large agency i guess. I think that one of the reasons that this agency HAD NOT made the AS2/AS3 switch is that there seems to be a large GRAY cloud over the area of programming for clickTags and not wanting to take the chance on having a full set of banners come back, because something was wrong with that programming.

    I am implementing your class file into a set of banners….I am keeping my fingers crossed that there isn’t any issues. As far as i know…these creatives mainly targeting US territories (mainly English speaking demographic).


Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Trackbacks are disabled.