Follow

The Ad Builder for Flash offers the following options for working with ActionScript:

Sizmek supports all assets and components that were created with ActionScript 3.0; however when working with ActionScript 3.0, some aspects of the code are treated differently than with ActionScript 2.0.

The following is a list of conditions and special instructions for working with ActionScript 3.0:
  • Sizmek Include File (ebFlashActionsAS3.as)

    On the main timeline, in the first frame of the Flash movie, the ebFlashActions.as file should be replaced with a full path to the required file, as follows:

    • Adding the EB.Init adds extra weight to your ad. It adds 5.90 KB.
    • All formats except for Standard Banners

EBBase.Init(this);

  •  For Standard Banners only
    Adding the EB.Std adds extra weight to your ad. It adds 1.06 KB.

EBStd.Init(this);

  • If you are working with an older version of the MXP, then in the first frame of the Flash movie, the ebFlashActions.as file should be replaced with a full path to the required file, as follows:
    • Windows XP or Vista
      include "/Documents and Settings//Local Settings/Application Data/Adobe///Configuration/Include/ebFlashActionsAS3.as"
    • MAC
      include "HD/Users//Library/Application Support/Adobe///Configuration/Include/ebFlashActionsAS3.as"
      Note: The parameters in angle brackets <> should be replaced with parameters applicable with your operating system and system definitions.
  • API functions
    When working in ActionScript 3.0, the API functions should be written in a frame after the component.
  • You are only required to perform the folloiwng procedure once.

To work with ActionScript 3.0:

  1. Do one of the following:
    • If you do not have the latest version of the Sizmek workshop, click here.
    • If you have already installed the latest version, then open the Flash environment you are using.
  2. Open the Preferences dialog as follows:
    For Windows: Select Edit > Preferences.
    For Macintosh: Select Flash Preferences.
  3. From the left column (Category), select ActionScript.
  4. In the Language area, click ActionScript 3.0 Settings.
  5. In the Source path area, click the plus icon + and double-click the new line (entry) then enter the following path: $(LocalData)/Classes/Eyeblaster ActionScript 3.0 (see the screenshot below for an example)

screen_AS3_settings

  1. Click OK, and OK again.

The Sizmek Workshop offers the following options for working with ActionScript:

 Sizmek external ActionScript files contain functionalities that enable the ad to run correctly and/or enable the use of features such as user polling.

To use the Sizmek ActionScript files, install the updated Sizmek Workshop from the Sizmek homepage and "include" them in your Flash assets.

Note: Shortcuts to the include commands can be accessed from the CustomActions tab in the Actions Panel, under the Sizmek Actions menu.

ebFlashActions.as is an ActionScript file that must be included in the first frame of any Sizmek ad for the ad to work properly. This file enables different Sizmek functionalities like security settings, tracking settings, and so on.

To use the Sizmek ActionScript files:

  1. Install the most updated Sizmek Workshop from the Sizmek homepage.
  2. On the main timeline, in the first frame of the Flash, enter the following ActionScript command:

All ad formats except for Standard Banner:

Note: Adding the EBBase.Init adds extra weight to your ad. It adds 3.47 KB for AS2 and 5.90 KB for AS3.

ActionScript 2.0:

EBBase.Init();

ActionScript 3.0:

EBBase.Init(this);

For Standard Banners only:

Note: Adding the EB.Std adds extra weight to your ad. It adds 0.619 KB for AS2 and 1.06 KB for AS3.

ActionScript 2.0:

EBStd.Init();

ActionScript 3.0:

EBStd.Init(this);

Notes:
- All Flash movies must include the or ebFlashActionsAS3.as ActionScript.
- Shortcuts to the ‘include commands ebFlashActions.as’ can be accessed from the CustomActions tab () in the Action Panel, under the Sizmek Actions menu.

 To tell the Flash banner where it should link to use clickTAG.

clickTAG is a click tracking method for rich media banners in Flash. It works by tracking the code that is assigned to an individual ad by the ad serving network. The clickTAG allows the network to register where the ad was displayed when it was clicked. The clickthrough data is then reported back to the ad server to determine the effectiveness of the campaign.

If you want to create a clickTAG in Flash, you need to insert a transparent button into the top-most layer of your Flash banner. Then you assign the button an action with some special ActionScript code that is designed to accept a click-tracking redirect URL as a parameter. Your button then uses that redirect URL as its link rather than having a direct link embedded inside the code.

For more information about how to implement clickTAGs, see flashclickTAG.

