Section 1
//Cpu_01 (classes.powerups.Cpu_01)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_01 extends pu_01 {
var d:Number;// = 0
var frame:String;// = "1"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_01(_arg1:Sprite, _arg2):void{
frame = "1";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(15);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 2
//Cpu_02 (classes.powerups.Cpu_02)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_02 extends pu_02 {
var d:Number;// = 0
var frame:String;// = "2"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_02(_arg1:Sprite, _arg2):void{
frame = "2";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Size(-0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 3
//Cpu_03 (classes.powerups.Cpu_03)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_03 extends pu_03 {
var d:Number;// = 0
var frame:String;// = "3"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_03(_arg1:Sprite, _arg2):void{
frame = "3";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Speed(-1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 4
//Cpu_04 (classes.powerups.Cpu_04)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_04 extends pu_04 {
var d:Number;// = 0
var frame:String;// = "4"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_04(_arg1:Sprite, _arg2):void{
frame = "4";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Speed(1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 5
//Cpu_05 (classes.powerups.Cpu_05)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_05 extends pu_05 {
var d:Number;// = 0
var frame:String;// = "5"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_05(_arg1:Sprite, _arg2):void{
frame = "5";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Size(0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 6
//Cpu_06 (classes.powerups.Cpu_06)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_06 extends pu_06 {
var d:Number;// = 0
var frame:String;// = "6"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_06(_arg1:Sprite, _arg2):void{
frame = "6";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Time(-10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 7
//Cpu_07 (classes.powerups.Cpu_07)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Cpu_07 extends pu_07 {
var d:Number;// = 0
var frame:String;// = "7"
var Ref:Sprite;
var Parent;
var time:Number;
public function Cpu_07(_arg1:Sprite, _arg2):void{
frame = "7";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Parent = _arg2;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Time(10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 8
//enemy (classes.powerups.enemy)
package classes.powerups {
import flash.display.*;
import flash.events.*;
public class enemy extends enemymc {
var xSpd:Number;// = -2
var frame:String;// = "6"
var ySpd:Number;// = -2
var r:Number;// = 0
var Ref:Sprite;
var ready:Boolean;// = false
var Parent;
public function enemy(_arg1:Sprite, _arg2):void{
ready = false;
xSpd = -2;
ySpd = -2;
r = 0;
frame = "6";
super();
Ref = _arg1;
Parent = _arg2;
x = (550 + (Math.random() * 120));
y = (Math.random() * 400);
r = (width / 2);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
x = (x + xSpd);
y = (y + ySpd);
rotation = (rotation + xSpd);
if (((((x + r) > 500)) && (ready))){
xSpd = -(xSpd);
x = (500 - r);
};
if ((x - r) < 0){
xSpd = -(xSpd);
x = r;
ready = true;
};
if ((y + r) > 400){
ySpd = -(ySpd);
y = (400 - r);
};
if ((y - r) < 0){
ySpd = -(ySpd);
y = r;
};
if ((((((Math.abs((x - Ref.x)) < 40)) && ((Math.abs((y - Ref.y)) < 40)))) && (!(Parent.done)))){
Parent.Time(-200);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes.powerups
Section 9
//P2Cpu_01 (classes.powerups.P2Cpu_01)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_01 extends pu_01 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "1"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_01(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "1";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(15);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(15);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 10
//P2Cpu_02 (classes.powerups.P2Cpu_02)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_02 extends pu_02 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "2"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_02(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "2";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Size(-0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(-2);
Parent.Size2(-0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 11
//P2Cpu_03 (classes.powerups.P2Cpu_03)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_03 extends pu_03 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "3"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_03(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "3";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Speed(-1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(-2);
Parent.Speed2(-1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 12
//P2Cpu_04 (classes.powerups.P2Cpu_04)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_04 extends pu_04 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "4"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_04(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "4";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Speed(1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(2);
Parent.Speed2(1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 13
//P2Cpu_05 (classes.powerups.P2Cpu_05)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_05 extends pu_05 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "5"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_05(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "5";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Size(0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(2);
Parent.Size2(0.1);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 14
//P2Cpu_06 (classes.powerups.P2Cpu_06)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_06 extends pu_06 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "6"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_06(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "6";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(-2);
Parent.Time(-10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(-2);
Parent.Time(-10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 15
//P2Cpu_07 (classes.powerups.P2Cpu_07)
package classes.powerups {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class P2Cpu_07 extends pu_07 {
var Ref2:Sprite;
var d:Number;// = 0
var frame:String;// = "7"
var Ref:Sprite;
var Parent;
var time:Number;
public function P2Cpu_07(_arg1:Sprite, _arg2:Sprite, _arg3):void{
frame = "7";
time = getTimer();
d = 0;
super();
Ref = _arg1;
Ref2 = _arg2;
Parent = _arg3;
alpha = 0;
x = (Math.random() * 500);
y = (Math.random() * 400);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
}
private function ef(_arg1:Event):void{
alpha = (alpha + 0.01);
if (((((getTimer() - time) > 5000)) && (!(Parent.done)))){
Parent.asplode(x, y, false, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((x - Ref.x)) < 25)) && ((Math.abs((y - Ref.y)) < 25)))){
Parent.Score(2);
Parent.Time(10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
} else {
if ((((Math.abs((x - Ref2.x)) < 25)) && ((Math.abs((y - Ref2.y)) < 25)))){
Parent.Score2(2);
Parent.Time(10);
Parent.asplode(x, y, true, frame);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
};
}
}
}//package classes.powerups
Section 16
//b0t (classes.b0t)
package classes {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class b0t extends b0tmc {
const pi:Number = 3.1415927;
var xSpd:Number;// = 0
var Pow:Number;// = 0
var dKey:Number;// = 83
var lKey:Number;// = 65
var tickd:Number;// = 0
var SFX:Sound;
var r:Number;// = 0
var ySpd:Number;// = 0
var tick:Number;// = 0
var spd:Number;// = 5
var rKey:Number;// = 68
var uKey:Number;// = 87
var Rot:Number;// = 0
var time:Number;
var move:Boolean;// = false
var rot:Number;// = 0
var rSpd:Number;// = 0
public function b0t(){
spd = 5;
rot = 0;
r = 0;
time = getTimer();
SFX = new beep();
tick = 0;
tickd = 0;
rKey = 68;
lKey = 65;
uKey = 87;
dKey = 83;
Rot = 0;
Pow = 0;
xSpd = 0;
ySpd = 0;
rSpd = 0;
move = false;
super();
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.ADDED, added, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
x = 250;
y = 200;
scaleX = 0.75;
scaleY = 0.75;
r = (bot.width / 2);
}
private function added(_arg1:Event):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, kd);
stage.addEventListener(KeyboardEvent.KEY_UP, ku);
removeEventListener(Event.ADDED, added);
}
private function cont():void{
if (Rot > 0){
rSpd = (rSpd + 0.4);
};
if (Rot < 0){
rSpd = (rSpd - 0.4);
};
if (Pow > 0){
if (rot > 180){
ySpd = (ySpd + ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd - ((spd * Math.sin(((pi / 180) * rot))) / 10));
} else {
ySpd = (ySpd - ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd + ((spd * Math.sin(((pi / 180) * rot))) / 10));
};
};
if (Pow < 0){
if (rot > 180){
ySpd = (ySpd - ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd + ((spd * Math.sin(((pi / 180) * rot))) / 10));
} else {
ySpd = (ySpd + ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd - ((spd * Math.sin(((pi / 180) * rot))) / 10));
};
};
}
public function spdUpdate(_arg1):void{
spd = (spd + _arg1);
if (spd > 10){
spd = 10;
};
if (spd < 1){
spd = 1;
};
}
private function c65():void{
Rot = -1;
}
private function kd(_arg1:KeyboardEvent):void{
var _local2:Number;
_local2 = _arg1.keyCode;
if (_local2 == 65){
c65();
};
if (_local2 == 68){
c68();
};
if (_local2 == 83){
c83();
};
if (_local2 == 87){
c87();
};
}
public function ku(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if ((((_local2 == 65)) || ((_local2 == 68)))){
Rot = 0;
};
if ((((_local2 == 83)) || ((_local2 == 87)))){
Pow = 0;
};
}
public function col():void{
if ((x + r) > 500){
x = (500 - r);
xSpd = (-(xSpd) * 0.5);
asplode(x, y);
};
if ((x - r) < 0){
x = r;
xSpd = (-(xSpd) * 0.5);
asplode(x, y);
};
if ((y + r) > 400){
y = (400 - r);
ySpd = (-(ySpd) * 0.5);
asplode(x, y);
};
if ((y - r) < 0){
y = r;
ySpd = (-(ySpd) * 0.5);
asplode(x, y);
};
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kd);
stage.removeEventListener(KeyboardEvent.KEY_UP, ku);
}
private function ef(_arg1:Event):void{
tickd = (getTimer() - tick);
tick = getTimer();
col();
cont();
rot = ndl.rotation;
x = (x + ((xSpd * tickd) / 22));
y = (y + ((ySpd * tickd) / 22));
ndl.rotation = (ndl.rotation + ((rSpd * tickd) / 22));
rSpd = (rSpd * 0.95);
xSpd = (xSpd * 0.95);
ySpd = (ySpd * 0.95);
}
private function c87():void{
Pow = 1;
}
public function asplode(_arg1, _arg2):void{
var _local3:*;
if ((getTimer() - time) > 150){
SFX.play();
time = getTimer();
if (tickd < 20){
_local3 = 0;
while (_local3 < 12) {
stage.addChild(new star(_arg1, _arg2));
_local3++;
};
};
};
}
public function sizUpdate(_arg1):void{
scaleX = (scaleY = (scaleX + _arg1));
if (scaleX > 1.5){
scaleX = (scaleY = 1.5);
};
if (scaleX < 0.5){
scaleX = (scaleY = 0.5);
};
r = (bot.width / 2);
}
private function c83():void{
Pow = -1;
}
private function c68():void{
Rot = 1;
}
}
}//package classes
Section 17
//bubble (classes.bubble)
package classes {
import flash.events.*;
public class bubble extends bubblemc {
var xSpd:Number;// = 0
var ySpd:Number;// = 0
public function bubble(_arg1):void{
xSpd = 0;
ySpd = 0;
super();
scaleX = (scaleY = (Math.random() * 1.2));
x = _arg1.x;
y = _arg1.y;
xSpd = ((Math.random() * 8) - 4);
ySpd = ((Math.random() * 8) - 6);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
}
private function ef(_arg1:Event):void{
x = (x + xSpd);
y = (y + ySpd);
ySpd = (ySpd + 0.2);
if (y > 410){
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, ef);
};
rotation = (rotation + 15);
}
}
}//package classes
Section 18
//explosion (classes.explosion)
package classes {
import flash.events.*;
public class explosion extends bubblemc2 {
public function explosion(_arg1, _arg2):void{
x = _arg1;
y = _arg2;
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
}
private function ef(_arg1:Event):void{
width = (width + 12);
height = (height + 12);
if (width > 1200){
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, ef);
};
}
}
}//package classes
Section 19
//hud (classes.hud)
package classes {
import flash.events.*;
import flash.utils.*;
public class hud extends hudmc {
var timer:Timer;
public var score:Number;// = 0
var tLeft:Number;// = 90
public function hud():void{
tLeft = 90;
score = 0;
timer = new Timer(1000, 0);
super();
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
timer.start();
sdisp.text = (score + " points");
tdisp.text = (tLeft + ":00");
addEventListener(Event.REMOVED, removed, false, 0, true);
}
public function sUpdate(_arg1):void{
score = (score + _arg1);
if (score < 0){
score = 0;
};
sdisp.text = (score + " points");
}
public function tUpdate(_arg1):void{
tLeft = (tLeft + _arg1);
if (tLeft < 0){
parent.dispatchEvent(new Event("GameOver"));
};
tdisp.text = (tLeft + ":00");
}
private function tim(_arg1:TimerEvent):void{
tLeft--;
tdisp.text = (tLeft + ":00");
if (tLeft < 0){
tLeft = 0;
tdisp.text = "0:00";
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, tim);
parent.dispatchEvent(new Event("GameOver"));
};
}
private function removed(_arg1:Event):void{
timer.removeEventListener(TimerEvent.TIMER, tim);
removeEventListener(Event.REMOVED, removed);
}
}
}//package classes
Section 20
//P2b0t (classes.P2b0t)
package classes {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class P2b0t extends P2b0tmc {
const pi:Number = 3.1415927;
var xSpd:Number;// = 0
var Pow:Number;// = 0
var dKey:Number;// = 40
var lKey:Number;// = 37
var tickd:Number;// = 0
var SFX:Sound;
var r:Number;// = 0
var ySpd:Number;// = 0
var tick:Number;// = 0
var spd:Number;// = 5
var rKey:Number;// = 39
var uKey:Number;// = 38
var Rot:Number;// = 0
var time:Number;
var move:Boolean;// = false
var rSpd:Number;// = 0
var rot:Number;// = 0
public function P2b0t(){
spd = 5;
rot = 0;
r = 0;
time = getTimer();
SFX = new beep();
tick = 0;
tickd = 0;
rKey = 39;
lKey = 37;
uKey = 38;
dKey = 40;
Rot = 0;
Pow = 0;
xSpd = 0;
ySpd = 0;
rSpd = 0;
move = false;
super();
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.ADDED, added, false, 0, true);
addEventListener(Event.REMOVED, removed, false, 0, true);
x = 250;
y = 200;
scaleX = 0.75;
scaleY = 0.75;
r = (P2bot.width / 2);
}
private function added(_arg1:Event):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, kd);
stage.addEventListener(KeyboardEvent.KEY_UP, ku);
removeEventListener(Event.ADDED, added);
}
private function c38():void{
Pow = 1;
}
private function c37():void{
Rot = -1;
}
private function c39():void{
Rot = 1;
}
private function c40():void{
Pow = -1;
}
private function cont():void{
if (Rot > 0){
rSpd = (rSpd + 0.4);
};
if (Rot < 0){
rSpd = (rSpd - 0.4);
};
if (Pow > 0){
if (rot > 180){
ySpd = (ySpd + ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd - ((spd * Math.sin(((pi / 180) * rot))) / 10));
} else {
ySpd = (ySpd - ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd + ((spd * Math.sin(((pi / 180) * rot))) / 10));
};
};
if (Pow < 0){
if (rot > 180){
ySpd = (ySpd - ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd + ((spd * Math.sin(((pi / 180) * rot))) / 10));
} else {
ySpd = (ySpd + ((spd * Math.cos(((pi / 180) * rot))) / 10));
xSpd = (xSpd - ((spd * Math.sin(((pi / 180) * rot))) / 10));
};
};
}
public function spdUpdate(_arg1):void{
spd = (spd + _arg1);
if (spd > 10){
spd = 10;
};
if (spd < 1){
spd = 1;
};
}
private function kd(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode > 36)) && ((_arg1.keyCode < 41)))){
var _local2 = this;
_local2[("c" + _arg1.keyCode)]();
};
}
public function ku(_arg1:KeyboardEvent):void{
var _local2:*;
_local2 = _arg1.keyCode;
if ((((_local2 == 37)) || ((_local2 == 39)))){
Rot = 0;
};
if ((((_local2 == 38)) || ((_local2 == 40)))){
Pow = 0;
};
}
public function col():void{
if ((x + r) > 500){
x = (500 - r);
xSpd = (-(xSpd) * 0.5);
asplode(x, y);
};
if ((x - r) < 0){
x = r;
xSpd = (-(xSpd) * 0.5);
asplode(x, y);
};
if ((y + r) > 400){
y = (400 - r);
ySpd = (-(ySpd) * 0.5);
asplode(x, y);
};
if ((y - r) < 0){
y = r;
ySpd = (-(ySpd) * 0.5);
asplode(x, y);
};
}
private function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, removed);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kd);
stage.removeEventListener(KeyboardEvent.KEY_UP, ku);
}
private function ef(_arg1:Event):void{
tickd = (getTimer() - tick);
tick = getTimer();
col();
cont();
rot = P2ndl.rotation;
x = (x + ((xSpd * tickd) / 22));
y = (y + ((ySpd * tickd) / 22));
P2ndl.rotation = (P2ndl.rotation + ((rSpd * tickd) / 22));
rSpd = (rSpd * 0.95);
xSpd = (xSpd * 0.95);
ySpd = (ySpd * 0.95);
}
public function asplode(_arg1, _arg2):void{
var _local3:*;
if ((getTimer() - time) > 150){
SFX.play();
time = getTimer();
if (tickd < 20){
_local3 = 0;
while (_local3 < 12) {
stage.addChild(new star(_arg1, _arg2));
_local3++;
};
};
};
}
public function sizUpdate(_arg1):void{
scaleX = (scaleY = (scaleX + _arg1));
if (scaleX > 1.5){
scaleX = (scaleY = 1.5);
};
if (scaleX < 0.5){
scaleX = (scaleY = 0.5);
};
r = (P2bot.width / 2);
}
}
}//package classes
Section 21
//P2hud (classes.P2hud)
package classes {
import flash.events.*;
import flash.utils.*;
public class P2hud extends P2hudmc {
var timer:Timer;
public var score:Number;// = 0
var tLeft:Number;// = 60
public var score2:Number;// = 0
public function P2hud():void{
tLeft = 60;
score = 0;
score2 = 0;
timer = new Timer(1000, 0);
super();
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
timer.start();
sdisp.text = (score + " points");
sdisp2.text = (score2 + " points");
tdisp.text = (tLeft + ":00");
addEventListener(Event.REMOVED, removed, false, 0, true);
}
public function sUpdate(_arg1):void{
score = (score + _arg1);
if (score < 0){
score = 0;
};
sdisp.text = (score + " points");
}
public function tUpdate(_arg1):void{
tLeft = (tLeft + _arg1);
if (tLeft < 0){
parent.dispatchEvent(new Event("GameOver"));
};
tdisp.text = (tLeft + ":00");
}
private function tim(_arg1:TimerEvent):void{
tLeft--;
tdisp.text = (tLeft + ":00");
if (tLeft < 0){
tLeft = 0;
tdisp.text = "0:00";
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, tim);
parent.dispatchEvent(new Event("GameOver"));
};
}
public function sUpdate2(_arg1):void{
score2 = (score2 + _arg1);
if (score2 < 0){
score2 = 0;
};
sdisp2.text = (score2 + " points");
}
private function removed(_arg1:Event):void{
timer.removeEventListener(TimerEvent.TIMER, tim);
removeEventListener(Event.REMOVED, removed);
}
}
}//package classes
Section 22
//P2powerup (classes.P2powerup)
package classes {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import classes.powerups.*;
public class P2powerup extends Sprite {
var Mask:maskmc;
var app:Boolean;// = true
var timer:Timer;
var b:Number;// = 0
var Char:b0t;
var Char2:P2b0t;
public var done:Boolean;// = false
var PUdisplayer:textbox;
var Hud:P2hud;
public function P2powerup(_arg1:b0t, _arg2:P2b0t, _arg3:P2hud, _arg4:maskmc):void{
var _local5:P2Cpu_01;
var _local6:P2Cpu_02;
var _local7:P2Cpu_03;
var _local8:P2Cpu_04;
var _local9:P2Cpu_05;
var _local10:P2Cpu_06;
var _local11:P2Cpu_07;
b = 0;
app = true;
timer = new Timer(1600, 0);
done = false;
PUdisplayer = new textbox();
super();
Char = _arg1;
Char2 = _arg2;
Hud = _arg3;
Mask = _arg4;
Mask.addChild(PUdisplayer);
_local5 = null;
_local6 = null;
_local7 = null;
_local8 = null;
_local9 = null;
_local10 = null;
_local11 = null;
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
addEventListener("end", End, false, 0, true);
timer.start();
}
public function Score2(_arg1):void{
Hud.sUpdate2(_arg1);
}
public function Speed(_arg1):void{
Char.spdUpdate(_arg1);
}
public function Size2(_arg1):void{
Char2.sizUpdate(_arg1);
}
public function Size(_arg1):void{
Char.sizUpdate(_arg1);
}
private function tim(_arg1:TimerEvent):void{
var _local2:Sprite;
var _local3:Class;
var _local4:Sprite;
if (app){
_local2 = new P2Cpu_01(Char, Char2, this);
addChild(_local2);
} else {
b = Math.ceil((Math.random() * 7));
_local3 = (getDefinitionByName(("classes.powerups.P2Cpu_0" + b)) as Class);
_local4 = new _local3(Char, Char2, this);
addChild(_local4);
};
app = !(app);
}
public function Score(_arg1):void{
Hud.sUpdate(_arg1);
}
private function End(_arg1:Event):void{
done = true;
timer.removeEventListener(TimerEvent.TIMER, tim);
removeEventListener("end", End);
}
public function asplode(_arg1, _arg2, _arg3, _arg4):void{
Char.asplode(_arg1, _arg2);
if (_arg3){
Mask.addChild(new explosion(_arg1, _arg2));
PUdisplayer.resetTimer(_arg4);
};
}
public function Speed2(_arg1):void{
Char2.spdUpdate(_arg1);
}
public function Time(_arg1):void{
Hud.tUpdate(_arg1);
}
}
}//package classes
Section 23
//powerup (classes.powerup)
package classes {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import classes.powerups.*;
public class powerup extends Sprite {
var Mask:maskmc;
var count:Number;// = 0
var app:Boolean;// = true
var timer:Timer;
var b:Number;// = 0
var Char:b0t;
public var done:Boolean;// = false
var PUdisplayer:textbox;
var Hud:hud;
public function powerup(_arg1:b0t, _arg2:hud, _arg3:maskmc):void{
var _local4:Cpu_01;
var _local5:Cpu_02;
var _local6:Cpu_03;
var _local7:Cpu_04;
var _local8:Cpu_05;
var _local9:Cpu_06;
var _local10:Cpu_07;
var _local11:enemy;
b = 0;
count = 0;
app = true;
timer = new Timer(2200, 0);
done = false;
PUdisplayer = new textbox();
super();
Char = _arg1;
Hud = _arg2;
Mask = _arg3;
Mask.addChild(PUdisplayer);
_local4 = null;
_local5 = null;
_local6 = null;
_local7 = null;
_local8 = null;
_local9 = null;
_local10 = null;
_local11 = null;
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
addEventListener("end", End, false, 0, true);
timer.start();
}
public function Speed(_arg1):void{
Char.spdUpdate(_arg1);
}
public function Size(_arg1):void{
Char.sizUpdate(_arg1);
}
private function tim(_arg1:TimerEvent):void{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Class;
var _local5:Sprite;
count++;
if (count > 9){
_local2 = new enemy(Char, this);
addChild(_local2);
count = 0;
};
if (app){
_local3 = new Cpu_01(Char, this);
addChild(_local3);
} else {
b = Math.ceil((Math.random() * 7));
_local4 = (getDefinitionByName(("classes.powerups.Cpu_0" + b)) as Class);
_local5 = new _local4(Char, this);
addChild(_local5);
};
app = !(app);
}
public function Score(_arg1):void{
Hud.sUpdate(_arg1);
}
private function End(_arg1:Event):void{
done = true;
timer.removeEventListener(TimerEvent.TIMER, tim);
removeEventListener("end", End);
}
public function asplode(_arg1, _arg2, _arg3, _arg4):void{
Char.asplode(_arg1, _arg2);
if (_arg3){
Mask.addChild(new explosion(_arg1, _arg2));
PUdisplayer.resetTimer(_arg4);
};
}
public function Time(_arg1):void{
Hud.tUpdate(_arg1);
}
}
}//package classes
Section 24
//star (classes.star)
package classes {
import flash.events.*;
public class star extends starmc {
var xSpd:Number;// = 0
var ySpd:Number;// = 0
public function star(_arg1, _arg2):void{
xSpd = 0;
ySpd = 0;
super();
x = _arg1;
y = _arg2;
xSpd = ((Math.random() * 8) - 4);
ySpd = ((Math.random() * 8) - 6);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
}
private function col():void{
if (x > 500){
x = 500;
xSpd = -(xSpd);
};
if (x < 0){
x = 0;
xSpd = -(xSpd);
};
if (y > 400){
y = 400;
ySpd = (-(ySpd) * 0.5);
};
if (y < 0){
y = 0;
ySpd = -(ySpd);
};
}
private function ef(_arg1:Event):void{
col();
x = (x + xSpd);
y = (y + ySpd);
ySpd = (ySpd + 0.2);
alpha = (alpha - 0.01);
if (alpha < 0.1){
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, ef);
};
rotation = (rotation + (2 * xSpd));
}
}
}//package classes
Section 25
//textbox (classes.textbox)
package classes {
import flash.events.*;
import flash.utils.*;
public class textbox extends textboxmc {
var time:Number;
public function textbox():void{
time = getTimer();
super();
gotoAndStop(8);
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
}
public function resetTimer(_arg1):void{
gotoAndStop(_arg1);
time = getTimer();
}
private function ef(_arg1:Event):void{
if ((getTimer() - time) > 750){
gotoAndStop(8);
};
}
}
}//package classes
Section 26
//transition (classes.transition)
package classes {
import flash.events.*;
public class transition extends fademc {
var P;
var Frame:String;// = ""
public function transition(_arg1, _arg2):void{
Frame = "";
super();
P = _arg1;
Frame = _arg2;
this.addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
}
private function ef(_arg1:Event):void{
if (currentFrame == 30){
P.gotoAndPlay(Frame);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, ef);
};
}
}
}//package classes
Section 27
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import flash.display.*;
import fl.core.*;
import flash.events.*;
public class IndeterminateBar extends UIComponent {
protected var bar:Sprite;
protected var barMask:Sprite;
protected var patternBmp:BitmapData;
protected var animationCount:uint;// = 0
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
animationCount = 0;
super();
setSize(0, 0);
startAnimation();
}
protected function drawBar():void{
var _local1:Graphics;
if (patternBmp == null){
return;
};
_local1 = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics;
_local1 = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject;
_local1 = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 28
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 29
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 30
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 31
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 32
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _value:Number;// = 0
protected var _indeterminate:Boolean;// = true
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 0
protected var determinateBar:DisplayObject;
protected var _loaded:Number;
protected var _source:Object;
protected var track:DisplayObject;
protected var indeterminateBar:UIComponent;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
public function ProgressBar(){
_direction = ProgressBarDirection.RIGHT;
_indeterminate = true;
_mode = ProgressBarMode.EVENT;
_minimum = 0;
_maximum = 0;
_value = 0;
super();
}
public function get minimum():Number{
return (_minimum);
}
public function get source():Object{
return (_source);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function drawBars():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
_local1 = determinateBar;
_local2 = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
protected function drawTrack():void{
var _local1:DisplayObject;
_local1 = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set sourceName(_arg1:String):void{
var _local2:DisplayObject;
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
_local2 = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
var _local1:Object;
_setProgress(0, 0);
_local1 = _source;
_source = null;
source = _local1;
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
}
protected function drawDeterminateBar():void{
var _local1:Number;
var _local2:Number;
_local1 = (percentComplete / 100);
_local2 = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
public function get value():Number{
return (_value);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get direction():String{
return (_direction);
}
public function get mode():String{
return (_mode);
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 33
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 34
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 35
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 36
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 37
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.text.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 38
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 39
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 40
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 41
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 42
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 43
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 44
//MainTimeline (main_fla.MainTimeline)
package main_fla {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import classes.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
public dynamic class MainTimeline extends MovieClip {
public var PU:Sprite;
public var scoredisplay:TextField;
public var P2Song:Sound;
public var btn_singleplayer:SimpleButton;
public var P2char:b0t;
public var bg:MovieClip;
public var cr_music:SimpleButton;
public var __setPropDict:Dictionary;
public var p:Number;
public var P2lastfps:Number;
public var lastfps:Number;
public var P2timer:Timer;
public var progressbar:ProgressBar;
public var P2scoredisplay:TextField;
public var HUD:hud;
public var Jaggo:Boolean;
public var fps:Number;
public var jaggo:Array;
public var P2char2:P2b0t;
public var GoneThrough:Boolean;
public var P2_mask:maskmc;
public var btn_replay:SimpleButton;
public var btn_playmoregames:SimpleButton;
public var FADE2:MovieClip;
public var Song:Sound;
public var FADE3:MovieClip;
public var timer:Timer;
public var cr_produced:SimpleButton;
public var char:b0t;
public var btn_menu:SimpleButton;
public var P2PU:Sprite;
public var P2bg:MovieClip;
public var winnerdisplay:TextField;
public var fpsdisplay:TextField;
public var P2HUD:P2hud;
public var P2fps:Number;
public var _mask:maskmc;
public var myMochiClip:MovieClip;
public var btn_multiplayer:SimpleButton;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 5, frame6, 28, frame29, 48, frame49, 49, frame50, 68, frame69, 88, frame89, 89, frame90, 109, frame110, 205, frame206, 301, frame302);
}
public function P2ef(_arg1:Event):void{
P2fps++;
if (P2lastfps > 50){
P2_mask.addChild(new bubble(P2char));
P2_mask.addChild(new bubble(P2char2));
};
}
public function P2cl_playmoregames2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.pierjeanlizotte.com/");
navigateToURL(_local2);
}
function frame6(){
stop();
MochiAd.showInterLevelAd({clip:myMochiClip, id:"fc642578a3293d7f", res:"500x400", ad_finished:KeepGoing});
}
function frame1(){
if ((((__setPropDict[progressbar] == undefined)) || (!((int(__setPropDict[progressbar]) == 1))))){
__setPropDict[progressbar] = currentFrame;
__setProp_progressbar_Scene1_background_1();
};
stop();
GoneThrough = false;
this.addEventListener(Event.ENTER_FRAME, preloading, false, 0, true);
}
function frame29(){
stop();
jaggo = [74, 65, 71, 71, 79];
p = 0;
Jaggo = false;
btn_singleplayer.addEventListener(MouseEvent.CLICK, cl_singleplayer, false, 0, true);
btn_multiplayer.addEventListener(MouseEvent.CLICK, cl_multiplayer, false, 0, true);
btn_playmoregames.addEventListener(MouseEvent.CLICK, cl_playmoregames, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, kd, false, 0, true);
}
public function cl_multiplayer(_arg1:MouseEvent):void{
var _local2:MovieClip;
_local2 = new transition(this, "P2instructions");
addChild(_local2);
}
public function cl_replay(_arg1:MouseEvent):void{
var _local2:MovieClip;
GoneThrough = false;
_local2 = new transition(this, "game");
this.addChild(_local2);
}
public function cl_playmoregames(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.pierjeanlizotte.com/");
navigateToURL(_local2);
}
public function tim(_arg1:Event):void{
fpsdisplay.text = (((fps + " fps ") + (System.totalMemory / 0x0400)) + " kb");
lastfps = fps;
if (lastfps < 40){
stage.quality = StageQuality.LOW;
} else {
stage.quality = StageQuality.MEDIUM;
};
fps = 0;
}
public function cl_produced(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.pierjeanlizotte.com/");
navigateToURL(_local2);
}
public function ef(_arg1:Event):void{
fps++;
if (lastfps > 50){
_mask.addChild(new bubble(char));
};
}
public function P2cl_music(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://nostrap.newgrounds.com/");
navigateToURL(_local2);
}
function frame49(){
stop();
SoundMixer.stopAll();
stage.quality = StageQuality.MEDIUM;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.frameRate = 100;
char = new b0t();
bg = new bg1mc();
_mask = new maskmc();
HUD = new hud();
PU = new powerup(char, HUD, _mask);
Song = new song();
fps = 0;
lastfps = 0;
timer = new Timer(1000, 0);
stage.addChild(bg);
stage.addChild(char);
stage.addChild(_mask);
stage.addChild(PU);
stage.addChild(HUD);
bg.gotoAndStop(String(Jaggo));
bg.mask = _mask;
Song.play();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kd);
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
stage.addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
stage.addEventListener("GameOver", gameover);
timer.start();
}
public function cl_music(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://nostrap.newgrounds.com/");
navigateToURL(_local2);
}
public function P2cl_replay(_arg1:MouseEvent):void{
var _local2:MovieClip;
GoneThrough = false;
_local2 = new transition(this, "P2game");
this.addChild(_local2);
}
function frame302(){
stop();
FADE3 = new transition(this, "P2game");
addChild(FADE3);
}
function frame50(){
if (!GoneThrough){
stage.removeChild(bg);
stage.removeChild(char);
stage.removeChild(_mask);
PU.dispatchEvent(new Event("end"));
stage.removeChild(PU);
stage.removeChild(HUD);
stage.removeEventListener("GameOver", gameover);
stage.frameRate = 30;
SoundMixer.stopAll();
GoneThrough = true;
};
}
function frame69(){
stop();
stage.quality = StageQuality.HIGH;
scoredisplay.text = (String(HUD.score) + " points");
Jaggo = false;
btn_replay.addEventListener(MouseEvent.CLICK, cl_replay, false, 0, true);
btn_menu.addEventListener(MouseEvent.CLICK, cl_menu, false, 0, true);
btn_playmoregames.addEventListener(MouseEvent.CLICK, cl_playmoregames2, false, 0, true);
cr_music.addEventListener(MouseEvent.CLICK, cl_music, false, 0, true);
cr_produced.addEventListener(MouseEvent.CLICK, cl_produced, false, 0, true);
}
function frame206(){
stop();
FADE2 = new transition(this, "game");
addChild(FADE2);
}
function frame89(){
stop();
SoundMixer.stopAll();
stage.quality = StageQuality.MEDIUM;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.frameRate = 100;
P2char = new b0t();
P2char2 = new P2b0t();
P2bg = new bg1mc();
P2_mask = new maskmc();
P2HUD = new P2hud();
P2PU = new P2powerup(P2char, P2char2, P2HUD, P2_mask);
P2Song = new song();
P2fps = 0;
P2lastfps = 0;
P2timer = new Timer(1000, 0);
stage.addChild(P2bg);
stage.addChild(P2char);
stage.addChild(P2char2);
stage.addChild(P2_mask);
stage.addChild(P2PU);
stage.addChild(P2HUD);
P2bg.gotoAndStop(String(Jaggo));
P2bg.mask = P2_mask;
P2Song.play();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kd);
P2timer.addEventListener(TimerEvent.TIMER, P2tim, false, 0, true);
stage.addEventListener(Event.ENTER_FRAME, P2ef, false, 0, true);
stage.addEventListener("GameOver", P2gameover);
P2timer.start();
}
public function preloading(_arg1:Event):void{
progressbar.setProgress(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100), 100);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndPlay(2);
this.removeEventListener(Event.ENTER_FRAME, preloading);
};
}
public function cl_singleplayer(_arg1:MouseEvent):void{
var _local2:MovieClip;
_local2 = new transition(this, "instructions");
addChild(_local2);
}
function frame90(){
if (!GoneThrough){
stage.removeChild(P2bg);
stage.removeChild(P2char);
stage.removeChild(P2char2);
stage.removeChild(P2_mask);
P2PU.dispatchEvent(new Event("end"));
stage.removeChild(P2PU);
stage.removeChild(P2HUD);
stage.removeEventListener("GameOver", gameover);
stage.frameRate = 30;
SoundMixer.stopAll();
GoneThrough = true;
};
}
public function P2cl_menu(_arg1:MouseEvent):void{
var _local2:MovieClip;
GoneThrough = false;
_local2 = new transition(this, "menu");
this.addChild(_local2);
}
public function KeepGoing(){
play();
}
public function kd(_arg1:KeyboardEvent):void{
if (p > 3){
Jaggo = true;
};
if (_arg1.keyCode == jaggo[p]){
p++;
} else {
p = 0;
};
}
public function cl_menu(_arg1:MouseEvent):void{
var _local2:MovieClip;
GoneThrough = false;
_local2 = new transition(this, "menu");
this.addChild(_local2);
}
public function P2tim(_arg1:Event):void{
fpsdisplay.text = (((P2fps + " fps ") + (System.totalMemory / 0x0400)) + " kb");
P2lastfps = P2fps;
if (P2lastfps < 40){
stage.quality = StageQuality.LOW;
} else {
stage.quality = StageQuality.MEDIUM;
};
P2fps = 0;
}
public function P2cl_produced(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.pierjeanlizotte.com/");
navigateToURL(_local2);
}
function frame110(){
stop();
stage.quality = StageQuality.HIGH;
scoredisplay.text = String(P2HUD.score);
P2scoredisplay.text = String(P2HUD.score2);
if (P2HUD.score > P2HUD.score2){
winnerdisplay.text = "Player 1 wins!";
} else {
winnerdisplay.text = "Player 2 wins!";
};
Jaggo = false;
btn_replay.addEventListener(MouseEvent.CLICK, P2cl_replay, false, 0, true);
btn_menu.addEventListener(MouseEvent.CLICK, P2cl_menu, false, 0, true);
btn_playmoregames.addEventListener(MouseEvent.CLICK, P2cl_playmoregames2, false, 0, true);
cr_music.addEventListener(MouseEvent.CLICK, P2cl_music, false, 0, true);
cr_produced.addEventListener(MouseEvent.CLICK, P2cl_produced, false, 0, true);
}
public function P2gameover(_arg1:Event):void{
var _local2:MovieClip;
stage.removeEventListener(Event.ENTER_FRAME, P2ef);
P2timer.stop();
P2timer.removeEventListener(TimerEvent.TIMER, P2tim);
_local2 = new transition(this, "P2gameover");
this.addChild(_local2);
}
public function gameover(_arg1:Event):void{
var _local2:MovieClip;
stage.removeEventListener(Event.ENTER_FRAME, ef);
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, tim);
_local2 = new transition(this, "gameover");
this.addChild(_local2);
}
function __setProp_progressbar_Scene1_background_1(){
try {
progressbar["componentInspectorSetting"] = true;
} catch(e:Error) {
};
progressbar.direction = "right";
progressbar.enabled = true;
progressbar.mode = "manual";
progressbar.sourceName = "";
progressbar.visible = true;
try {
progressbar["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function cl_playmoregames2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.pierjeanlizotte.com/");
navigateToURL(_local2);
}
}
}//package main_fla
Section 45
//b0tmc (b0tmc)
package {
import flash.display.*;
public dynamic class b0tmc extends MovieClip {
public var ndl:MovieClip;
public var bot:MovieClip;
}
}//package
Section 46
//beep (beep)
package {
import flash.media.*;
public dynamic class beep extends Sound {
}
}//package
Section 47
//bg1mc (bg1mc)
package {
import flash.display.*;
public dynamic class bg1mc extends MovieClip {
}
}//package
Section 48
//bubblemc (bubblemc)
package {
import flash.display.*;
public dynamic class bubblemc extends MovieClip {
}
}//package
Section 49
//bubblemc2 (bubblemc2)
package {
import flash.display.*;
public dynamic class bubblemc2 extends MovieClip {
}
}//package
Section 50
//enemymc (enemymc)
package {
import flash.display.*;
public dynamic class enemymc extends MovieClip {
}
}//package
Section 51
//fademc (fademc)
package {
import flash.display.*;
public dynamic class fademc extends MovieClip {
}
}//package
Section 52
//hudmc (hudmc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class hudmc extends MovieClip {
public var tdisp:TextField;
public var sdisp:TextField;
}
}//package
Section 53
//maskmc (maskmc)
package {
import flash.display.*;
public dynamic class maskmc extends MovieClip {
}
}//package
Section 54
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.1");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {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 (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = 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;
};
lv = 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;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
_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++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
_arg1.removeChild(_arg1._mochiad);
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = 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{
var _local1:Number;
_local1 = (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.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_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 _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
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.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = 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);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 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;
_local1 = (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;
f = function (_arg1:Event):void{
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 55
//P2b0tmc (P2b0tmc)
package {
import flash.display.*;
public dynamic class P2b0tmc extends MovieClip {
public var P2ndl:MovieClip;
public var P2bot:MovieClip;
}
}//package
Section 56
//P2hudmc (P2hudmc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class P2hudmc extends MovieClip {
public var tdisp:TextField;
public var sdisp2:TextField;
public var sdisp:TextField;
}
}//package
Section 57
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 58
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 59
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 60
//pu_01 (pu_01)
package {
import flash.display.*;
public dynamic class pu_01 extends MovieClip {
}
}//package
Section 61
//pu_02 (pu_02)
package {
import flash.display.*;
public dynamic class pu_02 extends MovieClip {
}
}//package
Section 62
//pu_03 (pu_03)
package {
import flash.display.*;
public dynamic class pu_03 extends MovieClip {
}
}//package
Section 63
//pu_04 (pu_04)
package {
import flash.display.*;
public dynamic class pu_04 extends MovieClip {
}
}//package
Section 64
//pu_05 (pu_05)
package {
import flash.display.*;
public dynamic class pu_05 extends MovieClip {
}
}//package
Section 65
//pu_06 (pu_06)
package {
import flash.display.*;
public dynamic class pu_06 extends MovieClip {
}
}//package
Section 66
//pu_07 (pu_07)
package {
import flash.display.*;
public dynamic class pu_07 extends MovieClip {
}
}//package
Section 67
//song (song)
package {
import flash.media.*;
public dynamic class song extends Sound {
}
}//package
Section 68
//starmc (starmc)
package {
import flash.display.*;
public dynamic class starmc extends MovieClip {
}
}//package
Section 69
//textboxmc (textboxmc)
package {
import flash.display.*;
public dynamic class textboxmc extends MovieClip {
}
}//package