After you've created your flash ad, you need
to add clickTag code so that IndustryWeek can
track ad clicks. The code that you insert will
interact with the ad system that's tracking the
clicks. This means that you don't need to modify
the code that you'll be attaching in any way.
Here's the piece of code you'll be adding:
on (release) {
if(_level0.clickTag.substr(0,5) == "http:"){
getURL(_level0.clickTag, "_blank");
}
}
Don’t modify the code in any way, including
adding a URL. If you modify this code, you will
lose any ad tracking capabilities. Supply the
destination URL to IndustryWeek’s ad trafficker (ads@industryweek.com)
when you submit your creative materials.
1. Open your file and save it as Flash 8
Document. This will allow you to add the
on(release) behavior to the invisible button that
will sit on the top-most layer of your movie.
2. After saving your file as a Flash 8
Document, view your file.
3. Go to your timeline (located at the top)
and add a new layer called "clickTag".
4. With your new layer ("clickTag") selected,
drag a new rectangle over the entire stage. The
image below shows the steps to dragging a
rectangle starting from the top left to the bottom
right. The last frame in the image below may vary
depending on the color you have selected in your
color toolbox.
5. Once the rectangle has been created, double
click the box (make sure you include the stroke
around the shape you just created, if there is
one) and go to "Modify" and then "Convert to
Symbol".
6. Name the new symbol "clickTag" and make
sure that radio button labeled "Button" is
selected and click "OK".
7. Once your button has been created, double
click (or right click and select "edit in place")
the button to edit it in place. You will now see
your timeline display the Up, Down, Over, and Hit
frames.
8. Now click once on the "Up" state frame and
then click and drag it over to the "Hit" frame.
9. Once you've completed step 8, go back to
the main stage. You'll now notice that your button
has taken on a blue tint. This tint denotes the
active (aka clickable) area of the movie.
10. Now click on the blue tinted button and
open your Actions panel. To open your Actions
panel, click "Window" in the upper toolbar and
scroll down to Actions.
11. Once your Actions panel is open, make sure
that the blue button on your stage is selected.
Now copy and paste the following clickTag code
into the Actions panel:
on (release) {
if(_level0.clickTag.substr(0,5) == "http:"){
getURL(_level0.clickTag, "_blank");
}
}
12. After adding the code to the button,
export the movie and make sure that ActionScript
version is set to ActionScript 2.0.
If you are still having trouble, you can either
try the steps above again, or try the clickTag
steps for ActionScript 3.0 (listed below).
Here are instructions for inserting the
clickTag code with ActionScript 3.0:
1. Select the button object on the stage that
you wish to use and in the properties panel assign
it an instance name (empty by default)
2. Since you can’t directly apply actionscript
to an object with 3.0, you must select the first
frame of a layer on the main stage (ideally the
layer containing your button) and in the
actionscript panel insert this code, replacing the
variable “myButton” with the button’s instance
name you assigned.
var _url:String = "";
if (LoaderInfo(root.loaderInfo).parameters.clickTag)
{ _url =
LoaderInfo(root.loaderInfo).parameters.clickTag;
myButton.addEventListener(MouseEvent.MOUSE_UP,
handleMouse); }
function handleMouse(event:MouseEvent):void
{ navigateToURL(new URLRequest(_url), "_blank");
}
The first line of code retrieves the http link
from the site the flash is in and creates a URL
variable, the second line executes the last when
the button is clicked on, and the third line
actually sends the browser to the URL variable
created by the first line.