Section 1
//_4_WAY_10_130 (_4WAY_fla._4_WAY_10_130)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_10_130 extends MovieClip {
public function _4_WAY_10_130(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 2
//_4_WAY_12_107 (_4WAY_fla._4_WAY_12_107)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_12_107 extends MovieClip {
public function _4_WAY_12_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 3
//_4_WAY_14_295 (_4WAY_fla._4_WAY_14_295)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_14_295 extends MovieClip {
public function _4_WAY_14_295(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package _4WAY_fla
Section 4
//_4_WAY_16_85 (_4WAY_fla._4_WAY_16_85)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_16_85 extends MovieClip {
public function _4_WAY_16_85(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
}
}
}//package _4WAY_fla
Section 5
//_4_WAY_25_95 (_4WAY_fla._4_WAY_25_95)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_25_95 extends MovieClip {
public function _4_WAY_25_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 6
//_4_WAY_30_300 (_4WAY_fla._4_WAY_30_300)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class _4_WAY_30_300 extends MovieClip {
public var totalKilled_txt:TextField;
public function _4_WAY_30_300(){
addFrameScript(0, frame1);
}
function frame1(){
totalKilled_txt.text = String(MovieClip(root).diedCount);
}
}
}//package _4WAY_fla
Section 7
//_4_WAY_4_199 (_4WAY_fla._4_WAY_4_199)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_4_199 extends MovieClip {
public function _4_WAY_4_199(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 8
//_4_WAY_44_301 (_4WAY_fla._4_WAY_44_301)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_44_301 extends MovieClip {
public function _4_WAY_44_301(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package _4WAY_fla
Section 9
//_4_WAY_5_187 (_4WAY_fla._4_WAY_5_187)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_5_187 extends MovieClip {
public function _4_WAY_5_187(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 10
//_4_WAY_56copy_245 (_4WAY_fla._4_WAY_56copy_245)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_56copy_245 extends MovieClip {
public function _4_WAY_56copy_245(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 11
//_4_WAY_6_176 (_4WAY_fla._4_WAY_6_176)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_6_176 extends MovieClip {
public function _4_WAY_6_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 12
//_4_WAY_7_165 (_4WAY_fla._4_WAY_7_165)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_7_165 extends MovieClip {
public function _4_WAY_7_165(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 13
//_4_WAY_8_153 (_4WAY_fla._4_WAY_8_153)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_8_153 extends MovieClip {
public function _4_WAY_8_153(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 14
//_4_WAY_83_263 (_4WAY_fla._4_WAY_83_263)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class _4_WAY_83_263 extends MovieClip {
public var blood_mc:MovieClip;
public function _4_WAY_83_263(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
MovieClip(root).ani = false;
}
function frame2(){
play();
MovieClip(root).ani = true;
}
function frame3(){
gotoAndStop(1);
}
}
}//package _4WAY_fla
Section 15
//_4_WAY_84_239 (_4WAY_fla._4_WAY_84_239)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class _4_WAY_84_239 extends MovieClip {
public var blood_mc:MovieClip;
public function _4_WAY_84_239(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
MovieClip(root).ani = false;
}
function frame2(){
play();
MovieClip(root).ani = true;
}
function frame3(){
gotoAndStop(1);
}
}
}//package _4WAY_fla
Section 16
//_4_WAY_85_257 (_4WAY_fla._4_WAY_85_257)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class _4_WAY_85_257 extends MovieClip {
public var blood_mc:MovieClip;
public function _4_WAY_85_257(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
MovieClip(root).ani = false;
}
function frame2(){
play();
MovieClip(root).ani = true;
}
function frame3(){
gotoAndStop(1);
}
}
}//package _4WAY_fla
Section 17
//_4_WAY_9_142 (_4WAY_fla._4_WAY_9_142)
package _4WAY_fla {
import flash.display.*;
public dynamic class _4_WAY_9_142 extends MovieClip {
public function _4_WAY_9_142(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 18
//a_man_9_211 (_4WAY_fla.a_man_9_211)
package _4WAY_fla {
import flash.display.*;
public dynamic class a_man_9_211 extends MovieClip {
public function a_man_9_211(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 19
//dgf_253 (_4WAY_fla.dgf_253)
package _4WAY_fla {
import flash.display.*;
public dynamic class dgf_253 extends MovieClip {
public var boundry_1:MovieClip;
public var boundry_2:MovieClip;
public var boundry_3:MovieClip;
public var man:MovieClip;
public function dgf_253(){
addFrameScript(0, frame1);
}
public function rotate_Fun2(){
var _local1:int = (mouseX - man.x);
var _local2:int = ((mouseY - man.y) * -1);
var _local3:* = (Math.atan((_local2 / _local1)) / (Math.PI / 180));
if (_local1 < 0){
_local3 = (_local3 + 180);
};
if ((((_local1 >= 0)) && ((_local2 < 0)))){
_local3 = (_local3 + 360);
};
man.rotation = ((_local3 * -1) - 90);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 20
//DIED_14_194 (_4WAY_fla.DIED_14_194)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_14_194 extends MovieClip {
public function DIED_14_194(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 21
//DIED_21_171 (_4WAY_fla.DIED_21_171)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_21_171 extends MovieClip {
public function DIED_21_171(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 22
//DIED_28_160 (_4WAY_fla.DIED_28_160)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_28_160 extends MovieClip {
public function DIED_28_160(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 23
//DIED_35_148 (_4WAY_fla.DIED_35_148)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_35_148 extends MovieClip {
public function DIED_35_148(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 24
//DIED_42_137 (_4WAY_fla.DIED_42_137)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_42_137 extends MovieClip {
public function DIED_42_137(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package _4WAY_fla
Section 25
//DIED_49_125 (_4WAY_fla.DIED_49_125)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_49_125 extends MovieClip {
public function DIED_49_125(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 26
//DIED_56_206 (_4WAY_fla.DIED_56_206)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_56_206 extends MovieClip {
public function DIED_56_206(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 27
//DIED_7_182 (_4WAY_fla.DIED_7_182)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_7_182 extends MovieClip {
public function DIED_7_182(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package _4WAY_fla
Section 28
//DIED_76_228 (_4WAY_fla.DIED_76_228)
package _4WAY_fla {
import flash.display.*;
public dynamic class DIED_76_228 extends MovieClip {
public function DIED_76_228(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package _4WAY_fla
Section 29
//eyzeee_283 (_4WAY_fla.eyzeee_283)
package _4WAY_fla {
import flash.display.*;
public dynamic class eyzeee_283 extends MovieClip {
public function eyzeee_283(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 30
//GDFHGFHee_278 (_4WAY_fla.GDFHGFHee_278)
package _4WAY_fla {
import flash.display.*;
public dynamic class GDFHGFHee_278 extends MovieClip {
public var gun:MovieClip;
public var leg_1:MovieClip;
public var leg_2:MovieClip;
public function GDFHGFHee_278(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 31
//hgjvvcopbee_279 (_4WAY_fla.hgjvvcopbee_279)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class hgjvvcopbee_279 extends MovieClip {
public function hgjvvcopbee_279(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
MovieClip(root).shootstat = false;
stop();
}
function frame2(){
play();
}
function frame3(){
gotoAndStop(1);
}
}
}//package _4WAY_fla
Section 32
//HKJUY_268 (_4WAY_fla.HKJUY_268)
package _4WAY_fla {
import flash.display.*;
public dynamic class HKJUY_268 extends MovieClip {
public var boundry_1:MovieClip;
public var boundry_2:MovieClip;
public var boundry_3:MovieClip;
public var man:MovieClip;
public function HKJUY_268(){
addFrameScript(0, frame1);
}
public function rotate_Fun4(){
var _local1:int = (mouseX - man.x);
var _local2:int = ((mouseY - man.y) * -1);
var _local3:* = (Math.atan((_local2 / _local1)) / (Math.PI / 180));
if (_local1 < 0){
_local3 = (_local3 + 180);
};
if ((((_local1 >= 0)) && ((_local2 < 0)))){
_local3 = (_local3 + 360);
};
man.rotation = ((_local3 * -1) - 90);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 33
//Magz_Ldr_3_275 (_4WAY_fla.Magz_Ldr_3_275)
package _4WAY_fla {
import flash.display.*;
public dynamic class Magz_Ldr_3_275 extends MovieClip {
public function Magz_Ldr_3_275(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package _4WAY_fla
Section 34
//MainTimeline (_4WAY_fla.MainTimeline)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import gs.*;
import mochi.as3.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var kill_txt:TextField;
public var hero_group:MovieClip;
public var c_man_6:MovieClip;
public var b_man_5:MovieClip;
public var a_man_8:MovieClip;
public var c_man_7:MovieClip;
public var b_man_6:MovieClip;
public var a_man_9:MovieClip;
public var logo:MovieClip;
public var playAgn:SimpleButton;
public var space_mc:MovieClip;
public var c_man_8:MovieClip;
public var b_man_7:MovieClip;
public var hero_life_1:MovieClip;
public var c_man_9:MovieClip;
public var b_man_8:MovieClip;
public var hero_life_2:MovieClip;
public var b_man_9:MovieClip;
public var hero:MovieClip;
public var hero_life_3:MovieClip;
public var branding:MovieClip;
public var d_man_1:MovieClip;
public var gover_bg:MovieClip;
public var heroPowerMc_1:MovieClip;
public var d_man_2:MovieClip;
public var d_man_3:MovieClip;
public var heroPowerMc_3:MovieClip;
public var d_man_4:MovieClip;
public var a_man_1:MovieClip;
public var play_btn_11:SimpleButton;
public var ball:Ball;
public var heroPowerMc_2:MovieClip;
public var d_man_5:MovieClip;
public var a_man_2:MovieClip;
public var d_man_6:MovieClip;
public var c_man_1:MovieClip;
public var a_man_3:MovieClip;
public var heroPowerMc_4:MovieClip;
public var d_man_7:MovieClip;
public var c_man_2:MovieClip;
public var b_man_1:MovieClip;
public var a_man_4:MovieClip;
public var play_btn:SimpleButton;
public var myCursor:MovieClip;
public var d_man_8:MovieClip;
public var c_man_3:MovieClip;
public var b_man_2:MovieClip;
public var a_man_5:MovieClip;
public var ins_btn:SimpleButton;
public var moreGames:SimpleButton;
public var hero_life_4:MovieClip;
public var d_man_9:MovieClip;
public var c_man_4:MovieClip;
public var b_man_3:MovieClip;
public var a_man_6:MovieClip;
public var c_man_5:MovieClip;
public var b_man_4:MovieClip;
public var a_man_7:MovieClip;
public var bgChannel:SoundChannel;
public var bgSound:Sound;
public var sndChannel:SoundChannel;
public var snd_Gun:Sound;
public var sndKillChannel:SoundChannel;
public var snd_Kill:Sound;
public var snd_Jeep:Sound;
public var sndFrontChannel:SoundChannel;
public var snd_Front:Sound;
public var lavr:Number;
public var lavr_link:String;
public var shade:Number;
public var press_state:Boolean;
public var mousePress:Boolean;
public var rAngle:Number;
public var move_stat:Boolean;
public var diedCount:Number;
public var aTimer:Number;
public var bTimer:Number;
public var cTimer:Number;
public var dTimer:Number;
public var aRan:Number;
public var bRan:Number;
public var cRan:Number;
public var dRan:Number;
public var XArray:Array;
public var YArray:Array;
public var bXArray:Array;
public var bYArray:Array;
public var cXArray:Array;
public var cYArray:Array;
public var dXArray:Array;
public var dYArray:Array;
public var ani:Boolean;
public var aEnemy:Array;
public var bEnemy:Array;
public var cEnemy:Array;
public var dEnemy:Array;
public var ballXSpeed:Number;
public var ballYSpeed:Number;
public var ball_speed:Number;
public var ballTravelDistance:Number;
public var bulletDist:Number;
public var ballMc:MovieClip;
public var findHero:String;
public var gun_Fire:Boolean;
public var lifestr:String;
public function MainTimeline(){
addFrameScript(1, frame2, 4, frame5, 9, frame10, 14, frame15, 19, frame20);
}
public function play_btn_Fun(_arg1:MouseEvent){
sndFrontChannel.stop();
bgChannel = bgSound.play(0, int.MAX_VALUE);
gotoAndStop("ins");
}
public function gotoLINK(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.gamesfree.ca"), "_blank");
}
public function play1_btn_Fun(_arg1:MouseEvent){
gotoAndStop("Game");
}
public function init(){
Mouse.hide();
space_mc.visible = false;
var _local1:* = 1;
while (_local1 <= 9) {
this[("a_man_" + _local1)].count = 0;
this[("a_man_" + _local1)].id = 0;
this[("a_man_" + _local1)].diedId = 0;
this[("a_man_" + _local1)].loseId = 0;
this[("a_man_" + _local1)].hitCount = 0;
XArray[_local1] = this[("a_man_" + _local1)].x;
YArray[_local1] = this[("a_man_" + _local1)].y;
this[("b_man_" + _local1)].count = 0;
this[("b_man_" + _local1)].id = 0;
this[("b_man_" + _local1)].diedId = 0;
this[("b_man_" + _local1)].loseId = 0;
this[("b_man_" + _local1)].hitCount = 0;
bXArray[_local1] = this[("b_man_" + _local1)].x;
bYArray[_local1] = this[("b_man_" + _local1)].y;
this[("c_man_" + _local1)].count = 0;
this[("c_man_" + _local1)].id = 0;
this[("c_man_" + _local1)].diedId = 0;
this[("c_man_" + _local1)].loseId = 0;
this[("c_man_" + _local1)].hitCount = 0;
cXArray[_local1] = this[("c_man_" + _local1)].x;
cYArray[_local1] = this[("c_man_" + _local1)].y;
this[("d_man_" + _local1)].count = 0;
this[("d_man_" + _local1)].id = 0;
this[("d_man_" + _local1)].diedId = 0;
this[("d_man_" + _local1)].loseId = 0;
this[("d_man_" + _local1)].hitCount = 0;
dXArray[_local1] = this[("d_man_" + _local1)].x;
dYArray[_local1] = this[("d_man_" + _local1)].y;
_local1++;
};
var _local2:* = 1;
while (_local2 <= 4) {
this["hero_group"][("man_" + _local2)].loseCount = 0;
this["hero_group"][("man_" + _local2)].gainCount = 0;
this["hero_group"][("man_" + _local2)].addEventListener(MouseEvent.ROLL_OVER, roll_Fun);
this[("hero_life_" + _local2)].addEventListener(MouseEvent.MOUSE_DOWN, hero_life_Fun);
this[("hero_life_" + _local2)].addEventListener(MouseEvent.ROLL_OVER, hero_lifeR_Fun);
this[("hero_life_" + _local2)].addEventListener(MouseEvent.ROLL_OUT, hero_lifeO_Fun);
this[("hero_life_" + _local2)].buttonMode = true;
_local2++;
};
press_state = false;
rAngle = 0;
ball.alpha = 0;
aTimer = setInterval(aTimer_Fun, 4000);
bTimer = setInterval(bTimer_Fun, 3500);
cTimer = setInterval(cTimer_Fun, 6000);
dTimer = setInterval(dTimer_Fun, 3500);
}
public function myCursor_Fun(){
myCursor.x = mouseX;
myCursor.y = mouseY;
}
public function rotate_Fun(){
var _local1:int = (mouseX - hero.x);
var _local2:int = ((mouseY - hero.y) * -1);
var _local3:* = (Math.atan((_local2 / _local1)) / (Math.PI / 180));
if (_local1 < 0){
_local3 = (_local3 + 180);
};
if ((((_local1 >= 0)) && ((_local2 < 0)))){
_local3 = (_local3 + 360);
};
hero.rotation = ((_local3 * -1) - 90);
}
public function aTimer_Fun(){
if (aEnemy.length >= 2){
aRan = (Math.floor((Math.random() * (aEnemy.length - 1))) + 1);
this[("a_man_" + aEnemy[aRan])].addEventListener(Event.ENTER_FRAME, aEnemy_Fun);
aEnemy.splice(aRan, 1);
};
}
public function aEnemy_Fun(_arg1:Event){
if ((((_arg1.currentTarget.count <= 375)) && ((_arg1.currentTarget.diedId == 0)))){
_arg1.currentTarget.x++;
_arg1.currentTarget.y++;
_arg1.currentTarget.count++;
} else {
if (_arg1.currentTarget.diedId == 0){
powerLose_Fun((_arg1.currentTarget as MovieClip));
if (_arg1.currentTarget.id == 0){
_arg1.currentTarget.id = 1;
_arg1.currentTarget.gotoAndStop(2);
};
};
};
if (((((((_arg1.currentTarget.hitTestObject(ball)) && ((_arg1.currentTarget.diedId == 0)))) && (move_stat))) && ((this["hero_group"][("man_" + findHero)]["man"].visible == true)))){
if (_arg1.currentTarget.name.substr(6) == 9){
if (_arg1.currentTarget.hitCount == 1){
sndKillChannel = snd_Jeep.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.hitCount = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
} else {
_arg1.currentTarget.hitCount++;
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
};
} else {
if (_arg1.currentTarget.name.substr(6) != 9){
sndKillChannel = snd_Kill.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
};
};
};
if ((((_arg1.currentTarget.loseId >= 30)) && ((_arg1.currentTarget.diedId == 1)))){
_arg1.currentTarget.count = 0;
_arg1.currentTarget.loseId = 0;
_arg1.currentTarget.diedId = 0;
_arg1.currentTarget.id = 0;
aEnemy.push(_arg1.currentTarget.name.substr(6));
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.x = XArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.y = YArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, aEnemy_Fun);
} else {
if (_arg1.currentTarget.diedId == 1){
_arg1.currentTarget.loseId++;
};
};
}
public function bTimer_Fun(){
if (bEnemy.length >= 2){
bRan = (Math.floor((Math.random() * (bEnemy.length - 1))) + 1);
this[("b_man_" + bEnemy[bRan])].addEventListener(Event.ENTER_FRAME, bEnemy_Fun);
bEnemy.splice(bRan, 1);
};
}
public function bEnemy_Fun(_arg1:Event){
if ((((_arg1.currentTarget.count <= 375)) && ((_arg1.currentTarget.diedId == 0)))){
_arg1.currentTarget.x--;
_arg1.currentTarget.y++;
_arg1.currentTarget.count++;
} else {
if (_arg1.currentTarget.diedId == 0){
powerLose_Fun((_arg1.currentTarget as MovieClip));
if (_arg1.currentTarget.id == 0){
_arg1.currentTarget.id = 1;
_arg1.currentTarget.gotoAndStop(2);
};
};
};
if (((((((_arg1.currentTarget.hitTestObject(ball)) && ((_arg1.currentTarget.diedId == 0)))) && (move_stat))) && ((this["hero_group"][("man_" + findHero)]["man"].visible == true)))){
if (_arg1.currentTarget.name.substr(6) == 9){
if (_arg1.currentTarget.hitCount == 1){
sndKillChannel = snd_Jeep.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.hitCount = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
} else {
_arg1.currentTarget.hitCount++;
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
};
} else {
if (_arg1.currentTarget.name.substr(6) != 9){
sndKillChannel = snd_Kill.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
};
};
};
if ((((_arg1.currentTarget.loseId >= 30)) && ((_arg1.currentTarget.diedId == 1)))){
_arg1.currentTarget.count = 0;
_arg1.currentTarget.loseId = 0;
_arg1.currentTarget.diedId = 0;
_arg1.currentTarget.id = 0;
bEnemy.push(_arg1.currentTarget.name.substr(6));
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.x = bXArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.y = bYArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, bEnemy_Fun);
} else {
if (_arg1.currentTarget.diedId == 1){
_arg1.currentTarget.loseId++;
};
};
}
public function cTimer_Fun(){
if (cEnemy.length >= 2){
cRan = (Math.floor((Math.random() * (cEnemy.length - 1))) + 1);
this[("c_man_" + cEnemy[cRan])].addEventListener(Event.ENTER_FRAME, cEnemy_Fun);
cEnemy.splice(cRan, 1);
};
}
public function cEnemy_Fun(_arg1:Event){
if ((((_arg1.currentTarget.count <= 375)) && ((_arg1.currentTarget.diedId == 0)))){
_arg1.currentTarget.x--;
_arg1.currentTarget.y--;
_arg1.currentTarget.count++;
} else {
if (_arg1.currentTarget.diedId == 0){
powerLose_Fun((_arg1.currentTarget as MovieClip));
if (_arg1.currentTarget.id == 0){
_arg1.currentTarget.id = 1;
_arg1.currentTarget.gotoAndStop(2);
};
};
};
if (((((((_arg1.currentTarget.hitTestObject(ball)) && ((_arg1.currentTarget.diedId == 0)))) && (move_stat))) && ((this["hero_group"][("man_" + findHero)]["man"].visible == true)))){
if (_arg1.currentTarget.name.substr(6) == 9){
if (_arg1.currentTarget.hitCount == 1){
sndKillChannel = snd_Jeep.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.hitCount = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
} else {
_arg1.currentTarget.hitCount++;
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
};
} else {
if (_arg1.currentTarget.name.substr(6) != 9){
sndKillChannel = snd_Kill.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
};
};
};
if ((((_arg1.currentTarget.loseId >= 30)) && ((_arg1.currentTarget.diedId == 1)))){
_arg1.currentTarget.count = 0;
_arg1.currentTarget.loseId = 0;
_arg1.currentTarget.diedId = 0;
_arg1.currentTarget.id = 0;
cEnemy.push(_arg1.currentTarget.name.substr(6));
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.x = cXArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.y = cYArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, cEnemy_Fun);
} else {
if (_arg1.currentTarget.diedId == 1){
_arg1.currentTarget.loseId++;
};
};
}
public function dTimer_Fun(){
if (dEnemy.length >= 2){
dRan = (Math.floor((Math.random() * (dEnemy.length - 1))) + 1);
this[("d_man_" + dEnemy[dRan])].addEventListener(Event.ENTER_FRAME, dEnemy_Fun);
dEnemy.splice(dRan, 1);
};
}
public function dEnemy_Fun(_arg1:Event){
if ((((_arg1.currentTarget.count <= 375)) && ((_arg1.currentTarget.diedId == 0)))){
_arg1.currentTarget.x++;
_arg1.currentTarget.y--;
_arg1.currentTarget.count++;
} else {
if (_arg1.currentTarget.diedId == 0){
powerLose_Fun((_arg1.currentTarget as MovieClip));
if (_arg1.currentTarget.id == 0){
_arg1.currentTarget.id = 1;
_arg1.currentTarget.gotoAndStop(2);
};
};
};
if (((((((_arg1.currentTarget.hitTestObject(ball)) && ((_arg1.currentTarget.diedId == 0)))) && (move_stat))) && ((this["hero_group"][("man_" + findHero)]["man"].visible == true)))){
if (_arg1.currentTarget.name.substr(6) == 9){
if (_arg1.currentTarget.hitCount == 1){
sndKillChannel = snd_Jeep.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.hitCount = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
} else {
_arg1.currentTarget.hitCount++;
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
};
} else {
if (_arg1.currentTarget.name.substr(6) != 9){
sndKillChannel = snd_Kill.play();
this["hero_group"][("man_" + findHero)].gainCount = (this["hero_group"][("man_" + findHero)].gainCount + 1);
this[("hero_life_" + findHero)].gotoAndStop(this["hero_group"][("man_" + findHero)].gainCount);
diedCount++;
kill_txt.text = String(diedCount);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
_arg1.currentTarget.diedId = 1;
_arg1.currentTarget.gotoAndStop(3);
};
};
};
if ((((_arg1.currentTarget.loseId >= 30)) && ((_arg1.currentTarget.diedId == 1)))){
_arg1.currentTarget.count = 0;
_arg1.currentTarget.loseId = 0;
_arg1.currentTarget.diedId = 0;
_arg1.currentTarget.id = 0;
dEnemy.push(_arg1.currentTarget.name.substr(6));
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.x = dXArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.y = dYArray[_arg1.currentTarget.name.substr(6)];
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, dEnemy_Fun);
} else {
if (_arg1.currentTarget.diedId == 1){
_arg1.currentTarget.loseId++;
};
};
}
public function gameLoop(){
if (ballTravelDistance > 0){
ball.x = (ball.x + ballXSpeed);
ball.y = (ball.y + ballYSpeed);
ballTravelDistance = (ballTravelDistance - ball_speed);
} else {
ball.alpha = 0;
ball.gotoAndStop(1);
move_stat = false;
ball.x = hero.x;
ball.y = hero.y;
ballXSpeed = 0;
ballYSpeed = 0;
ballTravelDistance = 0;
};
}
public function onClickHandler(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!move_stat){
move_stat = true;
_local1 = (mouseX - ball.x);
_local2 = (mouseY - ball.y);
ball.rotation = ((Math.atan2(_local2, _local1) * 180) / Math.PI);
ballTravelDistance = getDistance();
_local3 = (ball_speed * Math.cos(((ball.rotation * Math.PI) / 180)));
_local4 = (ball_speed * Math.sin(((ball.rotation * Math.PI) / 180)));
ballXSpeed = _local3;
ballYSpeed = _local4;
};
}
public function getDistance(){
var _local1:Number = 350;
return (_local1);
}
public function onClickHandler_rocket(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!move_stat){
move_stat = true;
_local1 = (mouseX - ball.x);
_local2 = (mouseY - ball.y);
ball.rotation = ((Math.atan2(_local2, _local1) * 180) / Math.PI);
ballTravelDistance = 800;
_local3 = (ball_speed * Math.cos(((ball.rotation * Math.PI) / 180)));
_local4 = (ball_speed * Math.sin(((ball.rotation * Math.PI) / 180)));
ballXSpeed = _local3;
ballYSpeed = _local4;
};
}
public function MouseClik_Fun(_arg1:MouseEvent){
mousePress = true;
if (this["hero_group"][("man_" + findHero)]["man"].visible){
this["hero_group"][("man_" + findHero)]["man"].gotoAndPlay(2);
};
}
public function MouseClik_UP_Fun(_arg1:MouseEvent){
mousePress = false;
}
public function roll_Fun(_arg1:MouseEvent){
findHero = _arg1.currentTarget.name.substr(4);
}
public function keyDown_Fun(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case Keyboard.SPACE:
if (!press_state){
space_mc.visible = false;
press_state = true;
rAngle = (rAngle + 90);
if (rAngle == 360){
rAngle = 0;
};
TweenLite.to(hero_group, 0.75, {rotation:rAngle, onComplete:end_Fun});
break;
};
};
}
public function end_Fun(){
if (press_state){
press_state = false;
};
}
public function powerLose_Fun(_arg1:MovieClip){
var _local2:* = 1;
while (_local2 <= 4) {
if (this["hero_group"][("man_" + _local2)].hitTestObject(_arg1)){
this["hero_group"][("man_" + _local2)].loseCount++;
this[("heroPowerMc_" + _local2)].gotoAndStop((int((this["hero_group"][("man_" + _local2)].loseCount / 25)) + 1));
this["hero_group"][("man_" + _local2)]["man"]["blood_mc"].gotoAndStop((int((this["hero_group"][("man_" + _local2)].loseCount / 25)) + 1));
if (int((this["hero_group"][("man_" + _local2)].loseCount / 25)) == 100){
space_mc.visible = true;
this["hero_group"][("man_" + _local2)]["man"].visible = false;
};
};
_local2++;
};
}
public function onEnterFrame(_arg1:Event){
var _local2:*;
if (mousePress){
if (move_stat == false){
sndChannel = snd_Gun.play();
};
if (ani == false){
this["hero_group"][("man_" + findHero)]["man"].gotoAndPlay(2);
};
onClickHandler();
};
if (findHero == "4"){
hero_group.man_4.rotate_Fun4();
} else {
if (findHero == "3"){
hero_group.man_3.rotate_Fun3();
} else {
if (findHero == "2"){
hero_group.man_2.rotate_Fun2();
} else {
if (findHero == "1"){
hero_group.man_1.rotate_Fun1();
};
};
};
};
myCursor_Fun();
rotate_Fun();
gameLoop();
if ((((((((heroPowerMc_1.currentFrame == 100)) && ((heroPowerMc_2.currentFrame == 100)))) && ((heroPowerMc_3.currentFrame == 100)))) && ((heroPowerMc_4.currentFrame == 100)))){
Mouse.show();
_local2 = 1;
while (_local2 <= 9) {
this[("a_man_" + _local2)].removeEventListener(Event.ENTER_FRAME, aEnemy_Fun);
this[("b_man_" + _local2)].removeEventListener(Event.ENTER_FRAME, bEnemy_Fun);
this[("c_man_" + _local2)].removeEventListener(Event.ENTER_FRAME, cEnemy_Fun);
this[("d_man_" + _local2)].removeEventListener(Event.ENTER_FRAME, dEnemy_Fun);
_local2++;
};
removeEventListener(MouseEvent.MOUSE_DOWN, MouseClik_Fun);
clearInterval(aTimer);
clearInterval(bTimer);
clearInterval(cTimer);
clearInterval(dTimer);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
bgChannel.stop();
gotoAndStop("Game_over");
};
}
public function hero_life_Fun(_arg1:MouseEvent){
lifestr = _arg1.currentTarget.name.substr(10);
if ((((this["hero_group"][("man_" + lifestr)].gainCount >= 20)) && ((this["hero_group"][("man_" + lifestr)]["man"].visible == false)))){
this["hero_group"][("man_" + lifestr)].loseCount = 0;
this["hero_group"][("man_" + lifestr)].gainCount = 0;
this[("heroPowerMc_" + lifestr)].gotoAndStop(1);
this[("hero_life_" + lifestr)].gotoAndStop(1);
this["hero_group"][("man_" + lifestr)]["man"].visible = true;
};
}
public function hero_lifeR_Fun(_arg1:MouseEvent){
Mouse.show();
}
public function hero_lifeO_Fun(_arg1:MouseEvent){
Mouse.hide();
}
public function playAgn_Fun(_arg1:MouseEvent){
gotoAndStop("Play");
}
function frame2(){
MochiBot.track(this, "efe12656");
MochiAd.showPreGameAd({clip:root, id:"73a687e0df8aee68", res:"800x600"});
stop();
}
function frame5(){
stop();
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, play_btn_Fun);
moreGames.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
bgSound = new snd_bg();
snd_Gun = new snd_gun();
snd_Kill = new snd_kill();
snd_Jeep = new snd_jeep();
snd_Front = new snd_front();
sndFrontChannel = snd_Front.play(0, int.MAX_VALUE);
lavr = 34;
shade = 1;
trace("doing it...");
branding.boxx.gotoAndStop(lavr);
branding.boxx2.boxx.gotoAndStop(lavr);
branding.boxx2.gotoAndStop(shade);
if (lavr != 0){
trace("!= 0");
branding.visible = true;
} else {
trace("== 0");
branding.visible = false;
};
logo.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
}
function frame10(){
play_btn_11.addEventListener(MouseEvent.MOUSE_DOWN, play1_btn_Fun);
moreGames.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
logo.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
}
function frame15(){
stop();
move_stat = false;
diedCount = 0;
aTimer = 0;
bTimer = 0;
cTimer = 0;
dTimer = 0;
aRan = 0;
bRan = 0;
cRan = 0;
dRan = 0;
XArray = new Array("");
YArray = new Array("");
bXArray = new Array("");
bYArray = new Array("");
cXArray = new Array("");
cYArray = new Array("");
dXArray = new Array("");
dYArray = new Array("");
ani = false;
init();
aEnemy = new Array("", "1", "2", "3", "4", "5", "6", "7", "8", "9");
bEnemy = new Array("", "1", "2", "3", "4", "5", "6", "7", "8", "9");
cEnemy = new Array("", "1", "2", "3", "4", "5", "6", "7", "8", "9");
dEnemy = new Array("", "1", "2", "3", "4", "5", "6", "7", "8", "9");
ballXSpeed = 0;
ballYSpeed = 0;
ball_speed = 32;
ballTravelDistance = 0;
bulletDist = 0;
ballMc = new MovieClip();
addEventListener(MouseEvent.MOUSE_DOWN, MouseClik_Fun);
addEventListener(MouseEvent.MOUSE_UP, MouseClik_UP_Fun);
findHero = null;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown_Fun);
gun_Fire = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
lifestr = null;
logo.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
}
function frame20(){
stop();
Mouse.show();
bgChannel.stop();
if (press_state){
sndChannel.stop();
};
if (diedCount >= 1){
sndKillChannel.stop();
};
playAgn.addEventListener(MouseEvent.MOUSE_DOWN, playAgn_Fun);
moreGames.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
logo.addEventListener(MouseEvent.MOUSE_DOWN, gotoLINK);
}
}
}//package _4WAY_fla
Section 35
//MAN_5_272 (_4WAY_fla.MAN_5_272)
package _4WAY_fla {
import flash.display.*;
public dynamic class MAN_5_272 extends MovieClip {
public function MAN_5_272(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 36
//UIU_262 (_4WAY_fla.UIU_262)
package _4WAY_fla {
import flash.display.*;
public dynamic class UIU_262 extends MovieClip {
public var boundry_1:MovieClip;
public var boundry_2:MovieClip;
public var boundry_3:MovieClip;
public var man:MovieClip;
public function UIU_262(){
addFrameScript(0, frame1);
}
public function rotate_Fun3(){
var _local1:int = (mouseX - man.x);
var _local2:int = ((mouseY - man.y) * -1);
var _local3:* = (Math.atan((_local2 / _local1)) / (Math.PI / 180));
if (_local1 < 0){
_local3 = (_local3 + 180);
};
if ((((_local1 >= 0)) && ((_local2 < 0)))){
_local3 = (_local3 + 360);
};
man.rotation = ((_local3 * -1) - 90);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 37
//Vr_0_Bt_2_40 (_4WAY_fla.Vr_0_Bt_2_40)
package _4WAY_fla {
import flash.display.*;
public dynamic class Vr_0_Bt_2_40 extends MovieClip {
public var boxx:MovieClip;
public function Vr_0_Bt_2_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 38
//Vr_Games501_13_67 (_4WAY_fla.Vr_Games501_13_67)
package _4WAY_fla {
import flash.display.*;
public dynamic class Vr_Games501_13_67 extends MovieClip {
public function Vr_Games501_13_67(){
addFrameScript(39, frame40);
}
function frame40(){
}
}
}//package _4WAY_fla
Section 39
//Vr_Games501_18_56 (_4WAY_fla.Vr_Games501_18_56)
package _4WAY_fla {
import flash.display.*;
public dynamic class Vr_Games501_18_56 extends MovieClip {
public function Vr_Games501_18_56(){
addFrameScript(24, frame25);
}
function frame25(){
}
}
}//package _4WAY_fla
Section 40
//Vr_LogoContainer_41 (_4WAY_fla.Vr_LogoContainer_41)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Vr_LogoContainer_41 extends MovieClip {
public var logo:MovieClip;
public function Vr_LogoContainer_41(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 82, frame83);
}
function frame1(){
MovieClip(root).lavr_link = "http://www.neodelight.com";
MovieClip(root).shade = 1;
}
function frame2(){
MovieClip(root).lavr_link = "http://www.andkon.com";
MovieClip(root).shade = 2;
}
function frame3(){
MovieClip(root).lavr_link = "http://www.anyad.rulez.org";
MovieClip(root).shade = 1;
}
function frame4(){
MovieClip(root).lavr_link = "http://www.girldressupgames.biz";
MovieClip(root).shade = 1;
}
function frame5(){
MovieClip(root).lavr_link = "http://www.bringler.com";
MovieClip(root).shade = 1;
}
function frame6(){
MovieClip(root).lavr_link = "http://www.bubblebox.com";
MovieClip(root).shade = 1;
}
function frame7(){
MovieClip(root).lavr_link = "http://www.bunnygames.com";
MovieClip(root).shade = 1;
}
function frame8(){
MovieClip(root).lavr_link = "http://www.dailyfreegames.com";
MovieClip(root).shade = 1;
}
function frame9(){
MovieClip(root).lavr_link = "http://www.directgamez.com";
MovieClip(root).shade = 2;
}
function frame10(){
MovieClip(root).lavr_link = "http://www.2flashgames.com";
MovieClip(root).shade = 2;
}
function frame11(){
MovieClip(root).lavr_link = "http://www.flashninjaclan.com";
MovieClip(root).shade = 1;
}
function frame12(){
MovieClip(root).lavr_link = "http://www.dailyaddictinggames.com/";
MovieClip(root).shade = 1;
}
function frame13(){
MovieClip(root).lavr_link = "http://www.funny-games.biz";
MovieClip(root).shade = 1;
}
function frame14(){
MovieClip(root).lavr_link = "http://www.gameitnow.com";
MovieClip(root).shade = 2;
}
function frame15(){
MovieClip(root).lavr_link = "http://www.gamesplz.com";
MovieClip(root).shade = 0;
}
function frame16(){
MovieClip(root).lavr_link = "http://www.onjogos.com.br";
MovieClip(root).shade = 1;
}
function frame17(){
MovieClip(root).lavr_link = "http://www.gamesfreak.net";
MovieClip(root).shade = 2;
}
function frame18(){
MovieClip(root).lavr_link = "http://www.stoneagegames.com";
MovieClip(root).shade = 1;
}
function frame19(){
MovieClip(root).lavr_link = "http://www.jarkey.net";
MovieClip(root).shade = 2;
}
function frame20(){
MovieClip(root).lavr_link = "http://www.gamesgames.com/";
MovieClip(root).shade = 1;
}
function frame21(){
MovieClip(root).lavr_link = "http://www.keepbusy.net";
MovieClip(root).shade = 1;
}
function frame22(){
MovieClip(root).lavr_link = "http://www.microjogos.com";
MovieClip(root).shade = 1;
}
function frame23(){
MovieClip(root).lavr_link = "http://www.minijuegos.com";
MovieClip(root).shade = 2;
}
function frame24(){
MovieClip(root).lavr_link = "http://www.oyunskor.com/";
MovieClip(root).shade = 1;
}
function frame25(){
MovieClip(root).lavr_link = "http://www.mostfungames.com";
MovieClip(root).shade = 2;
}
function frame26(){
MovieClip(root).lavr_link = "http://www.gameshot.org";
MovieClip(root).shade = 1;
}
function frame27(){
MovieClip(root).lavr_link = "http://www.online-games-zone.com/";
MovieClip(root).shade = 2;
}
function frame28(){
MovieClip(root).lavr_link = "http://www.puffgames.com";
MovieClip(root).shade = 2;
}
function frame29(){
MovieClip(root).lavr_link = "http://www.spele.nl";
MovieClip(root).shade = 1;
}
function frame30(){
MovieClip(root).lavr_link = "http://www.t45ol.com";
MovieClip(root).shade = 2;
}
function frame31(){
MovieClip(root).lavr_link = "http://www.thegamesonline.com/";
MovieClip(root).shade = 1;
}
function frame32(){
MovieClip(root).lavr_link = "http://www.ultimatearcade.com";
MovieClip(root).shade = 1;
}
function frame33(){
MovieClip(root).lavr_link = "http://www.girlgames4u.com/";
MovieClip(root).shade = 1;
}
function frame34(){
MovieClip(root).lavr_link = "http://www.gamesfree.ca/";
MovieClip(root).shade = 0;
}
function frame35(){
MovieClip(root).lavr_link = "http://www.stickpage.com/";
MovieClip(root).shade = 1;
}
function frame36(){
MovieClip(root).lavr_link = "http://www.gamespond.net/";
MovieClip(root).shade = 2;
}
function frame37(){
MovieClip(root).lavr_link = "http://www.flashgames.it/";
MovieClip(root).shade = 1;
}
function frame38(){
MovieClip(root).lavr_link = "http://www.gamesgirl.ca/";
MovieClip(root).shade = 1;
}
function frame39(){
MovieClip(root).lavr_link = "http://www.hallpass.com/";
MovieClip(root).shade = 2;
}
function frame40(){
MovieClip(root).lavr_link = "http://www.addictinggames.com/";
MovieClip(root).shade = 1;
}
function frame41(){
MovieClip(root).lavr_link = "http://www.benz.be";
MovieClip(root).shade = 2;
}
function frame42(){
MovieClip(root).lavr_link = "http://www.net-games.co.il/";
MovieClip(root).shade = 1;
}
function frame43(){
MovieClip(root).lavr_link = "http://www.bgames.com";
MovieClip(root).shade = 1;
}
function frame44(){
MovieClip(root).lavr_link = "http://www.pinkyarcade.com/";
MovieClip(root).shade = 1;
}
function frame45(){
MovieClip(root).lavr_link = "http://www.komikler.com/index.php";
MovieClip(root).shade = 2;
}
function frame46(){
MovieClip(root).lavr_link = "http://www.twizl.com/";
MovieClip(root).shade = 1;
}
function frame47(){
MovieClip(root).lavr_link = "http://www.a10.com/";
MovieClip(root).shade = 1;
}
function frame48(){
MovieClip(root).lavr_link = "http://www.bonniegames.com/";
MovieClip(root).shade = 1;
}
function frame49(){
MovieClip(root).lavr_link = "http://www.ug2.com/";
MovieClip(root).shade = 0;
}
function frame50(){
MovieClip(root).lavr_link = "http://www.agame.com";
MovieClip(root).shade = 1;
}
function frame51(){
MovieClip(root).lavr_link = "http://www.gamesclub.com/";
MovieClip(root).shade = 1;
}
function frame52(){
MovieClip(root).lavr_link = "http://www.killhours.com/";
MovieClip(root).shade = 1;
}
function frame53(){
MovieClip(root).lavr_link = "http://www.flasharcadegamessite.com/";
MovieClip(root).shade = 1;
}
function frame54(){
MovieClip(root).lavr_link = "http://www.roundgames.com/";
MovieClip(root).shade = 2;
}
function frame55(){
MovieClip(root).lavr_link = "http://www.arcadegangsta.com/";
MovieClip(root).shade = 1;
}
function frame56(){
MovieClip(root).lavr_link = "http://www.gamebusted.com/";
MovieClip(root).shade = 0;
}
function frame57(){
MovieClip(root).lavr_link = "http://www.flash-games.net/";
MovieClip(root).shade = 1;
}
function frame58(){
MovieClip(root).lavr_link = "http://www.flash-game.net/";
MovieClip(root).shade = 1;
}
function frame59(){
MovieClip(root).lavr_link = "http://www.kingofgames.net";
MovieClip(root).shade = 1;
}
function frame60(){
MovieClip(root).lavr_link = "http://www.playhub.com/";
MovieClip(root).shade = 0;
}
function frame61(){
MovieClip(root).lavr_link = "http://www.123spill.no/";
MovieClip(root).shade = 1;
}
function frame62(){
MovieClip(root).lavr_link = "http://www.dailygames.com/";
MovieClip(root).shade = 1;
}
function frame63(){
MovieClip(root).lavr_link = "http://www.octogames.com/";
MovieClip(root).shade = 2;
}
function frame64(){
MovieClip(root).lavr_link = "http://www.ugotgames.com/";
MovieClip(root).shade = 1;
}
function frame65(){
MovieClip(root).lavr_link = "http://www.fupa.com/";
MovieClip(root).shade = 1;
}
function frame66(){
MovieClip(root).lavr_link = "http://www.kibagames.com/";
MovieClip(root).shade = 0;
}
function frame67(){
MovieClip(root).lavr_link = "http://www.kraloyun.com/";
MovieClip(root).shade = 0;
}
function frame68(){
MovieClip(root).lavr_link = "http://www.spielaffe.de/";
MovieClip(root).shade = 0;
}
function frame69(){
MovieClip(root).lavr_link = "http://www.39games.com";
MovieClip(root).shade = 2;
}
function frame70(){
MovieClip(root).lavr_link = "http://www.bijuegos.com";
MovieClip(root).shade = 2;
}
function frame71(){
MovieClip(root).lavr_link = "http://www.mofunzone.com";
MovieClip(root).shade = 2;
}
function frame72(){
MovieClip(root).lavr_link = "http://www.freegamespy.com/";
MovieClip(root).shade = 2;
}
function frame73(){
MovieClip(root).lavr_link = "http://www.jogos10.com";
MovieClip(root).shade = 0;
}
function frame74(){
MovieClip(root).lavr_link = "http://www.juegos10.com";
MovieClip(root).shade = 0;
}
function frame75(){
MovieClip(root).lavr_link = "http://flash.178.com/";
MovieClip(root).shade = 0;
}
function frame76(){
MovieClip(root).lavr_link = "http://www.papajogos.com.br";
MovieClip(root).shade = 0;
}
function frame77(){
MovieClip(root).lavr_link = "http://www.arcadelots.com/";
MovieClip(root).shade = 0;
}
function frame78(){
MovieClip(root).lavr_link = "http://www.minigamers.com/";
MovieClip(root).shade = 0;
}
function frame79(){
MovieClip(root).lavr_link = "http://www.stickpage.com";
MovieClip(root).shade = 0;
}
function frame80(){
MovieClip(root).lavr_link = "http://www.y8.com/";
MovieClip(root).shade = 1;
}
function frame81(){
MovieClip(root).lavr_link = "http://www.y3.com/";
MovieClip(root).shade = 1;
}
function frame83(){
MovieClip(root).lavr_link = "http://www.videobash.com/";
MovieClip(root).shade = 0;
}
}
}//package _4WAY_fla
Section 41
//Vr_MainContainer_39 (_4WAY_fla.Vr_MainContainer_39)
package _4WAY_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Vr_MainContainer_39 extends MovieClip {
public var boxx:MovieClip;
public var url_btn:SimpleButton;
public var boxx2:MovieClip;
public function Vr_MainContainer_39(){
addFrameScript(0, frame1, 19, frame20);
}
public function mOver(_arg1:MouseEvent){
gotoAndPlay(2);
}
public function mOut(_arg1:MouseEvent){
gotoAndPlay(21);
}
public function mClick(_arg1:MouseEvent){
getURL(MovieClip(root).lavr_link, "_blank");
}
public function getURL(_arg1:String, _arg2:String){
navigateToURL(new URLRequest(_arg1), _arg2);
}
function frame1(){
stop();
url_btn.addEventListener(MouseEvent.ROLL_OVER, mOver);
url_btn.addEventListener(MouseEvent.ROLL_OUT, mOut);
url_btn.addEventListener(MouseEvent.CLICK, mClick);
}
function frame20(){
stop();
}
}
}//package _4WAY_fla
Section 42
//xcx_235 (_4WAY_fla.xcx_235)
package _4WAY_fla {
import flash.display.*;
public dynamic class xcx_235 extends MovieClip {
public var boundry_1:MovieClip;
public var boundry_2:MovieClip;
public var boundry_3:MovieClip;
public var man:MovieClip;
public function xcx_235(){
addFrameScript(0, frame1);
}
public function rotate_Fun1(){
var _local1:int = (mouseX - man.x);
var _local2:int = ((mouseY - man.y) * -1);
var _local3:* = (Math.atan((_local2 / _local1)) / (Math.PI / 180));
if (_local1 < 0){
_local3 = (_local3 + 180);
};
if ((((_local1 >= 0)) && ((_local2 < 0)))){
_local3 = (_local3 + 360);
};
man.rotation = ((_local3 * -1) - 90);
}
function frame1(){
stop();
}
}
}//package _4WAY_fla
Section 43
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _visible:Boolean;
protected var _tween:TweenLite;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 44
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
}
}//package gs.plugins
Section 45
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package gs.plugins
Section 46
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 47
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _target:DisplayObject;
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
public static const VERSION:Number = 1.1;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
}
}//package gs.plugins
Section 48
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var propName:String;
public var overwriteProps:Array;
public var round:Boolean;
public var onComplete:Function;
protected var _tweens:Array;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 49
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _tween:TweenLite;
protected var _visible:Boolean;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 50
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package gs.plugins
Section 51
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var index:uint;
public var start:Number;
public var change:Number;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 52
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var target:Object;
public var property:String;
public var start:Number;
public var change:Number;
public var name:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 53
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
public class TweenLite {
public var duration:Number;
public var vars:Object;
public var delay:Number;
public var startTime:Number;
public var initTime:Number;
public var tweens:Array;
public var target:Object;
public var active:Boolean;
public var ease:Function;
public var initted:Boolean;
public var combinedTimeScale:Number;
public var gc:Boolean;
public var started:Boolean;
public var exposedVars:Object;
protected var _hasPlugins:Boolean;
protected var _hasUpdate:Boolean;
public static const version:Number = 10.092;
public static var plugins:Object = {};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var defaultEase:Function = TweenLite.easeOut;
public static var overwriteManager:Object;
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
public static var timingSprite:Sprite = new Sprite();
private static var _tlInitted:Boolean;
private static var _timer:Timer = new Timer(2000);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
}
}//package gs
Section 54
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
var bar_w:Number = ((w - bar.x) - 10);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var progress:Number = Math.min(1, options.progress_override(clip));
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
var _local7:Number = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local8:Number = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
var _local9:Number = ((100 * _local3) / chk.ad_msec);
var _local10:Object = this._mochiad_bar._inside;
var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var mc:MovieClip;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
loader.load(req);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.right - _local3.left);
_local5 = (_local3.top - _local3.bottom);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
}
}//package mochi.as3
Section 55
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_SHOW:String = "StoreShow";
public static const STORE_HIDE:String = "StoreHide";
public static const ITEM_OWNED:String = "ItemOwned";
public static const ITEM_NEW:String = "ItemNew";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static var _inventory:MochiInventory;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 56
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Fragment:Number;
private var Sibling:MochiDigits;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function get value():Number{
return (Number(this.toString()));
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
}
}//package mochi.as3
Section 57
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
}
}//package mochi.as3
Section 58
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_CENTER:String = "ALIGN_C";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const FORMAT_SHORT:String = "ShortForm";
public static const FORMAT_LONG:String = "LongForm";
private static var gameStart:Number;
private static var levelStart:Number;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local4:Object;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
}
}//package mochi.as3
Section 59
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _consumableProperties:Object;
private var _syncPending:Boolean;
private var _outstandingID:Number;
private var _syncID:Number;
private var _names:Array;
private var _storeSync:Object;
private static const CONSUMER_KEY:String = "MochiConsumables";
private static const KEY_SALT:String = " syncMaint";
public static const READY:String = "InvReady";
public static const WRITTEN:String = "InvWritten";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
public static const VALUE_ERROR:String = "InvValueError";
public static const NOT_READY:String = "InvNotReady";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 60
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _id:String;
private static var _container:Object;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _timer:Timer;
private static var _preserved:Object;
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
private static var _services:String = "services.swf";
private static var _mochiLC:String = "MochiLC.swf";
private static var _swfVersion:String;
private static var _listenChannelName:String = "__ms_";
private static var _sendChannel:LocalConnection;
private static var _sendChannelName:String;
private static var _connecting:Boolean = false;
private static var _connected:Boolean = false;
public static var netup:Boolean = true;
public static var netupAttempted:Boolean = false;
public static var onError:Object;
public static var widget:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _queue:Array;
private static var _nextCallbackID:Number;
private static var _callbacks:Object;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function get id():String{
return (_id);
}
public static function get clip():Object{
return (_container);
}
public static function get childClip():Object{
return (_clip);
}
public static function getVersion():String{
return ("3.9.2 as3");
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
public static function get connected():Boolean{
return (_connected);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} catch(error:Error) {
};
};
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
private static function detach(_arg1:Event):void{
var _local2:LoaderInfo = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader = new Loader();
var _local3:String = (_servURL + _mochiLC);
var _local4:URLRequest = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://link.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 61
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const LOGGED_OUT:String = "LoggedOut";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_CANCELED:String = "onCancel";
public static const ACTION_COMPLETE:String = "onComplete";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 62
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var _loader:URLLoader;
public var key:String;// = null
public var data;// = null
public var error:Event;// = null
public var operation:String;// = null
public var callback:Function;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function getEvent():void{
request("get", serialize(null));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 63
//Ball (Ball)
package {
import flash.display.*;
public dynamic class Ball extends MovieClip {
public function Ball(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 64
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 65
//snd_bg (snd_bg)
package {
import flash.media.*;
public dynamic class snd_bg extends Sound {
}
}//package
Section 66
//snd_front (snd_front)
package {
import flash.media.*;
public dynamic class snd_front extends Sound {
}
}//package
Section 67
//snd_gun (snd_gun)
package {
import flash.media.*;
public dynamic class snd_gun extends Sound {
}
}//package
Section 68
//snd_jeep (snd_jeep)
package {
import flash.media.*;
public dynamic class snd_jeep extends Sound {
}
}//package
Section 69
//snd_kill (snd_kill)
package {
import flash.media.*;
public dynamic class snd_kill extends Sound {
}
}//package