Section 1
//BGclick_4 (960x250_main_fla.BGclick_4)
package 960x250_main_fla {
import flash.display.*;
import flash.events.*;
import com.doubleclick.studio.*;
public dynamic class BGclick_4 extends MovieClip {
public var white_bg_btn:SimpleButton;
public function BGclick_4(){
addFrameScript(0, frame1);
}
function frame1(){
white_bg_btn.addEventListener(MouseEvent.CLICK, on_white_bg_click);
white_bg_btn.useHandCursor = false;
}
public function on_white_bg_click(_arg1:Event){
Enabler.exit("Background Clickthrough");
}
}
}//package 960x250_main_fla
Section 2
//MainTimeline (960x250_main_fla.MainTimeline)
package 960x250_main_fla {
import flash.display.*;
import flash.net.*;
import com.doubleclick.studio.events.*;
import com.doubleclick.studio.*;
import com.doubleclick.studio.display.*;
public dynamic class MainTimeline extends MovieClip {
public var white_bg_btn:SimpleButton;
public var polite_bg_mc:MovieClip;
public var s:StudioLoader;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
Enabler.init(stage);
Enabler.addEventListener(StudioEvent.ON_PAGE_LOADED, pageLoadHandler);
s = new StudioLoader();
this.addChild(s);
}
public function pageLoadHandler(_arg1:StudioEvent):void{
s.load(new URLRequest("960x250.swf"));
}
}
}//package 960x250_main_fla
Section 3
//NewLoad_2 (960x250_main_fla.NewLoad_2)
package 960x250_main_fla {
import flash.display.*;
public dynamic class NewLoad_2 extends MovieClip {
public var rating:MovieClip;
}
}//package 960x250_main_fla
Section 4
//StudioLoader (com.doubleclick.studio.display.StudioLoader)
package com.doubleclick.studio.display {
import flash.display.*;
import flash.net.*;
import flash.system.*;
import com.doubleclick.studio.utils.*;
public class StudioLoader extends Loader {
private function getEnabler():Class{
var _local1:Class;
_local1 = StudioClassAccessor.getClass(StudioClassAccessor.CLASS_ENABLER);
if (_local1 != null){
return (_local1);
};
_local1 = StudioClassAccessor.getClass(StudioClassAccessor.CLASS_F2F_ENABLER);
if (_local1 != null){
return (_local1);
};
return (StudioClassAccessor.getClass(StudioClassAccessor.CLASS_ENABLER_PROXY));
}
override public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{
var request = _arg1;
var context = _arg2;
if (getEnabler() != null){
request.url = getEnabler().getFilename(request.url);
};
try {
super.load(request, new LoaderContext(false, new ApplicationDomain(ApplicationDomain.currentDomain), SecurityDomain.currentDomain));
} catch(e:Error) {
super.load(request, new LoaderContext(false, new ApplicationDomain(ApplicationDomain.currentDomain)));
};
}
}
}//package com.doubleclick.studio.display
Section 5
//StudioEvent (com.doubleclick.studio.events.StudioEvent)
package com.doubleclick.studio.events {
import flash.events.*;
import flash.utils.*;
public dynamic class StudioEvent extends Event {
public var timeElapsed:int;
public static const ON_VIDEO_CUE_POINT:String = "onCuePoint";
public static const ON_EXPAND:String = "onExpand";
public static const ON_STAGE_MOUSE_OUT:String = "onStageMouseOut";
public static const LOCAL_SEARCH_CLICK:String = "localSearchClick";
public static const ON_CONTEXTUAL_DISCOVERY:String = "onContextualDiscovery";
public static const ON_DATA:String = "onData";
public static const ON_CUSTOM_EVENT:String = "onCustomEvent";
public static const ON_COLLAPSE:String = "onCollapse";
public static const ON_REPORT_EVENT:String = "onReportEvent";
public static const MAP_INITIALIZE_FAILED:String = "mapInitializeFailed";
public static const ON_VIDEO_PAUSE:String = "onVideoPause";
public static const ON_VIDEO_LOAD_FAIL:String = "onVideoLoadFail";
public static const ON_VIDEO_LOOPS_COMPLETE:String = "VideoLoopsComplete";
public static const ON_VIDEO_NETCONNECT_SUCCESS:String = "onConnectSuccess";
public static const ON_VIDEO_UNPAUSE:String = "onVideoUnpause";
public static const ON_INTERACTION_MOUSE_OVER:String = "onInteractionMouseOver";
public static const ON_VIDEO_SEEK_BACKWARDS:String = "onVideoSeekBackwards";
public static const ON_VIDEO_BUFFERED:String = "onVideoBuffered";
public static const ON_VIDEO_MIDPOINT:String = "onVideoMidpoint";
public static const ON_NETSTREAM_READY:String = "NetStreamReady";
public static const ON_MOVIE_LOADER_INIT:String = "onMovieLoaderInit";
public static const ON_VIDEO_LOAD_COMPLETE:String = "onLoadComplete";
public static const ON_VIDEO_REPLAY:String = "onVideoReplay";
public static const ON_FULLSCREEN:String = "onFullScreen";
public static const ON_REPORT_FLUSH_EVENT:String = "onFlushReportedEvents";
public static const ON_VIDEO_SHUTDOWN:String = "onVideoShutdown";
public static const ON_STAGE_MOUSE_OVER:String = "onStageMouseOver";
public static const ERROR_LOADING_LOCATIONS:String = "errorLoadingLocations";
public static const ON_VIDEO_STREAM_NOT_FOUND:String = "onStreamNotFound";
public static const ON_VIDEO_NETCONNECT_FAILED:String = "onConnectFailed";
public static const ON_VIDEO_STOP:String = "onVideoStop";
public static const ON_FULLSCREEN_RETURN:String = "onFullScreenReturn";
public static const ON_PAGE_LOADED:String = "onPageLoaded";
public static const ON_VIDEO_MUTE:String = "onVideoMute";
public static const ON_TIMEOUT:String = "onTimeout";
public static const ERROR_RESOLVING_USER_LOCATION:String = "errorResolvingUserLocation";
public static const ON_VIDEO_STREAM_VERIFIED:String = "onStreamVerified";
public static const ON_DISCOVERY_FAIL:String = "onDiscoveryFail";
public static const ON_CONNECT:String = "onConnect";
public static const ON_MOVIE_LOADER_COMPLETE:String = "onMovieLoaderComplete";
public static const ON_DYNAMIC_STATUS:String = "onDynamicStatus";
public static const ON_VIDEO_METADATA:String = "onMetaData";
public static const ON_VIDEO_UNMUTE:String = "onVideoUnmute";
public static const ON_VIDEO_PLAY:String = "onVideoPlay";
public static const ON_VIDEO_COMPLETE:String = "onVideoComplete";
public static const ON_EXIT:String = "onExit";
public function StudioEvent(_arg1:String){
super(_arg1, false, false);
timeElapsed = getTimer();
}
override public function clone():Event{
var _local1:StudioEvent;
var _local2:String;
_local1 = new StudioEvent(type);
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
_local1["timeElapsed"] = timeElapsed;
return (_local1);
}
}
}//package com.doubleclick.studio.events
Section 6
//TraceLocalizer (com.doubleclick.studio.localization.TraceLocalizer)
package com.doubleclick.studio.localization {
import flash.net.*;
public class TraceLocalizer {
private static var cachedData:Object;
private static var forceAlwaysShowTokens:Boolean = false;
private static var localData:SharedObject;
private static var TRANSLATIONS_FILE:String = "StudioTraceTranslations";
private static var TRANSLATION_MANAGER:String = "StudioTranslationManager";
public static function getMessage(_arg1:String):String{
var _local2:String;
if (alwaysShowTokens()){
return (_arg1);
};
if (cachedData == null){
setDataObject(TRANSLATIONS_FILE);
if (((((!((localData == null))) && (!((localData.data == null))))) && (!((localData.data.translations == null))))){
cachedData = localData.data.translations;
} else {
return (_arg1);
};
};
_local2 = cachedData[_arg1.toUpperCase()];
if (_local2 != null){
return (_local2);
};
return (_arg1);
}
private static function alwaysShowTokens():Boolean{
if (forceAlwaysShowTokens){
return (true);
};
setDataObject(TRANSLATION_MANAGER);
if (((!((localData.data.showTranslationTokens == null))) && ((localData.data.showTranslationTokens == true)))){
return (true);
};
return (false);
}
private static function setDataObject(_arg1:String):void{
var SharedObjectFile = _arg1;
try {
localData = SharedObject.getLocal(SharedObjectFile, "/");
} catch(error:Error) {
};
}
public static function setForceAlwaysShowTokens(_arg1:Boolean):void{
forceAlwaysShowTokens = _arg1;
}
}
}//package com.doubleclick.studio.localization
Section 7
//Logger (com.doubleclick.studio.utils.Logger)
package com.doubleclick.studio.utils {
import flash.utils.*;
import com.doubleclick.studio.localization.*;
public class Logger {
public static const WARN:int = -1;
public static const INFO:int = 1;
public static const DEBUG:int = 2147483647;
public static const NONE:int = 0;
public static const EVENTS:int = 2;
private static var loggingLevel:int = 1;
public static function log(_arg1:int, _arg2:String):void{
var _local3:String;
_local3 = getLogTime();
if (TraceLocalizer.getMessage(_arg2) != null){
_arg2 = TraceLocalizer.getMessage(_arg2);
};
if (_arg1 == DEBUG){
_local3 = (_local3 + "[DEBUG] ");
};
_local3 = (_local3 + _arg2);
if (loggingLevel >= _arg1){
trace(_local3);
};
}
public static function setLogLevel(_arg1:Number):void{
loggingLevel = _arg1;
}
private static function getLogTime():String{
var _local1:String;
_local1 = ((Math.round((getTimer() / 10)) / 100) + "");
if (_local1.indexOf(".") == -1){
_local1 = (_local1 + ".");
};
while (_local1.length < 4) {
_local1 = (_local1 + "0");
};
return ((("[" + _local1) + "] "));
}
}
}//package com.doubleclick.studio.utils
Section 8
//StudioClassAccessor (com.doubleclick.studio.utils.StudioClassAccessor)
package com.doubleclick.studio.utils {
import flash.system.*;
public class StudioClassAccessor {
public static const CLASS_EXPANDING:String = "com.doubleclick.studio.expanding.ExpandingComponent";
public static const CLASS_F2F_ENABLER:String = "com.doubleclick.studio.flash.Enabler";
public static const CLASS_ENABLER:String = "com.doubleclick.studio.Enabler";
public static const CLASS_F2F_ENABLER_PROXY:String = "com.doubleclick.studio.flash.proxy.Enabler";
public static const CLASS_ENABLER_PROXY:String = "com.doubleclick.studio.proxy.Enabler";
public function StudioClassAccessor(){
throw (new Error("StudioClassAccessor should never be constructed."));
}
public static function getAbsoluteClass(_arg1:String):Class{
var runTimeClass:Class;
var fullPackageName = _arg1;
try {
runTimeClass = Class(ApplicationDomain.currentDomain.getDefinition(fullPackageName));
return (runTimeClass);
} catch(e:ReferenceError) {
};
return (null);
}
public static function getClass(_arg1:String):Class{
return (getAbsoluteClass(_arg1));
}
}
}//package com.doubleclick.studio.utils
Section 9
//Enabler (com.doubleclick.studio.Enabler)
package com.doubleclick.studio {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
import com.doubleclick.studio.events.*;
import com.doubleclick.studio.utils.*;
import flash.external.*;
public final class Enabler {
private static const DELIM:String = "#mtf#";
private static var enablerCore:EnablerCore = new EnablerCore(StudioClassAccessor.CLASS_ENABLER);
private static var preFsAlign:String;
public static var componentVersion:String = "1.5.12";
private static var preFsScaleMode:String;
private static var assetName:String;
private static var flashObjId:String;
private static var User:Object = {};
private static var fsCommandQueue:Array = [];
private static function getSerializedCommand(_arg1:Object):String{
return (((escape(_arg1.command) + "=") + escape(_arg1.params)));
}
public static function reportCustomClickVariable(_arg1:String):void{
enablerCore.reportCustomVariable(_arg1);
reportCustomVariableImpl(_arg1, 2);
}
public static function logMetEvent(_arg1:String, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:String;
enablerCore.logMetEvent(_arg1, _arg2, _arg3, _arg4);
_local5 = ((((((((_arg1 + DELIM) + escape(_arg2)) + DELIM) + flashObjId) + DELIM) + _arg3) + DELIM) + _arg4);
invokeGlobalTemplateFunction("logEvent", _local5);
}
public static function closeCompanion():void{
invokeGlobalTemplateFunction("tellCompanionAssetHide", assetName);
}
public static function getUserDMACode():String{
return (enablerCore.getUserDMACode());
}
private static function checkCommandQueues():void{
if (fsCommandQueue.length > 0){
flushFsCommandQueue();
};
}
public static function stopAllVideos():void{
enablerCore.stopAllVideos();
}
public static function getDartSiteName():String{
return (enablerCore.getDartSiteName());
}
public static function getUserAreaCode():String{
return (enablerCore.getUserAreaCode());
}
public static function init(_arg1:Stage):void{
enablerCore.init(_arg1);
}
public static function getDartRenderingId():Number{
return (enablerCore.getDartRenderingId());
}
private static function logMetEventFlushMetEvents(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:Boolean):void{
var _local5:String;
_local5 = ((((((((_arg1 + DELIM) + _arg2) + DELIM) + flashObjId) + DELIM) + _arg3) + DELIM) + _arg4);
invokeGlobalTemplateFunction("logEventFlushCounters", _local5);
}
private static function changeInputVariable(_arg1:String, _arg2:String):void{
switch (_arg1){
case "mtfContinue":
enablerCore.setMtfContinue(_arg2);
break;
case "isMouseOver":
enablerCore.setIsMouseOver(_arg2);
break;
};
}
public static function getDartSiteId():Number{
return (enablerCore.getDartSiteId());
}
public static function exitFullScreen():void{
var _local1:Stage;
_local1 = enablerCore.getStageReference();
if (_local1.displayState == StageDisplayState.FULL_SCREEN){
_local1.displayState = StageDisplayState.NORMAL;
};
}
public static function expand(_arg1:Boolean=false):void{
enablerCore.expand(_arg1);
invokeGlobalTemplateFunction("expandAsset", assetName);
}
public static function getUserCountry():String{
return (enablerCore.getUserCountry());
}
private static function buildExitMap():void{
var _local1:Object;
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Object;
if (enablerCore.parameterExists("exitEvents")){
_local1 = {};
_local2 = getParameter("exitEvents");
_local3 = _local2.split("{DELIM}");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = convertFlashVarStrToObject(_local3[_local4]);
_local1[_local5.name] = _local5;
_local4++;
};
enablerCore.setExitData(_local1);
};
}
private static function reportCustomVariableImpl(_arg1:String, _arg2:int):void{
var _local3:String;
if (_arg1.length > 100){
_arg1 = _arg1.substr(0, 100);
};
_local3 = ((escape(_arg1) + DELIM) + _arg2);
invokeGlobalTemplateFunction("reportCustomVariable", _local3);
}
public static function getStreamingURL(_arg1:String):String{
return (enablerCore.getStreamingURL(_arg1));
}
public static function exit(_arg1:String, _arg2:String=""):void{
enablerCore.exit(_arg1, _arg2);
}
private static function flushFsCommandQueue():void{
var _local1:String;
var _local2:String;
_local1 = "";
_local2 = getSerializedCommand(fsCommandQueue[0]);
while ((((fsCommandQueue.length > 0)) && (((_local1.length + _local2.length) < 990)))) {
if (_local1.length > 0){
_local1 = (_local1 + "&");
};
_local1 = (_local1 + _local2);
fsCommandQueue.shift();
if (fsCommandQueue.length > 0){
_local2 = getSerializedCommand(fsCommandQueue[0]);
} else {
_local2 = undefined;
};
};
fireMultipleCommandString(_local1);
}
private static function convertFlashVarStrToObject(_arg1:String):Object{
var _local2:Object;
var _local3:Array;
var _local4:int;
var _local5:Array;
_local2 = {};
_local3 = _arg1.split(",");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split(":");
_local2[enablerCore.trim(_local5.shift())] = unescape(enablerCore.trim(_local5.join(":")));
_local4++;
};
return (_local2);
}
private static function addExternalCallbacks():void{
if (ExternalInterface.available){
try {
ExternalInterface.addCallback("changeInputVariable", changeInputVariable);
} catch(e:SecurityError) {
};
};
}
public static function getUserZipCode():String{
return (enablerCore.getUserZipCode());
}
public static function logMetEventFlushMetEventsOpenPopup(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String, _arg5:String):void{
var _local6:Object;
var _local7:String;
var _local8:String;
_local6 = enablerCore.getExitData();
if (_local6[_arg2] != undefined){
if (_local6[_arg2].target != "popup"){
_local7 = enablerCore.getExitUrl(_arg2, _arg4);
if (_arg5 != null){
_local7 = (((((!((_local7.indexOf("?") == -1))) && (!((_arg5.charAt(0) == "&"))))) && (!((_local7.charAt((_local7.length - 1)) == "?"))))) ? (_local7 + "&") : _local7;
_local7 = ((((_local7.indexOf("?") == -1)) && ((_arg5.indexOf("?") == -1)))) ? (_local7 + "?") : _local7;
_local7 = (_local7 + _arg5);
};
if (!isRunningLocally()){
if (((ExternalInterface.available) && ((User.browser.toUpperCase() == "IE")))){
ExternalInterface.call("window.open", _local7, _local6[_arg2].target);
} else {
navigateToURL(new URLRequest(_local7), _local6[_arg2].target);
};
};
logMetEventFlushMetEvents("Count", _arg2, true, true);
} else {
_local8 = ((((((((((_arg1 + DELIM) + _arg2) + DELIM) + flashObjId) + DELIM) + _arg3) + DELIM) + _arg4) + DELIM) + _arg5);
invokeGlobalTemplateFunction("logExitFlushEventsOpenPopup", _local8);
};
flushFsCommandQueue();
};
}
public static function startTimer(_arg1:String):void{
enablerCore.startTimer(_arg1);
}
public static function timerCallback():void{
checkCommandQueues();
enablerCore.checkPageLoadTimeout();
}
public static function getDartAdId():Number{
return (enablerCore.getDartAdId());
}
public static function collapse():void{
enablerCore.collapse();
invokeGlobalTemplateFunction("collapseAsset", assetName);
}
public static function setDynamicServeId(_arg1:String):void{
enablerCore.setDynamicServeId(_arg1);
invokeGlobalTemplateFunction("setDynamicServeId", _arg1);
}
public static function invokeJSFunction(_arg1:String, _arg2:String):void{
invokeGlobalTemplateFunction(_arg1, _arg2);
}
public static function muteAllVideos():void{
enablerCore.muteAllVideos();
}
public static function hasUserInteracted():Boolean{
return (enablerCore.hasUserInteracted());
}
public static function isRunningLocally():Boolean{
if (LoaderInfo(enablerCore.getStageReference().loaderInfo).parameters["varName"]){
return (false);
};
return (enablerCore.isRunningLocally());
}
public static function logCustomEvent(_arg1:String, _arg2:String, _arg3:Boolean=false):void{
logMetEvent(_arg1, _arg2, _arg3, true);
}
public static function isInitialized():Boolean{
return (enablerCore.isInitialized());
}
public static function registerVideoComponent(_arg1):void{
enablerCore.registerVideoComponent(_arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
enablerCore.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
private static function attachFullScreenEventListener():void{
var _local1:Stage;
_local1 = enablerCore.getStageReference();
_local1.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler);
}
public static function getUserState():String{
return (enablerCore.getUserState());
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean):void{
enablerCore.removeEventListener(_arg1, _arg2, _arg3);
}
public static function getExpanding():Class{
return (enablerCore.getExpanding());
}
public static function isFlashFullScreenSupported():Boolean{
return ((((getParameter("isFlashFullScreenEnabled") == "true")) || ((getParameter("isFlashFullScreenEnabled") == "1"))));
}
public static function startInteractionTimer():void{
setTimerAdjustment(3, -1000, 0);
}
private static function setTimerAdjustment(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:String;
_local4 = ((((_arg1 + DELIM) + _arg2) + DELIM) + _arg3);
invokeGlobalTemplateFunction("setTimerAdjustment", _local4);
}
public static function reportCustomImpressionVariable(_arg1:String):void{
enablerCore.reportCustomVariable(_arg1);
reportCustomVariableImpl(_arg1, 1);
}
public static function getVideoComponentByName(_arg1:String):Object{
return (enablerCore.getVideoComponentByName(_arg1));
}
public static function logVideoEvent(_arg1:String, _arg2:String, _arg3:String):void{
var _local4:String;
enablerCore.logVideoEvent(_arg1, _arg2, _arg3);
_local4 = ((((_arg1 + DELIM) + escape(_arg2)) + DELIM) + _arg3);
invokeGlobalTemplateFunction("logVideoEvent", _local4);
}
public static function getDomainWhiteList():Array{
return (enablerCore.getDomainWhitelist());
}
public static function getDartPageId():Number{
return (enablerCore.getDartPageId());
}
public static function initEnvironment():void{
var _local1:Stage;
var _local2:Object;
var _local3:String;
_local1 = enablerCore.getStageReference();
_local2 = LoaderInfo(_local1.loaderInfo).parameters;
for (_local3 in _local2) {
setParameter(_local3, _local2[_local3]);
};
if (((enablerCore.parameterExists("scaleMode")) && (!((enablerCore.trim(getParameter("scaleMode")) == ""))))){
_local1.scaleMode = StageScaleMode[enablerCore.stageScaleModeMap[getParameter("scaleMode")]];
};
if (((!(enablerCore.parameterExists("clickN"))) || ((enablerCore.trim(getParameter("clickN")) == "")))){
setParameter("clickN", "1", "Number");
};
if (getParameter("ise") == "true"){
enablerCore.shouldLog = false;
};
enablerCore.allowDomain(getParameter("td"));
addExternalCallbacks();
attachFullScreenEventListener();
User.browser = getParameter("br");
User.OS = getParameter("os");
flashObjId = getParameter("rid");
assetName = getParameter("varName");
enablerCore.startDisplayTimer();
enablerCore.processCDNFiles();
buildExitMap();
invokeGlobalTemplateFunction("conduitInitialized", assetName);
}
private static function invokeGlobalTemplateFunction(_arg1:String, _arg2:String):void{
var _local3:Object;
_local3 = new Object();
_local3.command = _arg1;
_local3.params = _arg2;
fsCommandQueue.push(_local3);
}
public static function setParameter(_arg1:String, _arg2:String, _arg3:String="String"):void{
enablerCore.setParameter(_arg1, _arg2, _arg3);
}
public static function displayCompanion():void{
invokeGlobalTemplateFunction("tellCompanionAssetShow", assetName);
}
public static function launchFullScreen():void{
var _local1:Stage;
if (isFlashFullScreenSupported()){
_local1 = enablerCore.getStageReference();
preFsAlign = _local1.align;
preFsScaleMode = _local1.scaleMode;
_local1.align = StageAlign.TOP_LEFT;
_local1.scaleMode = StageScaleMode.EXACT_FIT;
_local1.displayState = StageDisplayState.FULL_SCREEN;
};
}
private static function fullScreenHandler(_arg1:FullScreenEvent):void{
var _local2:Stage;
if (_arg1.fullScreen){
setParameter("isMouseOverOnFullScreen", "true", "Boolean");
logMetEvent("Count", "EVENT_FULLSCREEN");
enablerCore.dispatchEvent(new StudioEvent(StudioEvent.ON_FULLSCREEN));
} else {
_local2 = enablerCore.getStageReference();
_local2.align = preFsAlign;
_local2.scaleMode = preFsScaleMode;
setParameter("isMouseOverOnFullScreen", "false", "Boolean");
invokeGlobalTemplateFunction("setFocus", assetName);
enablerCore.dispatchEvent(new StudioEvent(StudioEvent.ON_FULLSCREEN_RETURN));
};
}
public static function getUserBandwidth():Number{
return (enablerCore.getUserBandwidth());
}
public static function flushMetEvents():void{
invokeGlobalTemplateFunction("flushCounters", flashObjId);
}
public static function stopTimer(_arg1:String):void{
enablerCore.stopTimer(_arg1);
}
public static function getParameter(_arg1:String){
return (enablerCore.getParameter(_arg1));
}
public static function hasEventListener(_arg1:String):Boolean{
return (enablerCore.hasEventListener(_arg1));
}
private static function fireMultipleCommandString(_arg1:String):void{
var fsCommandHandler:String;
var callString:String;
var multipleCommandString = _arg1;
if (((!((User.browser == null))) && ((((User.browser.toUpperCase() == "FF")) || ((User.browser.toUpperCase() == "SF")))))){
fsCommandHandler = (("FLASH_" + assetName) + "_DoFSCommand");
callString = (((("javascript:" + fsCommandHandler) + "(\"mtfCommands\", \"") + escape(multipleCommandString)) + "\");");
navigateToURL(new URLRequest(callString), "_self");
} else {
try {
fscommand("mtfCommands", multipleCommandString);
} catch(e:SecurityError) {
};
};
}
public static function pageHasLoaded():Boolean{
return (enablerCore.pageHasLoaded());
}
public static function close():void{
if (getParameter("assetType") == "Expanding"){
collapse();
return;
};
enablerCore.close();
exitFullScreen();
}
public static function exitQueryString(_arg1:String, _arg2:String):void{
enablerCore.exitQueryString(_arg1, _arg2);
}
public static function counter(_arg1:String, _arg2:Boolean=false):void{
enablerCore.counter(_arg1, _arg2);
}
public static function getFilename(_arg1:String):String{
return (enablerCore.getFilename(_arg1));
}
public static function reportManualClose():void{
enablerCore.reportManualClose();
}
public static function getDartCreativeId():Number{
return (enablerCore.getDartCreativeId());
}
}
}//package com.doubleclick.studio
Section 10
//EnablerCore (com.doubleclick.studio.EnablerCore)
package com.doubleclick.studio {
import flash.display.*;
import flash.events.*;
import flash.system.*;
import com.doubleclick.studio.events.*;
import flash.utils.*;
import com.doubleclick.studio.utils.*;
import com.doubleclick.studio.localization.*;
import flash.geom.*;
public class EnablerCore {
private var stage:Stage;
private var mouseOverDetectedTime:int;// = 0
public var stageScaleModeMap:Object;
private var dynamicManifestId:String;
private var interactionTimer:Timer;
private var isInteractionTimerRunning:Boolean;// = false
private var mouse_dx:int;
private var mouse_dy:int;
private var adParameters:Object;
private var pageLoaded:Boolean;// = false
private var pageLoadTimeout:int;// = 5000
public var shouldLog:Boolean;// = true
private var mouseSpeed:int;// = 1
private var mouseOverDetected:Boolean;// = false
private var initialized:Boolean;// = false
private var eventDispatcher:EventDispatcher;
private var domainWhitelist:Array;
private var exitData:Object;
private var videoComponents:Array;
private static const INTERACTION_PAUSE_LIMIT:int = 1000;
private static const INTERACTION_TIMER_INTERVAL:int = 80;
private static var userHasInteracted:Boolean = false;
private static var alreadyLoggedUserInteraction:Boolean = false;
private static var cdnFilesMap:Object = {};
private static var enablerClassName:String;
public function EnablerCore(_arg1:String){
initialized = false;
adParameters = {};
shouldLog = true;
exitData = {};
videoComponents = [];
pageLoaded = false;
pageLoadTimeout = 5000;
eventDispatcher = new EventDispatcher();
mouseOverDetectedTime = 0;
isInteractionTimerRunning = false;
mouseOverDetected = false;
mouseSpeed = 1;
domainWhitelist = ["google.com", "doubleclick.com", "doubleclick.net", "2mdn.net"];
stageScaleModeMap = {exactFit:"EXACT_FIT", showAll:"SHOW_ALL", noBorder:"NO_BORDER", noScale:"NO_SCALE"};
super();
enablerClassName = _arg1;
}
public function startTimer(_arg1:String):void{
if (getRuntimeEnabler()){
getRuntimeEnabler().logCustomEvent("Start", _arg1);
};
Logger.log(Logger.INFO, (TraceLocalizer.getMessage("enabler.traceMessages.timerStart") + _arg1));
}
public function init(_arg1:Stage):void{
var _local2:Class;
if (!initialized){
stage = _arg1;
_local2 = getRuntimeEnabler();
if (((_local2) && (_local2.isRunningLocally()))){
createLocalEnvironment();
} else {
TraceLocalizer.setForceAlwaysShowTokens(true);
if (getRuntimeEnabler()){
getRuntimeEnabler().initEnvironment();
};
};
initialized = true;
startInteractionTimer();
};
}
public function getUserCountry():String{
return (getParameter("ct"));
}
private function mousePointerIsIdle():Boolean{
return (false);
}
public function getDartSiteId():Number{
return (parseInt(getParameter("sid")));
}
public function exit(_arg1:String, _arg2:String=""):void{
if (((!((_arg2.indexOf("http://") == -1))) || (!((_arg2.indexOf("https://") == -1))))){
performExit(_arg1, _arg2, true);
performExit(_arg1, _arg2, true);
} else {
performExit(_arg1, "", false);
};
}
private function performExit(_arg1:String, _arg2:String, _arg3:Boolean):void{
var _local4:String;
var _local5:String;
var _local6:StudioEvent;
_local4 = null;
_local5 = null;
if (trim(_arg2) != ""){
if (_arg3){
_local4 = _arg2;
_local5 = null;
} else {
_local4 = null;
_local5 = _arg2;
};
};
if (trim(_arg1) != ""){
if (getRuntimeEnabler()){
getRuntimeEnabler().logMetEventFlushMetEventsOpenPopup("Count", _arg1, false, _local4, _local5);
};
_local6 = new StudioEvent(StudioEvent.ON_EXIT);
_local6.id = _arg1;
dispatchEvent(_local6);
Logger.log(Logger.INFO, (TraceLocalizer.getMessage("enabler.traceMessages.exit") + _arg1));
} else {
Logger.log(Logger.WARN, "enabler.traceMessages.exitError");
};
}
public function getStreamingURL(_arg1:String):String{
var _local2:String;
_local2 = getFilename(("STR_" + _arg1));
return (((_local2)!=("STR_" + _arg1)) ? _local2 : _arg1);
}
public function startDisplayTimer():void{
if (((shouldLog) && (getRuntimeEnabler()))){
getRuntimeEnabler().logMetEvent("Start", "DISPLAY_TIMER");
};
}
private function isMouseOver():Boolean{
return ((getParameter("isMouseOver") == "1"));
}
public function trim(_arg1:String):String{
if (_arg1 != null){
while (_arg1.substring((_arg1.length - 1), _arg1.length) == " ") {
_arg1 = _arg1.substring(0, (_arg1.length - 1));
};
while (_arg1.substring(0, 1) == " ") {
_arg1 = _arg1.substring(1, _arg1.length);
};
};
return (_arg1);
}
public function getUserZipCode():String{
return (getParameter("zp"));
}
public function getDartAdId():Number{
return (parseInt(getParameter("aid")));
}
public function getExitUrl(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:String;
var _local5:int;
_local3 = ((((_arg2 == null)) || ((trim(_arg2) == "")))) ? exitData[_arg1].url : _arg2;
_local4 = (getParameter("click")) ? getParameter("click") : "";
if ((((_local4.length > 0)) && (dynamicManifestId))){
_local4 = addDynamicIdToClickString(_local4);
};
if ((((_local4.indexOf("?") >= 0)) || ((_local4.indexOf("&") >= 0)))){
_local5 = 0;
while (_local5 < getParameter("clickN")) {
_local3 = escape(_local3);
_local5++;
};
};
return ((_local4 + _local3));
}
private function getProtocolAndHostname(_arg1:String):String{
var _local2:Array;
_local2 = _arg1.split("/");
_local2.splice(3);
return (_local2.join("/"));
}
public function dispatchEvent(_arg1:Event):void{
var _local2:Number;
switch (_arg1.type){
case StudioEvent.ON_PAGE_LOADED:
case StudioEvent.ON_STAGE_MOUSE_OUT:
case StudioEvent.ON_STAGE_MOUSE_OVER:
case StudioEvent.ON_INTERACTION_MOUSE_OVER:
case StudioEvent.ON_EXIT:
_local2 = Logger.EVENTS;
break;
case StudioEvent.ON_COLLAPSE:
case StudioEvent.ON_EXPAND:
case StudioEvent.ON_REPORT_FLUSH_EVENT:
case StudioEvent.ON_REPORT_EVENT:
_local2 = Logger.DEBUG;
break;
default:
_local2 = Logger.INFO;
break;
};
Logger.log(_local2, (TraceLocalizer.getMessage("enabler.traceMessages.event") + _arg1.type));
eventDispatcher.dispatchEvent(_arg1);
}
public function logVideoEvent(_arg1:String, _arg2:String, _arg3:String):void{
Logger.log(Logger.DEBUG, ((((TraceLocalizer.getMessage("enabler.traceMessages.videoEventForVideoName") + "'") + _arg2) + "': ") + _arg3));
}
public function registerVideoComponent(_arg1:Object):void{
var _local2:int;
_local2 = 0;
while (_local2 < videoComponents.length) {
if (videoComponents[_local2] == _arg1){
return;
};
_local2++;
};
videoComponents.push(_arg1);
}
public function muteAllVideos():void{
var _local1:int;
_local1 = 0;
while (_local1 < videoComponents.length) {
videoComponents[_local1].mute(true);
_local1++;
};
}
public function isInitialized():Boolean{
return (initialized);
}
public function setIsMouseOver(_arg1:String):void{
if (getParameter("isMouseOver") == _arg1){
return;
};
if (_arg1 == "1"){
dispatchEvent(new StudioEvent(StudioEvent.ON_STAGE_MOUSE_OVER));
} else {
if (_arg1 == "0"){
dispatchEvent(new StudioEvent(StudioEvent.ON_STAGE_MOUSE_OUT));
};
};
setParameter("isMouseOver", _arg1);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function isRunningLocally():Boolean{
var _local1:String;
_local1 = Capabilities.playerType;
return (!((((_local1 == "PlugIn")) || ((_local1 == "ActiveX")))));
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
private function startInteraction():void{
dispatchEvent(new StudioEvent(StudioEvent.ON_INTERACTION_MOUSE_OVER));
if (shouldLog){
if (getRuntimeEnabler()){
getRuntimeEnabler().logMetEvent("Start", "INTERACTION_TIMER");
};
if (!alreadyLoggedUserInteraction){
if (getRuntimeEnabler()){
getRuntimeEnabler().logMetEvent("Count", "EVENT_USER_INTERACTION");
};
if (getParameter("mtfContinue") != "1"){
setMtfContinue("1");
};
alreadyLoggedUserInteraction = true;
};
};
}
public function getExpanding():Class{
var _local1:Class;
_local1 = StudioClassAccessor.getClass(StudioClassAccessor.CLASS_EXPANDING);
return ((_local1) ? _local1 : null);
}
public function getVideoComponentByName(_arg1:String):Object{
var _local2:int;
var _local3:String;
_local2 = (videoComponents.length - 1);
while (_local2 > -1) {
_local3 = videoComponents[_local2].getReportingIdentifier();
if (_local3 != null){
if (_local3 == _arg1){
return (videoComponents[_local2]);
};
};
_local2--;
};
return (null);
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
_local2 = _arg1.target.localToGlobal(new Point(_arg1.localX, _arg1.localY));
mouse_dx = Math.abs((mouse_dx - _local2.x));
mouse_dy = Math.abs((mouse_dy - _local2.y));
mouseSpeed = ((mouse_dx > mouse_dy)) ? mouse_dx : mouse_dy;
mouseSpeed = (mouseSpeed + 1);
checkMousePosition();
mouse_dx = _local2.x;
mouse_dy = _local2.y;
}
private function getRuntimeEnabler():Class{
var _local1:*;
_local1 = StudioClassAccessor.getClass(enablerClassName);
if (_local1 != null){
return (_local1);
};
return (null);
}
public function getExitData():Object{
return (exitData);
}
public function getDartPageId():Number{
return (parseInt(getParameter("pid")));
}
public function stopTimer(_arg1:String):void{
if (getRuntimeEnabler()){
getRuntimeEnabler().logCustomEvent("Stop", _arg1);
};
Logger.log(Logger.INFO, (TraceLocalizer.getMessage("enabler.traceMessages.timerStop") + _arg1));
}
public function checkPageLoadTimeout():void{
var _local1:int;
if (pageLoaded){
return;
};
_local1 = getTimer();
if (_local1 >= pageLoadTimeout){
setMtfContinue("1");
};
}
public function setDynamicServeId(_arg1:String):void{
dynamicManifestId = _arg1;
}
public function setParameter(_arg1:String, _arg2:String, _arg3:String="String"):void{
var _local4:Object;
_local4 = _arg2;
if (_arg3 == "Number"){
_local4 = Number(_arg2);
} else {
if (_arg3 == "Boolean"){
_local4 = ((((_arg2.toLowerCase() == "true")) || ((_arg2 == "1")))) ? true : false;
};
};
adParameters[_arg1] = _local4;
}
public function reportCustomVariable(_arg1:String):void{
Logger.log(Logger.INFO, (TraceLocalizer.getMessage("enabler.traceMessages.customVariableString") + _arg1));
}
public function setExitData(_arg1:Object):void{
this.exitData = _arg1;
}
private function createLocalStageMouseListners():void{
setParameter("isMouseOver", "0");
mouse_dx = stage.mouseX;
mouse_dy = stage.mouseY;
checkMousePosition();
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
}
public function allowDomain(_arg1:String):void{
var domain:String;
var url = _arg1;
domain = getProtocolAndHostname(url);
try {
Security.allowDomain(domain);
} catch(e:SecurityError) {
};
}
public function getUserBandwidth():Number{
return (parseInt(getParameter("bw")));
}
public function pageHasLoaded():Boolean{
return (pageLoaded);
}
public function getUserAreaCode():String{
return (getParameter("ac"));
}
public function getFilename(_arg1:String):String{
var _local2:String;
_local2 = _arg1.toLowerCase();
return (((cdnFilesMap[_local2])!=undefined) ? cdnFilesMap[_local2] : _arg1);
}
public function stopAllVideos():void{
var _local1:int;
_local1 = 0;
while (_local1 < videoComponents.length) {
videoComponents[_local1].stop();
_local1++;
};
}
private function isWhitelistedDomain(_arg1:String):Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
var _local5:String;
var _local6:int;
if ((((_arg1.indexOf("http://") == 0)) || ((_arg1.indexOf("https://") == 0)))){
_local2 = getProtocolAndHostname(_arg1.toLowerCase());
if (_local2.indexOf(":") != _local2.lastIndexOf(":")){
_local2 = _local2.split(":")[1];
};
_local3 = _local2.split(".");
_local4 = _local3[(_local3.length - 1)];
_local5 = _local3[(_local3.length - 2)];
_local6 = 0;
while (_local6 < domainWhitelist.length) {
if (((_local5.toLowerCase() + ".") + _local4.toLowerCase()) == domainWhitelist[_local6]){
return (true);
};
_local6++;
};
};
return (false);
}
public function logMetEvent(_arg1:String, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:String;
_local5 = (_arg4) ? TraceLocalizer.getMessage("enabler.traceMessages.customEvent") : TraceLocalizer.getMessage("enabler.traceMessages.standardEvent");
Logger.log(Logger.DEBUG, (((((_local5 + "'") + _arg2) + "' ") + TraceLocalizer.getMessage("enabler.traceMessages.eventType")) + _arg1));
}
public function getUserDMACode():String{
return (getParameter("dma"));
}
private function interactionTimerHandler(_arg1:TimerEvent):void{
var _local2:int;
if (getRuntimeEnabler()){
getRuntimeEnabler().timerCallback();
};
if (isMouseOver()){
if (isInteractionTimerRunning){
return;
};
if (!mouseOverDetected){
mouseOverDetected = true;
mouseOverDetectedTime = getTimer();
if (!userHasInteracted){
userHasInteracted = true;
};
} else {
_local2 = (getTimer() - mouseOverDetectedTime);
if (INTERACTION_PAUSE_LIMIT < _local2){
isInteractionTimerRunning = true;
startInteraction();
} else {
return;
};
};
} else {
if (isInteractionTimerRunning){
isInteractionTimerRunning = false;
stopInteraction();
};
mouseOverDetected = false;
mouseOverDetectedTime = -1;
};
}
public function getDartSiteName():String{
return (getParameter("sn"));
}
public function setFileMapEntry(_arg1:String, _arg2:String):void{
}
public function getDartRenderingId():Number{
return (parseInt(getParameter("rid")));
}
public function expand(_arg1:Boolean=false):void{
if (((!(_arg1)) && (getRuntimeEnabler()))){
getRuntimeEnabler().logMetEvent("Start", "EXPAND_TIMER");
};
Logger.log(Logger.INFO, "enabler.traceMessages.expanded");
}
public function parameterExists(_arg1:String):Boolean{
return (((adParameters[_arg1])==null) ? false : true);
}
public function setMtfContinue(_arg1:String):void{
if ((((_arg1 == "1")) && (!(pageLoaded)))){
pageLoaded = true;
setParameter("mtfContinue", "1");
dispatchEvent(new StudioEvent(StudioEvent.ON_PAGE_LOADED));
};
}
private function addDynamicIdToClickString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Array;
var _local5:String;
_local2 = "~okv=";
_local3 = ("dc_mid=" + dynamicManifestId);
_arg1 = unescape(_arg1);
if (_arg1.indexOf(_local2) > -1){
_local4 = _arg1.split(_local2);
_local5 = _local4.join(((_local2 + _local3) + ";"));
} else {
_local4 = _arg1.split(";");
_local4.splice(9, 0, (_local2 + _local3));
_local5 = _local4.join(";");
};
return (_local5);
}
public function collapse():void{
if (getRuntimeEnabler()){
getRuntimeEnabler().logMetEvent("Stop", "EXPAND_TIMER");
};
Logger.log(Logger.INFO, "enabler.traceMessages.collapsed");
}
private function stopInteraction():void{
if (((shouldLog) && (getRuntimeEnabler()))){
getRuntimeEnabler().logMetEvent("Stop", "INTERACTION_TIMER");
};
}
public function getDomainWhitelist():Array{
return (domainWhitelist);
}
public function hasUserInteracted():Boolean{
return (userHasInteracted);
}
private function createLocalEnvironment():void{
pageLoadTimeout = 2000;
setParameter("bw", "5", "Number");
createLocalStageMouseListners();
}
private function checkMousePosition():void{
if ((((((((stage.mouseX < mouseSpeed)) || ((stage.mouseX > (stage.stageWidth - mouseSpeed))))) || ((stage.mouseY < mouseSpeed)))) || ((stage.mouseY > (stage.stageHeight - mouseSpeed))))){
setIsMouseOver("0");
} else {
setIsMouseOver("1");
};
}
public function getUserState():String{
return (getParameter("st"));
}
public function startInteractionTimer():void{
if (getRuntimeEnabler()){
getRuntimeEnabler().startInteractionTimer();
};
interactionTimer = new Timer(INTERACTION_TIMER_INTERVAL);
interactionTimer.addEventListener(TimerEvent.TIMER, interactionTimerHandler);
interactionTimer.start();
}
public function processCDNFiles():void{
var _local1:Array;
var _local2:int;
var _local3:Array;
var _local4:String;
var _local5:String;
if (parameterExists("assets")){
_local1 = unescape(getParameter("assets")).split("&");
if ((((_local1.length == 1)) && ((_local1[0] == "")))){
return;
};
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = _local1[_local2].split("=");
_local4 = _local3[0];
_local5 = unescape(_local3[1]);
if ((((_local5.toLowerCase().indexOf(".swf") == -1)) || (isWhitelistedDomain(_local5)))){
cdnFilesMap[_local4.toLowerCase()] = _local5;
if (_local5.toLowerCase().indexOf(".swf") > -1){
allowDomain(_local5);
};
};
_local2++;
};
};
}
public function getStageReference():Stage{
return (stage);
}
public function getParameter(_arg1:String){
return (adParameters[_arg1]);
}
public function hasEventListener(_arg1:String):Boolean{
return (eventDispatcher.hasEventListener(_arg1));
}
public function close():void{
stopAllVideos();
Logger.log(Logger.INFO, "enabler.traceMessages.advertClosed");
}
public function exitQueryString(_arg1:String, _arg2:String=""):void{
if (trim(_arg2) == ""){
performExit(_arg1, "", false);
} else {
performExit(_arg1, _arg2, false);
};
}
public function counter(_arg1:String, _arg2:Boolean=false):void{
Logger.log(Logger.INFO, (TraceLocalizer.getMessage("enabler.traceMessages.counter") + _arg1));
if (getRuntimeEnabler()){
getRuntimeEnabler().logCustomEvent("Count", _arg1, _arg2);
};
}
public function reportManualClose():void{
if (getRuntimeEnabler()){
getRuntimeEnabler().logMetEvent("Count", "EVENT_MANUAL_CLOSE");
};
Logger.log(Logger.INFO, "enabler.traceMessages.logManualClose");
}
public function getDartCreativeId():Number{
return (parseInt(getParameter("cid")));
}
}
}//package com.doubleclick.studio