This document explains how to set up a Page Peel ad in ZEDO. It has instructions on modifying the Ad flash file and how to give it to your Advertiser.

Modifying a flash file for ZEDO’s Page Peel

Functions and Syntax for ActionScript 2.0

Expanding the Page Peel

  • The function zzPeelOpen() expands or opens the page peel on load.
  • This function should be placed on the first frame of the flash file.
  • The syntax is
    getURL("javascript:zzPeelOpen();");

Closing the Page Peel

  • The function zzPeelClose() closes the page peel. It should be placed on the last frame of the flash file.
  • The syntax is
    getURL("javascript:zzPeelClose()");
    stop();

Replaying the Page Peel

  • The function required to replay should be placed on the Replay button.
  • The function is
    on (release) {
    getURL("javascript:zzPeelOpen();");
    gotoAndPlay(1);
    }

     

ClickTAG Implementation

In order for ZEDO to track clicks, the clickTAG must be implemented in the flash file used for serving the ad.

on(release) {
 if (clickTAG.substr(0, 4) == "http") {
 getURL(clickTAG, "_blank");
 }
 }

Notes:

  • The above code must NOT contain the destination URL
  • The example shows the target URL opening in a new window “_blank”. If you want the destination URL to open in the same window, replace “_blank” with “_top”.
  • The above code supports tracking of both http and https URLs.

—————–end of instructions for ActionScript 2.0——————-

Functions and Syntax for ActionScript 3.0

Expanding the Page Peel

  • The function zzPeelOpen()expands the ad.
  • This function should be placed on the first frame of the flash file.
  • The syntax is
    import flash.external.ExternalInterface;
    ExternalInterface.call(“zzPeelOpen()”);

Closing and Replaying the Page Peel

The function for closing the Page Peel is zzPeelClose().

Syntax for the close and replay functions is shown below.

Syntax

ExternalInterface.call(“zzPeelClose()”); 
stop(); 
/*Replay Page Peel Function STARTS HERE*/ 
replaybtn.buttonMode = true; 
replaybtn.useHandCursor = true; 
replaybtn.addEventListener(MouseEvent.CLICK, replaypp); 
function replaypp(event:MouseEvent):void( 
ExternalInterface.call(“zzPeelOpen()”); 
gotoAndPlay(1); 
} 
/Replay Page Peel Function ENDS HERE*/

ClickTAG Implementation

In order for ZEDO to track clicks, the clickTAG must be implemented within the flash file used for serving the ad.

 /*ClickTAG STARTS*/
 function clkThrough(mouseEvent:MouseEvent):void {
    var interactiveObj:InteractiveObject = mouseEvent.target as InteractiveObject;
    var li:LoaderInfo = LoaderInfo(interactiveObj.root.loaderInfo);
    var _zzParamString:String = li.parameters.clickTAG;
    if (_zzParamString) {
        if (ExternalInterface.available) {
            try {
                var zzUserAgent:String = ExternalInterface.call('function(){ return navigator.userAgent; }');                
                if (zzUserAgent && zzUserAgent.indexOf("MSIE") >= 0) {
                    ExternalInterface.call('window.open', _zzParamString, '_blank');
                    return;
                }
            } catch (e:Error) {}
        }
        navigateToURL(new URLRequest(_zzParamString), '_blank');
    } 
}
clkbtn.buttonMode = true;
clkbtn.useHandCursor = true;
clkbtn.addEventListener(MouseEvent.CLICK, clkThrough);
 /*ClickTAG ENDS*/

If you have any questions, please have your Publisher or Ad Network contact ZEDO.

 

0 0