How to Add a Clicktag to a Flash Ad


ClickTags in ActionScript 2.0

ClickTags should be easy... but they are not so simple. Firstly, because some ads built for polite loading require a parent swf that loads a child swf, we must access the clicktag value through "_level0" and not "_root" in AS2. Also, some vendors who shall remain nameless but not shameless, refuse to use "clickTag" and prefer "clickTAG." Why? I have no idea. "TAG" does not stand for anything like "XML." Whenever we use "XML" in the naming of a function or variable, we capitalize, but not "TAG", that's senseless. And since Flash is case-sensitive, we can not ignore this difference. So we must check for both if we want a universal function to handle everything.

Another common question is whether to place it above everything or below everything on the stage. In AS2, a button on top of other buttons may intercept the click/rollover action intended for the button below it. We don't want to obscure any funky mouseover states, such as call-to-action rollovers, by laying a big invisible button over the movie. Though not all ads have interactive elements, it makes sense to layer the catch-all clicktag behind other elements in case interactivity is needed. Some clicktag tutorials suggest putting it on top for simplicity’s sake. Ignore this. This is done to avoid having to explain that the clicktag action also needs to be on those other buttons in the movie - or clicking on them will do nothing. Mouseover states are important to user feedback.

The last thing to consider is how to properly create an invisible button. This has nothing to do with "_alpha." Simply create a button and place the hit area block in the "hit" frame (frame 4) of the button. Leave the rest of the frames blank. The movieclip will appear blue on the screen. The reason using this over _alpha is important because using _alpha=0 will force Flash to render those pixels over your animation. Rendering _alpha channels should be avoided if necessary as it requires processor power.

ClickTags in ActionScript 3.0

AS3 is another monster entirely. Anyone's who broke into programming with AS2 will see AS3 as fairly daunting. It's ugly. It requires many lines more text to get simple things done. And every turn requires a class of some sort or another. Let's face it, the good ol' days of slash and burn programming with AS2 are over. It's not a bad thing. More like migrating from pitchforks to laser scapuls. We just need a steadier hand. In AS3 we don't have _global, _root, or _level0. We have to use "root.loaderInfo" to access FlashVars. I won't include here how to pass variables to an AS3 child movie because it's a bit of a bugger. But check this aritcle out if you're curious. You'll also have problems with other movieclips intercepting mouse events through various layers. There may be cause to use AS3's "mouseEnabled" and "mouseChildren" properties to set this straight. I'll save this for another article. Very few ads are ever done in AS3. Mainly because of habit. Anyone who dares site Flash Player penetration and the reason hasn't seen recent numbers: 98%-99% in the developed world. Not for Player 10 mind you.

Below is the code for AS2 and AS3.

Articles & Tutorials


How to Shimmer Water (Water Ripple Effect)


The classic water ripple effect, when used sparingly, can create waves with a dead calm banner design... more»

Making Images in TextFields Clickable


When loading html into TextField, <img> tags can act strange. Using a few tricks, these images can be treated like normal MovieClips... more»
 

Interactive Resources


The fastest poker hands evaluator ever


Few months ago I've been working in a project where I had to validate poker hands (based on 5 cards) and also calculate ... more»


Two Minute Introduction to the Flint Particle System library


The Flint Particle System Actionscript library for Flash and Flex is an easy and powerful way of animating large groups... more»


Amethyst Professional - The Flash Platform IDE for Visual Studio


Hartland, UK - August 26, 2010 - SapphireSteel Software, http://www.sapphiresteel.com, specialists in development enviro... more»


Weaverant Content Management System made for Adobe Flash developers Beta Announced


Weaverant™ is a Content Management System made for Adobe Flash developers and their clients.... more»


Adobe announces 2010 Layer Tennis design tournament


Adobe today announced that the 2010 Layer Tennis design tournament will kick off this Friday, August 20, at 2 p.m. Easte... more»
 

Business & The Internet


Should We Still Use Flash?


This is a fair question, but you probably should be less concerned about what you want and more focused on what your customers want. And that 'thing' is not necessarily Flash... more»

Clicktags in AS 2.0 and AS 3.0


ClickTags should be easy... but they are not so simple. Firstly, because some ads built for polite loading require a parent swf... more»
 
Responses:
Dnhkysqs | June 2, 2010 4:52 pm
I love this site hot preteen girls get done :-DD the robbery pthc 0536 illegal verry young virgin bbs preteen bear hug aovvo underage models naked galleries 946 nymphet legal 8-((( preteen lingerie supermodels :-OOO nonnudepreteen models :O pthc interchat 362155 blonde nymphets 82439 nymph girls little kzo preteen pussy pics com dblma preteen galleries samples 8D kds pthc list =OOO nymphets tgp girls 07903 nymphet pussy cp dwu cute preteen naked girls 75908 pthc paysite cp ekhhp tiny preteen model calendar 6236 hot underage nude pitures jfkigz preteen girls jap ntduqc model preteen pantie =-] underage teen girl xxx :-[ pre teens cuties kids bwu preteens bikini models 8008 forever models elite nymphets lhf galerie little nymphet nudes =-( dark preteens 79215 underage cuties non nude kvb preteen non nude pussy =PP free pictures of preteen girls in panties nha pthc model toplist :-(( preteen model nonude gallories 958895 jenny pthc search :-[[ free almost nude preteens 952106 preteen princess model 8084 preteen movie sample iax tiny preteen non nude modeling photos :-( preteens on panty %-P ukrainian nymphets masha hnt sexy preteen cartoon 3d girls pulwbn preteens models photo image 181246 preteen bbs pic gallery 758514 shocking photos pre teen girls vyztp free preteen pusy pics wbismo forever models elite nymphets %D nymphet girl panty 435 nymph young nude srnse nude preteen girls videos >:-DD nude preteen girlz 487 preteen nude top incest 785105

Enter Your Comments Below:
Enter Your Name:
Comments:
Security Question: What is 4 minus 0?