Best Practices

  • It is recommended to enter the code for the clickTAG inside a button.

To add clickTAG code to your ad:

  1. Open a new Flash document.
  2. Add the following line to the first frame of the main timeline:

Note: Adding the EB.Init adds 3.47 KB and adding the EB.Std.Init adds 0.619 KB. 

 AS2
 EBBase.Init();  

or

 for Standard Banners only
 EBStd.Init();

Note: Adding the EB.Init(this) adds 5.90 KB and adding the EB.Std(this) adds 1.06 KB.

 AS3
 EBBase.Init(this);

or

 for Standard Banners only
 EBStd.Init(this);

To add the code in the action frame, enter the following:

 AS3
 

instanceName.onRelease = function(){

if(_root.clickTag) {

getURL(_root.clickTag ,_root.clickTARGET);

}

}

To add the code in a button, enter the following code:

 AS2 and AS3
 

on(release){

if(_root.clickTag) {

getURL(_root.clickTag ,_root.clickTARGET);

}

 

 

Enter the following code:

AS3
 

instanceName.addEventListener(MouseEvent.CLICK,eventHandler)

function eventHandler (event:MouseEvent){

if(EB.clickTAG) {

flash.net.navigateToURL(new URLRequest(EB.clickTAG), EB.clickTARGET);

}

}

 

The following notes are relevant for AS3 ONLY

Notes:

  • Instead of EB.clickTAG/EB.clickTag, you can use the following: root.loaderInfo.parameters.clickTAG/ root.loaderInfo.parameters.clickTag.
  • Instead of EB.clickTARGET, you can use the following: root.loaderInfo.parameters.clickTARGET.

You can create multiple clickTAGs when you want to have multiple clickthroughs in your ad. You do not need to create the clickthroughs via the Sizmek Workshop rather you can call the Flash variable clickTAG instead. For more information about clickTAGs see, flashclickTAG.

Once you upload your Flash asset to the Sizmek MDX platform, Sizmek recognizes the multiple clickTAGs and converts them to clickthroughs. The display name will be the same as the name you defined in Flash.

You can create up to ten enumerated clickTAGs.

Note: Multiple clickthroughs are only supported by Enhanced Standard Banners.

To create multiple clickTAGs:

  1. Open a new Flash document.
  2. Add the following line to the first frame of the main timeline:

Note: Adding the EB.Init adds 3.47 KB and adding the EB.Std.Init adds 0.619 KB.

 AS2

EBBase.Init();

or

 For Standard Banners only

EBStd.Init();

Note: Adding the EB.Init(this) adds 5.90 KB and adding the EB.Std(this) adds 1.06 KB.

 AS3

EBBase.Init(this);

or

 for Standard Banners only

EBStd.Init(this);

In your Actions panel enter the following code:

 

 AS2

on(release)

{

 

                if(_root.clickTag5)

                {

                                getURL(_root.clickTag5 ,_root.clickTARGET);

                }

                               

}

 

 AS3

b1.addEventListener(MouseEvent.CLICK, ct1);

 

function ct1(e:MouseEvent):void

{

navigateToURL(new URLRequest(this.root.loaderInfo.parameters.clickTag1),"_blank");

}

 

Repeat the same for all the clickTAGs you are defining. For example, clickTAG1, clickTAG2, clickTAG3, etc.

This process describes how to create a print button in your ad that enables you to print directly from your ad. You can also add a custom interaction to track the number of times the print option was used.

To print from an ad:

  1. Select a frame that contains the area to be printed.
  2. Enter a "#p" label in the frame properties, to make it printable.
  3. Create a print button that triggers the following action:

 

print("Target","bframe");

Where Target is the instance name of a movie clip.

 

printNum(level,"bframe");

 

Where level is the level in Flash where the printable frames are.

Note: Add an Expandable Banner tracking method (EB.Clickthrough) to track the number of times the print option was used.

You can find more information on printing functionality in Flash here.

Was this article helpful?
1 out of 2 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Harley

    Hi guys,

    Can we please remove mention if this type of click tag below - MDX doesn't recognise clicks from the interaction monitor using this, and the creative is rejected by media agencies. Media agencies then can't tell the difference between an ad which is missing a click tag and one using an industry standard (non sizmek) click tag. Also creates confusion since we're always mentioning that people should use EBBase.Clickthrough(); etc.

    Just had a debate with a client because they complied a spec doc based on this page.

    on(release){

    if(_root.clickTag) {

    getURL(_root.clickTag ,_root.clickTARGET);

    }

    }