var _loc27_ = {clip:_root,ad_timeout:3000,fadeout_time:250,regpt:"o",method:"showPreloaderAd",color:16747008,background:16777161,outline:13994812,ad_started:function()
{
this.clip.stop();
},ad_finished:function()
{
this.clip.play();
},ad_failed:function()
{
trace("[MochAd] 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 _loc2_ = Math.min(100,Math.min(_loc10_ || 0,_loc11_));
_loc2_ = Math.max(this.last_pcnt,_loc2_);
this.last_pcnt = _loc2_;
_loc9_._xscale = _loc2_;
if(!chk.showing)
{
var _loc7_ = _loc12_.getBytesTotal();
if(_loc7_ > 0 || typeof _loc7_ == "undefined")
{
chk.showing = true;
chk.started = getTimer();
}
else if(_loc5_ > chk.ad_timeout)
{
options.ad_failed();
_loc3_ = true;
}
}
if(_loc5_ > chk.ad_msec)
{
_loc3_ = true;
}
if(_loc4_ > 0 && _loc8_ >= _loc4_ && _loc3_)
{
if(this.server_control)
{
delete this.onEnterFrame;
}
else
{
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
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("[MochAd] 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)
{
}};
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);