Flash Specs

 

Please find detailed below, guidelines to ensure that the delivery of your Adobe Flash advertisements are consistent and fully maximised. They also explain how to use Flash ActionScript to track through rates of your ad. This information is relevant for all sites on AdHub.

Checklist before submitting your ad to AdHub:

  • .gif image of the ad (.gif file)
  • Publish Flash File (.swf file)
  • Adobe Flash File (.fla file) *
  • Click tag embedded within .swf file (refer to the following instructions)
  • Required click-through URL for the ad

 * It is necessary that we have the .fla file in order to ensure the click tag is inserted correctly.

Please note: flash banners have a weight limit of 40kb

Testing

 

AdHub requires at least 3 working days to load and test an ad.
For ads being placed on MySpace however, AdHub requires 7 working days.

Tracking Code

 

In order to track the click-through rate of an Adobe Flash ad it needs to be coded with the ‘clickTag’ tracking code. The clickTag tracking code (outlined below) is attached to the button within the ad. When the user clicks on this button the interaction will be recorded by AdHub and the user will be directed to the URL you supply. The ‘clickTag’ ActionScript is:

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

Please do not cut and paste the above ActionScript as this can lead to errors.
The ‘clickTag’ ActionScript is case sensitive and variations such as ‘clickTAG’ or ‘clicktag’ can not be accurately recorded.
Please do not link directly to the destination URL within the ad as Adhub will not be able to record the click-through rate.
Please note this code will not work correctly if applied to a movie clip and will only work using the getURL ActionScript method.

null

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1. Once you have created a button or link that’s intended to track the clicks, attach the following ActionScript to the button or link.


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

 
 

 

 

2. The file can now be ‘published’, please ensure the .swf is published to version Flash Player 9, or lower.

 

 

 

 

 

 

 

 

 

Flash Actionscript 3 ClickTag Instructions


Please note that we recommend the use of Actionscript 2 for Flash creatives. However, if your creative requires implementation of the clickTag in Actionscript 3, please use the following instructions:

  • In your Flash document create 2 new layers at the very top. Call the top one “ActionScript” and the bottom one “Button”.
  • With the Button-layer selected, draw a rectangle which covers the area you want to respond to the mouseclick.
  • Highlight the rectangle and convert it to a Button symbol (F8 and select the button option)
  • Chose as the fill colour of the rectangle a total transparent colour or shift the keyframe to the “Hit” frame
  • Now return to the scene and name the button instance on stage “clickTagButton”
  • Select frame 1 in the ActionScript layer and open the Actionscript Editor (F9 key)
  • In the Actionscript Editor type the following to create your clickTag:

clickTagButton.addEventListener(MouseEvent.CLICK, onMouseClick);

function onMouseClick(e:MouseEvent):void {
getClickTagURL(LoaderInfo(root.loaderInfo).parameters.clickTag, "_blank");
}

function getClickTagURL(url:String,window:String):void
{
ExternalInterface.call('window.open("' + url + '","' + window + '")');
}


  • Firstly an event handler needs to be setup so that actions can be supported on the button. In the example above, the handler is attached to a MovieClip with instance name "clickTagButton".
  • Secondly a function is set up to retrieve the click URL that has been dynamically embedded using the LoaderInfo property. The click URL is then established as a string.
  • Lastly, the ExternalInterface.call will cause the click action to open in a new window via JavasScript in order to avoid being blocked by Pop-up blocker.

Optimisation

 

Adobe's Flash Player uses a computer's CPU (central processing unit) to handle all animation, masking, and computation contained within a Flash file. If a Flash file requires heavy amounts of mathematical computation for elements such as animation, loops, or timers, it will use a much greater percentage of CPU usage. As a result, the Flash file is forced to compete with other Flash files and other applications for CPU usage, which causes all Flash elements on the page to slow down significantly.

One way to estimate how CPU intensive your Flash file may be is to open "Task Manager" (control+alt+delete) and view the "Performance" tab (if you have other programmes running, use the Processes tab instead) - this gives a graphical estimate of CPU usage.

With Task Manager open, open your swf file in the Flash player - you may see a spike as your Flash file is animating. A small spike of 20-40% is normal; if your CPU Usage jumps up to 50% or more, the Flash file will need revising until it uses less CPU resources. A Flash ad shouldn't consistently use more than 20% on a standard computer (aprox Pentium D 3GHz). Remember, there will almost always be at least 2 other flash ads on the page at the same time competing for resource.

The following add considerably to CPU usage so use them sparingly:

  • math-based animation (animation which is controlled by mathematical-based action script)
  • looping functions that are associated with timers
  • masking and animated masking techniques
  • simultaneous animation tweens
  • bitmaps
  • embedded fonts

 

More Optimisation Tips:

  • preload symbols and images
  • limit the amount of information stored within the first few frames of the flash movie
  • simplify graphical elements
  • group objects wherever possible
  • make use of device fonts and symbol fonts
  • avoid "snowflake syndrome" - a large number of animated elements moving all at once
  • get the intense animations out of the way early and then don't loop back to that portion of the timeline for the remainder of the ad
  • For more information on optimizing Flash files, see this article in the Macromedia Flash Support Centre.

 

If you require further assistance, please contact traffic@adhub.co.nz