var _loc26_ = {clip:_root,ad_timeout:3000,fadeout_time:250,regpt:"o",method:"showPreloaderAd",color:16747008,background:16777161,outline:13994812,no_progress_bar:false,ad_started:function()
{
this.clip.stop();
},ad_finished:function()
{
this.clip.play();
},ad_failed:function()
{
trace("[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
var _loc9_ = {clip:_root,ad_timeout:2000,fadeout_time:250,regpt:"o",method:"showClickAwayAd",res:"300x250",no_bg:true,ad_started:function()
{
},ad_finished:function()
{
},ad_loaded:function(width, height)
{
},ad_failed:function()
{
trace("[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
},ad_skipped:function()
{
}};
options = MochiAd._parseOptions(options,_loc9_);
var clip = options.clip;
var _loc8_ = options.ad_timeout;
delete options.ad_timeout;
if(!MochiAd.load(options))
{
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function()
{
options.ad_finished();
};
var _loc4_ = MochiAd._getRes(options);
var _loc10_ = _loc4_[0];
var _loc7_ = _loc4_[1];
mc._x = _loc10_ * 0.5;
mc._y = _loc7_ * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait",3);
chk.ad_timeout = _loc8_;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function(callbackID, arg)
{
MochiAd.rpc(clip,callbackID,arg);
};
mc.rpcTestFn = function(s)
{
trace("[MOCHIAD rpcTestFn] " + s);
return s;
};
var _loc20_ = false;
mc.lc.regContLC = function(lc_name)
{
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function()
{
var _loc5_ = this._parent._mochiad_ctr;
var _loc4_ = getTimer() - this.started;
var _loc2_ = false;
if(!chk.showing)
{
var _loc3_ = _loc5_.getBytesTotal();
if(_loc3_ > 0 || typeof _loc3_ == "undefined")
{
_loc2_ = true;
chk.showing = true;
chk.started = getTimer();
}
else if(_loc4_ > chk.ad_timeout)
{
options.ad_failed();
_loc2_ = true;
}
}
if(_loc2_)
{
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options)
{
var _loc13_ = {clip:_root,ad_timeout:2000,fadeout_time:250,regpt:"o",method:"showTimedAd",ad_started:function()
{
this.clip.stop();
},ad_finished:function()
{
this.clip.play();
},ad_failed:function()
{
trace("[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
},ad_loaded:function(width, height)
{
},ad_skipped:function()
{
}};
options = MochiAd._parseOptions(options,_loc13_);
var clip = options.clip;
var _loc10_ = 11000;
var _loc12_ = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if(!MochiAd.load(options))
{
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function()
{
options.ad_finished();
};
var _loc5_ = MochiAd._getRes(options);
var _loc14_ = _loc5_[0];
var _loc11_ = _loc5_[1];
mc._x = _loc14_ * 0.5;
mc._y = _loc11_ * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait",3);