Section 1
//Timeline_22 (Border_fla.Timeline_22)
package Border_fla {
import flash.display.*;
public dynamic class Timeline_22 extends MovieClip {
public var marker_head:Marker;
public function Timeline_22(){
addFrameScript(34, frame35);
}
function frame35(){
gotoAndStop(1);
}
}
}//package Border_fla
Section 2
//Blue (classes.Flyings.Blue)
package classes.Flyings {
import classes.*;
import muzaffaraka.display.*;
public class Blue extends Yellow {
public function Blue(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
super(brd, tv, dead, grl);
scaleX = (scaleY = 0.6);
damagesToKill = Game.dataLoader.getGlobalVar("BLUE_HIT_TO_KILL");
_speed = Game.dataLoader.getGlobalVar("BLUE_SPEED");
_flyingTime = Game.dataLoader.getGlobalVar("BLUE_FLYTIME");
_sitTime = Game.dataLoader.getGlobalVar("BLUE_SITTIME");
_price = Game.dataLoader.getGlobalVar("BLUE_PRICE");
_type = "blue";
}
override protected function die():void{
super.die();
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Blue_flying_mc, 1, true);
states["sitting"] = new Blue_sitting_mc();
states["dieing"] = new Blue_dieing_mc();
}
}
}//package classes.Flyings
Section 3
//Flying (classes.Flyings.Flying)
package classes.Flyings {
import classes.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import muzaffaraka.display.*;
public class Flying extends Sprite {
protected var states:Object;
protected var currentPers:MovieClip;
protected var _immortal:Boolean;// = false
protected var _type:String;// = "flying"
protected var _inChrys:Boolean;// = false
protected var _tv:TVSet;
protected var turnFactor:Number;// = 0.77
protected var _me:Flying;
protected var _ptSit:SitPoint;// = null
protected var vector:Vector;
protected var _speed:Number;
protected var _price:int;
protected var _border:Border;
protected var _dead:Dead;
protected var _appeared:Boolean;// = false
protected var _goingToDisappear:Boolean;// = false
protected var damagedTimes:int;
protected var _currentState:String;
protected var _girl:Girl;
protected var damagesToKill:Number;
protected var _dropped:Boolean;// = false
protected var goingToSit:Boolean;// = false
protected var _sitTime:int;
protected var _flyingTime:int;
protected var _used:Boolean;// = false
protected var _flyCounter:int;
protected var bounds:Rectangle;
protected var ptStart:Point;
protected var _died:Boolean;// = false
protected var ptDest:Point;
protected var _sitCounter:int;
protected var _eated:Boolean;// = false
public function Flying(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
ptStart = new Point();
ptDest = new Point();
bounds = new Rectangle(20, 20, 780, 250);
super();
vector = new Vector(0, 0);
createStates();
currentPers = null;
_flyingTime = 25;
_sitTime = 5;
_border = brd;
_tv = tv;
_dead = dead;
_girl = grl;
_me = this;
}
protected function setRotation():void{
if (_currentState == "flying"){
currentPers.rotation = (((Math.atan2(vector.y, vector.x) * 180) / Math.PI) + 90);
};
}
protected function disappearComplete():void{
_appeared = false;
if (((currentPers) && (currentPers.stage))){
removeChild(currentPers);
};
}
public function get goingToDisappear():Boolean{
return (_goingToDisappear);
}
public function get flyCounter():int{
return (_flyCounter);
}
protected function stopFly():void{
}
protected function createStates():void{
states = new Object();
}
public function set flyCounter(to:int):void{
if (currentState != "flying"){
return;
};
_flyCounter = to;
}
public function get type():String{
return (_type);
}
public function get sitCounter():int{
return (_sitCounter);
}
public function startAnimation():void{
currentPers.play();
}
protected function sitComplete():void{
trace("damagedTimes", damagedTimes, currentPers);
changeState("sitting", false);
if (damagedTimes > 0){
changeState(("sitting" + damagedTimes.toString()), true);
};
setChild();
trace("damagedTimes", damagedTimes, currentPers);
}
public function get price():int{
return (_price);
}
protected function addToBorder():void{
var pt:Point;
switch (_me.parent.name){
case "head":
pt = new Point(_dead.clip.head.marker_head.x, _dead.clip.head.marker_head.y);
pt = _dead.clip.head.localToGlobal(pt);
_me.x = pt.x;
_me.y = pt.y;
break;
case "deadbody":
pt = new Point(_dead.clip.deadbody.marker_body.x, _dead.clip.deadbody.marker_body.y);
pt = _dead.clip.deadbody.localToGlobal(pt);
_me.x = pt.x;
_me.y = pt.y;
break;
case "tvbody":
pt = new Point(_tv.clip.tvbody.marker_tv.x, _tv.clip.tvbody.marker_tv.y);
pt = _tv.clip.tvbody.localToGlobal(pt);
_me.x = pt.x;
_me.y = pt.y;
break;
default:
break;
};
_border.addChildAt(_me, (_border.getChildIndex(_girl) + 1));
}
public function get inChrys():Boolean{
return (_inChrys);
}
public function set immortal(to:Boolean):void{
_immortal = to;
}
public function damage():void{
if (immortal){
return;
};
damagedTimes++;
if (damagedTimes >= damagesToKill){
damagedTimes = damagesToKill;
die();
};
}
public function fly(speed:Number=0, direction:Vector=null):void{
if (!_appeared){
return;
};
if (currentState == "sitting"){
releaseSitPoint();
if (parent.name != "border"){
addToBorder();
};
};
_flyCounter = 0;
_sitCounter = 0;
if (speed > 0){
_speed = speed;
};
if (direction){
vector = direction.clone();
} else {
vector = new Vector(1, -1);
};
vector.normalize();
vector.timesEquals(speed);
changeState("flying", false);
if (damagedTimes > 0){
changeState(("flying" + damagedTimes.toString()), true);
};
_goingToDisappear = false;
goingToSit = false;
}
protected function releaseSitPoint():void{
if (_ptSit){
Game.pointsDip.releasePoint(_ptSit);
_ptSit = null;
};
}
public function set sitCounter($to:int):void{
_sitCounter = $to;
if (_sitCounter >= _sitTime){
fly();
_sitCounter = 0;
};
}
public function set dropped(to:Boolean):void{
_dropped = to;
}
protected function die():void{
_died = true;
SoundMan.playEffect("butterfly");
var evt:GameEvent = new GameEvent(GameEvent.DIEID);
evt.obj = this;
dispatchEvent(evt);
releaseSitPoint();
}
public function get currentState():String{
return (_currentState);
}
public function turnToDest():void{
if (((goingToSit) || (_goingToDisappear))){
ptStart.x = x;
ptStart.y = y;
vector.x = (ptDest.x - ptStart.x);
vector.y = (ptDest.y - ptStart.y);
};
}
public function externalEnterFrame(ev:Event=null):void{
var vectDestDistance:Vector;
var vectMovedDistance:Vector;
if (!_appeared){
return;
};
if ((currentPers is BitmapMovieClip)){
currentPers.nextFrame();
};
if (_currentState == "dieing"){
if (currentPers.currentFrame == currentPers.totalFrames){
removeChild(currentPers);
_appeared = false;
visible = false;
};
return;
};
if (((goingToSit) || (_goingToDisappear))){
vectDestDistance = new Vector((ptDest.x - ptStart.x), (ptDest.y - ptStart.y));
vectMovedDistance = new Vector((x - ptStart.x), (y - ptStart.y));
if (vectMovedDistance.magnitude >= vectDestDistance.magnitude){
x = ptDest.x;
y = ptDest.y;
if (_goingToDisappear){
trace("Исчезновение завершено");
_goingToDisappear = false;
disappearComplete();
};
if (goingToSit){
trace("Посадка завершена");
goingToSit = false;
sitComplete();
};
};
};
if ((((_currentState == "flying")) && (!(((goingToSit) || (_goingToDisappear)))))){
vector.x = (vector.x + ((Math.random() - 0.5) * 2));
vector.y = (vector.y + ((Math.random() - 0.5) * 2));
if ((((x > bounds.right)) && ((vector.x > 0)))){
vector.x = -(vector.x);
x = bounds.right;
};
if ((((y > bounds.bottom)) && ((vector.y > 0)))){
vector.y = (vector.y - turnFactor);
};
if ((((y > 600)) && ((vector.y > 0)))){
vector.y = -(vector.y);
y = 600;
};
if ((((x <= bounds.left)) && ((vector.x < 0)))){
vector.x = -(vector.x);
x = bounds.left;
};
if ((((y <= bounds.top)) && ((vector.y < 0)))){
vector.y = -(vector.y);
y = bounds.top;
};
};
if ((((((_currentState == "flying")) || (goingToSit))) || (_goingToDisappear))){
vector.normalize();
vector.timesEquals(_speed);
x = (x + vector.x);
y = (y + vector.y);
};
setRotation();
}
public function stopAnimation():void{
currentPers.stop();
}
public function disappear(pt:Point=null):void{
if (!_appeared){
return;
};
if (currentState == "sitting"){
fly();
};
_goingToDisappear = true;
goingToSit = false;
ptDest = pt;
turnToDest();
}
public function appear(pt:Point):void{
if (((_appeared) || (_died))){
return;
};
_died = false;
_eated = false;
_dropped = false;
damagedTimes = 0;
changeState("flying", false);
_goingToDisappear = false;
goingToSit = false;
x = pt.x;
y = pt.y;
_appeared = (visible = true);
_used = true;
fly();
}
public function get inited():Boolean{
return (_appeared);
}
public function get immortal():Boolean{
return (_immortal);
}
public function get used():Boolean{
return (_used);
}
public function get dropped():Boolean{
return (_dropped);
}
protected function changeState(to:String, subState:Boolean):void{
if (!states[to]){
return;
};
if (((currentPers) && (currentPers.stage))){
removeChild(currentPers);
};
if (!subState){
_currentState = to;
};
currentPers = states[to];
addChild(currentPers);
}
public function set inChrys($to:Boolean):void{
_inChrys = $to;
}
public function sit(pt:SitPoint):void{
if (((!(_appeared)) || ((_currentState == "dieing")))){
return;
};
_ptSit = pt;
if (goingToDisappear){
releaseSitPoint();
return;
};
if (_currentState == "sitting"){
fly();
};
goingToSit = true;
_goingToDisappear = false;
ptDest = new Point(pt.x, pt.y);
turnToDest();
}
protected function setChild():void{
switch (_ptSit.num){
case 0:
_dead.clip.deadbody.addChild(_me);
_me.x = _dead.clip.deadbody["marker_body"].x;
_me.x = _dead.clip.deadbody["marker_body"].y;
break;
case 1:
_dead.clip.head.addChild(_me);
_me.x = _dead.clip.head["marker_head"].x;
_me.y = _dead.clip.head["marker_head"].y;
break;
case 2:
_tv.clip.tvbody.addChild(_me);
_me.x = _tv.clip.tvbody["marker_tv"].x;
_me.y = _tv.clip.tvbody["marker_tv"].y;
break;
default:
_border.addChildAt(_me, (_border.getChildIndex(_border.getChildByName("shvabra")) - 1));
break;
};
}
public function get died():Boolean{
return (_died);
}
public function set eated(to:Boolean):void{
_eated = to;
visible = !(_eated);
}
public function get appeared():Boolean{
return (_appeared);
}
public function pause($pause:Boolean):void{
var clip:MovieClip;
var $pause = $pause;
if (!currentPers){
return;
};
var i:int;
for (;i < currentPers.numChildren;(i = (i + 1))) {
clip = (currentPers.getChildAt(i) as MovieClip);
if ($pause){
clip.stop();
currentPers.stop();
} else {
clip.play();
currentPers.play();
};
continue;
var _slot1 = e;
};
}
public function get eated():Boolean{
return (_eated);
}
public function get flyingTime():int{
return (_flyingTime);
}
}
}//package classes.Flyings
Section 4
//Mega (classes.Flyings.Mega)
package classes.Flyings {
import classes.*;
import muzaffaraka.display.*;
public class Mega extends Flying {
private const toKill:int = 5;
public function Mega(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
super(brd, tv, dead, grl);
_type = "mega";
damagesToKill = Game.dataLoader.getGlobalVar("MEGA_HIT_TO_KILL");
_speed = Game.dataLoader.getGlobalVar("MEGA_SPEED");
_price = Game.dataLoader.getGlobalVar("MEGA_PRICE");
_sitTime = Game.dataLoader.getGlobalVar("MEGA_SITTIME");
_flyingTime = Game.dataLoader.getGlobalVar("MEGA_FLYTIME");
}
override protected function die():void{
damagesToKill = toKill;
super.die();
_appeared = (visible = false);
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Mega_flying_normal_mc, 1, true);
states["flying1"] = new BitmapMovieClip(Mega_flying1_mc, 1, true);
states["flying2"] = new BitmapMovieClip(Mega_flying2_mc, 1, true);
states["flying3"] = new BitmapMovieClip(Mega_flying3_mc, 1, true);
states["flying4"] = new BitmapMovieClip(Mega_flying4_mc, 1, true);
states["sitting"] = new Mega_sitting_normal_mc();
states["sitting1"] = new Mega_sitting1_mc();
states["sitting2"] = new Mega_sitting2_mc();
states["sitting3"] = new Mega_sitting3_mc();
states["sitting4"] = new Mega_sitting4_mc();
}
override public function damage():void{
if (immortal){
return;
};
super.damage();
if (damagedTimes > (damagesToKill - 1)){
return;
};
var newState:String = (_currentState + damagedTimes.toString());
trace(("newState: " + newState));
changeState(newState, true);
}
}
}//package classes.Flyings
Section 5
//Metall (classes.Flyings.Metall)
package classes.Flyings {
import classes.*;
import muzaffaraka.display.*;
public class Metall extends Flying {
private const toKill:int = 2;
public function Metall(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
super(brd, tv, dead, grl);
_type = "metall";
damagesToKill = Game.dataLoader.getGlobalVar("METALL_HIT_TO_KILL");
_speed = Game.dataLoader.getGlobalVar("METALL_SPEED");
_price = Game.dataLoader.getGlobalVar("METALL_PRICE");
_flyingTime = Game.dataLoader.getGlobalVar("METALL_FLYTIME");
_sitTime = Game.dataLoader.getGlobalVar("METALL_SITTIME");
}
override protected function die():void{
super.die();
_appeared = (visible = false);
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Metall_flying_mc, 1, true);
states["sitting"] = new Metall_sitting_mc();
states["flying1"] = new Metall_flying1_mc();
states["sitting1"] = new Metall_sitting1_mc();
}
override public function damage():void{
if (immortal){
return;
};
super.damage();
if (damagedTimes > (damagesToKill - 1)){
return;
};
var newState:String = (_currentState + damagedTimes.toString());
trace(("Metall newState: " + newState));
changeState(newState, true);
if (currentPers["inner"]){
currentPers["inner"]["part1"]["inner"].gotoAndPlay(1);
currentPers["inner"]["part2"]["inner"].gotoAndPlay(1);
} else {
currentPers["part1"]["inner"].gotoAndPlay(1);
currentPers["part2"]["inner"].gotoAndPlay(1);
currentPers["part3"]["inner"].gotoAndPlay(1);
currentPers["part4"]["inner"].gotoAndPlay(1);
};
}
}
}//package classes.Flyings
Section 6
//Red (classes.Flyings.Red)
package classes.Flyings {
import classes.*;
import muzaffaraka.display.*;
public class Red extends Flying {
public function Red(brd:Border, tv:TVSet, dead:Dead, grl:Girl):void{
super(brd, tv, dead, grl);
scaleX = (scaleY = 1.2);
_type = "red";
damagesToKill = Game.dataLoader.getGlobalVar("RED_HIT_TO_KILL");
_speed = Game.dataLoader.getGlobalVar("RED_SPEED");
_price = Game.dataLoader.getGlobalVar("RED_PRICE");
_flyingTime = Game.dataLoader.getGlobalVar("RED_FLYTIME");
_sitTime = Game.dataLoader.getGlobalVar("RED_SITTIME");
}
override protected function die():void{
super.die();
_appeared = (visible = false);
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Red_flying_mc, 1, true);
states["sitting"] = new Red_sitting_mc();
states["dieing"] = new Red_dieing_mc();
}
}
}//package classes.Flyings
Section 7
//WaspNormal (classes.Flyings.WaspNormal)
package classes.Flyings {
import classes.*;
import flash.events.*;
import gs.*;
import flash.geom.*;
import muzaffaraka.Math.*;
import gs.easing.*;
import muzaffaraka.display.*;
public class WaspNormal extends Flying {
private const stingSpeed:Number = 2000;
private var _stingCounter:int;
public function WaspNormal(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
super(brd, tv, dead, grl);
_type = "wasp";
damagesToKill = Game.dataLoader.getGlobalVar("WASP_HIT_TO_KILL");
_speed = Game.dataLoader.getGlobalVar("WASP_SPEED");
_flyingTime = Game.dataLoader.getGlobalVar("WASP_FLYTIME");
_sitTime = Game.dataLoader.getGlobalVar("WASP_SITTIME");
_girl = grl;
}
override protected function setRotation():void{
if (vector.x > 0){
scaleX = -1;
} else {
scaleX = 1;
};
}
public function sting():void{
var completeSting:Function;
completeSting = function (state:String):void{
TweenMax.delayedCall(0.1, changeState, ["flying", false]);
if (hitTestObject(_girl)){
_girl.jump();
};
};
if (((!(_appeared)) || ((currentState == "dieing")))){
return;
};
if (currentState == "stinging"){
return;
};
if (_currentState != "flying"){
fly();
};
var localPoints:Array = new Array();
var i:int;
while (i < _girl.stingPoints.length) {
localPoints[i] = _girl.localToGlobal(_girl.stingPoints[i]);
i = (i + 1);
};
var stingPt:Point = new Point();
var rndPtNum:int = Utils.randRange(0, 2);
if (x > _girl.x){
rndPtNum = (rndPtNum + 3);
scaleX = 1;
} else {
scaleX = -1;
};
stingPt = localPoints[rndPtNum];
trace("PARENT WHEN STINGING:", parent, stingPt);
var dist:Number = Point.distance(new Point(x, y), stingPt);
var time:Number = (dist / stingSpeed);
SoundMan.playEffect("wasp_attack");
_stingCounter = 0;
changeState("stinging", false);
TweenMax.killAllDelayedCalls();
TweenMax.to(this, time, {x:stingPt.x, y:stingPt.y, ease:Linear.easeNone, onComplete:completeSting, onCompleteParams:[_currentState]});
}
override protected function die():void{
if (_currentState == "dieing"){
return;
};
super.die();
changeState("dieing", false);
currentPers.gotoAndPlay(1);
}
override public function externalEnterFrame(ev:Event=null):void{
if (((!(_appeared)) || ((_currentState == "stinging")))){
return;
};
super.externalEnterFrame(ev);
}
override public function appear(pt:Point):void{
super.appear(pt);
}
public function set stingCounter(to:int):void{
if (((!(_appeared)) || ((_currentState == "stinging")))){
return;
};
_stingCounter = to;
}
override public function fly(speed:Number=0, direction:Vector=null):void{
super.fly(speed, direction);
_speed = (_speed * 1.4);
}
public function get stingCounter():int{
return (_stingCounter);
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Wasp_flying_mc, 1, true);
states["sitting"] = new Wasp_sitting_mc();
states["dieing"] = new Wasp_dieing_mc();
states["stinging"] = new Wasp_stinging_mc();
}
}
}//package classes.Flyings
Section 8
//Yellow (classes.Flyings.Yellow)
package classes.Flyings {
import classes.*;
import flash.events.*;
import gs.*;
import flash.geom.*;
import muzaffaraka.Math.*;
import gs.easing.*;
import muzaffaraka.display.*;
public class Yellow extends Flying {
public function Yellow(brd:Border, tv:TVSet, dead:Dead, grl:Girl){
super(brd, tv, dead, grl);
_type = "yellow";
damagesToKill = Game.dataLoader.getGlobalVar("YELLOW_HIT_TO_KILL");
_price = Game.dataLoader.getGlobalVar("YELLOW_PRICE");
_speed = Game.dataLoader.getGlobalVar("YELLOW_SPEED");
_flyingTime = Game.dataLoader.getGlobalVar("YELLOW_FLYTIME");
_sitTime = Game.dataLoader.getGlobalVar("YELLOW_SITTIME");
}
override protected function die():void{
if (_currentState == "dieing"){
return;
};
changeState("dieing", false);
currentPers.rotation = -90;
currentPers.gotoAndPlay(1);
super.die();
}
override protected function createStates():void{
super.createStates();
states["flying"] = new BitmapMovieClip(Butterfly_flying_mc, 1, true);
states["sitting"] = new Butterfly_sitting_mc();
states["dieing"] = new Butterfly_dieing_mc();
}
override public function externalEnterFrame(ev:Event=null):void{
var endDie:Function;
var dropY:int;
var shiftX:int;
var pt:Point;
var ev = ev;
endDie = function ():void{
currentPers.play();
_appeared = false;
_dropped = true;
};
if (!_appeared){
return;
};
if (_currentState != "dieing"){
super.externalEnterFrame(ev);
return;
};
if (currentPers.currentFrame == 36){
addToBorder();
dropY = Utils.randRange(550, 560);
shiftX = Utils.randRange(-15, 45);
pt = parent.localToGlobal(new Point(x, y));
trace("Tween MAx");
TweenMax.to(this, 1, {x:(pt.x + shiftX), y:dropY, ease:Linear.easeNone, onComplete:endDie});
_appeared = false;
return;
};
}
}
}//package classes.Flyings
Section 9
//Bonus (classes.Bonus)
package classes {
import flash.display.*;
import muzaffaraka.*;
public class Bonus extends Sprite {
protected var clip:MovesBonus_mc;
public function Bonus(){
clip = new MovesBonus_mc();
super();
StringUtil.setFont(clip.inner["namePart"], myStartFont);
StringUtil.setFont(clip.inner["scorePart"], myStartFont);
clip.x = 400;
clip.y = 300;
addChild(clip);
clip.gotoAndStop(1);
mouseChildren = (mouseEnabled = false);
}
public function appear($bonusName:String, $bonus:int):void{
clip.inner["namePart"].text = ($bonusName + ": ");
clip.inner["scorePart"].text = ("+" + $bonus.toString());
clip.gotoAndPlay(1);
}
}
}//package classes
Section 10
//Chrysalis (classes.Chrysalis)
package classes {
import flash.events.*;
import classes.Flyings.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class Chrysalis extends Sprite {
private var _border:Border;
private var _appearedYet:Boolean;// = false
private var s2:Chrysalis_blue_mc;
private var s3:Chrysalis_yellow_mc;
private var s4:Chrysalis_mega_mc;
private var s5:Chrysalis_metall_mc;
private var s1:Chrysalis_red_mc;
private var _flying:Flying;
private var _clip:MovieClip;
private var _manager:FlyingsManager;
public function Chrysalis(flying:Flying, border:Border, manager:FlyingsManager){
super();
s1 = null;
s2 = null;
s3 = null;
s4 = null;
s5 = null;
_flying = flying;
_border = border;
_manager = manager;
var name = (("Chrysalis_" + _flying.type) + "_mc");
var type:Class = (getDefinitionByName(name) as Class);
_clip = new (type);
addEventListener(Event.ADDED_TO_STAGE, onAdded);
addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
protected function onRemoved(ev:Event):void{
removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function stop():void{
if (((!(_clip)) || (!(_clip.stage)))){
return;
};
var i:int;
for (;i < _clip.numChildren;(i = (i + 1))) {
MovieClip(_clip.getChildAt(i)).stop();
continue;
var _slot1 = e;
};
_clip.stop();
}
public function appearFlying():void{
if (_appearedYet){
return;
};
_appearedYet = true;
trace("APPEARING FLYING", _flying);
var topChild:Sprite = (clip.getChildAt((clip.numChildren - 1)) as Sprite);
var pt:Point = new Point(topChild.x, topChild.y);
pt = clip.localToGlobal(pt);
pt.x = (pt.x + 20);
pt.y = (pt.y - 20);
_manager.addSomeone(_flying, false, pt);
}
public function get flying():Flying{
return (_flying);
}
public function get clip():MovieClip{
return (_clip);
}
protected function onAdded(ev:Event):void{
addChild(_clip);
_clip.gotoAndPlay(1);
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
}
public function play():void{
if (((!(_clip)) || (!(_clip.stage)))){
return;
};
var i:int;
while (i < _clip.numChildren) {
MovieClip(_clip.getChildAt(i)).play();
i++;
};
_clip.play();
}
}
}//package classes
Section 11
//CustomMousePointer (classes.CustomMousePointer)
package classes {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
public class CustomMousePointer extends Sprite {
var enabled:Boolean;
var vy:int;
var vx:int;
var pointerClip:Sprite;
protected var bounRect:Rectangle;
var elastic:Boolean;
public function CustomMousePointer(rect:Rectangle, clip:Sprite){
super();
elastic = false;
enabled = true;
pointerClip = clip;
addChild(pointerClip);
bounRect = rect;
var stageDetector:StageDetector = new StageDetector(this);
stageDetector.addEventListener(StageDetector.ADDED_TO_STAGE, addedToStageListener);
stageDetector.addEventListener(StageDetector.REMOVED_FROM_STAGE, removedFromStageListener);
}
private function removedFromStageListener(e:Event):void{
Mouse.show();
}
function extMouseMoveListener(e:MouseEvent):void{
if (((!(enabled)) || (!(stage)))){
return;
};
var pointInParent:Point = parent.globalToLocal(new Point(stage.mouseX, stage.mouseY));
x = pointInParent.x;
if (pointInParent.y < bounRect.y){
y = bounRect.y;
return;
};
if (pointInParent.y > (bounRect.y + bounRect.height)){
y = (bounRect.y + bounRect.height);
return;
};
y = pointInParent.y;
if (!visible){
visible = true;
};
}
private function addedToStageListener(e:Event):void{
Mouse.hide();
}
private function mouseLeaveListener(e:Event):void{
visible = false;
}
}
}//package classes
Section 12
//DataLoader (classes.DataLoader)
package classes {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class DataLoader extends MovieClip {
protected const URL:String = "http://tvxspb.ru/spidersbride/";
protected var levelsLoadedCounter:int;// = 1
protected var levelVariables:Array;
protected var _totalLevels:int;
protected var readyFunction:Function;
protected var dataLoader:URLLoader;
protected var levelsLoader:URLLoader;
protected var ready:Boolean;
protected var _startLevelNum:int;
protected var globalVars:URLVariables;
public function DataLoader(callBackFunc:Function){
super();
ready = false;
readyFunction = callBackFunc;
levelsLoader = new URLLoader();
levelsLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
levelsLoader.addEventListener(Event.COMPLETE, onCompleteLevelsLoading);
dataLoader = new URLLoader();
dataLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
dataLoader.addEventListener(Event.COMPLETE, onCompleteDataLoading);
}
public function getGlobalVar(varName:String):Number{
var varName = varName;
return (parseFloat(globalVars[varName]));
//unresolved jump
var _slot1 = e;
return (-1);
}
protected function loadLevelsNum():void{
levelsLoader.load(new URLRequest((URL + "levels.txt")));
}
public function get totalLevels():int{
if (!ready){
return (-1);
};
return (_totalLevels);
}
protected function onCompleteDataLoading(ev:Event):void{
levelVariables[(levelsLoadedCounter - 1)] = new URLVariables(dataLoader.data);
levelsLoadedCounter++;
loadData();
}
public function get startLevelNum():int{
if (!ready){
return (-1);
};
return (_startLevelNum);
}
public function loadAllData():void{
loadLevelsNum();
}
protected function loadData():void{
if (levelsLoadedCounter > _totalLevels){
ready = true;
trace("LOADING DATA COMPLETE");
readyFunction();
return;
};
dataLoader.load(new URLRequest((((URL + "variables") + levelsLoadedCounter.toString()) + ".txt")));
}
public function getVariable(levelNum:uint, varName:String):Number{
if (levelNum < 1){
return (-1);
};
if (levelNum > _totalLevels){
return (levelVariables[(_totalLevels - 1)][varName]);
};
return (levelVariables[(levelNum - 1)][varName]);
}
protected function onCompleteLevelsLoading(ev:Event):void{
globalVars = new URLVariables(levelsLoader.data);
_totalLevels = int(globalVars["LEVELS_NUM"]);
_startLevelNum = int(globalVars["LEVEL_START"]);
if (_totalLevels == 0){
return;
};
levelVariables = new Array((_totalLevels - 1));
loadData();
}
}
}//package classes
Section 13
//Dead (classes.Dead)
package classes {
import flash.events.*;
import gs.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import muzaffaraka.Math.*;
public class Dead extends Sprite {
private var oparishArr:Array;
private var totalCounter:int;
private var chrysalises:Array;
private var prevDropCounter:int;
private var droppingCounter:int;
private var spider:Spider;
private var dropPointCurrent:Point;
private var border:Border;
private var _clip:Dead_mc;
private var game:Game;
protected var _droppingTimer:Timer;
public function Dead(brd:Border, gm:Game, spr:Spider){
_droppingTimer = new Timer(500);
super();
spider = spr;
game = gm;
border = brd;
_clip = new Dead_mc();
_clip.x = 82;
_clip.y = 42;
addChild(_clip);
_clip.stop();
_clip.filters = _clip.deadbody["marker_body"].filters;
_droppingTimer.addEventListener(TimerEvent.TIMER, dropTimer);
}
public function stopDropping():void{
var i:int;
trace("STOP DROPPING");
_droppingTimer.stop();
if (chrysalises){
i = 0;
while (i < chrysalises.length) {
if (chrysalises[i].stage){
chrysalises[i].parent.removeChild(chrysalises[i]);
};
chrysalises[i] = null;
i++;
};
};
chrysalises = null;
}
public function pause():void{
if (!chrysalises){
return;
};
_droppingTimer.stop();
var i:int;
while (i < chrysalises.length) {
if (chrysalises[i]){
if (chrysalises[i].stage){
chrysalises[i].stop();
};
};
i++;
};
}
protected function climbOutAndDrop():void{
var i:int;
trace(("droppingCounter >= totalCounter: " + (droppingCounter >= totalCounter)));
if (droppingCounter >= totalCounter){
return;
};
if (prevDropCounter == droppingCounter){
return;
};
if (!chrysalises){
return;
};
prevDropCounter = droppingCounter;
dropPointCurrent = dropPoint;
trace("DROPPING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #", droppingCounter);
border.addChildAt(chrysalises[droppingCounter], border.getChildIndex(spider));
chrysalises[droppingCounter].x = dropPointCurrent.x;
chrysalises[droppingCounter].y = dropPointCurrent.y;
droppingCounter++;
return;
}
public function get clip():Dead_mc{
return (_clip);
}
public function playAndDrop():void{
if (!spider.stage){
return;
};
_clip.gotoAndPlay(1);
}
protected function dropTimer(ev:TimerEvent=null, $firstTime:Boolean=false):void{
if (((!(game.started)) && ($firstTime))){
TweenMax.delayedCall(1, dropTimer, [null, $firstTime]);
return;
};
if (!game.started){
return;
};
trace("Calling climbOutAndDrop()");
climbOutAndDrop();
}
public function externalEnterFrame(ev:Event=null):void{
var i:int;
if (!game.started){
return;
};
if (chrysalises){
i = 0;
while (i < chrysalises.length) {
if (!chrysalises[i].stage){
} else {
if ((((Chrysalis(chrysalises[i]).clip.currentLabel == "appear")) && (!(Chrysalis(chrysalises[i]).flying.appeared)))){
Chrysalis(chrysalises[i]).appearFlying();
};
if (chrysalises[i].clip.currentFrame == chrysalises[i].clip.totalFrames){
border.removeChild(chrysalises[i]);
};
};
i++;
};
};
if (_clip.currentFrame == 2){
SoundMan.playEffect("dead");
};
}
protected function get dropPoint():Point{
var x:int = Utils.randRange(20, 100);
var y:int = Utils.randRange(40, 70);
return (new Point(x, y));
}
public function startDropping(chrys:Array):void{
_droppingTimer.start();
trace("START DROPPING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
chrysalises = chrys;
droppingCounter = 0;
prevDropCounter = -1;
totalCounter = chrys.length;
var totalTime:int = Game.dataLoader.getGlobalVar("FLYINGS_APPEAR_TIME");
totalTime = (totalTime * 1000);
var timePerEach:Number = (totalTime / totalCounter);
_droppingTimer.delay = timePerEach;
_droppingTimer.reset();
_droppingTimer.stop();
_droppingTimer.start();
dropTimer(null, true);
}
public function resume():void{
if (!chrysalises){
return;
};
_droppingTimer.start();
var i:int;
while (i < chrysalises.length) {
if (chrysalises[i]){
if (chrysalises[i].stage){
chrysalises[i].play();
};
};
i++;
};
}
}
}//package classes
Section 14
//FinalScene (classes.FinalScene)
package classes {
import flash.events.*;
import flash.display.*;
public class FinalScene extends Sprite {
protected var _levelNum:int;
protected var _clip:MovieClip;
protected var _score:int;
protected var _frameNum:int;
protected var _event:GameEvent;
protected var _win:Boolean;
public function FinalScene($win:Boolean, $level:int, $score:int){
_event = new GameEvent(GameEvent.END_GAME);
super();
_win = $win;
_score = $score;
if (!$win){
_clip = new SpiderDie_mc();
} else {
_clip = new FinalScene_mc();
};
_clip.x = 400;
_clip.y = 300;
addChild(_clip);
_levelNum = $level;
if (_levelNum <= 10){
_frameNum = 1;
} else {
if (_levelNum <= 15){
_frameNum = 2;
} else {
if (_levelNum <= 20){
_frameNum = 3;
};
};
};
_event.obj = new Object();
_event.obj["win"] = _win;
_event.obj["scores"] = _score;
addEventListener(Event.ADDED_TO_STAGE, onAdd);
}
protected function onRemove(ev:Event):void{
removeEventListener(Event.REMOVED_FROM_STAGE, onRemove);
removeEventListener(Event.ENTER_FRAME, enterFrame);
}
protected function onAdd(ev:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, onAdd);
addEventListener(Event.REMOVED_FROM_STAGE, onRemove);
addEventListener(Event.ENTER_FRAME, enterFrame);
addEventListener(MouseEvent.CLICK, onClick);
}
protected function onClick(ev:MouseEvent):void{
if (ev.target["name"] == "skipFinal"){
dispatchEvent(_event);
};
}
protected function enterFrame(ev:Event):void{
if (_clip["inner"]){
if (_clip["inner"]["label"]){
_clip["inner"]["label"].gotoAndStop(_frameNum);
};
if (_clip["inner"].currentFrame == _clip["inner"].totalFrames){
removeEventListener(Event.ENTER_FRAME, enterFrame);
dispatchEvent(_event);
};
};
}
}
}//package classes
Section 15
//FlyingsManager (classes.FlyingsManager)
package classes {
import flash.events.*;
import classes.Flyings.*;
import gs.*;
import flash.utils.*;
import flash.geom.*;
import muzaffaraka.Math.*;
import muzaffaraka.utils.*;
public class FlyingsManager {
protected const _fromMega:int;
protected const _fromMetall:int;
protected const _fromRed:int;
protected const types:Object;
protected var _redsStart:int;
protected var _flyings:Object;
protected var _yellowsStart:int;
protected var _spider:Spider;
protected var _metalls:int;
protected var _metallsStart:int;
protected var _waspAppearInterval:int;
protected var _tv:TVSet;
protected var _numOfDied:int;
protected var _bluesStart:int;
protected var _wasps:int;
protected var _waspsStart:int;
protected var _timeStarted:Number;
protected var _totalFlyings:int;
protected var _yellows:int;
protected var _started:Boolean;
protected var _dead:Dead;
protected var immediateDied:int;// = 1
protected var _waveTime:int;
protected var _megasStart:int;
protected var _merged:Array;
protected var _ranTime:int;
protected var _stingTime:int;
protected var _megas:int;
protected var _border:Border;
protected var _blues:int;
protected var _reds:int;
protected var completeEvent:GameEvent;// = null
protected var timeDeid:Number;
protected var _girl:Girl;
public function FlyingsManager(brd:Border, dead:Dead, girl:Girl, tv:TVSet, $spider:Spider){
_fromRed = Game.dataLoader.getGlobalVar("RED_FROM");
_fromMega = Game.dataLoader.getGlobalVar("MEGA_FROM");
_fromMetall = Game.dataLoader.getGlobalVar("METALL_FROM");
types = {yellows:Yellow, reds:Red, blues:Blue, megas:Mega, metalls:Metall, wasps:WaspNormal};
timeDeid = getTimer();
super();
_started = false;
_border = brd;
_girl = girl;
_dead = dead;
_tv = tv;
_spider = $spider;
_border.addEventListener(GameEvent.DIEID, onDie, true, 0, true);
_stingTime = Game.dataLoader.getGlobalVar("WASP_STINGTIME");
_waspAppearInterval = Game.dataLoader.getGlobalVar("WASP_APPEAREANCE_DELAY");
}
public function addWhenDied(died:Flying):void{
var i:int;
var k:int;
trace("ADDING WHEN DIED!!!!!!!!!!!");
var pt:Point = new Point(died.x, died.y);
pt = died.parent.localToGlobal(pt);
switch (died.type){
case "red":
i = 0;
while (i < _fromRed) {
k = 0;
while (k < _flyings["yellows"].length) {
if (((((((!(_flyings["yellows"][k].died)) && (!(_flyings["yellows"][k].appeared)))) && (!(_flyings["yellows"][k].used)))) && (!(_flyings["yellows"][k].inChrys)))){
_flyings["yellows"][k].x = pt.x;
_flyings["yellows"][k].y = pt.y;
addSomeone(_flyings["yellows"][k], true);
if (died.goingToDisappear){
sendMeBackAnDisappear(_flyings["yellows"][k]);
};
break;
};
k++;
};
i++;
};
break;
case "metall":
i = 0;
while (i < _fromMetall) {
k = 0;
while (k < _flyings["blues"].length) {
if (((((((!(_flyings["blues"][k].died)) && (!(_flyings["blues"][k].appeared)))) && (!(_flyings["blues"][k].used)))) && (!(_flyings["blues"][k].inChrys)))){
_flyings["blues"][k].x = pt.x;
_flyings["blues"][k].y = pt.y;
addSomeone(_flyings["blues"][k], true);
if (died.goingToDisappear){
sendMeBackAnDisappear(_flyings["blues"][k]);
};
break;
};
k++;
};
i++;
};
break;
case "mega":
i = 0;
while (i < _fromMega) {
k = 0;
while (k < _flyings["yellows"].length) {
if (((((((!(_flyings["yellows"][k].died)) && (!(_flyings["yellows"][k].appeared)))) && (!(_flyings["yellows"][k].used)))) && (!(_flyings["yellows"][k].inChrys)))){
_flyings["yellows"][k].x = pt.x;
_flyings["yellows"][k].y = pt.y;
addSomeone(_flyings["yellows"][k], true);
if (died.goingToDisappear){
sendMeBackAnDisappear(_flyings["yellows"][k]);
};
break;
};
k++;
};
i++;
};
break;
default:
return;
};
}
public function createWave(yellows:int=0, megas:int=0, metalls:int=0, blues:int=0, reds:int=0, wasps:int=0):void{
_started = false;
killWave();
_yellows = yellows;
_megas = megas;
_metalls = metalls;
_wasps = wasps;
_reds = reds;
_blues = blues;
_yellows = (_yellows + (_reds * _fromRed));
_yellows = (_yellows + (_megas * _fromMega));
_blues = (_blues + (_metalls * _fromMetall));
_yellowsStart = yellows;
_megasStart = megas;
_metallsStart = metalls;
_waspsStart = wasps;
_redsStart = reds;
_bluesStart = blues;
_flyings = new Object();
createFlyings();
createMergedFlyings();
}
public function addSomeone(obj:Flying, runAway:Boolean=false, ptAppear:Point=null):void{
var endRunAway:Function;
var distRunX:int;
var distRunY:int;
var direction:int;
var obj = obj;
var runAway = runAway;
var ptAppear = ptAppear;
endRunAway = function (obj:Flying):void{
obj.immortal = false;
if (obj.goingToDisappear){
obj.turnToDest();
};
};
if (((_spider.big) && ((obj is WaspNormal)))){
_border.addChildAt(obj, _border.getChildIndex(_spider));
} else {
_border.addChildAt(obj, (_border.getChildIndex(_girl) + 1));
};
if (!runAway){
obj.appear((ptAppear) ? ptAppear : Game.appearPoint);
} else {
obj.immortal = true;
obj.appear(new Point(obj.x, obj.y));
};
TweenMax.delayedCall(2, bringMeFront, [obj]);
if (runAway){
distRunX = Utils.randRange(120, 180);
distRunY = Utils.randRange(20, 70);
direction = Utils.randRange(0, 1);
distRunX = (distRunX * ((direction == 0)) ? -1 : 1);
trace(distRunX);
if ((((((obj.x < distRunX)) && ((distRunX < 0)))) || ((((obj.x > 750)) && ((distRunX > 0)))))){
distRunX = (distRunX * -1);
};
TweenMax.to(obj, 0.2, {x:(obj.x + distRunX), y:(obj.y + distRunY), onComplete:endRunAway, onCompleteParams:[obj]});
};
if (!_started){
sendMeBackAnDisappear(obj);
};
}
public function get eatables():Array{
return (null);
}
protected function stopWave():void{
if (!_started){
return;
};
trace("END OF WAVE!!!!!!!!!!!!!");
var i:int;
while (i < _merged.length) {
sendMeBackAnDisappear(Flying(_merged[i]));
i++;
};
_started = false;
}
public function externalEnterFrame():void{
var r:int;
var scoreLeft:int;
var y:int;
var scoreLost:int;
if (((!(_merged)) || (completeEvent))){
return;
};
var i:int;
while (i < _merged.length) {
if (_merged[i]){
if (_merged[i].appeared){
_merged[i].externalEnterFrame();
};
};
i++;
};
if (_started){
} else {
r = 0;
while (r < _merged.length) {
if (((_merged[r].appeared) && (_merged[r].used))){
return;
};
r++;
};
if (timeLeft <= 0){
scoreLeft = 0;
y = 0;
while (y < _merged.length) {
scoreLost = (Flying(_merged[y]).died) ? 0 : Flying(_merged[y]).price;
if (!Flying(_merged[y]).died){
};
scoreLeft = (scoreLeft + scoreLost);
y++;
};
completeEvent = new GameEvent(GameEvent.FINISH);
completeEvent.obj = new Object();
completeEvent.obj["num"] = scoreLeft;
_border.dispatchEvent(completeEvent);
};
};
}
protected function createFlyings():void{
var type:String;
var arr:String;
var i:int;
for (type in types) {
_flyings[type] = new Array();
};
for (arr in _flyings) {
i = 0;
while (i < this[("_" + arr)]) {
_flyings[arr][i] = new types[arr](_border, _tv, _dead, _girl);
i++;
};
};
trace(_flyings);
}
protected function onDie(ev:Event):void{
var evt:GameEvent;
if (!_started){
return;
};
_numOfDied++;
if (_numOfDied == _totalFlyings){
_started = false;
evt = new GameEvent(GameEvent.SUCCESS);
_border.dispatchEvent(evt);
};
var time:Number = (getTimer() - timeDeid);
if (time < 300){
immediateDied++;
};
timeDeid = getTimer();
}
protected function addFlyings():void{
var type:String;
var k:int;
var startNum:int;
var j:int;
var butterFlys:Array = new Array();
for (type in types) {
if (type == "wasps"){
} else {
startNum = this[(("_" + type) + "Start")];
j = 0;
while (j < startNum) {
butterFlys.push(_flyings[type][j]);
j++;
};
};
};
k = 0;
while (k < _flyings["wasps"].length) {
TweenMax.delayedCall(((k + 1) * _waspAppearInterval), addSomeone, [_flyings["wasps"][k]]);
k++;
};
var chrysArray:Array = new Array();
var e:int;
while (e < butterFlys.length) {
chrysArray[e] = new Chrysalis(butterFlys[e], _border, this);
Flying(butterFlys[e]).inChrys = true;
e++;
};
var len1:int = chrysArray.length;
chrysArray = ArrayUtil.shuffleArray(chrysArray);
var len2:int = chrysArray.length;
if (len1 != len2){
trace();
};
_dead.startDropping(chrysArray);
}
public function externalTimer():void{
var evt:GameEvent;
var ptSit:SitPoint;
if (!_started){
return;
};
_ranTime++;
if (_ranTime >= _waveTime){
stopWave();
};
if (!_merged){
return;
};
if ((getTimer() - timeDeid) > 500){
if (immediateDied > 1){
evt = new GameEvent(GameEvent.BONUS);
evt.obj = new Object();
evt.obj["num"] = immediateDied;
_border.dispatchEvent(evt);
};
immediateDied = 1;
};
var i:int;
while (i < _merged.length) {
if (Flying(_merged[i]).currentState == "sitting"){
Flying(_merged[i]).sitCounter++;
};
if (Flying(_merged[i]).currentState != "flying"){
} else {
Flying(_merged[i]).flyCounter++;
if (Flying(_merged[i]).type == "wasp"){
WaspNormal(_merged[i]).stingCounter++;
if (WaspNormal(_merged[i]).stingCounter >= _stingTime){
WaspNormal(_merged[i]).sting();
};
};
if (Flying(_merged[i]).flyCounter == Flying(_merged[i]).flyingTime){
ptSit = Game.pointsDip.getNearestFreePoint(Flying(_merged[i]));
if (ptSit){
Flying(_merged[i]).sit(ptSit);
};
};
};
i++;
};
}
public function pauseAnimation($pause:Boolean):void{
if (!_started){
return;
};
var i:int;
while (i < _merged.length) {
Flying(_merged[i]).pause($pause);
i++;
};
}
protected function sendMeBackAnDisappear($obj:Flying):void{
var $obj = $obj;
var tryLater:Function = function ():void{
TweenMax.delayedCall(2, sendMeBackAnDisappear, [$obj]);
};
if (!$obj.parent){
return;
};
$obj.disappear(Game.appearPoint);
if ($obj.parent.name != "border"){
tryLater();
return;
};
if (_border.getChildIndex(_spider) > _border.getChildIndex($obj)){
return;
};
if (((((!(_girl.hitTestPoint($obj.x, $obj.y, true))) && (!(_spider.hitTestPoint($obj.x, $obj.y, true))))) && (($obj.parent.name == "border")))){
_border.setChildIndex($obj, (_border.getChildIndex(_spider) - 1));
return;
};
$obj.fly();
tryLater();
}
public function startWave(seconds:uint):void{
if (_started){
return;
};
_waveTime = seconds;
_ranTime = 0;
_started = true;
_timeStarted = getTimer();
completeEvent = null;
_numOfDied = 0;
_totalFlyings = _merged.length;
addFlyings();
}
public function get flyings():Array{
return (_merged);
}
protected function createMergedFlyings():void{
var key:String;
var i:int;
_merged = new Array();
for (key in _flyings) {
i = 0;
while (i < _flyings[key].length) {
_merged.push(_flyings[key][i]);
i++;
};
};
}
public function get timeLeft():int{
return ((_waveTime - _ranTime));
}
public function killWave():void{
var arr:String;
var i:int;
TweenMax.killAllDelayedCalls();
if (!_merged){
return;
};
var k:int;
while (k < _merged.length) {
if (_merged[k].parent){
_merged[k].parent.removeChild(_merged[k]);
_merged[k] = null;
};
k++;
};
for (arr in _flyings) {
i = 0;
while (i < this[("_" + arr)]) {
if (_flyings[arr]){
_flyings[arr][i] = null;
};
i++;
};
_flyings[arr] = null;
};
_flyings = null;
_merged = null;
_dead.stopDropping();
}
protected function bringMeFront(obj:Flying):void{
if (!obj.parent){
return;
};
if ((((_border.getChildIndex(_girl) > _border.getChildIndex(obj))) && ((obj.parent.name == "border")))){
if (((!(_spider.hitTestPoint(obj.x, obj.y, true))) && (!(_girl.hitTestPoint(obj.x, obj.y, true))))){
_border.setChildIndex(obj, _border.getChildIndex(_girl));
} else {
TweenMax.delayedCall(1, bringMeFront, [obj]);
};
};
}
}
}//package classes
Section 16
//Game (classes.Game)
package classes {
import flash.events.*;
import classes.Flyings.*;
import gs.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import muzaffaraka.Math.*;
import flash.ui.*;
public class Game extends Sprite {
protected var spiderpercentagedecreaseAccelerated:Number;
protected var arrow:Arrow_mc;
private var pauseScreen:PauseScreen;
protected var tmr:Timer;
protected var _stepPerFrame:Number;
protected var mouseRect:Rectangle;
protected var pointer:CustomMousePointer;
protected var nextLevelClip:NextLevelLabel;
protected var _border:Border;
protected var bonusLanbel:Bonus;
protected var sh:Shvabra;
protected var mini:Boolean;// = false
protected var _finalScene:FinalScene;
protected var dead:Dead;
protected var _waitingForLevel:Boolean;// = false
protected var hittingThing:Sprite;
protected var dark:Dark_mc;
protected var growingMovie:MovieClip;
protected var tv:TVSet;
var started:Boolean;// = false
protected var levelsLimit:int;
protected var spiderDieMovie:SpiderDie_mc;
protected var girl:Girl;
protected var pauseLabel:pause_label;
protected var ptDead1:Point;
var manager:FlyingsManager;
protected var inited:Boolean;
protected var ptDead2:Point;
protected var dust:Dust_mc;
protected var handPointer:Hand_mc;
protected var lamp:LampaContainer;
protected var _lastTime:Number;
protected var spider:Spider;
protected var gameEnded:Boolean;// = false
protected var _soundInterval:Number;
var hud:HUD;
public static var Spider_growing_mc:Class = Game_Spider_growing_mc;
public static var dataLoader:DataLoader;
public static var pointsDip:SitPointDispatcher;
static var currentLevel:int;
protected static var winningtLevel:int;
static var appearPoint:Point = new Point(457, 311);
public function Game($dataLoader:DataLoader){
ptDead1 = new Point();
ptDead2 = new Point();
pauseLabel = new pause_label();
tmr = new Timer(1000);
pauseScreen = new PauseScreen();
dust = new Dust_mc();
dark = new Dark_mc();
hud = new HUD();
nextLevelClip = new NextLevelLabel();
bonusLanbel = new Bonus();
super();
inited = false;
trace("Game started");
dataLoader = $dataLoader;
addEventListener(Event.ADDED_TO_STAGE, init);
}
protected function onShvabraFall(ev:GameEvent):void{
_border.addChild(dust);
_border.addChild(dark);
dust.name = "dust";
dark.y = 300;
dark.x = 400;
dark.mouseChildren = false;
dark.mouseEnabled = false;
dust.x = ((sh.rotation < 0)) ? (sh.x - sh.myHeight) : (sh.x + sh.myHeight);
dust.y = 445.6;
dust.gotoAndPlay(1);
dark.gotoAndPlay(1);
}
protected function init(ev:Event=null):void{
hud.spiderSatisfaction.percentage = 100;
currentLevel = dataLoader.startLevelNum;
dust.gotoAndStop(1);
dark.gotoAndStop(1);
_border = new Border();
_border.name = "border";
_border.addChild(pauseLabel);
pauseLabel.x = 387;
pauseLabel.y = 15.4;
mouseRect = new Rectangle(_border.bounds.x, _border.bounds.y, _border.bounds.width, _border.bounds.height);
_border.bounds.visible = false;
handPointer = new Hand_mc();
pointer = new CustomMousePointer(mouseRect, handPointer);
pointer.x = mouseX;
pointer.y = mouseY;
pointer.mouseChildren = (pointer.mouseEnabled = false);
pointer.name = "pointer";
tv = new TVSet();
sh = new Shvabra(pointer);
sh.started = false;
sh.name = "shvabra";
sh.x = 200;
sh.y = 200;
girl = new Girl(pointer);
spider = new Spider(_border, this, girl);
dead = new Dead(_border, this, spider);
_border.addChild(tv);
_border.addChild(dead);
girl.y = 560;
girl.x = 400;
_border.addChild(girl);
girl.pause(true);
_border.addChild(pointer);
_border.addChild(sh);
_border.addChild(spider);
spider.x = girl.x;
spider.y = (girl.y + 30);
spider.size = dataLoader.getGlobalVar("SPIDERSIZE");
pointer.x = 320;
pointer.y = 440;
sh.x = pointer.x;
sh.y = pointer.y;
arrow = new Arrow_mc();
arrow.mouseEnabled = (arrow.mouseChildren = false);
addChild(arrow);
Mouse.show();
lamp = new LampaContainer();
_border.addChild(lamp);
hud.time.value = dataLoader.getGlobalVar("WAVE_TIME");
hud.wave.value = currentLevel;
pointsDip = new SitPointDispatcher(_border, girl, sh, tv, dead);
ptDead1.x = dead.clip.deadbody["marker_body"].x;
ptDead1.y = dead.clip.deadbody["marker_body"].y;
ptDead2.x = dead.clip.head["marker_head"].x;
ptDead2.y = dead.clip.head["marker_head"].y;
ptDead1 = dead.clip.deadbody.localToGlobal(ptDead1);
ptDead2 = dead.clip.head.localToGlobal(ptDead2);
hidePoints();
setListeners();
addChild(hud);
manager = new FlyingsManager(_border, dead, girl, tv, spider);
_border["inner"]["back"].cacheAsBitmap = true;
inited = true;
winningtLevel = Game.dataLoader.getGlobalVar("WINNING_LEVEL");
levelsLimit = dataLoader.getGlobalVar("WINNING_LEVEL");
var evt:GameEvent = new GameEvent(GameEvent.PLAY);
dispatchEvent(evt);
}
protected function hitOrMiddle(flying:Flying):Boolean{
if (((((!(sh.left)) || (!(sh.lastLeft)))) || (!(flying.stage)))){
return (false);
};
if (sh.hitBounds){
if (sh.hitBounds.hitTestObject(flying)){
return (true);
};
};
var pt1:Point = sh.left;
var pt2:Point = sh.right;
var pt3:Point = sh.lastLeft;
var pt4:Point = sh.lastRight;
var triangle1:Triangle = new Triangle(pt1, pt3, pt4);
var triangle2:Triangle = new Triangle(pt1, pt2, pt4);
var ptFlying:Point = new Point(flying.x, flying.y);
ptFlying = flying.parent.localToGlobal(ptFlying);
var trToCheck1:Triangle = new Triangle(ptFlying, pt1, pt2);
var trToCheck2:Triangle = new Triangle(ptFlying, pt1, pt4);
var trToCheck3:Triangle = new Triangle(ptFlying, pt4, pt2);
var summArea:Number = Math.floor(((trToCheck1.area + trToCheck2.area) + trToCheck3.area));
if (((near(triangle1.area, summArea)) || (near(triangle2.area, summArea)))){
return (true);
};
trToCheck1 = new Triangle(ptFlying, pt1, pt3);
trToCheck2 = new Triangle(ptFlying, pt1, pt4);
trToCheck3 = new Triangle(ptFlying, pt4, pt3);
summArea = Math.floor(((trToCheck1.area + trToCheck2.area) + trToCheck3.area));
if (((near(triangle1.area, summArea)) || (near(triangle2.area, summArea)))){
return (true);
};
return (false);
}
protected function onDie(ev:GameEvent):void{
manager.addWhenDied((ev.obj as Flying));
hud.scores.value = (hud.scores.value + Flying(ev.obj).price);
}
protected function removeListeners():void{
removeEventListener(GameEvent.END_GAME, preFinalResults);
removeEventListener("shadowComplete", onShadowComplete);
removeEventListener(GameEvent.SUCCESS, onWaveSuccess);
removeEventListener(GameEvent.BONUS, onBonus);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(GameEvent.DIEID, onDie);
removeEventListener(GameEvent.SHVARBRA_FALL, onShvabraFall);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
removeEventListener(MouseEvent.CLICK, onClick);
removeEventListener(GameEvent.FINISH, onWaveComplete, true);
tmr.removeEventListener(TimerEvent.TIMER, onTimer);
}
protected function near(val1:Number, val2:Number):Boolean{
var diff:Number = Math.abs((val1 - val2));
if (diff < 10){
return (true);
};
return (false);
}
protected function killIfPossibleElseFly(flying:Flying):Boolean{
if (sh.speed >= dataLoader.getVariable(currentLevel, "KICK_SPEED")){
flying.damage();
return (true);
};
if (flying.currentState == "sitting"){
flying.fly();
};
return (false);
}
protected function onShadowComplete(ev:Event=null):void{
trace("Shadow complete");
removeChild(_border);
}
protected function growingComplete(ev:Event):void{
trace("Growing complete");
SoundMan.stopTheme2();
SoundMan.playTheme();
removeChild(growingMovie);
growingMovie = null;
addChildAt(_border, 0);
spider.x = 300;
spider.big = true;
Mouse.show();
}
function nextLevel():void{
if (gameEnded){
return;
};
trace("СЛЕДУЮЩИЙ УРОВЕНЬ");
currentLevel++;
if (currentLevel == 2){
hidePuseLabel();
};
if ((((currentLevel >= dataLoader.getGlobalVar("SPIDER_BIG_ON_LEVEL"))) && (!(spider.big)))){
TweenMax.delayedCall(1, playGrowingMovie);
};
if (currentLevel > winningtLevel){
endGame();
return;
};
hud.wave.value = currentLevel;
_border.addChild(nextLevelClip);
nextLevelClip.gotoAndPlay(1);
SoundMan.playEffect("new_wave");
hud.time.value = dataLoader.getGlobalVar("WAVE_TIME");
_waitingForLevel = true;
if ((currentLevel % dataLoader.getGlobalVar("SPIDER_GROW_PER_LEVEL")) == 0){
spider.grow(dataLoader.getVariable(currentLevel, "SPIDER_GROW"));
};
TweenMax.delayedCall(4, createLevel);
_soundInterval = 1;
}
public function start():void{
trace("RESUMING STARTED GAME");
stage.focus = this;
started = true;
sh.started = true;
girl.pause(false);
dead.resume();
spider.pause(false);
manager.pauseAnimation(false);
}
protected function onWaveSuccess(ev:GameEvent):void{
trace("WAVE SUCCESS!!!");
nextLevel();
}
protected function checkHit(flyings:Array):void{
if (((((sh.hitTestPoint(ptDead1.x, ptDead1.y)) || (sh.hitTestPoint(ptDead2.x, ptDead2.y)))) && ((sh.speed >= dataLoader.getVariable(currentLevel, "KICK_SPEED"))))){
dead.playAndDrop();
};
if (((sh.hitTestObject(tv.clip.tvbody)) && ((sh.speed >= dataLoader.getVariable(currentLevel, "KICK_SPEED"))))){
tv.play();
};
if (!flyings){
return;
};
var i:int;
while (i < flyings.length) {
if (!flyings[i]){
} else {
if (!flyings[i].inited){
} else {
if (hitOrMiddle(flyings[i])){
if (Flying(flyings[i]).currentState == "sitting"){
killIfPossibleElseFly(flyings[i]);
};
if (!flyings[i]){
} else {
if ((((Flying(flyings[i]).parent.name == "border")) && (!((Flying(flyings[i]).currentState == "sitting"))))){
if (((((!((Flying(flyings[i]).currentState == "dieing"))) && (!(Flying(flyings[i]).dropped)))) && ((sh.speed > 0)))){
Flying(flyings[i]).x = sh.middle.x;
Flying(flyings[i]).y = sh.middle.y;
if (Flying(flyings[i]).y < 30){
Flying(flyings[i]).y = 30;
};
Flying(flyings[i]).turnToDest();
if (sh.middle.y < 30){
killIfPossibleElseFly(flyings[i]);
};
};
};
};
};
};
};
i++;
};
}
public function endGame():void{
trace("END GAME");
if (gameEnded){
return;
};
gameEnded = true;
pause(true);
trace("CURRENT LEVEL", currentLevel);
manager.killWave();
removeChild(_border);
Mouse.show();
_finalScene = new FinalScene((currentLevel > winningtLevel), currentLevel, hud.scores.value);
addChild(_finalScene);
if (((pauseScreen) && (pauseScreen.stage))){
_border.removeChild(pauseScreen);
};
SoundMan.stopTheme();
SoundMan.playTheme2();
spider.big = false;
}
protected function onBonus(ev:GameEvent):void{
var bonusName:String;
var bonus:int;
switch (ev.obj["num"]){
case 2:
bonusName = "2 Death bonus";
bonus = 50;
break;
case 3:
bonusName = "3 Death bonus";
bonus = 100;
break;
case 4:
bonusName = "Mortal bonus";
bonus = 300;
break;
case 5:
default:
bonusName = "Impossible bonus";
bonus = 500;
break;
};
bonusLanbel.appear(bonusName, bonus);
hud.scores.value = (hud.scores.value + bonus);
addChild(bonusLanbel);
}
protected function onTimer(ev:TimerEvent):void{
if (!started){
return;
};
manager.externalTimer();
if (!_waitingForLevel){
hud.time.value = manager.timeLeft;
};
}
protected function onEnterFrame(ev:Event):void{
var tmpPt:Point;
var time:Number;
SoundMan.enterFrame();
if (dark.currentFrame == 152){
resumeAfterFall();
};
if (!started){
sh.enterFrame(ev);
girl.externalEnterFrame(handPointer);
return;
};
if (!gameEnded){
Mouse.hide();
};
if (!sh.falling){
tmpPt = new Point(pointer.pointerClip.x, pointer.pointerClip.y);
tmpPt = pointer.localToGlobal(tmpPt);
sh.x = tmpPt.x;
sh.y = tmpPt.y;
};
sh.enterFrame(ev);
if (!sh.started){
};
if (tv.clip.currentFrame == 77){
SoundMan.playEffect("short_circut");
} else {
if (tv.clip.currentFrame == 2){
SoundMan.playEffect("tv_kick");
};
};
pointer.extMouseMoveListener(null);
girl.externalEnterFrame(handPointer);
dead.externalEnterFrame();
spider.externalEnterFrame();
manager.externalEnterFrame();
checkHit(manager.flyings);
arrow.x = mouseX;
arrow.y = mouseY;
arrow.rotation = ((Math.atan2((arrow.x - pointer.x), (arrow.y - pointer.y)) * 180) / Math.PI);
arrow.alpha = (Point.distance(new Point(arrow.x, arrow.y), new Point(pointer.x, pointer.y)) / 100);
if ((((hud.time.value < 11)) && (started))){
time = (getTimer() - _lastTime);
if (time >= (_soundInterval * 1000)){
SoundMan.playEffect("tiktak");
_soundInterval = (_soundInterval - _stepPerFrame);
if (_soundInterval < 0.15){
_soundInterval = 0.15;
};
_lastTime = getTimer();
};
};
}
protected function onKeyDown(ev:KeyboardEvent):void{
switch (ev.charCode){
case 32:
if (started){
pause();
};
break;
default:
break;
};
}
protected function hidePoints():void{
dead.clip.deadbody["marker_body"].visible = false;
dead.clip.head["marker_head"].visible = false;
tv.clip.tvbody["marker_tv"].visible = false;
_border.marker_potolok1.visible = false;
_border.marker_potolok2.visible = false;
_border.marker_potolok3.visible = false;
_border.marker_potolok4.visible = false;
}
protected function onWaveComplete(ev:GameEvent):void{
hud.spiderSatisfaction.percentage = (hud.spiderSatisfaction.percentage - ev.obj["num"]);
if (hud.spiderSatisfaction.percentage <= 0){
endGame();
return;
};
nextLevel();
}
protected function playGrowingMovie():void{
TweenMax.delayedCall(2, pause, [true]);
sh.standUp();
sh.started = false;
SoundMan.stopTheme();
SoundMan.playTheme2();
growingMovie = new Spider_growing_mc();
addChild(growingMovie);
}
public function resumeAfterFall():void{
sh.started = false;
Mouse.show();
getReady();
}
protected function preFinalResults(ev:Event):void{
gameEnded = true;
if (((_finalScene) && (_finalScene.stage))){
removeChild(_finalScene);
};
_finalScene = null;
}
protected function onClick(ev:MouseEvent):void{
if (!ev.target["name"]){
return;
};
switch (ev.target["name"]){
case "finalYes":
break;
case "finalNo":
gameEnded = true;
getReady();
hud.spiderSatisfaction.percentage = dataLoader.getVariable(dataLoader.totalLevels, "SPIDERBEGINNINGPERCENTAGE");
SoundMan.stopTheme2();
SoundMan.playTheme();
break;
case "btnPlay":
case "btnPlayMini":
_border.removeChild(pauseScreen);
TweenMax.resumeAll();
start();
break;
case "exitBtn":
endGame();
break;
case "soundBtn":
break;
case "helpBtn":
break;
case "skipDie":
break;
case "skipGrowing":
growingComplete(null);
break;
default:
return;
};
}
protected function getReady():void{
sh.standUp();
sh.x = pointer.x;
sh.y = pointer.y;
girl.pause(false);
addChildAt(_border, 0);
pause(true);
}
protected function createLevel():void{
var data:Function = dataLoader.getVariable;
manager.createWave(data(currentLevel, "YELLOWS"), data(currentLevel, "MEGAS"), data(currentLevel, "METALLS"), data(currentLevel, "BLUES"), data(currentLevel, "REDS"), data(currentLevel, "WASPS"));
manager.startWave(dataLoader.getGlobalVar("WAVE_TIME"));
_waitingForLevel = false;
}
public function fromScratch():Boolean{
Mouse.show();
if (!inited){
return (false);
};
trace("FROM SCRATCH");
currentLevel = dataLoader.startLevelNum;
hud.scores.value = 0;
hud.spiderSatisfaction.percentage = 100;
hud.wave.value = currentLevel;
sh.standUp();
spider.big = false;
spider.size = dataLoader.getGlobalVar("SPIDERSIZE");
if (!_border.stage){
addChildAt(_border, 0);
};
gameEnded = false;
tmr.start();
createLevel();
_soundInterval = 1;
_stepPerFrame = 0.06;
_lastTime = getTimer();
pause();
return (true);
}
protected function pause(_mini:Boolean=false):void{
Mouse.show();
mini = _mini;
trace("PAUSING mini=", _mini);
started = false;
if (((pauseScreen) && (pauseScreen.stage))){
_border.addChild(pauseScreen);
_border.removeChild(pauseScreen);
};
pauseScreen.mini = _mini;
_border.addChild(pauseScreen);
if (_mini){
pointer.x = 400;
pointer.y = 400;
sh.x = pointer.x;
sh.y = pointer.y;
};
pauseScreen.x = pointer.x;
pauseScreen.y = pointer.y;
dead.pause();
spider.pause(true);
girl.pause(true);
sh.started = false;
if (manager){
manager.pauseAnimation(true);
};
}
public function hidePuseLabel():void{
TweenMax.to(pauseLabel, 3, {y:(pauseLabel.y - 50)});
}
protected function setListeners():void{
addEventListener(GameEvent.BONUS, onBonus);
addEventListener("shadowComplete", onShadowComplete);
addEventListener("spiderGrowingComplete", growingComplete);
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
addEventListener(GameEvent.DIEID, onDie, true, 0, true);
addEventListener(GameEvent.SHVARBRA_FALL, onShvabraFall, true, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true);
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
addEventListener(GameEvent.FINISH, onWaveComplete, true, 0, true);
addEventListener(GameEvent.SUCCESS, onWaveSuccess);
addEventListener(GameEvent.END_GAME, preFinalResults);
tmr.addEventListener(TimerEvent.TIMER, onTimer);
}
static function randRange(minNum:Number, maxNum:Number):Number{
return (Utils.randRange(minNum, maxNum));
}
}
}//package classes
Section 17
//Game_Spider_growing_mc (classes.Game_Spider_growing_mc)
package classes {
import flash.utils.*;
import mx.core.*;
public class Game_Spider_growing_mc extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Game_Spider_growing_mc(){
dataClass = Game_Spider_growing_mc_dataClass;
super();
initialWidth = (16000 / 20);
initialHeight = (12000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package classes
Section 18
//Game_Spider_growing_mc_dataClass (classes.Game_Spider_growing_mc_dataClass)
package classes {
import mx.core.*;
public class Game_Spider_growing_mc_dataClass extends ByteArrayAsset {
}
}//package classes
Section 19
//GameEvent (classes.GameEvent)
package classes {
import flash.events.*;
public class GameEvent extends Event {
private var param:Object;
public static var READY:String = "ready";
public static var SEND:String = "netSend";
public static var WHO_AROUND:String = "au_SOSEDI";
public static var FINISH:String = "finish";
public static var BUTTER_FLY:String = "butter_fly";
public static var NEXT_LEVEL:String = "next_level";
public static var SHVARBRA_FALL:String = "SHVARBRA_FALL";
public static var END_GAME:String = "end_game";
public static var RESUME:String = "resume";
public static var AUTH:String = "netAuthor";
public static var PLAY:String = "gamePlay";
public static var DATA_LOADED:String = "data_loaded";
public static var HELP:String = "gameHelp";
public static var START:String = "start";
public static var RECEIVE:String = "netData";
public static var END:String = "netEnd";
public static var SB:String = "startBattle";
public static var REPLY:String = "netReply";
public static var PAUSE:String = "gamePause";
public static var CLOSE:String = "close";
public static var DESTROY:String = "destroy";
public static var MENU:String = "menu";
public static var SUCCESS:String = "seccess";
public static var POINTS:String = "points_arrived";
public static var BLOCK:String = "noturn";
public static var SOUND:String = "sound";
public static var END_SCREEN:String = "endscreen";
public static var RESTART:String = "restartGame";
public static var DIEID:String = "died";
public static var TURN:String = "turn";
public static var BONUS:String = "boNus";
public function GameEvent(type:String){
super(type, true);
}
public function set obj(to:Object):void{
param = to;
}
public function get obj():Object{
return (param);
}
}
}//package classes
Section 20
//Girl (classes.Girl)
package classes {
import flash.events.*;
import gs.*;
import flash.display.*;
import flash.geom.*;
public class Girl extends Sprite {
private const RIGHTMARGIN:int = 707;
private const LEFTMARGIN:int = 79;
private var bodyHandDistance:int;// = 76
private var goingRight:girl_right;
protected var _paused:Boolean;// = false
private var currentPers:MovieClip;
var locked:Boolean;
private var _state:String;
private var vx:Number;// = 4
private var goingLeft:girl_left;
protected var _stingPoints:Array;
private var jumping:girl_jump;
private var pointer:CustomMousePointer;
public function Girl(pt:CustomMousePointer){
super();
pointer = pt;
locked = false;
loadData();
x = (y = 400);
goingLeft = new girl_left();
goingRight = new girl_right();
jumping = new girl_jump();
currentPers = goingLeft;
_state = "left";
addChild(currentPers);
_stingPoints = new Array();
_stingPoints[0] = new Point(-26, -98);
_stingPoints[1] = new Point(-25, -143);
_stingPoints[2] = new Point(-34, -167);
_stingPoints[3] = new Point(36, -168);
_stingPoints[4] = new Point(27, -98);
_stingPoints[5] = new Point(26, -143);
name = "girl";
}
protected function shake():void{
if (_paused){
return;
};
var rnd:int = randRange(0, 1);
if (rnd == 0){
rnd = 1;
} else {
rnd = -1;
};
TweenMax.to(pointer.pointerClip, Game.dataLoader.getVariable(Game.currentLevel, "MOVE_TIME"), {x:(pointer.pointerClip.x - (Game.dataLoader.getVariable(Game.currentLevel, "SHAKE") * rnd)), onComplete:movePointerBack});
}
function randRange(minNum:Number, maxNum:Number):Number{
return ((Math.floor((Math.round((Math.random() * maxNum)) - minNum)) + minNum));
}
protected function movePointerBack():void{
TweenMax.to(pointer.pointerClip, Game.dataLoader.getVariable(Game.currentLevel, "BACK_TIME"), {x:0});
}
protected function stopAnimation(begin:Boolean=false):void{
if (begin){
currentPers.gotoAndStop(1);
} else {
currentPers.stop();
};
}
public function moveRight():void{
if (_state == "right"){
return;
};
_state = "right";
removeChild(currentPers);
currentPers = goingRight;
addChild(currentPers);
startAnimation();
}
public function externalEnterFrame(handPointer:Hand_mc):void{
var speed:Number;
if (currentPers.currentFrame == 9){
switch (_state){
case "left":
SoundMan.playEffect("girl_step2");
break;
case "right":
SoundMan.playEffect("girl_step1");
break;
case "jump":
SoundMan.playEffect("girl_step1");
break;
};
};
if (_state == "jump"){
if (currentPers.currentFrame == currentPers.totalFrames){
moveLeft();
stopAnimation();
return;
};
if (currentPers.currentFrame == 1){
shake();
};
return;
};
if (locked){
return;
};
speed = (((x - bodyHandDistance) - handPointer.parent.x) / Game.dataLoader.getVariable(Game.currentLevel, "DIVIDER"));
if (handPointer.parent.x > x){
handPointer.hand.gotoAndStop(1);
} else {
if (handPointer.parent.x < (x - (width / 2))){
handPointer.hand.gotoAndStop(3);
};
};
vx = speed;
if (Math.abs(vx) < 1.5){
vx = 0;
stopAnimation(true);
} else {
startAnimation();
};
x = (x - vx);
if (vx > 0){
moveLeft();
};
if ((((vx < 0)) && ((x < RIGHTMARGIN)))){
moveRight();
};
if (x < LEFTMARGIN){
x = LEFTMARGIN;
stopMoving();
moveRight();
};
if (x > RIGHTMARGIN){
x = RIGHTMARGIN;
stopMoving();
moveLeft();
};
}
protected function onCompleteLoading(ev:Event):void{
}
public function jump():void{
if (!currentPers){
return;
};
_state = "jump";
removeChild(currentPers);
currentPers = jumping;
addChild(currentPers);
currentPers.gotoAndPlay(1);
}
protected function startAnimation():void{
if ((((x <= LEFTMARGIN)) || ((x >= RIGHTMARGIN)))){
currentPers.stop();
};
currentPers.play();
}
public function stopMoving():void{
vx = 0;
_state = "standing";
stopAnimation(true);
}
public function pause($pause:Boolean):void{
_paused = $pause;
if (_paused){
stopAnimation();
} else {
startAnimation();
};
}
protected function loadData():void{
}
public function moveLeft():void{
if (_state == "left"){
return;
};
_state = "left";
removeChild(currentPers);
currentPers = goingLeft;
addChild(currentPers);
startAnimation();
}
protected function onEnterFrame(e:Event):void{
if (currentPers.currentFrame == currentPers.totalFrames){
currentPers.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
moveLeft();
stopAnimation();
};
}
public function get stingPoints():Array{
return (_stingPoints);
}
}
}//package classes
Section 21
//HelpScreen (classes.HelpScreen)
package classes {
public class HelpScreen extends Help_mc {
public function HelpScreen(){
super();
}
public function next():void{
pages.nextFrame();
}
public function prev():void{
pages.prevFrame();
}
}
}//package classes
Section 22
//HUD (classes.HUD)
package classes {
import flash.display.*;
public class HUD extends Sprite {
public var scores:Scores;
public var spiderSatisfaction:Satisfaction;
public var wave:WaveInd;
public var time:TimeInd;
public function HUD(){
scores = new Scores();
time = new TimeInd();
wave = new WaveInd();
spiderSatisfaction = new Satisfaction();
super();
spiderSatisfaction.x = 675;
spiderSatisfaction.y = 520;
addChild(spiderSatisfaction);
scores.x = 710;
addChild(scores);
time.x = 11.2;
time.y = 528.4;
addChild(time);
wave.x = 21;
wave.y = 564.3;
addChild(wave);
}
}
}//package classes
Section 23
//Main (classes.Main)
package classes {
import flash.events.*;
import gs.*;
import flash.display.*;
import muzaffaraka.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
public class Main extends Sprite {
private var help:HelpScreen;
private var _dataLoader:DataLoader;
private var credits:Credits_mc;
protected var _firstScene:MovieClip;
private var helpFromGame:Boolean;// = false
private var menu:MainMenu_mc;
private var game:Game;
private var _tutor:Tutorial_mc;
protected var shad:ShadowBeforeTutor_mc;
private var results:Results;
public static var First_scene_mc:Class = Main_First_scene_mc;
public function Main($dataLoader:DataLoader):void{
shad = new ShadowBeforeTutor_mc();
super();
addEventListener(Event.ADDED_TO_STAGE, init);
addEventListener(GameEvent.END_GAME, finalResults);
_dataLoader = $dataLoader;
shad.mouseEnabled = (shad.mouseChildren = false);
}
protected function showTitles():void{
removeChild(menu);
if (!credits){
credits = new Credits_mc();
};
addChild(credits);
}
protected function hideMenu():void{
if (credits){
if (credits.stage){
removeChild(credits);
};
};
if (help){
if (help.stage){
removeChild(help);
};
};
if (game){
if (results){
removeChild(results);
results = null;
};
};
if (menu){
if (menu.stage){
removeChild(menu);
};
menu = null;
};
}
protected function firstScene():void{
_firstScene = new First_scene_mc();
addChild(_firstScene);
}
protected function init(ev:Event):void{
MochiBot.track(this, "18ac6222");
SoundMixer.soundTransform = new SoundTransform(0.5);
Profiler.init(stage, this);
removeEventListener(Event.ADDED_TO_STAGE, init);
addEventListener(MouseEvent.CLICK, onClick);
addEventListener("firstsceneComplete", showTutor);
showMenu();
SoundMan.stop();
SoundMan.start();
}
protected function showHelp():void{
if (((menu) && (menu.stage))){
removeChild(menu);
helpFromGame = false;
} else {
helpFromGame = true;
};
if (!help){
help = new HelpScreen();
};
addChild(help);
help.prev();
}
protected function finalResults(ev:GameEvent):void{
results = new Results(ev.obj["scores"], ev.obj["win"]);
addChild(results);
SoundMan.stopTheme2();
Mouse.show();
}
protected function start(ev:Event):void{
game.fromScratch();
}
protected function onClick(ev:Event):void{
trace("Main", ev.target["name"]);
switch (ev.target["name"]){
case "menuBtn":
showMenu(false);
break;
case "muzaffar":
navigateToURL(new URLRequest("mailto:muzaffaraka@inbox.ru"), "_blank");
break;
case "tvxgames":
navigateToURL(new URLRequest("http://tvxgames.ru"), "_blank");
break;
case "nemuPlay":
TweenMax.delayedCall(5, hideMenu);
firstScene();
break;
case "skipFirstScene":
showTutor();
break;
case "menuFromResult":
showMenu(true);
break;
case "menuHelp":
case "helpBtn":
showHelp();
break;
case "menuTitles":
showTitles();
break;
case "nextBtn":
help.next();
break;
case "backBtn":
help.prev();
break;
case "skipAndPlay":
getReady();
break;
default:
return;
};
}
protected function getReady(ev:Event=null):void{
trace("Starting game");
hideMenu();
if (_tutor){
if (_tutor.stage){
removeChild(_tutor);
};
_tutor = null;
};
if (_firstScene){
removeChild(_firstScene);
_firstScene = null;
};
if (!game){
game = new Game(_dataLoader);
game.addEventListener(GameEvent.PLAY, start);
} else {
addChild(game);
game.fromScratch();
};
addChild(game);
shad.x = (shad.y = 0);
shad.gotoAndPlay(1);
game.addChild(shad);
Mouse.show();
}
protected function showTutor(ev:Event=null):void{
if (_firstScene){
removeChild(_firstScene);
_firstScene = null;
};
_tutor = new Tutorial_mc();
shad.x = -400;
shad.y = -300;
shad.gotoAndPlay(1);
_tutor.addChild(shad);
_tutor.x = 400;
_tutor.y = 300;
addChild(_tutor);
}
protected function showMenu(soundRestart:Boolean=true):void{
if (((((helpFromGame) && (help))) && (help.stage))){
removeChild(help);
return;
};
SoundMan.start();
if (((game) && (game.stage))){
removeChild(game);
};
hideMenu();
if (!menu){
menu = new MainMenu_mc();
};
addChild(menu);
SoundMan.stopTheme2();
if (soundRestart){
SoundMan.stop();
SoundMan.start();
};
}
}
}//package classes
Section 24
//Main_First_scene_mc (classes.Main_First_scene_mc)
package classes {
import flash.utils.*;
import mx.core.*;
public class Main_First_scene_mc extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Main_First_scene_mc(){
dataClass = Main_First_scene_mc_dataClass;
super();
initialWidth = (16000 / 20);
initialHeight = (12000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package classes
Section 25
//Main_First_scene_mc_dataClass (classes.Main_First_scene_mc_dataClass)
package classes {
import mx.core.*;
public class Main_First_scene_mc_dataClass extends ByteArrayAsset {
}
}//package classes
Section 26
//MochiBot (classes.MochiBot)
package classes {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public function MochiBot(){
super();
}
public static function ioError(ev:IOErrorEvent):void{
trace("IO Error");
}
public static function track(parent:Sprite, tag:String):MochiBot{
trace("TRACK");
trace("sandboxType:", Security.sandboxType);
if (Security.sandboxType == "localWithFile"){
return (null);
};
var self:MochiBot = new (MochiBot);
parent.addChild(self);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var server:String = "http://core.mochibot.com/my/core.swf";
var lv:URLVariables = new URLVariables();
lv["sb"] = Security.sandboxType;
lv["v"] = Capabilities.version;
lv["swfid"] = tag;
lv["mv"] = "8";
lv["fv"] = "9";
var url:String = self.root.loaderInfo.loaderURL;
if (url.indexOf("http") == 0){
lv["url"] = url;
} else {
lv["url"] = "local";
};
trace("Server is:", server);
var req:URLRequest = new URLRequest(server);
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
var loader:Loader = new Loader();
self.addChild(loader);
self.visible = false;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
loader.load(req);
return (self);
}
}
}//package classes
Section 27
//NextLevelLabel (classes.NextLevelLabel)
package classes {
import muzaffaraka.*;
public class NextLevelLabel extends NextLevel_mc {
public function NextLevelLabel(){
super();
StringUtil.setFont(inner["label"], myStartFont);
mouseChildren = false;
mouseEnabled = false;
x = 400;
y = 300;
}
}
}//package classes
Section 28
//PauseScreen (classes.PauseScreen)
package classes {
import flash.display.*;
public class PauseScreen extends Sprite {
protected var _clipMini:Sprite;
protected var _currentClip:Sprite;
private var vc:VolumeControl2;
protected var _clipWhithMenu:PauseBlock_mc;
protected var _btn:Pause_mini_bt;
public function PauseScreen(){
vc = new VolumeControl2();
_btn = new Pause_mini_bt();
_clipMini = new Sprite();
_clipWhithMenu = new PauseBlock_mc();
super();
_btn.name = "btnPlayMini";
_clipMini.addChild(_btn);
}
public function set mini(to:Boolean):void{
if (((_currentClip) && (_currentClip.parent))){
removeChild(_currentClip);
};
_currentClip = (to) ? _clipMini : _clipWhithMenu;
addChild(_currentClip);
if (!to){
vc.x = -20;
vc.y = 70;
_currentClip.addChild(vc);
};
}
}
}//package classes
Section 29
//Preloader (classes.Preloader)
package classes {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import muzaffaraka.net.*;
public class Preloader extends MovieClip {
protected var _minijuegosAd:Class;
protected var _dataLoader:DataLoader;
protected var _dataLoaded:Boolean;// = false
protected var loadScreen:Preloader_mc;
protected var _minijuegos_mc:MovieClip;
protected var mainClass:Class;
public function Preloader(){
_minijuegosAd = Preloader__minijuegosAd;
super();
var urls:Array = new Array();
urls.push("tvxspb.ru");
urls.push("www.tvxspb.ru");
urls.push("www.flashgamelicense.com");
urls.push("flashgamelicense.com");
if (!NetUtil.checkURL(urls)){
};
_minijuegos_mc = (new _minijuegosAd() as MovieClip);
_minijuegos_mc.x = ((800 / 2) - (_minijuegos_mc.width / 2));
_minijuegos_mc.y = ((600 / 2) - (_minijuegos_mc.height / 2));
_minijuegos_mc.stop();
addChild(_minijuegos_mc);
stage.addEventListener("M_STOP", startPreloader);
}
public function startup(ev:GameEvent=null):void{
var ev = ev;
if (loadScreen){
if (loadScreen.stage){
removeChild(loadScreen);
};
loadScreen = null;
};
mainClass = (getDefinitionByName("classes.Main") as Class);
trace("Mainclass is:", mainClass);
stage.addChild((new mainClass(_dataLoader) as DisplayObject));
gotoAndStop("start");
//unresolved jump
var _slot1 = e;
trace(_slot1.message);
}
protected function dataLoaded():void{
_dataLoaded = true;
}
protected function startPreloader(e:Event):void{
removeEventListener("M_STOP", startPreloader);
addEventListener(Event.ENTER_FRAME, progressHandler);
stage.quality = StageQuality.HIGH;
loadScreen = new Preloader_mc();
addChild(loadScreen);
_dataLoader = new DataLoader(dataLoaded);
_dataLoader.loadAllData();
}
protected function progressHandler(evt:Event):void{
var perc:int = Math.floor(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 100));
loadScreen.progress.scaleX = (perc / 100);
if ((((perc >= 100)) && (_dataLoaded))){
removeEventListener(Event.ENTER_FRAME, progressHandler);
gotoAndStop("start");
startup();
trace("Loading complete....");
};
}
}
}//package classes
Section 30
//Preloader__minijuegosAd (classes.Preloader__minijuegosAd)
package classes {
import mx.core.*;
import flash.utils.*;
public class Preloader__minijuegosAd extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Preloader__minijuegosAd(){
dataClass = Preloader__minijuegosAd_dataClass;
super();
initialWidth = (0x3200 / 20);
initialHeight = (9600 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package classes
Section 31
//Preloader__minijuegosAd_dataClass (classes.Preloader__minijuegosAd_dataClass)
package classes {
import mx.core.*;
public class Preloader__minijuegosAd_dataClass extends ByteArrayAsset {
}
}//package classes
Section 32
//Results (classes.Results)
package classes {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import muzaffaraka.*;
import flash.net.*;
public class Results extends Results_mc {
protected var currScore:int;
protected var place:int;
protected var loader:URLLoader;
protected var _win:Boolean;// = false
protected var req:URLRequest;
protected var _wallpaperUrl:String;
protected var url:String;// = "http://tvxspb.ru/spidersbride/gateway.php"
protected var tf:TextFormat;
protected var variables:URLVariables;
public function Results(score:int, $win:Boolean):void{
loader = new URLLoader();
variables = new URLVariables();
super();
tf = TextField(this["name1"]).getTextFormat();
tf.size = 13;
tf.bold = true;
currScore = score;
scoreCurrent.text = currScore.toString();
scoreCurrent.setTextFormat(tf);
wallpaper.visible = false;
_win = $win;
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
addEventListener(KeyboardEvent.KEY_UP, onKeyDown, false, 0, true);
addEventListener(Event.ADDED_TO_STAGE, onAdded);
loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
loader.addEventListener(IOErrorEvent.IO_ERROR, onError, false, 0, true);
loader.addEventListener(IOErrorEvent.NETWORK_ERROR, onError, false, 0, true);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, false, 0, true);
error_clip.visible = false;
validate();
}
protected function onKeyDown(ev:KeyboardEvent):void{
nameInput.setTextFormat(tf);
if (ev.keyCode == 13){
onClick();
};
}
protected function validate(name:String="", score:int=0):void{
var name = name;
var score = score;
var trimmedName:String = StringUtil.trim(name);
variables["name"] = trimmedName;
variables["score"] = currScore;
trace("Name:", variables["name"], ",score:", variables["score"]);
req = new URLRequest(url);
req.data = variables;
req.method = URLRequestMethod.POST;
loader.load(req);
//unresolved jump
var _slot1 = e;
trace("CONNECTION FAILED", _slot1.message);
}
protected function onAdded(ev:Event):void{
stage.focus = nameInput;
}
public function disable(obj:DisplayObject):void{
obj.visible = false;
}
protected function onError(e:Event):void{
trace("Communocation error!!!!!");
error_clip.visible = true;
}
protected function onClick(ev:MouseEvent=null):void{
var targName:String;
var _local3:String;
if (((ev) && (ev.target["name"]))){
targName = ev.target["name"];
} else {
targName = "submitBtn";
};
switch (targName){
case "submitBtn":
if (!submitBtn.visible){
return;
};
_local3 = nameInput["text"];
_local3 = StringUtil.trim(_local3);
if (_local3 == "\r"){
return;
};
if (_local3.length > 0){
disable(submitBtn);
validate(_local3, currScore);
};
break;
case "wallpaperBtn":
navigateToURL(new URLRequest(_wallpaperUrl), "_blank");
break;
default:
return;
};
}
protected function onComplete(ev:Event):void{
var element:XML;
var strName:String;
var ev = ev;
var vars:URLVariables = new URLVariables(ev.target["data"]);
var xml:XML = new XML(vars["ratings"]);
_wallpaperUrl = ("http://tvxspb.ru/spidersbride/" + decodeURIComponent(vars["image"]));
wallpaper.visible = _win;
trace(xml);
placeCurrent.text = vars["position"];
placeCurrent.setTextFormat(tf);
trace("Position is:", vars["position"]);
for each (element in xml.elements()) {
trace(element.@id, element.name, element.score);
strName = element["name"];
strName = decodeURIComponent(strName);
//unresolved jump
var _slot1 = e;
this[("name" + element.@id)]["text"] = strName;
this[("score" + element.@id)]["text"] = element["score"];
StringUtil.setFont(this[("name" + element.@id)], ComicSansMS);
StringUtil.setFont(this[("score" + element.@id)], ComicSansMS);
//unresolved jump
var _slot1 = e;
};
}
}
}//package classes
Section 33
//Satisfaction (classes.Satisfaction)
package classes {
import flash.display.*;
import muzaffaraka.*;
public class Satisfaction extends Sprite {
protected var clip:Satisfaction_mc;
protected var num:Number;// = 0
protected var indicatorHeight:Number;
public function Satisfaction(){
clip = new Satisfaction_mc();
super();
addChild(clip);
clip.spider["body"].indicator.stop();
indicatorHeight = clip.spider["body"].indicator.height;
warning = false;
StringUtil.setFont(clip.label["txt"], myStartFont);
}
public function get percentage():Number{
return (num);
}
public function set percentage(percent:Number):void{
if (percent <= 0){
num = 0;
};
if (percent >= 100){
num = 100;
};
if ((((percent > 0)) && ((percent < 100)))){
num = percent;
};
clip.spider["body"].indicator.height = (indicatorHeight * (num / 100));
clip.label["txt"].text = Math.ceil(num);
warning = (num < 30);
}
public function get persentageInt():int{
return (Math.ceil(num));
}
protected function set warning(to:Boolean):void{
if (to){
clip.spider["body"].play();
} else {
clip.spider["body"].gotoAndStop(1);
};
}
}
}//package classes
Section 34
//Scores (classes.Scores)
package classes {
import flash.text.*;
import muzaffaraka.*;
public class Scores extends ScoresNew_mc {
protected var _value:int;
protected var tf:TextFormat;
protected var fnt:Gothic;
public function Scores(){
fnt = new Gothic();
super();
value = 0;
StringUtil.setFont(scoressTxt, myStartFont);
}
public function get value():int{
return (_value);
}
public function set value(to:int):void{
_value = to;
scoressTxt.text = _value.toString();
}
}
}//package classes
Section 35
//Shvabra (classes.Shvabra)
package classes {
import flash.events.*;
import gs.*;
import flash.geom.*;
import gs.easing.*;
public class Shvabra extends Shvabra_mc {
public const LEFT:Number = -1;
public const TOP:Number = 2;
public const RIGHT:Number = 1;
protected var _lastY:Number;
var left:Point;
private var compensAngle:Number;
protected var yPos:Number;
var right:Point;
var middle:Point;
var lastRight:Point;
private var bottom:Point;
private var leftMargin:Number;
protected var _myHeigth:Number;
protected var xPos:Number;
private var pointer:CustomMousePointer;
protected var _started:Boolean;// = false
var lastLeft:Point;
protected var _speed:Number;
private var _falling:Boolean;// = false
protected var outOfBorder:Boolean;// = false
private var katetA:Number;
private var katetOld:Number;
private var rightMargin:Number;
private var diffX:Number;
protected var myWidth:Number;
private var diffY:Number;
public function Shvabra(pt:CustomMousePointer){
super();
pointer = pt;
_lastY = y;
stop();
myWidth = width;
_myHeigth = height;
compensAngle = calcCompensAngle();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
rotation = 0;
xPos = x;
yPos = y;
loadData();
}
public function get myHeight():Number{
return (_myHeigth);
}
public function get lastY():Number{
return (_lastY);
}
protected function calcCompensAngle():Number{
var gipotenuza:Number;
gipotenuza = Math.sqrt(((_myHeigth * _myHeigth) + ((myWidth / 2) * (myWidth / 2))));
var angle:Number = Math.acos((_myHeigth / gipotenuza));
return (fromRadianToDegree(angle));
}
public function standUp():void{
trace("Shvabra standin up");
TweenMax.killTweensOf(this);
rotation = 0;
gotoAndStop(1);
x = pointer.x;
y = pointer.y;
diffX = 0;
diffY = 0;
_lastY = y;
xPos = x;
yPos = y;
initMargins();
scaleX = 1;
_falling = false;
}
protected function fall():void{
var completeFall:Function;
completeFall = function ():void{
SoundMan.playEffect("mop_fall");
play();
if (rotation < 0){
scaleX = -1;
};
TweenMax.delayedCall(0, dispatchEvent, [new GameEvent(GameEvent.SHVARBRA_FALL)]);
};
_falling = true;
var speed = 1000;
var dist:Number = (580 - y);
var time:Number = (dist / speed);
TweenMax.to(this, time, {y:580, onComplete:completeFall, ease:Linear.easeNone});
}
protected function calculateAngle(side:Number):Boolean{
katetOld = katetA;
switch (side){
case LEFT:
katetA = (bottom.x - leftMargin);
break;
case RIGHT:
katetA = (rightMargin - bottom.x);
break;
case TOP:
break;
};
if (katetA >= katetOld){
return (false);
};
var gipotenuza:Number = _myHeigth;
var radianAngle:Number = Math.acos((katetA / gipotenuza));
var degreeAngle:Number = fromRadianToDegree(radianAngle);
degreeAngle = (side * ((90 - Math.abs(degreeAngle)) - compensAngle));
if (Math.abs(degreeAngle) <= 0){
return (false);
};
rotation = degreeAngle;
return (true);
}
public function get started():Boolean{
return (_started);
}
public function set started(yes:Boolean):void{
xPos = x;
yPos = y;
_lastY = y;
trace("STARTED");
_started = yes;
}
override public function set rotation(value:Number):void{
super.rotation = value;
}
public function get falling():Boolean{
return (_falling);
}
protected function onAddedToStage(ev:Event):void{
leftMargin = 0;
rightMargin = 800;
}
protected function fromRadianToDegree(angle:Number):Number{
return (((angle * 180) / Math.PI));
}
protected function loadData():void{
started = true;
}
public function get speed():Number{
return (_speed);
}
protected function getCompensation(val:Number):Number{
var res:Number;
var rotation2:Number;
return (val);
}
protected function initMargins():void{
lastLeft = left;
lastRight = right;
left = localToGlobal(new Point(leftLimit.x, leftLimit.y));
right = localToGlobal(new Point(rightLimit.x, rightLimit.y));
bottom = localToGlobal(new Point(bottomLimit.x, bottomLimit.y));
middle = localToGlobal(new Point(middleLimit.x, middleLimit.y));
leftLimit.alpha = 0;
rightLimit.alpha = 0;
middleLimit.alpha = 0;
bottomLimit.alpha = 0;
}
override public function set x(value:Number):void{
super.x = value;
}
public function enterFrame(ev:Event=null):void{
var sign:int;
if (_falling){
return;
};
_speed = (_lastY - y);
_lastY = y;
if (!started){
return;
};
if (!stage){
return;
};
initMargins();
if (left.x <= leftMargin){
calculateAngle(LEFT);
xPos = x;
yPos = y;
return;
};
if (right.x >= rightMargin){
calculateAngle(RIGHT);
xPos = x;
yPos = y;
return;
};
diffX = ((x - xPos) * getCompensation(Game.dataLoader.getVariable(Game.currentLevel, "COMPENSATIONH")));
if ((y - yPos) > 0){
diffY = ((y - yPos) * Game.dataLoader.getVariable(Game.currentLevel, "COMPENSATIONV"));
} else {
diffY = ((y - yPos) * Game.dataLoader.getVariable(Game.currentLevel, "COMPENSATIONV2"));
};
rotation = (rotation + ((rotation * Math.pow(Game.dataLoader.getVariable(Game.currentLevel, "ROTAT_MULTIP"), (1 / 3))) - diffX));
if (rotation < 0){
rotation = (rotation + diffY);
} else {
rotation = (rotation - diffY);
};
if (Math.abs(rotation) > 78){
sign = ((rotation < 0)) ? -1 : 1;
rotation = (78 * sign);
fall();
};
xPos = x;
yPos = y;
}
}
}//package classes
Section 36
//SitPoint (classes.SitPoint)
package classes {
import classes.Flyings.*;
public class SitPoint {
public var y:Number;
public var distance:Number;// = 0
public var num:int;// = 0
public var x:Number;
public var busy:Flying;
public function SitPoint(xc:Number=0, yc:Number=0){
super();
x = xc;
y = yc;
busy = null;
}
}
}//package classes
Section 37
//SitPointDispatcher (classes.SitPointDispatcher)
package classes {
import classes.Flyings.*;
import flash.geom.*;
public class SitPointDispatcher {
private var tvSet:TVSet;
private var points:Array;
private var dead:Dead;
private var border:Border;
private var shvabra:Shvabra;
private var girl:Girl;
public function SitPointDispatcher(brd:Border, grl:Girl, sh:Shvabra, tv:TVSet=null, dd:Dead=null){
super();
border = brd;
grl = girl;
shvabra = sh;
dead = dd;
tvSet = tv;
fillPoints();
}
public function releasePoint(pt:SitPoint):void{
if (pt == null){
return;
};
points[pt.num].busy = null;
}
public function getNearestFreePoint(flying:Flying):SitPoint{
var distances:Array = new Array();
var i:int;
while (i < points.length) {
if (points[i].busy){
distances[i] = null;
} else {
distances[i] = new SitPoint();
distances[i].distance = Point.distance(new Point(flying.x, flying.y), new Point(points[i].x, points[i].y));
distances[i].num = i;
};
i++;
};
distances.sortOn("distance", Array.NUMERIC);
var distances2:Array = new Array();
var k:Number = 0;
while (k < distances.length) {
if (distances[k]){
distances2.push(distances[k]);
};
k++;
};
distances = null;
if (distances2.length != 0){
trace("ДАЁМ ТОЧКУ ПОСАДКИ");
points[distances2[0].num].busy = flying;
return (points[distances2[0].num]);
};
return (null);
}
protected function fillPoints():void{
points = new Array();
points[0] = new SitPoint(dead.clip.deadbody.marker_body.x, dead.clip.deadbody.marker_body.y);
points[1] = new SitPoint(dead.clip.head.marker_head.x, dead.clip.head.marker_head.y);
points[0] = new SitPoint(dead.clip.deadbody.localToGlobal(new Point(points[0].x, points[0].y)).x, dead.clip.deadbody.localToGlobal(new Point(points[0].x, points[0].y)).y);
points[1] = new SitPoint(dead.clip.head.localToGlobal(new Point(points[1].x, points[1].y)).x, dead.clip.head.localToGlobal(new Point(points[1].x, points[1].y)).y);
points[2] = new SitPoint(tvSet.clip.tvbody.marker_tv.x, tvSet.clip.tvbody.marker_tv.y);
points[2] = new SitPoint(tvSet.clip.tvbody.localToGlobal(new Point(points[2].x, points[2].y)).x, tvSet.clip.tvbody.localToGlobal(new Point(points[2].x, points[2].y)).y);
points[3] = new SitPoint(border.marker_potolok1.x, border.marker_potolok1.y);
points[4] = new SitPoint(border.marker_potolok2.x, border.marker_potolok2.y);
points[5] = new SitPoint(border.marker_potolok3.x, border.marker_potolok3.y);
points[6] = new SitPoint(border.marker_potolok4.x, border.marker_potolok4.y);
var i:int;
while (i < points.length) {
SitPoint(points[i]).num = i;
i++;
};
}
}
}//package classes
Section 38
//SoundMan (classes.SoundMan)
package classes {
import flash.media.*;
public class SoundMan {
protected static var girl_step1:Class = SoundMan_girl_step1;
protected static var girl_step2:Class = SoundMan_girl_step2;
protected static var theme2:Sound;
protected static var mop_fall:Class = SoundMan_mop_fall;
protected static var short_circut:Class = SoundMan_short_circut;
protected static var soundToOff:Sound;
protected static var new_wave:Class = SoundMan_new_wave;
protected static var sndEff:Sound;
private static var tikOrTak:Boolean = true;
protected static var theme:Sound;
protected static var stopped:Boolean = true;
protected static var cut_scene:Class = SoundMan_cut_scene;
protected static var offSound2:SoundChannel = null;
protected static var spiderChannel:SoundChannel;
protected static var offSound:SoundChannel = null;
protected static var cutChannel:SoundChannel;
protected static var tv_kick:Class = SoundMan_tv_kick;
protected static var dead:Class = SoundMan_dead;
protected static var eff:Object = {tik:new tik(), tak:new tak(), new_wave:new new_wave(), cut_scene:new cut_scene(), dead:new dead(), short_circut:new short_circut(), spider_eat:new spider_eat(), butterfly:new butterfly(), dead:null, girl_step2:new girl_step2(), mop_fall:new mop_fall(), wasp_attack:new wasp_attack(), spider_step:new spider_step(), ceiling_kick:null, girl_step1:new girl_step1(), short_circut:null, tv_kick:new tv_kick()};
protected static var spider_stepOn:Boolean = false;
protected static var spider_step:Class = SoundMan_spider_step;
protected static var wasp_attack:Class = SoundMan_wasp_attack;
public static var butterfly:Class = SoundMan_butterfly;
protected static var mp3:Class = SoundMan_mp3;
protected static var themeChannel2:SoundChannel;
protected static var themeChannel:SoundChannel;
public static var spider_eat:Class = SoundMan_spider_eat;
public function SoundMan():void{
super();
}
public static function playTheme(startTm:Number=0):void{
trace("Playin theme");
if (stopped){
return;
};
theme = new mp3();
themeChannel = theme.play(startTm, 99999999999, new SoundTransform(0.7));
}
public static function stop():void{
stopped = true;
SoundMixer.stopAll();
}
public static function stopTheme2():void{
if (themeChannel2){
offSound2 = themeChannel2;
};
}
public static function playTheme2(startTm:Number=0):void{
if (stopped){
return;
};
theme2 = new cut_scene();
themeChannel2 = theme2.play(startTm, 99999999999, new SoundTransform(0.8));
}
public static function start():void{
if (!stopped){
return;
};
stopped = false;
playTheme(0);
}
public static function stopTheme():void{
if (themeChannel){
offSound = themeChannel;
};
}
public static function enterFrame():void{
var sndTrsm:SoundTransform;
var sndTrsm2:SoundTransform;
if (offSound){
sndTrsm = new SoundTransform((offSound.soundTransform.volume - 0.01));
offSound.soundTransform = sndTrsm;
if (offSound.soundTransform.volume <= 0.1){
offSound.stop();
offSound = null;
};
};
if (offSound2){
sndTrsm2 = new SoundTransform((offSound2.soundTransform.volume - 0.01));
offSound2.soundTransform = sndTrsm2;
if (offSound2.soundTransform.volume <= 0.1){
offSound2.stop();
offSound2 = null;
};
};
}
public static function playEffect(id:String=null, on:Boolean=false):void{
if (((stopped) || (!(id)))){
return;
};
if (id == "tiktak"){
if (tikOrTak){
sndEff = eff["tik"];
} else {
sndEff = eff["tak"];
};
tikOrTak = !(tikOrTak);
} else {
sndEff = eff[id];
};
if (sndEff){
switch (id){
case "spider_step":
if (on){
if (!spider_stepOn){
trace("Starting sound");
spiderChannel = sndEff.play(0, 4, new SoundTransform(3));
spider_stepOn = true;
};
} else {
if (spider_stepOn){
trace("Stoping sound");
spiderChannel.stop();
spider_stepOn = false;
};
};
break;
case "cut_scene":
if (on){
cutChannel = sndEff.play();
} else {
if (cutChannel){
offSound = cutChannel;
};
};
break;
case "new_wave":
sndEff.play(0, 0, new SoundTransform(2));
break;
case "tiktak":
sndEff.play(0.35);
break;
default:
sndEff.play();
break;
};
};
}
}
}//package classes
Section 39
//SoundMan_butterfly (classes.SoundMan_butterfly)
package classes {
import mx.core.*;
public class SoundMan_butterfly extends SoundAsset {
}
}//package classes
Section 40
//SoundMan_cut_scene (classes.SoundMan_cut_scene)
package classes {
import mx.core.*;
public class SoundMan_cut_scene extends SoundAsset {
}
}//package classes
Section 41
//SoundMan_dead (classes.SoundMan_dead)
package classes {
import mx.core.*;
public class SoundMan_dead extends SoundAsset {
}
}//package classes
Section 42
//SoundMan_girl_step1 (classes.SoundMan_girl_step1)
package classes {
import mx.core.*;
public class SoundMan_girl_step1 extends SoundAsset {
}
}//package classes
Section 43
//SoundMan_girl_step2 (classes.SoundMan_girl_step2)
package classes {
import mx.core.*;
public class SoundMan_girl_step2 extends SoundAsset {
}
}//package classes
Section 44
//SoundMan_mop_fall (classes.SoundMan_mop_fall)
package classes {
import mx.core.*;
public class SoundMan_mop_fall extends SoundAsset {
}
}//package classes
Section 45
//SoundMan_mp3 (classes.SoundMan_mp3)
package classes {
import mx.core.*;
public class SoundMan_mp3 extends SoundAsset {
}
}//package classes
Section 46
//SoundMan_new_wave (classes.SoundMan_new_wave)
package classes {
import mx.core.*;
public class SoundMan_new_wave extends SoundAsset {
}
}//package classes
Section 47
//SoundMan_short_circut (classes.SoundMan_short_circut)
package classes {
import mx.core.*;
public class SoundMan_short_circut extends SoundAsset {
}
}//package classes
Section 48
//SoundMan_spider_eat (classes.SoundMan_spider_eat)
package classes {
import mx.core.*;
public class SoundMan_spider_eat extends SoundAsset {
}
}//package classes
Section 49
//SoundMan_spider_step (classes.SoundMan_spider_step)
package classes {
import mx.core.*;
public class SoundMan_spider_step extends SoundAsset {
}
}//package classes
Section 50
//SoundMan_tv_kick (classes.SoundMan_tv_kick)
package classes {
import mx.core.*;
public class SoundMan_tv_kick extends SoundAsset {
}
}//package classes
Section 51
//SoundMan_wasp_attack (classes.SoundMan_wasp_attack)
package classes {
import mx.core.*;
public class SoundMan_wasp_attack extends SoundAsset {
}
}//package classes
Section 52
//Spider (classes.Spider)
package classes {
import flash.events.*;
import classes.Flyings.*;
import gs.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import gs.easing.*;
import muzaffaraka.display.*;
public class Spider extends Sprite {
private var game:Game;
protected var _oldSize:Number;// = -1
private var currentPers:MovieClip;
private var eating:Spider_eating_mc;
private var sittingBig:MovieClip;
private var tmr:Timer;
private var girl:Girl;
private var border:Border;
private var dist:Number;
private var oldPos:Number;
private var ptGirl:Point;
protected var _big:Boolean;// = false
private var turning:Spider_turn_mc;
private var ptDest:Point;
private var speed:Number;
protected var _paused:Boolean;// = false
private var time:Number;
private var oldScaleX:Number;
private var toEat:Flying;
private var tweenMax:TweenMax;
private var going:Spider_going_mc;
private var goingNow:Boolean;// = false
public function Spider(brd:Border=null, gm:Game=null, grl:Girl=null){
super();
border = brd;
game = gm;
girl = grl;
eating = new Spider_eating_mc();
going = new Spider_going_mc();
turning = new Spider_turn_mc();
sittingBig = new BitmapMovieClip(SpiderBig_mc, 2.7);
sittingBig.y = -407;
tmr = new Timer(500);
scaleX = (scaleY = 0.5);
addEventListener(Event.ADDED_TO_STAGE, setListeners);
name = "spider";
init();
}
protected function goTo(ptGrl:Point=null):void{
var bezierPoint:Object;
if (_big){
if (toEat){
bezierPoint = {x:400, y:550};
speed = 400;
dist = Math.abs((toEat.x - 350));
time = (dist / speed);
tweenMax = TweenMax.to(toEat, time, {x:350, y:470, bezierThrough:[bezierPoint], ease:Linear.easeNone, onComplete:eatItBig});
};
return;
};
oldScaleX = scaleX;
if (goingNow){
};
if (currentPers == turning){
return;
};
ptGirl = ptGrl;
if (ptGirl){
ptDest = ptGirl;
} else {
ptDest = new Point(toEat.x, toEat.y);
};
if (ptDest.x > x){
scaleX = -(Math.abs(scaleX));
ptDest.x = (ptDest.x - (width / 2));
} else {
scaleX = Math.abs(scaleX);
ptDest.x = (ptDest.x + (width / 2));
};
if (oldScaleX != scaleX){
turn();
} else {
goToComplete();
};
}
protected function turn():void{
changeState("turn");
currentPers["inner"].gotoAndPlay(1);
}
public function get big():Boolean{
return (_big);
}
public function get size():Number{
return (Math.abs(scaleX));
}
protected function init():void{
currentPers = null;
changeState("going", true);
toEat = null;
}
public function grow(relDiff:Number):void{
if (_big){
return;
};
tweenMax = TweenMax.to(this, 0.9, {size:(size * (1 + relDiff))});
}
public function set big($to:Boolean):void{
if ($to == _big){
return;
};
if (toEat){
toEat.eated = true;
};
toEat = null;
parent.setChildIndex(this, parent.getChildIndex(girl));
TweenMax.killTweensOf(this, true);
TweenMax.killAllTweens();
if ($to){
x = 100;
changeState("big");
_oldSize = size;
size = 1;
} else {
changeState("going");
if (_oldSize > 0){
size = _oldSize;
};
};
var girlShift = 30;
if ($to){
girl.y = (girl.y + girlShift);
} else {
girl.y = (girl.y - girlShift);
};
_big = $to;
trace("_oldSize", _oldSize);
}
public function externalEnterFrame(ev:Event=null):void{
if (_paused){
return;
};
if (currentPers == eating){
if (currentPers["inner"].currentFrame == currentPers["inner"].totalFrames){
goingNow = false;
changeState("going", true);
toEat.visible = true;
toEat.eated = true;
toEat.dropped = false;
toEat = null;
};
};
if (currentPers == turning){
currentPers["inner"].nextFrame();
if (currentPers["inner"].currentFrame == currentPers["inner"].totalFrames){
changeState("going");
goToComplete();
};
};
if (currentPers == going){
if (x == oldPos){
currentPers["inner"].stop();
} else {
currentPers["inner"].play();
};
};
if (big){
currentPers.nextFrame();
};
oldPos = x;
}
private function removeListeners(ev:Event=null):void{
tmr.stop();
tmr.removeEventListener(TimerEvent.TIMER, onTimer);
removeEventListener(Event.REMOVED_FROM_STAGE, removeListeners);
}
protected function eatIt():void{
SoundMan.playEffect("spider_step", false);
if (((!(toEat)) || (!(toEat.parent)))){
goingNow = false;
toEat = null;
changeState("going", true);
return;
};
changeState("eating", false);
toEat.visible = false;
SoundMan.playEffect("spider_eat");
}
public function set size(to:Number):void{
scaleX = (scaleY = Math.abs(to));
}
protected function onTimer(ev:TimerEvent):void{
if (_paused){
return;
};
if (!girl){
return;
};
if (((!(game.manager.flyings)) || (toEat))){
return;
};
var i:int;
while (i < game.manager.flyings.length) {
if (game.manager.flyings[i].dropped){
toEat = game.manager.flyings[i];
goTo();
return;
};
i++;
};
goTo(new Point(girl.x, girl.y));
}
protected function changeState(state:String, stop:Boolean=false):void{
if (_big){
return;
};
if (state != "big"){
if ((((state == "eating")) && ((currentPers == eating)))){
if (stop){
currentPers.gotoAndStop(5);
} else {
currentPers.play();
};
return;
};
if ((((state == "going")) && ((currentPers == going)))){
if (stop){
currentPers["inner"].gotoAndStop(5);
} else {
currentPers["inner"].play();
};
return;
};
};
if (currentPers){
if (currentPers.stage){
removeChild(currentPers);
};
};
switch (state){
case "eating":
currentPers = eating;
break;
case "going":
currentPers = going;
break;
case "turn":
currentPers = turning;
currentPers["inner"].gotoAndStop(1);
break;
case "big":
currentPers = sittingBig;
break;
default:
currentPers = going;
currentPers.stop();
break;
};
addChild(currentPers);
if (stop){
currentPers["inner"].gotoAndStop(5);
} else {
if (state != "big"){
currentPers["inner"].gotoAndPlay(1);
};
};
}
protected function goToComplete():void{
speed = 120;
dist = Math.abs((x - ptDest.x));
time = (dist / speed);
if (ptGirl){
if (dist > 80){
goingNow = true;
tweenMax = TweenMax.killTweensOf(this);
tweenMax = TweenMax.to(this, time, {x:ptDest.x, ease:Linear.easeNone, onComplete:nearGirl});
changeState("going");
SoundMan.playEffect("spider_step", true);
};
return;
} else {
goingNow = true;
tweenMax = TweenMax.killTweensOf(this);
tweenMax = TweenMax.to(this, time, {x:ptDest.x, ease:Linear.easeNone, onComplete:eatIt});
SoundMan.playEffect("spider_step", true);
};
changeState("going");
}
protected function nearGirl():void{
currentPers["inner"].stop();
SoundMan.playEffect("spider_step", false);
goingNow = false;
}
protected function eatItBig():void{
if (!toEat){
return;
};
SoundMan.playEffect("spider_eat");
toEat.visible = true;
toEat.eated = true;
toEat.dropped = false;
toEat = null;
}
public function pause($pause:Boolean):void{
var toPause:MovieClip;
var $pause = $pause;
_paused = $pause;
toPause = (big) ? currentPers : currentPers["inner"];
if (_paused){
TweenMax.pauseAll();
toPause.stop();
} else {
TweenMax.resumeAll();
toPause.play();
};
//unresolved jump
var _slot1 = e;
}
private function setListeners(ev:Event):void{
tmr.addEventListener(TimerEvent.TIMER, onTimer);
tmr.start();
addEventListener(Event.REMOVED_FROM_STAGE, removeListeners);
}
}
}//package classes
Section 53
//StageDetector (classes.StageDetector)
package classes {
import flash.events.*;
import flash.display.*;
public class StageDetector extends EventDispatcher {
private var onStage:Boolean;// = false
private var watchedObject:DisplayObject;// = null
private var watchedRoot:DisplayObject;// = null
public static const REMOVED_FROM_STAGE:String = "REMOVED_FROM_STAGE";
public static const ADDED_TO_STAGE:String = "ADDED_TO_STAGE";
public function StageDetector(objectToWatch:DisplayObject){
super();
setWatchedObject(objectToWatch);
}
private function clearWatchedRoot():void{
if (watchedRoot != null){
unregisterListeners(watchedRoot);
watchedRoot = null;
};
}
private function unregisterListeners(target:DisplayObject):void{
target.removeEventListener(Event.ADDED, addedListener);
target.removeEventListener(Event.REMOVED, removedListener);
}
public function setWatchedObject(objectToWatch:DisplayObject):void{
watchedObject = objectToWatch;
if (watchedObject.stage != null){
onStage = true;
};
setWatchedRoot(findWatchedObjectRoot());
}
private function setWatchedRoot(newWatchedRoot:DisplayObject):void{
clearWatchedRoot();
watchedRoot = newWatchedRoot;
registerListeners(watchedRoot);
}
private function addedListener(e:Event):void{
if (e.eventPhase == EventPhase.AT_TARGET){
if (watchedObject.stage != null){
onStage = true;
dispatchEvent(new Event(StageDetector.ADDED_TO_STAGE));
};
setWatchedRoot(findWatchedObjectRoot());
};
}
private function findWatchedObjectRoot():DisplayObject{
var watchedObjectRoot:DisplayObject = watchedObject;
while (watchedObjectRoot.parent != null) {
watchedObjectRoot = watchedObjectRoot.parent;
};
return (watchedObjectRoot);
}
public function getWatchedObject():DisplayObject{
return (watchedObject);
}
private function removedListener(e:Event):void{
var wasRemoved:Boolean;
var ancestor:DisplayObject;
var target:DisplayObject;
if (onStage){
wasRemoved = false;
ancestor = watchedObject;
target = DisplayObject(e.target);
while (ancestor != null) {
if (target == ancestor){
wasRemoved = true;
break;
};
ancestor = ancestor.parent;
};
if (wasRemoved){
setWatchedRoot(target);
onStage = false;
dispatchEvent(new Event(StageDetector.REMOVED_FROM_STAGE));
};
};
}
private function registerListeners(target:DisplayObject):void{
target.addEventListener(Event.ADDED, addedListener);
target.addEventListener(Event.REMOVED, removedListener);
}
public function dispose():void{
clearWatchedRoot();
watchedObject = null;
}
}
}//package classes
Section 54
//TimeInd (classes.TimeInd)
package classes {
import muzaffaraka.*;
public class TimeInd extends TimeInd_mc {
private var _value:int;
public function TimeInd(){
super();
_value = 0;
}
public function get value():int{
return (_value);
}
public function set value(to:int):void{
_value = to;
StringUtil.setFont(timeTxt, myStartFont);
timeTxt.text = _value.toString();
}
}
}//package classes
Section 55
//Triangle (classes.Triangle)
package classes {
import flash.geom.*;
public class Triangle {
protected var vertexes:Array;
public function Triangle(pt1:Point, pt2:Point, pt3:Point){
super();
vertexes = new Array(pt1, pt2, pt3);
}
public function get pt2():Point{
return (vertexes[1]);
}
public function get area():Number{
return (calculateArea());
}
public function set pt1(pt:Point):void{
vertexes[0] = pt;
}
protected function calculateArea():Number{
var aSide:Number = Point.distance(pt1, pt2);
var bSide:Number = Point.distance(pt2, pt3);
var cSide:Number = Point.distance(pt3, pt1);
var halfP:Number = (((aSide + bSide) + cSide) / 2);
var squared:Number = (((halfP * (halfP - aSide)) * (halfP - bSide)) * (halfP - cSide));
return (Math.sqrt(squared));
}
public function set pt2(pt:Point):void{
vertexes[1] = pt;
}
public function get pt1():Point{
return (vertexes[0]);
}
public function set pt3(pt:Point):void{
vertexes[2] = pt;
}
public function get pt3():Point{
return (vertexes[2]);
}
}
}//package classes
Section 56
//TVSet (classes.TVSet)
package classes {
import flash.display.*;
public class TVSet extends Sprite {
private var _clip:TV_set_mc;
public function TVSet(){
super();
_clip = new TV_set_mc();
_clip.x = 591;
addChild(_clip);
_clip.stop();
}
public function get clip():TV_set_mc{
return (_clip);
}
public function play():void{
_clip.gotoAndPlay(1);
}
}
}//package classes
Section 57
//WaveInd (classes.WaveInd)
package classes {
import muzaffaraka.*;
public class WaveInd extends WaveInd_mc {
private var _value:int;
public function WaveInd(){
super();
}
public function get value():int{
return (_value);
}
public function set value(to:int):void{
_value = to;
StringUtil.setFont(waveTxt, myStartFont);
waveTxt.text = _value.toString();
}
}
}//package classes
Section 58
//Vector (classes.Vector)
package classes {
public class Vector {
public var y:Number;
public var x:Number;
public function Vector(x:Number=0, y:Number=0){
super();
this.x = x;
this.y = y;
}
public function dividedByEquals(scalar:Number):void{
x = (x / scalar);
y = (y / scalar);
}
public function dividedBy(scalar:Number):Vector{
return (new Vector((x / scalar), (y / scalar)));
}
public function getAngle(v:Vector):Number{
return (Math.atan2((v.y - y), (v.x - x)));
}
public function timesEquals(scalar:Number):void{
x = (x * scalar);
y = (y * scalar);
}
public function times(scalar:Number):Vector{
return (new Vector((x * scalar), (y * scalar)));
}
public function cross(v:Vector):Number{
return (((x * v.y) - (y * v.x)));
}
public function getUnit():Vector{
return (dividedBy(magnitude));
}
public function dot(v:Vector):Number{
return (((x * v.x) + (y * v.y)));
}
public function crossScalar(scalar:Number):Vector{
return (new Vector((-(scalar) * y), (scalar * x)));
}
public function normalize():void{
if ((((x == 0)) && ((y == 0)))){
return;
};
dividedByEquals(magnitude);
}
public function minusEquals(v:Vector):void{
x = (x - v.x);
y = (y - v.y);
}
public function negate():void{
x = (x * -1);
y = (y * -1);
}
public function getPerp():Vector{
return (new Vector(-(y), x));
}
public function minus(v:Vector):Vector{
return (new Vector((x - v.x), (y - v.y)));
}
public function plusEquals(v:Vector):void{
x = (x + v.x);
y = (y + v.y);
}
public function plus(v:Vector):Vector{
return (new Vector((x + v.x), (y + v.y)));
}
public function clone():Vector{
return (new Vector(x, y));
}
public function get magnitude():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public static function project(theta:Number, magnitude:Number):Vector{
return (new Vector((Math.cos(theta) * magnitude), (Math.sin(theta) * magnitude)));
}
}
}//package classes
Section 59
//VolumeControl2 (classes.VolumeControl2)
package classes {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class VolumeControl2 extends Sprite {
private var mouseDown:Boolean;
private var mouseOut:Boolean;
private var clip:VolumeControl_mc;
private var _volume_level:int;
public function VolumeControl2(){
super();
trace("VolumeControl");
clip = new VolumeControl_mc();
clip.volume_mc.gotoAndStop(1);
mouseDown = false;
mouseOut = false;
_volume_level = 0;
addChild(clip);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
volumePrecision = SoundMixer.soundTransform.volume;
}
protected function onMouseUp(ev:MouseEvent):void{
mouseDown = false;
trace("Mouse UP");
}
public function get volumePrecision():Number{
return ((clip.slider_mc.inner.x / 80));
}
protected function onMouseDown(ev:MouseEvent):void{
mouseDown = true;
mouseOut = false;
setVolumeFromX(mouseX);
if (ev.target.name == "volume_mc"){
mouseDown = false;
};
}
public function set volumePrecision(to:Number):void{
setVolumeFromX((to * 80));
}
protected function onMouseOut(ev:MouseEvent):void{
trace("Mouse OUT", mouseX);
mouseOut = true;
}
protected function onMouseMove(ev:MouseEvent):void{
if (!mouseDown){
return;
};
if (!clip.slider_mc.hitTestPoint(mouseX, mouseY)){
};
setVolumeFromX(mouseX);
}
protected function setVolumeFromX(xCooor:Number):void{
clip.slider_mc.inner.x = xCooor;
if (clip.slider_mc.inner.x <= 0){
clip.slider_mc.inner.x = 0;
};
_volume_level = ((mouseX / 17) + 1);
clip.volume_mc.gotoAndStop(_volume_level);
SoundMixer.soundTransform = new SoundTransform(volumePrecision);
trace("volumePrecision", volumePrecision, SoundMixer.soundTransform.volume);
}
}
}//package classes
Section 60
//Linear (gs.easing.Linear)
package gs.easing {
public class Linear {
public static function easeNone(t:Number, b:Number, c:Number, d:Number):Number{
return ((((c * t) / d) + b));
}
public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{
return ((((c * t) / d) + b));
}
public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{
return ((((c * t) / d) + b));
}
public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{
return ((((c * t) / d) + b));
}
}
}//package gs.easing
Section 61
//TweenEvent (gs.events.TweenEvent)
package gs.events {
import flash.events.*;
public class TweenEvent extends Event {
public var info:Object;
public static const version:Number = 0.9;
public static const START:String = "start";
public static const UPDATE:String = "update";
public static const COMPLETE:String = "complete";
public function TweenEvent($type:String, $info:Object=null, $bubbles:Boolean=false, $cancelable:Boolean=false){
super($type, $bubbles, $cancelable);
this.info = $info;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable));
}
}
}//package gs.events
Section 62
//OverwriteManager (gs.OverwriteManager)
package gs {
import flash.utils.*;
import flash.errors.*;
public class OverwriteManager {
public static const version:Number = 0.992;
public static const NONE:int = 0;
public static const ALL:int = 1;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static var mode:int;
public static var enabled:Boolean;
public static function init($mode:int=2):int{
if (TweenLite.version < 9.21){
trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com.");
};
TweenLite.overwriteManager = OverwriteManager;
mode = $mode;
enabled = true;
return (mode);
}
public static function manageOverwrites($tween:TweenLite, $targetTweens:Array):void{
var i:int;
var tween:TweenLite;
var v:Object;
var p:String;
var vars:Object = $tween.vars;
var m:int = ((vars.overwrite)==undefined) ? mode : int(vars.overwrite);
if ((((m < 2)) || (($targetTweens == null)))){
return;
};
var startTime:Number = $tween.startTime;
var a:Array = [];
i = ($targetTweens.length - 1);
while (i > -1) {
tween = $targetTweens[i];
if (((((!((tween == $tween))) && ((tween.startTime <= startTime)))) && (((tween.startTime + ((tween.duration * 1000) / tween.combinedTimeScale)) > startTime)))){
a[a.length] = tween;
};
i--;
};
if (a.length == 0){
return;
};
if (m == AUTO){
if (vars.isTV == true){
vars = vars.exposedProps;
};
v = {};
for (p in vars) {
if ((((((((((((((((((((((((((((((((((((((((((((p == "ease")) || ((p == "delay")))) || ((p == "overwrite")))) || ((p == "onComplete")))) || ((p == "onCompleteParams")))) || ((p == "runBackwards")))) || ((p == "persist")))) || ((p == "onUpdate")))) || ((p == "onUpdateParams")))) || ((p == "timeScale")))) || ((p == "onStart")))) || ((p == "onStartParams")))) || ((p == "renderOnStart")))) || ((p == "proxiedEase")))) || ((p == "easeParams")))) || ((p == "onCompleteAll")))) || ((p == "onCompleteAllParams")))) || ((p == "yoyo")))) || ((p == "loop")))) || ((p == "onCompleteListener")))) || ((p == "onStartListener")))) || ((p == "onUpdateListener")))){
} else {
v[p] = 1;
if (p == "removeTint"){
v.tint = 1;
} else {
if (p == "autoAlpha"){
v.alpha = 1;
v.visible = 1;
};
};
};
};
i = (a.length - 1);
while (i > -1) {
a[i].killVars(v);
i--;
};
} else {
i = (a.length - 1);
while (i > -1) {
a[i].enabled = false;
i--;
};
};
}
public static function killVars($killVars:Object, $vars:Object, $tweens:Array, $subTweens:Array, $filters:Array):void{
var i:int;
var p:String;
i = ($subTweens.length - 1);
while (i > -1) {
if ($killVars[$subTweens[i].name] != undefined){
$subTweens.splice(i, 1);
};
i--;
};
i = ($tweens.length - 1);
while (i > -1) {
if ($killVars[$tweens[i][4]] != undefined){
$tweens.splice(i, 1);
};
i--;
};
i = ($filters.length - 1);
while (i > -1) {
if ($killVars[$filters[i].name] != undefined){
$filters.splice(i, 1);
};
i--;
};
for (p in $killVars) {
delete $vars[p];
};
}
}
}//package gs
Section 63
//TweenFilterLite (gs.TweenFilterLite)
package gs {
import flash.filters.*;
import flash.utils.*;
public class TweenFilterLite extends TweenLite {
protected var _matrix:Array;
protected var _endMatrix:Array;
protected var _cmf:ColorMatrixFilter;
protected var _clrsa:Array;
protected var _hf:Boolean;// = false
protected var _filters:Array;
protected var _timeScale:Number;
protected var _roundProps:Boolean;
public static var version:Number = 9.27;
public static var delayedCall:Function = TweenLite.delayedCall;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var removeTween:Function = TweenLite.removeTween;
protected static var _globalTimeScale:Number = 1;
private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
private static var _lumR:Number = 0.212671;
private static var _lumG:Number = 0.71516;
private static var _lumB:Number = 0.072169;
public function TweenFilterLite($target:Object, $duration:Number, $vars:Object){
this._filters = [];
super($target, $duration, $vars);
if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenFilterLite)))){
this._timeScale = 1;
this.combinedTimeScale = _globalTimeScale;
} else {
this._timeScale = this.combinedTimeScale;
this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale);
};
if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
};
if (TweenLite.version < 9.26){
trace("TweenFilterLite error! Please update your TweenLite class or try deleting your ASO files. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
};
}
override public function initTweenVals($hrp:Boolean=false, $reservedProps:String=""):void{
var i:int;
var fv:Object;
var cmf:Object;
var tp:Object;
var j:int;
var prop:String;
if (((!($hrp)) && (TweenLite.overwriteManager.enabled))){
TweenLite.overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this._clrsa = [];
this._filters = [];
this._matrix = _idMatrix.slice();
$reservedProps = ($reservedProps + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter roundProps ");
this._roundProps = (this.vars.roundProps is Array);
if (_isDisplayObject){
if (this.vars.blurFilter != null){
fv = this.vars.blurFilter;
this.addFilter("blurFilter", fv, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((fv.quality) || (2))));
};
if (this.vars.glowFilter != null){
fv = this.vars.glowFilter;
this.addFilter("glowFilter", fv, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((fv.strength) || (1)), ((fv.quality) || (2)), fv.inner, fv.knockout));
};
if (this.vars.colorMatrixFilter != null){
fv = this.vars.colorMatrixFilter;
cmf = this.addFilter("colorMatrixFilter", fv, ColorMatrixFilter, [], new ColorMatrixFilter(this._matrix));
this._cmf = cmf.filter;
this._matrix = ColorMatrixFilter(this._cmf).matrix;
if (((!((fv.matrix == null))) && ((fv.matrix is Array)))){
this._endMatrix = fv.matrix;
} else {
if (fv.relative == true){
this._endMatrix = this._matrix.slice();
} else {
this._endMatrix = _idMatrix.slice();
};
this._endMatrix = setBrightness(this._endMatrix, fv.brightness);
this._endMatrix = setContrast(this._endMatrix, fv.contrast);
this._endMatrix = setHue(this._endMatrix, fv.hue);
this._endMatrix = setSaturation(this._endMatrix, fv.saturation);
this._endMatrix = setThreshold(this._endMatrix, fv.threshold);
if (!isNaN(fv.colorize)){
this._endMatrix = colorize(this._endMatrix, fv.colorize, fv.amount);
} else {
if (!isNaN(fv.color)){
this._endMatrix = colorize(this._endMatrix, fv.color, fv.amount);
};
};
};
i = 0;
while (i < this._endMatrix.length) {
if (((!((this._matrix[i] == this._endMatrix[i]))) && (!((this._matrix[i] == undefined))))){
this.tweens[this.tweens.length] = [this._matrix, i.toString(), this._matrix[i], (this._endMatrix[i] - this._matrix[i]), "colorMatrixFilter"];
};
i++;
};
};
if (this.vars.dropShadowFilter != null){
fv = this.vars.dropShadowFilter;
this.addFilter("dropShadowFilter", fv, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((fv.quality) || (2)), fv.inner, fv.knockout, fv.hideObject));
};
if (this.vars.bevelFilter != null){
fv = this.vars.bevelFilter;
this.addFilter("bevelFilter", fv, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((fv.quality) || (2))));
};
if (this.vars.runBackwards == true){
i = (this._clrsa.length - 1);
while (i > -1) {
tp = this._clrsa[i];
tp.sr = (tp.sr + tp.cr);
tp.cr = (tp.cr * -1);
tp.sg = (tp.sg + tp.cg);
tp.cg = (tp.cg * -1);
tp.sb = (tp.sb + tp.cb);
tp.cb = (tp.cb * -1);
tp.f[tp.p] = (((tp.sr << 16) | (tp.sg << 8)) | tp.sb);
i--;
};
};
super.initTweenVals(true, $reservedProps);
} else {
super.initTweenVals($hrp, $reservedProps);
};
if (this._roundProps){
i = (this.vars.roundProps.length - 1);
while (i > -1) {
prop = this.vars.roundProps[i];
j = (this.tweens.length - 1);
while (j > -1) {
if ((((this.tweens[j][1] == prop)) && ((this.tweens[j][0] == this.target)))){
this.tweens[j][5] = true;
break;
};
j--;
};
i--;
};
};
}
private function addFilter($name:String, $fv:Object, $filterType:Class, $props:Array, $defaultFilter:BitmapFilter):Object{
var i:int;
var prop:String;
var valChange:Number;
var begin:Object;
var end:Object;
var f:Object = {type:$filterType, name:$name};
var fltrs:Array = this.target.filters;
i = 0;
while (i < fltrs.length) {
if ((fltrs[i] is $filterType)){
f.filter = fltrs[i];
break;
};
i++;
};
if (f.filter == undefined){
f.filter = $defaultFilter;
fltrs[fltrs.length] = f.filter;
this.target.filters = fltrs;
};
i = 0;
while (i < $props.length) {
prop = $props[i];
if ($fv[prop] != undefined){
if ((((((prop == "color")) || ((prop == "highlightColor")))) || ((prop == "shadowColor")))){
begin = HEXtoRGB(f.filter[prop]);
end = HEXtoRGB($fv[prop]);
this._clrsa[this._clrsa.length] = {f:f.filter, p:prop, sr:begin.rb, cr:(end.rb - begin.rb), sg:begin.gb, cg:(end.gb - begin.gb), sb:begin.bb, cb:(end.bb - begin.bb)};
} else {
if ((((((((prop == "quality")) || ((prop == "inner")))) || ((prop == "knockout")))) || ((prop == "hideObject")))){
f.filter[prop] = $fv[prop];
} else {
if (typeof($fv[prop]) == "number"){
valChange = ($fv[prop] - f.filter[prop]);
} else {
valChange = Number($fv[prop]);
};
this.tweens[this.tweens.length] = [f.filter, prop, f.filter[prop], valChange, $name];
};
};
};
i++;
};
this._filters[this._filters.length] = f;
this._hf = true;
return (f);
}
override public function render($t:uint):void{
var factor:Number;
var tp:Object;
var i:int;
var val:Number;
var neg:int;
var f:Array;
var j:int;
var time:Number = ((($t - this.startTime) / 1000) * this.combinedTimeScale);
if (time >= this.duration){
time = this.duration;
factor = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
factor = this.ease(time, 0, 1, this.duration);
};
if (!this._roundProps){
i = (this.tweens.length - 1);
while (i > -1) {
tp = this.tweens[i];
tp[0][tp[1]] = (tp[2] + (factor * tp[3]));
i--;
};
} else {
i = (this.tweens.length - 1);
while (i > -1) {
tp = this.tweens[i];
if (tp[5]){
val = (tp[2] + (factor * tp[3]));
neg = ((val)<0) ? -1 : 1;
tp[0][tp[1]] = ((((val % 1) * neg))>0.5) ? (int(val) + neg) : int(val);
} else {
tp[0][tp[1]] = (tp[2] + (factor * tp[3]));
};
i--;
};
};
if (this._hf){
i = (this._clrsa.length - 1);
while (i > -1) {
tp = this._clrsa[i];
tp.f[tp.p] = ((((tp.sr + (factor * tp.cr)) << 16) | ((tp.sg + (factor * tp.cg)) << 8)) | (tp.sb + (factor * tp.cb)));
i--;
};
if (this._cmf != null){
ColorMatrixFilter(this._cmf).matrix = this._matrix;
};
f = this.target.filters;
i = 0;
while (i < this._filters.length) {
j = (f.length - 1);
while (j > -1) {
if ((f[j] is this._filters[i].type)){
f.splice(j, 1, this._filters[i].filter);
break;
};
j--;
};
i++;
};
this.target.filters = f;
};
if (_hst){
i = (_subTweens.length - 1);
while (i > -1) {
_subTweens[i].proxy(_subTweens[i], time);
i--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (time == this.duration){
complete(true);
};
}
override public function killVars($vars:Object):void{
if (TweenLite.overwriteManager.enabled){
TweenLite.overwriteManager.killVars($vars, this.vars, this.tweens, _subTweens, ((this._filters) || ([])));
};
}
public function get timeScale():Number{
return (this._timeScale);
}
public function set timeScale($n:Number):void{
if ($n < 1E-5){
$n = (this._timeScale = 1E-5);
} else {
this._timeScale = $n;
$n = ($n * _globalTimeScale);
};
this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / $n))) - (this.delay * (1000 / $n)));
if (this.startTime != 999999999999999){
this.startTime = (this.initTime + (this.delay * (1000 / $n)));
};
this.combinedTimeScale = $n;
}
override public function set enabled($b:Boolean):void{
super.enabled = $b;
if ($b){
this.combinedTimeScale = (this._timeScale * _globalTimeScale);
};
}
public static function to($target:Object, $duration:Number, $vars:Object):TweenFilterLite{
return (new TweenFilterLite($target, $duration, $vars));
}
public static function from($target:Object, $duration:Number, $vars:Object):TweenFilterLite{
$vars.runBackwards = true;
return (new TweenFilterLite($target, $duration, $vars));
}
public static function setGlobalTimeScale($scale:Number):void{
var i:int;
var a:Array;
if ($scale < 1E-5){
$scale = 1E-5;
};
var ml:Dictionary = masterList;
_globalTimeScale = $scale;
for each (a in ml) {
i = (a.length - 1);
while (i > -1) {
if ((a[i] is TweenFilterLite)){
a[i].timeScale = (a[i].timeScale * 1);
};
i--;
};
};
}
public static function HEXtoRGB($n:Number):Object{
return ({rb:($n >> 16), gb:(($n >> 8) & 0xFF), bb:($n & 0xFF)});
}
public static function colorize($m:Array, $color:Number, $amount:Number=1):Array{
if (isNaN($color)){
return ($m);
};
if (isNaN($amount)){
$amount = 1;
};
var r:Number = ((($color >> 16) & 0xFF) / 0xFF);
var g:Number = ((($color >> 8) & 0xFF) / 0xFF);
var b:Number = (($color & 0xFF) / 0xFF);
var inv:Number = (1 - $amount);
var temp:Array = [(inv + (($amount * r) * _lumR)), (($amount * r) * _lumG), (($amount * r) * _lumB), 0, 0, (($amount * g) * _lumR), (inv + (($amount * g) * _lumG)), (($amount * g) * _lumB), 0, 0, (($amount * b) * _lumR), (($amount * b) * _lumG), (inv + (($amount * b) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(temp, $m));
}
public static function setThreshold($m:Array, $n:Number):Array{
if (isNaN($n)){
return ($m);
};
var temp:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * $n), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * $n), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * $n), 0, 0, 0, 1, 0];
return (applyMatrix(temp, $m));
}
public static function setHue($m:Array, $n:Number):Array{
if (isNaN($n)){
return ($m);
};
$n = ($n * (Math.PI / 180));
var c:Number = Math.cos($n);
var s:Number = Math.sin($n);
var temp:Array = [((_lumR + (c * (1 - _lumR))) + (s * -(_lumR))), ((_lumG + (c * -(_lumG))) + (s * -(_lumG))), ((_lumB + (c * -(_lumB))) + (s * (1 - _lumB))), 0, 0, ((_lumR + (c * -(_lumR))) + (s * 0.143)), ((_lumG + (c * (1 - _lumG))) + (s * 0.14)), ((_lumB + (c * -(_lumB))) + (s * -0.283)), 0, 0, ((_lumR + (c * -(_lumR))) + (s * -((1 - _lumR)))), ((_lumG + (c * -(_lumG))) + (s * _lumG)), ((_lumB + (c * (1 - _lumB))) + (s * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(temp, $m));
}
public static function setBrightness($m:Array, $n:Number):Array{
if (isNaN($n)){
return ($m);
};
$n = (($n * 100) - 100);
return (applyMatrix([1, 0, 0, 0, $n, 0, 1, 0, 0, $n, 0, 0, 1, 0, $n, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], $m));
}
public static function setSaturation($m:Array, $n:Number):Array{
if (isNaN($n)){
return ($m);
};
var inv:Number = (1 - $n);
var r:Number = (inv * _lumR);
var g:Number = (inv * _lumG);
var b:Number = (inv * _lumB);
var temp:Array = [(r + $n), g, b, 0, 0, r, (g + $n), b, 0, 0, r, g, (b + $n), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(temp, $m));
}
public static function setContrast($m:Array, $n:Number):Array{
if (isNaN($n)){
return ($m);
};
$n = ($n + 0.01);
var temp:Array = [$n, 0, 0, 0, (128 * (1 - $n)), 0, $n, 0, 0, (128 * (1 - $n)), 0, 0, $n, 0, (128 * (1 - $n)), 0, 0, 0, 1, 0];
return (applyMatrix(temp, $m));
}
public static function applyMatrix($m:Array, $m2:Array):Array{
var y:int;
var x:int;
if (((!(($m is Array))) || (!(($m2 is Array))))){
return ($m2);
};
var temp:Array = [];
var i:int;
var z:int;
y = 0;
while (y < 4) {
x = 0;
while (x < 5) {
if (x == 4){
z = $m[(i + 4)];
} else {
z = 0;
};
temp[(i + x)] = ((((($m[i] * $m2[x]) + ($m[(i + 1)] * $m2[(x + 5)])) + ($m[(i + 2)] * $m2[(x + 10)])) + ($m[(i + 3)] * $m2[(x + 15)])) + z);
x++;
};
i = (i + 5);
y++;
};
return (temp);
}
public static function set globalTimeScale($n:Number):void{
setGlobalTimeScale($n);
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
}
}//package gs
Section 64
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class TweenLite {
public var duration:Number;
public var vars:Object;
public var delay:Number;
public var startTime:Number;
public var initTime:Number;
public var tweens:Array;
public var target:Object;
public var active:Boolean;
public var ease:Function;
public var initted:Boolean;
public var combinedTimeScale:Number;
public var gc:Boolean;
public var started:Boolean;
protected var _subTweens:Array;
protected var _hst:Boolean;
protected var _hasUpdate:Boolean;
protected var _isDisplayObject:Boolean;
protected var _specialVars:Object;
public static var version:Number = 9.26;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var defaultEase:Function = TweenLite.easeOut;
public static var overwriteManager:Object;
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
private static var _classInitted:Boolean;
private static var _sprite:Sprite = new Sprite();
private static var _timer:Timer = new Timer(2000);
public function TweenLite($target:Object, $duration:Number, $vars:Object){
super();
if ($target == null){
return;
};
if (!_classInitted){
currentTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, updateAll);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage);
_timer.start();
_classInitted = true;
};
this.vars = $vars;
this.duration = (($duration) || (0.001));
this.delay = (($vars.delay) || (0));
this.combinedTimeScale = (($vars.timeScale) || (1));
this.active = ((($duration == 0)) && ((this.delay == 0)));
this.target = $target;
this._isDisplayObject = ($target is DisplayObject);
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = this.easeProxy;
};
this.ease = this.vars.ease;
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = (this.vars.alpha > 0);
};
this._specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
this.tweens = [];
this._subTweens = [];
this._hst = (this.initted = false);
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var mode:int = (((($vars.overwrite == undefined)) || (((!(overwriteManager.enabled)) && (($vars.overwrite > 1)))))) ? overwriteManager.mode : int($vars.overwrite);
if ((((masterList[$target] == undefined)) || (((!(($target == null))) && ((mode == 1)))))){
masterList[$target] = [];
};
masterList[$target].push(this);
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
this.initTweenVals();
if (this.active){
this.render((this.startTime + 1));
} else {
this.render(this.startTime);
};
if (((((!((this._specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (this._isDisplayObject))){
this.target.visible = this._specialVars.visible;
};
};
}
public function initTweenVals($hrp:Boolean=false, $reservedProps:String=""):void{
var p:String;
var i:int;
var endArray:Array;
var clr:ColorTransform;
var endClr:ColorTransform;
var tp:Object;
if (((!($hrp)) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
if ((this.target is Array)){
endArray = ((this.vars.endArray) || ([]));
i = 0;
while (i < endArray.length) {
if (((!((this.target[i] == endArray[i]))) && (!((this.target[i] == undefined))))){
this.tweens[this.tweens.length] = [this.target, i.toString(), this.target[i], (endArray[i] - this.target[i]), i.toString()];
};
i++;
};
} else {
if (((((!((typeof(this._specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (this._isDisplayObject))){
clr = this.target.transform.colorTransform;
endClr = new ColorTransform();
if (this._specialVars.alpha != undefined){
endClr.alphaMultiplier = this._specialVars.alpha;
delete this._specialVars.alpha;
} else {
endClr.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((this._specialVars.tint == null))) && (!((this._specialVars.tint == ""))))) || ((this._specialVars.tint == 0)))))){
endClr.color = this._specialVars.tint;
};
this.addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:clr, endColor:endClr});
};
if (((!((this._specialVars.frame == null))) && (this._isDisplayObject))){
this.addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:this._specialVars.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
this.addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
if (((!((this._specialVars.visible == null))) && (this._isDisplayObject))){
this.addSubTween("visible", visibleProxy, {}, {}, {tween:this});
};
for (p in this._specialVars) {
if ((((((((((((((((((((((((((((((((((((((p == "ease")) || ((p == "delay")))) || ((p == "overwrite")))) || ((p == "onComplete")))) || ((p == "onCompleteParams")))) || ((p == "runBackwards")))) || ((p == "visible")))) || ((p == "autoOverwrite")))) || ((p == "persist")))) || ((p == "onUpdate")))) || ((p == "onUpdateParams")))) || ((p == "autoAlpha")))) || ((((p == "timeScale")) && (!((this.target is TweenLite))))))) || ((p == "onStart")))) || ((p == "onStartParams")))) || ((p == "renderOnStart")))) || ((p == "proxiedEase")))) || ((p == "easeParams")))) || ((($hrp) && (!(($reservedProps.indexOf(((" " + p) + " ")) == -1))))))){
} else {
if (((!(((this._isDisplayObject) && ((((((p == "tint")) || ((p == "removeTint")))) || ((p == "frame"))))))) && (!((((p == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(this._specialVars[p]) == "number"){
this.tweens[this.tweens.length] = [this.target, p, this.target[p], (this._specialVars[p] - this.target[p]), p];
} else {
this.tweens[this.tweens.length] = [this.target, p, this.target[p], Number(this._specialVars[p]), p];
};
};
};
};
};
if (this.vars.runBackwards == true){
i = (this.tweens.length - 1);
while (i > -1) {
tp = this.tweens[i];
tp[2] = (tp[2] + tp[3]);
tp[3] = (tp[3] * -1);
i--;
};
};
if (this.vars.onUpdate != null){
this._hasUpdate = true;
};
this.initted = true;
}
protected function addSubTween($name:String, $proxy:Function, $target:Object, $props:Object, $info:Object=null):void{
var p:String;
this._subTweens[this._subTweens.length] = {name:$name, proxy:$proxy, target:$target, info:$info};
for (p in $props) {
if (typeof($props[p]) == "number"){
this.tweens[this.tweens.length] = [$target, p, $target[p], ($props[p] - $target[p]), $name];
} else {
this.tweens[this.tweens.length] = [$target, p, $target[p], Number($props[p]), $name];
};
};
this._hst = true;
}
public function render($t:uint):void{
var factor:Number;
var tp:Object;
var i:int;
var time:Number = (($t - this.startTime) / 1000);
if (time >= this.duration){
time = this.duration;
factor = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
factor = this.ease(time, 0, 1, this.duration);
};
i = (this.tweens.length - 1);
while (i > -1) {
tp = this.tweens[i];
tp[0][tp[1]] = (tp[2] + (factor * tp[3]));
i--;
};
if (this._hst){
i = (this._subTweens.length - 1);
while (i > -1) {
this._subTweens[i].proxy(this._subTweens[i], time);
i--;
};
};
if (this._hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (time == this.duration){
this.complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
this.initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function complete($skipRender:Boolean=false):void{
if (!$skipRender){
if (!this.initted){
this.initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
this.render(currentTime);
return;
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public function clear():void{
this.tweens = [];
this._subTweens = [];
this.vars = {};
this._hst = (this._hasUpdate = false);
}
public function killVars($vars:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars($vars, this.vars, this.tweens, this._subTweens, []);
};
}
protected function easeProxy($t:Number, $b:Number, $c:Number, $d:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function get enabled():Boolean{
return (!(this.gc));
}
public function set enabled($b:Boolean):void{
var a:Array;
var found:Boolean;
var i:int;
if ($b){
if (masterList[this.target] == undefined){
masterList[this.target] = [this];
} else {
a = masterList[this.target];
i = (a.length - 1);
while (i > -1) {
if (a[i] == this){
found = true;
break;
};
i--;
};
if (!found){
masterList[this.target].push(this);
};
};
} else {
if ((this.target is DisplayObject)){
};
};
this.gc = !($b);
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public static function to($target:Object, $duration:Number, $vars:Object):TweenLite{
return (new TweenLite($target, $duration, $vars));
}
public static function from($target:Object, $duration:Number, $vars:Object):TweenLite{
$vars.runBackwards = true;
return (new TweenLite($target, $duration, $vars));
}
public static function delayedCall($delay:Number, $onComplete:Function, $onCompleteParams:Array=null):TweenLite{
return (new TweenLite($onComplete, 0, {delay:$delay, onComplete:$onComplete, onCompleteParams:$onCompleteParams, overwrite:0}));
}
public static function updateAll($e:Event=null):void{
var a:Array;
var i:int;
var tween:TweenLite;
var t:uint = (currentTime = getTimer());
var ml:Dictionary = masterList;
for each (a in ml) {
i = (a.length - 1);
while (i > -1) {
tween = a[i];
if (tween == null){
} else {
if (tween.active){
tween.render(t);
} else {
if (tween.gc){
a.splice(i, 1);
} else {
if (t >= tween.startTime){
tween.activate();
tween.render(t);
};
};
};
};
i--;
};
};
}
public static function removeTween($t:TweenLite, $clear:Boolean=true):void{
if ($t != null){
if ($clear){
$t.clear();
};
$t.enabled = false;
};
}
public static function killTweensOf($target:Object=null, $complete:Boolean=false):void{
var a:Array;
var i:int;
var tween:TweenLite;
if (((!(($target == null))) && (!((masterList[$target] == undefined))))){
a = masterList[$target];
i = (a.length - 1);
while (i > -1) {
tween = a[i];
if ((($complete) && (!(tween.gc)))){
tween.complete(false);
};
tween.clear();
i--;
};
delete masterList[$target];
};
}
public static function killGarbage($e:TimerEvent):void{
var tgt:Object;
var a:Array;
var ml:Dictionary = masterList;
for (tgt in ml) {
if (ml[tgt].length == 0){
delete ml[tgt];
};
};
}
public static function easeOut($t:Number, $b:Number, $c:Number, $d:Number):Number{
$t = ($t / $d);
return ((((-($c) * $t) * ($t - 2)) + $b));
}
public static function tintProxy($o:Object, $time:Number=0):void{
var n:Number = $o.target.progress;
var r:Number = (1 - n);
var sc:Object = $o.info.color;
var ec:Object = $o.info.endColor;
$o.info.target.transform.colorTransform = new ColorTransform(((sc.redMultiplier * r) + (ec.redMultiplier * n)), ((sc.greenMultiplier * r) + (ec.greenMultiplier * n)), ((sc.blueMultiplier * r) + (ec.blueMultiplier * n)), ((sc.alphaMultiplier * r) + (ec.alphaMultiplier * n)), ((sc.redOffset * r) + (ec.redOffset * n)), ((sc.greenOffset * r) + (ec.greenOffset * n)), ((sc.blueOffset * r) + (ec.blueOffset * n)), ((sc.alphaOffset * r) + (ec.alphaOffset * n)));
}
public static function frameProxy($o:Object, $time:Number=0):void{
$o.info.target.gotoAndStop(Math.round($o.target.frame));
}
public static function volumeProxy($o:Object, $time:Number=0):void{
$o.info.target.soundTransform = $o.target;
}
public static function visibleProxy($o:Object, $time:Number):void{
var t:TweenLite = $o.info.tween;
if (t.duration == $time){
if (((!((t.vars.runBackwards == true))) && ((t.ease == t.vars.ease)))){
t.target.visible = t.vars.visible;
};
} else {
if (t.target.visible != true){
t.target.visible = true;
};
};
}
}
}//package gs
Section 65
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import flash.utils.*;
import gs.events.*;
public class TweenMax extends TweenFilterLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
public var pauseTime:Number;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static var version:Number = 3.39;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init();
;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var removeTween:Function = TweenLite.removeTween;
public static var setGlobalTimeScale:Function = TweenFilterLite.setGlobalTimeScale;
protected static var _pausedTweens:Dictionary = new Dictionary(false);
public function TweenMax($target:Object, $duration:Number, $vars:Object){
super($target, $duration, $vars);
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
this.initDispatcher();
if (((($duration == 0)) && ((this.delay == 0)))){
this.onUpdateDispatcher();
this.onCompleteDispatcher();
};
};
if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
this.vars.persist = true;
};
if (TweenFilterLite.version < 9.26){
trace("TweenMax error! Please update your TweenFilterLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.");
};
}
override public function initTweenVals($hrp:Boolean=false, $reservedProps:String=""):void{
var p:String;
var i:int;
var curProp:Object;
var props:Object;
var b:Array;
$reservedProps = ($reservedProps + " hexColors bezier bezierThrough orientToBezier quaternions onCompleteAll onCompleteAllParams yoyo loop onCompleteListener onUpdateListener onStartListener ");
if (((!($hrp)) && (TweenLite.overwriteManager.enabled))){
TweenLite.overwriteManager.manageOverwrites(this, masterList[this.target]);
};
var bProxy:Function = bezierProxy;
if (this.vars.orientToBezier == true){
this.vars.orientToBezier = [["x", "y", "rotation", 0]];
bProxy = bezierProxy2;
} else {
if ((this.vars.orientToBezier is Array)){
bProxy = bezierProxy2;
};
};
if (((!((this.vars.bezier == undefined))) && ((this.vars.bezier is Array)))){
props = {};
b = this.vars.bezier;
i = 0;
while (i < b.length) {
for (p in b[i]) {
if (props[p] == undefined){
props[p] = [this.target[p]];
};
if (typeof(b[i][p]) == "number"){
props[p].push(b[i][p]);
} else {
props[p].push((this.target[p] + Number(b[i][p])));
};
};
i++;
};
for (p in props) {
if (typeof(this.vars[p]) == "number"){
props[p].push(this.vars[p]);
} else {
props[p].push((this.target[p] + Number(this.vars[p])));
};
delete this.vars[p];
};
addSubTween("bezier", bProxy, {t:0}, {t:1}, {props:parseBeziers(props, false), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.bezierThrough == undefined))) && ((this.vars.bezierThrough is Array)))){
props = {};
b = this.vars.bezierThrough;
i = 0;
while (i < b.length) {
for (p in b[i]) {
if (props[p] == undefined){
props[p] = [this.target[p]];
};
if (typeof(b[i][p]) == "number"){
props[p].push(b[i][p]);
} else {
props[p].push((this.target[p] + Number(b[i][p])));
};
};
i++;
};
for (p in props) {
if (typeof(this.vars[p]) == "number"){
props[p].push(this.vars[p]);
} else {
props[p].push((this.target[p] + Number(this.vars[p])));
};
delete this.vars[p];
};
addSubTween("bezierThrough", bProxy, {t:0}, {t:1}, {props:parseBeziers(props, true), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.hexColors == undefined))) && ((typeof(this.vars.hexColors) == "object")))){
for (p in this.vars.hexColors) {
addSubTween("hexColors", hexColorsProxy, {r:(this.target[p] >> 16), g:((this.target[p] >> 8) & 0xFF), b:(this.target[p] & 0xFF)}, {r:(this.vars.hexColors[p] >> 16), g:((this.vars.hexColors[p] >> 8) & 0xFF), b:(this.vars.hexColors[p] & 0xFF)}, {prop:p, target:this.target});
};
};
super.initTweenVals(true, $reservedProps);
}
public function pause():void{
if (isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.enabled = false;
_pausedTweens[this] = this;
};
}
public function resume():void{
var d:Number;
this.enabled = true;
if (!isNaN(this.pauseTime)){
d = (this.delay * (1000 / this.combinedTimeScale));
this.initTime = (this.initTime + (currentTime - this.pauseTime));
this.startTime = (this.initTime + d);
this.pauseTime = NaN;
if (((!(this.started)) && ((currentTime >= this.startTime)))){
activate();
} else {
this.active = this.started;
};
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
}
public function restart($includeDelay:Boolean=false):void{
if ($includeDelay){
this.initTime = currentTime;
this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale)));
} else {
this.startTime = currentTime;
this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale)));
};
if (this.target != this.vars.onComplete){
render(this.startTime);
};
this.pauseTime = NaN;
this.enabled = true;
}
public function reverse($adjustDuration:Boolean=true, $forcePlay:Boolean=true):void{
this.ease = ((this.vars.ease)==this.ease) ? this.reverseEase : this.vars.ease;
var p:Number = this.progress;
if ((($adjustDuration) && ((p > 0)))){
this.startTime = (currentTime - ((((1 - p) * this.duration) * 1000) / this.combinedTimeScale));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
};
if ($forcePlay != false){
if (p < 1){
this.resume();
} else {
this.restart();
};
};
}
public function reverseEase($t:Number, $b:Number, $c:Number, $d:Number):Number{
return (this.vars.ease(($d - $t), $b, $c, $d));
}
public function invalidate($adjustStartValues:Boolean=true):void{
var p:Number;
if (this.initted){
p = this.progress;
if (((!($adjustStartValues)) && (!((p == 0))))){
this.progress = 0;
};
this.tweens = [];
_subTweens = [];
_specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
this.initTweenVals();
_timeScale = ((this.vars.timeScale) || (1));
this.combinedTimeScale = (_timeScale * _globalTimeScale);
this.delay = ((this.vars.delay) || (0));
if (isNaN(this.pauseTime)){
this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
if (this._dispatcher != null){
this.vars.onStart = this._callbacks.onStart;
this.vars.onUpdate = this._callbacks.onUpdate;
this.vars.onComplete = this._callbacks.onComplete;
this._dispatcher = null;
};
this.initDispatcher();
};
if (p != 0){
if ($adjustStartValues){
this.adjustStartValues();
} else {
this.progress = p;
};
};
};
}
public function setDestination($property:String, $value, $adjustStartValues:Boolean=true):void{
var v:Object;
var i:int;
var varsOld:Object;
var tweensOld:Array;
var subTweensOld:Array;
var p:Number = this.progress;
if (((!((this.vars[$property] == undefined))) && (this.initted))){
if (((!($adjustStartValues)) && (!((p == 0))))){
i = (this.tweens.length - 1);
while (i > -1) {
if (this.tweens[i][4] == $property){
this.tweens[i][0][this.tweens[i][1]] = this.tweens[i][2];
};
i--;
};
};
v = {};
v[$property] = 1;
killVars(v);
};
this.vars[$property] = $value;
if (this.initted){
varsOld = this.vars;
tweensOld = this.tweens;
subTweensOld = _subTweens;
this.vars = {};
this.tweens = [];
_subTweens = [];
this.vars[$property] = $value;
this.initTweenVals();
if (((!((this.ease == this.reverseEase))) && ((varsOld.ease is Function)))){
this.ease = varsOld.ease;
};
if ((($adjustStartValues) && (!((p == 0))))){
this.adjustStartValues();
};
this.vars = varsOld;
this.tweens = tweensOld.concat(this.tweens);
_subTweens = subTweensOld.concat(_subTweens);
};
}
protected function adjustStartValues():void{
var factor:Number;
var endValue:Number;
var tp:Object;
var i:int;
var p:Number = this.progress;
if (p != 0){
factor = (1 / (1 - this.ease((p * this.duration), 0, 1, this.duration)));
i = (this.tweens.length - 1);
while (i > -1) {
tp = this.tweens[i];
endValue = (tp[2] + tp[3]);
tp[3] = ((endValue - tp[0][tp[1]]) * factor);
tp[2] = (endValue - tp[3]);
i--;
};
};
}
public function killProperties($names:Array):void{
var i:int;
var v:Object = {};
i = ($names.length - 1);
while (i > -1) {
if (this.vars[$names[i]] != null){
v[$names[i]] = 1;
};
i--;
};
killVars(v);
}
override public function complete($skipRender:Boolean=false):void{
if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
if (this.vars.yoyo == true){
this.ease = ((this.vars.ease)==this.ease) ? this.reverseEase : this.vars.ease;
};
this.startTime = currentTime;
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
} else {
if (this.vars.persist == true){
this.pause();
};
};
super.complete($skipRender);
}
protected function initDispatcher():void{
var v:Object;
var p:String;
if (this._dispatcher == null){
this._dispatcher = new EventDispatcher(this);
this._callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete};
v = {};
for (p in this.vars) {
v[p] = this.vars[p];
};
this.vars = v;
this.vars.onStart = this.onStartDispatcher;
this.vars.onComplete = this.onCompleteDispatcher;
if ((this.vars.onStartListener is Function)){
this._dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
this._dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
this.vars.onUpdate = this.onUpdateDispatcher;
_hasUpdate = true;
};
if ((this.vars.onCompleteListener is Function)){
this._dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
};
}
protected function onStartDispatcher(... _args):void{
if (this._callbacks.onStart != null){
this._callbacks.onStart.apply(null, this.vars.onStartParams);
};
this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
}
protected function onUpdateDispatcher(... _args):void{
if (this._callbacks.onUpdate != null){
this._callbacks.onUpdate.apply(null, this.vars.onUpdateParams);
};
this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
}
protected function onCompleteDispatcher(... _args):void{
if (this._callbacks.onComplete != null){
this._callbacks.onComplete.apply(null, this.vars.onCompleteParams);
};
this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
}
public function addEventListener($type:String, $listener:Function, $useCapture:Boolean=false, $priority:int=0, $useWeakReference:Boolean=false):void{
if (this._dispatcher == null){
this.initDispatcher();
};
if (((($type == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == this.onUpdateDispatcher))))){
this.vars.onUpdate = this.onUpdateDispatcher;
_hasUpdate = true;
};
this._dispatcher.addEventListener($type, $listener, $useCapture, $priority, $useWeakReference);
}
public function removeEventListener($type:String, $listener:Function, $useCapture:Boolean=false):void{
if (this._dispatcher != null){
this._dispatcher.removeEventListener($type, $listener, $useCapture);
};
}
public function hasEventListener($type:String):Boolean{
if (this._dispatcher == null){
return (false);
};
return (this._dispatcher.hasEventListener($type));
}
public function willTrigger($type:String):Boolean{
if (this._dispatcher == null){
return (false);
};
return (this._dispatcher.willTrigger($type));
}
public function dispatchEvent($e:Event):Boolean{
if (this._dispatcher == null){
return (false);
};
return (this._dispatcher.dispatchEvent($e));
}
public function get paused():Boolean{
return ((this.startTime == 999999999999999));
}
public function set paused($b:Boolean):void{
if ($b){
this.pause();
} else {
this.resume();
};
}
public function get reversed():Boolean{
return ((this.ease == this.reverseEase));
}
public function set reversed($b:Boolean):void{
if (this.reversed != $b){
this.reverse();
};
}
public function get progress():Number{
var t:Number = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime;
var p:Number = (((((t - this.initTime) / 1000) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale);
if (p > 1){
return (1);
};
if (p < 0){
return (0);
};
return (p);
}
public function set progress($n:Number):void{
this.startTime = (currentTime - ((this.duration * $n) * 1000));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
if (!this.started){
activate();
};
render(currentTime);
if (!isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.active = false;
};
}
public static function to($target:Object, $duration:Number, $vars:Object):TweenMax{
return (new TweenMax($target, $duration, $vars));
}
public static function from($target:Object, $duration:Number, $vars:Object):TweenMax{
$vars.runBackwards = true;
return (new TweenMax($target, $duration, $vars));
}
public static function allTo($targets:Array, $duration:Number, $vars:Object):Array{
var i:int;
var v:Object;
var p:String;
var dl:Number;
var lastVars:Object;
trace("WARNING: TweenMax.allTo() and TweenMax.allFrom() have been deprecated in favor of the much more powerful and flexible TweenGroup class. See http://blog.greensock.com/tweengroup/ for more details. Future versions of TweenMax may not include allTo() and allFrom() (to conserve file size).");
if ($targets.length == 0){
return ([]);
};
var a:Array = [];
var dli:Number = (($vars.delayIncrement) || (0));
delete $vars.delayIncrement;
if ($vars.onCompleteAll == undefined){
lastVars = $vars;
} else {
lastVars = {};
for (p in $vars) {
lastVars[p] = $vars[p];
};
lastVars.onCompleteParams = [[$vars.onComplete, $vars.onCompleteAll], [$vars.onCompleteParams, $vars.onCompleteAllParams]];
lastVars.onComplete = TweenMax.callbackProxy;
delete $vars.onCompleteAll;
};
delete $vars.onCompleteAllParams;
if (dli == 0){
i = 0;
while (i < ($targets.length - 1)) {
v = {};
for (p in $vars) {
v[p] = $vars[p];
};
a[a.length] = new TweenMax($targets[i], $duration, v);
i++;
};
} else {
dl = (($vars.delay) || (0));
i = 0;
while (i < ($targets.length - 1)) {
v = {};
for (p in $vars) {
v[p] = $vars[p];
};
v.delay = (dl + (i * dli));
a[a.length] = new TweenMax($targets[i], $duration, v);
i++;
};
lastVars.delay = (dl + (($targets.length - 1) * dli));
};
a[a.length] = new TweenMax($targets[($targets.length - 1)], $duration, lastVars);
if (($vars.onCompleteAllListener is Function)){
a[(a.length - 1)].addEventListener(TweenEvent.COMPLETE, $vars.onCompleteAllListener);
};
return (a);
}
public static function allFrom($targets:Array, $duration:Number, $vars:Object):Array{
$vars.runBackwards = true;
return (allTo($targets, $duration, $vars));
}
public static function callbackProxy($functions:Array, $params:Array=null):void{
var i:uint;
while (i < $functions.length) {
if ($functions[i] != undefined){
$functions[i].apply(null, $params[i]);
};
i++;
};
}
public static function sequence($target:Object, $tweens:Array):Array{
var i:uint;
while (i < $tweens.length) {
$tweens[i].target = $target;
i++;
};
return (multiSequence($tweens));
}
public static function multiSequence($tweens:Array):Array{
var tw:Object;
var tgt:Object;
var dl:Number;
var t:Number;
var i:uint;
var o:Object;
var p:String;
trace("WARNING: TweenMax.multiSequence() and TweenMax.sequence() have been deprecated in favor of the much more powerful and flexible TweenGroup class. See http://blog.greensock.com/tweengroup/ for more details. Future versions of TweenMax may not include sequence() and multiSequence() (to conserve file size).");
var dict:Dictionary = new Dictionary();
var a:Array = [];
var overwriteMode:int = TweenLite.overwriteManager.mode;
var totalDelay:Number = 0;
i = 0;
while (i < $tweens.length) {
tw = $tweens[i];
t = ((tw.time) || (0));
o = {};
for (p in tw) {
o[p] = tw[p];
};
delete o.time;
dl = ((o.delay) || (0));
o.delay = (totalDelay + dl);
tgt = o.target;
delete o.target;
if (overwriteMode == 1){
if (dict[tgt] == undefined){
dict[tgt] = o;
} else {
o.overwrite = 2;
};
};
a[a.length] = new TweenMax(tgt, t, o);
totalDelay = (totalDelay + (t + dl));
i++;
};
return (a);
}
public static function delayedCall($delay:Number, $onComplete:Function, $onCompleteParams:Array=null, $persist:Boolean=false):TweenMax{
return (new TweenMax($onComplete, 0, {delay:$delay, onComplete:$onComplete, onCompleteParams:$onCompleteParams, persist:$persist, overwrite:0}));
}
public static function parseBeziers($props:Object, $through:Boolean=false):Object{
var i:int;
var a:Array;
var b:Object;
var p:String;
var all:Object = {};
if ($through){
for (p in $props) {
a = $props[p];
b = [];
all[p] = b;
if (a.length > 2){
b[b.length] = {s:a[0], cp:(a[1] - ((a[2] - a[0]) / 4)), e:a[1]};
i = 1;
while (i < (a.length - 1)) {
b[b.length] = {s:a[i], cp:(a[i] + (a[i] - b[(i - 1)].cp)), e:a[(i + 1)]};
i++;
};
} else {
b[b.length] = {s:a[0], cp:((a[0] + a[1]) / 2), e:a[1]};
};
};
} else {
for (p in $props) {
a = $props[p];
b = [];
all[p] = b;
if (a.length > 3){
b[b.length] = {s:a[0], cp:a[1], e:((a[1] + a[2]) / 2)};
i = 2;
while (i < (a.length - 2)) {
b[b.length] = {s:b[(i - 2)].e, cp:a[i], e:((a[i] + a[(i + 1)]) / 2)};
i++;
};
b[b.length] = {s:b[(b.length - 1)].e, cp:a[(a.length - 2)], e:a[(a.length - 1)]};
} else {
if (a.length == 3){
b[b.length] = {s:a[0], cp:a[1], e:a[2]};
} else {
if (a.length == 2){
b[b.length] = {s:a[0], cp:((a[0] + a[1]) / 2), e:a[1]};
};
};
};
};
};
return (all);
}
public static function getTweensOf($target:Object):Array{
var i:int;
var a:Array = masterList[$target];
var toReturn:Array = [];
if (a != null){
i = (a.length - 1);
while (i > -1) {
if (!a[i].gc){
toReturn[toReturn.length] = a[i];
};
i--;
};
};
return (toReturn);
}
public static function isTweening($target:Object):Boolean{
var a:Array = getTweensOf($target);
var i:int = (a.length - 1);
while (i > -1) {
if (((a[i].active) && (!(a[i].gc)))){
return (true);
};
i--;
};
return (false);
}
public static function getAllTweens():Array{
var a:Array;
var i:int;
var tween:TweenLite;
var ml:Dictionary = masterList;
var toReturn:Array = [];
for each (a in ml) {
i = (a.length - 1);
while (i > -1) {
if (!a[i].gc){
toReturn[toReturn.length] = a[i];
};
i--;
};
};
for each (tween in _pausedTweens) {
toReturn[toReturn.length] = tween;
};
return (toReturn);
}
public static function killAllTweens($complete:Boolean=false):void{
killAll($complete, true, false);
}
public static function killAllDelayedCalls($complete:Boolean=false):void{
killAll($complete, false, true);
}
public static function killAll($complete:Boolean=false, $tweens:Boolean=true, $delayedCalls:Boolean=true):void{
var isDC:Boolean;
var a:Array = getAllTweens();
var i:int = (a.length - 1);
while (i > -1) {
isDC = (a[i].target == a[i].vars.onComplete);
if ((((isDC == $delayedCalls)) || (!((isDC == $tweens))))){
if ($complete){
a[i].complete(false);
a[i].clear();
} else {
TweenLite.removeTween(a[i], true);
};
};
i--;
};
}
public static function pauseAll($tweens:Boolean=true, $delayedCalls:Boolean=false):void{
changePause(true, $tweens, $delayedCalls);
}
public static function resumeAll($tweens:Boolean=true, $delayedCalls:Boolean=false):void{
changePause(false, $tweens, $delayedCalls);
}
public static function changePause($pause:Boolean, $tweens:Boolean=true, $delayedCalls:Boolean=false):void{
var isDC:Boolean;
var a:Array = getAllTweens();
var i:int = (a.length - 1);
while (i > -1) {
isDC = (a[i].target == a[i].vars.onComplete);
if ((((a[i] is TweenMax)) && ((((isDC == $delayedCalls)) || (!((isDC == $tweens))))))){
a[i].paused = $pause;
};
i--;
};
}
public static function hexColorsProxy($o:Object, $time:Number=0):void{
$o.info.target[$o.info.prop] = uint(((($o.target.r << 16) | ($o.target.g << 8)) | $o.target.b));
}
public static function bezierProxy($o:Object, $time:Number=0):void{
var i:int;
var p:String;
var b:Object;
var t:Number;
var segments:uint;
var factor:Number = $o.target.t;
var props:Object = $o.info.props;
var tg:Object = $o.info.target;
if (factor == 1){
for (p in props) {
i = (props[p].length - 1);
tg[p] = props[p][i].e;
};
} else {
for (p in props) {
segments = props[p].length;
if (factor < 0){
i = 0;
} else {
if (factor >= 1){
i = (segments - 1);
} else {
i = int((segments * factor));
};
};
t = ((factor - (i * (1 / segments))) * segments);
b = props[p][i];
tg[p] = (b.s + (t * (((2 * (1 - t)) * (b.cp - b.s)) + (t * (b.e - b.s)))));
};
};
}
public static function bezierProxy2($o:Object, $time:Number=0):void{
var a:Number;
var dx:Number;
var dy:Number;
var cotb:Array;
var toAdd:Number;
bezierProxy($o, $time);
var future:Object = {};
var tg:Object = $o.info.target;
$o.info.target = future;
$o.target.t = ($o.target.t + 0.01);
bezierProxy($o);
var otb:Array = $o.info.orientToBezier;
var i:uint;
while (i < otb.length) {
cotb = otb[i];
toAdd = ((cotb[3]) || (0));
dx = (future[cotb[0]] - tg[cotb[0]]);
dy = (future[cotb[1]] - tg[cotb[1]]);
tg[cotb[2]] = ((Math.atan2(dy, dx) * _RAD2DEG) + toAdd);
i++;
};
$o.info.target = tg;
$o.target.t = ($o.target.t - 0.01);
}
public static function set globalTimeScale($n:Number):void{
setGlobalTimeScale($n);
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
}
}//package gs
Section 66
//bad_points_movie_17 (help_fla.bad_points_movie_17)
package help_fla {
import flash.display.*;
public dynamic class bad_points_movie_17 extends MovieClip {
public function bad_points_movie_17(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package help_fla
Section 67
//help_block_4 (help_fla.help_block_4)
package help_fla {
import flash.display.*;
public dynamic class help_block_4 extends MovieClip {
public var backBtn:SimpleButton;
public var nextBtn:SimpleButton;
public function help_block_4(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package help_fla
Section 68
//points_movie_15 (help_fla.points_movie_15)
package help_fla {
import flash.display.*;
public dynamic class points_movie_15 extends MovieClip {
public function points_movie_15(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package help_fla
Section 69
//2_stady_movie_1_11 (Metall_fla.2_stady_movie_1_11)
package Metall_fla {
import flash.display.*;
public dynamic class 2_stady_movie_1_11 extends MovieClip {
public function 2_stady_movie_1_11(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Metall_fla
Section 70
//2_stady_movie_2_13 (Metall_fla.2_stady_movie_2_13)
package Metall_fla {
import flash.display.*;
public dynamic class 2_stady_movie_2_13 extends MovieClip {
public function 2_stady_movie_2_13(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Metall_fla
Section 71
//Timeline_10 (Metall_fla.Timeline_10)
package Metall_fla {
import flash.display.*;
public dynamic class Timeline_10 extends MovieClip {
public var inner:MovieClip;
}
}//package Metall_fla
Section 72
//Timeline_12 (Metall_fla.Timeline_12)
package Metall_fla {
import flash.display.*;
public dynamic class Timeline_12 extends MovieClip {
public var inner:MovieClip;
}
}//package Metall_fla
Section 73
//Timeline_15 (Metall_fla.Timeline_15)
package Metall_fla {
import flash.display.*;
public dynamic class Timeline_15 extends MovieClip {
public var part2:MovieClip;
public var part1:MovieClip;
}
}//package Metall_fla
Section 74
//BitmapMovieClip (muzaffaraka.display.BitmapMovieClip)
package muzaffaraka.display {
import flash.display.*;
import flash.geom.*;
public class BitmapMovieClip extends MovieClip {
protected var _totalFrames:int;
protected var _bitmap:Bitmap;
protected var _shiftingPoint:Array;
protected var _vectorClip:MovieClip;
protected var _currentFrame:int;
protected var _bitmapDataArray:Array;
protected var _orientToCenter:Boolean;
public function BitmapMovieClip($source:Class, $scale:Number=1, $orientToCenter:Boolean=false){
super();
_vectorClip = new ($source);
_orientToCenter = $orientToCenter;
_vectorClip.gotoAndStop(1);
_vectorClip.scaleX = (_vectorClip.scaleY = $scale);
_totalFrames = _vectorClip.totalFrames;
_bitmapDataArray = new Array();
_shiftingPoint = new Array();
initBitmapData();
_vectorClip = null;
_bitmap = new Bitmap();
addChild(_bitmap);
gotoFrameAndStop(1);
}
override public function nextFrame():void{
var frameNum:int = (_currentFrame + 1);
if (frameNum > _totalFrames){
frameNum = 1;
};
gotoFrameAndStop(frameNum);
}
override public function get currentFrame():int{
return (_currentFrame);
}
override public function gotoAndPlay(frame:Object, scene:String=null):void{
trace("WARNING!!!! BitmapMovieClip: Calling 'gotoAndPlay' is same to call 'gotoAndStop'");
gotoAndStop(frame, scene);
}
override public function get totalFrames():int{
return (_totalFrames);
}
override public function play():void{
trace("WARNING!!!! BitmapMovieClip: Instead of using 'play' function, \ncall 'nextFrame()' or 'prevFrame' periodically");
}
protected function gotoFrameAndStop($frameNum:int):void{
var frameNum:int = $frameNum;
if ($frameNum < 1){
frameNum = 1;
};
if ($frameNum > _totalFrames){
frameNum = _totalFrames;
};
if (_orientToCenter){
_bitmap.x = Point(_shiftingPoint[(frameNum - 1)]).x;
_bitmap.y = Point(_shiftingPoint[(frameNum - 1)]).y;
};
_bitmap.bitmapData = _bitmapDataArray[(frameNum - 1)];
_currentFrame = frameNum;
}
override public function prevScene():void{
trace("WARNING!!!! BitmapMovieClip: this class does't support 'prevScene' property.");
}
override public function get framesLoaded():int{
trace("WARNING!!!! BitmapMovieClip: 'framesLoaded' always returns 'totalFrames'");
return (_totalFrames);
}
override public function gotoAndStop($num:Object, scene:String=null):void{
var num:int = ($num as int);
gotoFrameAndStop(num);
if (scene){
trace("WARNING!!!! BitmapMovieClip: this class does't support scenes.");
};
}
protected function initBitmapData():void{
var rect:Rectangle;
var pointLeftTop:Point;
var i = 1;
while (i <= _vectorClip.totalFrames) {
_vectorClip.gotoAndStop(i);
if (_orientToCenter){
rect = _vectorClip.getBounds(_vectorClip);
pointLeftTop = rect.topLeft;
_vectorClip.x = -(pointLeftTop.x);
_vectorClip.y = -(pointLeftTop.y);
_shiftingPoint[(i - 1)] = pointLeftTop;
};
_bitmapDataArray[(i - 1)] = new BitmapData(_vectorClip.width, _vectorClip.height, true, 0xFFFF00);
BitmapData(_bitmapDataArray[(i - 1)]).draw(_vectorClip, _vectorClip.transform.matrix, _vectorClip.transform.colorTransform, BlendMode.NORMAL, null, false);
i++;
};
}
override public function addFrameScript(... _args):void{
trace("WARNING!!!! BitmapMovieClip: Adding frame scripts is not suported by this class.");
}
override public function prevFrame():void{
var frameNum:int = (_currentFrame - 1);
if (frameNum < 1){
frameNum = _totalFrames;
};
gotoFrameAndStop(frameNum);
}
override public function get currentLabel():String{
trace("WARNING!!!! BitmapMovieClip: this class does't support 'currentLabel' property.");
return (null);
}
}
}//package muzaffaraka.display
Section 75
//Utils (muzaffaraka.Math.Utils)
package muzaffaraka.Math {
public class Utils {
public function Utils(){
super();
trace("Random", randRange(2, 12));
}
public static function randRange(min:int, max:int):int{
return (Math.round(((Math.random() * ((max - min) + 1)) + (min - 0.5))));
}
}
}//package muzaffaraka.Math
Section 76
//NetUtil (muzaffaraka.net.NetUtil)
package muzaffaraka.net {
import flash.net.*;
public class NetUtil {
public function NetUtil(){
super();
}
public static function checkURL(urlArray:Array):Boolean{
var LC:LocalConnection = new LocalConnection();
var i:int;
while (i < urlArray.length) {
if (!(urlArray[i] is String)){
return (false);
};
if (LC.domain == urlArray[i]){
return (true);
};
i++;
};
return (false);
}
}
}//package muzaffaraka.net
Section 77
//ArrayUtil (muzaffaraka.utils.ArrayUtil)
package muzaffaraka.utils {
import muzaffaraka.Math.*;
public class ArrayUtil {
public function ArrayUtil(){
super();
}
public static function shuffleArray($array:Array):Array{
var num:int;
var exists:Boolean;
var e:int;
var arr:Array = new Array();
var usedNums:Array = new Array();
var i:int;
while (i < $array.length) {
num = Utils.randRange(0, ($array.length - 1));
exists = false;
e = 0;
while (e < usedNums.length) {
if (usedNums[e] == num){
exists = true;
};
e++;
};
if (exists){
i--;
} else {
usedNums.push(num);
arr.push($array[num]);
};
i++;
};
return (arr);
}
}
}//package muzaffaraka.utils
Section 78
//Profiler (muzaffaraka.Profiler)
package muzaffaraka {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
public class Profiler {
private static var started:Boolean = false;
private static var initTime:int;
public static var memList:Array = [];
public static var history:int = 60;
private static var itvTime:int;
public static var minMem:Number;
public static var fpsList:Array = [];
private static var frameCount:int;
private static var totalCount:int;
private static var inited:Boolean = false;
public static var minFps:Number;
public static var maxMem:Number;
private static var displayed:Boolean = false;
public static var maxFps:Number;
private static var currentTime:int;
private static var frame:Sprite;
private static var ci:ContextMenuItem;
private static var content:ProfilerContent;
private static var stage:Stage;
public function Profiler(){
super();
}
private static function addEvent(item:EventDispatcher, type:String, listener:Function):void{
item.addEventListener(type, listener, false, 0, true);
}
public static function stop():void{
if (!started){
return;
};
started = false;
removeEvent(frame, Event.ENTER_FRAME, draw);
}
public static function get averageFps():Number{
return ((totalCount / runningTime));
}
public static function init(swf:Stage, context:InteractiveObject):void{
if (inited){
return;
};
inited = true;
stage = swf;
content = new ProfilerContent();
frame = new Sprite();
minFps = Number.MAX_VALUE;
maxFps = Number.MIN_VALUE;
minMem = Number.MAX_VALUE;
maxMem = Number.MIN_VALUE;
var cm:ContextMenu = new ContextMenu();
ci = new ContextMenuItem("Show Profiler", true);
addEvent(ci, ContextMenuEvent.MENU_ITEM_SELECT, onSelect);
cm.customItems = [ci];
context.contextMenu = cm;
start();
}
public static function get currentMem():Number{
return (((System.totalMemory / 0x0400) / 1000));
}
private static function get runningTime():Number{
return (((currentTime - initTime) / 1000));
}
private static function get intervalTime():Number{
return (((currentTime - itvTime) / 1000));
}
private static function resize(e:Event):void{
content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
}
private static function updateDisplay():void{
updateMinMax();
content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
}
private static function onSelect(e:ContextMenuEvent):void{
if (!displayed){
show();
} else {
hide();
};
}
public static function get currentFps():Number{
return ((frameCount / intervalTime));
}
private static function hide():void{
ci.caption = "Show Profiler";
displayed = false;
removeEvent(stage, Event.RESIZE, resize);
stage.removeChild(content);
}
private static function draw(e:Event):void{
currentTime = getTimer();
frameCount++;
totalCount++;
if (intervalTime >= 1){
if (displayed){
updateDisplay();
} else {
updateMinMax();
};
fpsList.unshift(currentFps);
memList.unshift(currentMem);
if (fpsList.length > history){
fpsList.pop();
};
if (memList.length > history){
memList.pop();
};
itvTime = currentTime;
frameCount = 0;
};
}
private static function updateMinMax():void{
minFps = Math.min(currentFps, minFps);
maxFps = Math.max(currentFps, maxFps);
minMem = Math.min(currentMem, minMem);
maxMem = Math.max(currentMem, maxMem);
}
public static function gc():void{
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
//unresolved jump
var _slot1 = e;
}
public static function start():void{
if (started){
return;
};
started = true;
initTime = (itvTime = getTimer());
totalCount = (frameCount = 0);
addEvent(frame, Event.ENTER_FRAME, draw);
}
private static function removeEvent(item:EventDispatcher, type:String, listener:Function):void{
item.removeEventListener(type, listener);
}
private static function show():void{
ci.caption = "Hide Profiler";
displayed = true;
addEvent(stage, Event.RESIZE, resize);
stage.addChild(content);
updateDisplay();
}
}
}//package muzaffaraka
import flash.events.*;
import flash.display.*;
import flash.text.*;
class ProfilerContent extends Sprite {
private var maxFpsTxtBx:TextField;
private var minMemTxtBx:TextField;
private var fps:Shape;
private var box:Sprite;
private var minFpsTxtBx:TextField;
private var maxMemTxtBx:TextField;
private var infoTxtBx:TextField;
private var mb:Shape;
private function ProfilerContent():void{
super();
fps = new Shape();
mb = new Shape();
box = new Sprite();
this.mouseChildren = false;
this.mouseEnabled = false;
fps.x = 65;
fps.y = 45;
mb.x = 65;
mb.y = 90;
var tf:TextFormat = new TextFormat("_sans", 9, 0xAAAAAA);
infoTxtBx = new TextField();
infoTxtBx.autoSize = TextFieldAutoSize.CENTER;
infoTxtBx.defaultTextFormat = new TextFormat("_sans", 11, 0xCCCCCC);
infoTxtBx.y = 98;
minFpsTxtBx = new TextField();
minFpsTxtBx.autoSize = TextFieldAutoSize.LEFT;
minFpsTxtBx.defaultTextFormat = tf;
minFpsTxtBx.x = 7;
minFpsTxtBx.y = 37;
maxFpsTxtBx = new TextField();
maxFpsTxtBx.autoSize = TextFieldAutoSize.LEFT;
maxFpsTxtBx.defaultTextFormat = tf;
maxFpsTxtBx.x = 7;
maxFpsTxtBx.y = 5;
minMemTxtBx = new TextField();
minMemTxtBx.autoSize = TextFieldAutoSize.LEFT;
minMemTxtBx.defaultTextFormat = tf;
minMemTxtBx.x = 7;
minMemTxtBx.y = 83;
maxMemTxtBx = new TextField();
maxMemTxtBx.autoSize = TextFieldAutoSize.LEFT;
maxMemTxtBx.defaultTextFormat = tf;
maxMemTxtBx.x = 7;
maxMemTxtBx.y = 50;
addChild(box);
addChild(infoTxtBx);
addChild(minFpsTxtBx);
addChild(maxFpsTxtBx);
addChild(minMemTxtBx);
addChild(maxMemTxtBx);
addChild(fps);
addChild(mb);
this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
}
private function added(e:Event):void{
resize();
stage.addEventListener(Event.RESIZE, resize, false, 0, true);
}
private function removed(e:Event):void{
stage.removeEventListener(Event.RESIZE, resize);
}
private function resize(e:Event=null):void{
var vec:Graphics = box.graphics;
vec.clear();
vec.beginFill(0, 0.5);
vec.drawRect(0, 0, stage.stageWidth, 120);
vec.lineStyle(1, 0xFFFFFF, 0.2);
vec.moveTo(65, 45);
vec.lineTo(65, 10);
vec.moveTo(65, 45);
vec.lineTo((stage.stageWidth - 15), 45);
vec.moveTo(65, 90);
vec.lineTo(65, 55);
vec.moveTo(65, 90);
vec.lineTo((stage.stageWidth - 15), 90);
vec.endFill();
infoTxtBx.x = ((stage.stageWidth - infoTxtBx.width) - 20);
}
public function update(runningTime:Number, minFps:Number, maxFps:Number, minMem:Number, maxMem:Number, currentFps:Number, currentMem:Number, averageFps:Number, fpsList:Array, memList:Array, history:int):void{
var value:Number;
if (runningTime >= 1){
minFpsTxtBx.text = (minFps.toFixed(3) + " Fps");
maxFpsTxtBx.text = (maxFps.toFixed(3) + " Fps");
minMemTxtBx.text = (minMem.toFixed(3) + " Mb");
maxMemTxtBx.text = (maxMem.toFixed(3) + " Mb");
};
infoTxtBx.text = (((((("Current Fps " + currentFps.toFixed(3)) + " | Average Fps ") + averageFps.toFixed(3)) + " | Memory Used ") + currentMem.toFixed(3)) + " Mb");
infoTxtBx.x = ((box.width - infoTxtBx.width) - 20);
var vec:Graphics = fps.graphics;
vec.clear();
vec.lineStyle(1, 0x33FF00, 0.7);
var i:int;
var len:int = fpsList.length;
var height = 35;
var width:int = (stage.stageWidth - 80);
var inc:Number = (width / (history - 1));
var rateRange:Number = (maxFps - minFps);
i = 0;
while (i < len) {
value = ((fpsList[i] - minFps) / rateRange);
if (i == 0){
vec.moveTo(0, (-(value) * height));
} else {
vec.lineTo((i * inc), (-(value) * height));
};
i++;
};
vec = mb.graphics;
vec.clear();
vec.lineStyle(1, 26367, 0.7);
i = 0;
len = memList.length;
rateRange = (maxMem - minMem);
i = 0;
while (i < len) {
value = ((memList[i] - minMem) / rateRange);
if (i == 0){
vec.moveTo(0, (-(value) * height));
} else {
vec.lineTo((i * inc), (-(value) * height));
};
i++;
};
}
}
Section 79
//StringUtil (muzaffaraka.StringUtil)
package muzaffaraka {
import flash.text.*;
public class StringUtil {
public function StringUtil(){
super();
}
public static function setFont(to:TextField, fontClass:Class):void{
var flashText:TextField = to;
var myFont:Font = (new (fontClass) as Font);
var textFormat:TextFormat = new TextFormat();
textFormat.font = myFont.fontName;
flashText.defaultTextFormat = textFormat;
flashText.setTextFormat(textFormat);
flashText.embedFonts = true;
flashText.antiAliasType = AntiAliasType.ADVANCED;
}
public static function trim(txt_str:String):String{
while (txt_str.charAt(0) == " ") {
txt_str = txt_str.substring(1, txt_str.length);
};
while (txt_str.charAt((txt_str.length - 1)) == " ") {
txt_str = txt_str.substring(0, (txt_str.length - 1));
};
return (txt_str);
}
public static function showEmbeddedFonts():void{
trace("========Embedded Fonts======== (c) muzaffaraka");
var fonts:Array = Font.enumerateFonts();
fonts.sortOn("fontName", Array.CASEINSENSITIVE);
var i:int;
while (i < fonts.length) {
trace(((fonts[i].fontName + ", ") + fonts[i].fontStyle));
i++;
};
trace("====END OF: Embedded Fonts==== (c) muzaffaraka");
}
public static function setBold(field:TextField, bold:Boolean):void{
var textFormat:TextFormat = field.getTextFormat();
textFormat.bold = bold;
field.defaultTextFormat = textFormat;
field.setTextFormat(textFormat);
}
}
}//package muzaffaraka
Section 80
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
public function ByteArrayAsset(){
super();
}
}
}//package mx.core
Section 81
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){
super();
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 82
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 83
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 84
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 85
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(void:Point):Point;
function get name():String;
function set width(flash.display:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(flash.display:String):void;
function set scaleX(flash.display:Number):void;
function set scaleY(flash.display:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(flash.display:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(void:Point):Point;
function get height():Number;
function set blendMode(flash.display:String):void;
function get parent():DisplayObjectContainer;
function getBounds(String:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(flash.display:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(flash.display:Number):void;
function set accessibilityProperties(flash.display:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(flash.display:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(flash.display:Number):void;
function set mask(flash.display:DisplayObject):void;
function getRect(String:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(flash.display:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean;
function set opaqueBackground(flash.display:Object):void;
function set visible(flash.display:Boolean):void;
function get mask():DisplayObject;
function set x(flash.display:Number):void;
function set y(flash.display:Number):void;
function get transform():Transform;
function set filters(flash.display:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(flash.display:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 86
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(E:\dev\3.1.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get isDocument():Boolean;
function set repeaters(E:\dev\3.1.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function initializeRepeaterArrays(E:\dev\3.1.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(E:\dev\3.1.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 87
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
super();
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(newWidth:Number, newHeight:Number):void{
width = newWidth;
height = newHeight;
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 88
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
super();
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in loaderContext)){
loaderContext["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, loaderContext);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(value:Number):void{
if (!initialized){
requestedWidth = value;
} else {
loader.width = value;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(event:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(event);
}
override public function set height(value:Number):void{
if (!initialized){
requestedHeight = value;
} else {
loader.height = value;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 89
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 90
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
public function SoundAsset(){
super();
}
}
}//package mx.core
Section 91
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public function NameUtil(){
super();
}
public static function displayObjectToString(displayObject:DisplayObject):String{
var result:String;
var s:String;
var indices:Array;
var o:DisplayObject = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
return (result);
}
public static function createUniqueName(object:Object):String{
if (!object){
return (null);
};
var name:String = getQualifiedClassName(object);
var index:int = name.indexOf("::");
if (index != -1){
name = name.substr((index + 2));
};
var charCode:int = name.charCodeAt((name.length - 1));
if ((((charCode >= 48)) && ((charCode <= 57)))){
name = (name + "_");
};
return ((name + counter++));
}
}
}//package mx.utils
Section 92
//Timeline_15 (oparish_fla.Timeline_15)
package oparish_fla {
import flash.display.*;
public dynamic class Timeline_15 extends MovieClip {
public function Timeline_15(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package oparish_fla
Section 93
//Timeline_21 (oparish_fla.Timeline_21)
package oparish_fla {
import flash.display.*;
public dynamic class Timeline_21 extends MovieClip {
public function Timeline_21(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package oparish_fla
Section 94
//Timeline_27 (oparish_fla.Timeline_27)
package oparish_fla {
import flash.display.*;
public dynamic class Timeline_27 extends MovieClip {
public function Timeline_27(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package oparish_fla
Section 95
//Timeline_3 (oparish_fla.Timeline_3)
package oparish_fla {
import flash.display.*;
public dynamic class Timeline_3 extends MovieClip {
public function Timeline_3(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package oparish_fla
Section 96
//Timeline_9 (oparish_fla.Timeline_9)
package oparish_fla {
import flash.display.*;
public dynamic class Timeline_9 extends MovieClip {
public function Timeline_9(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package oparish_fla
Section 97
//Timeline_9 (Red_fla.Timeline_9)
package Red_fla {
import flash.display.*;
public dynamic class Timeline_9 extends MovieClip {
public function Timeline_9(){
addFrameScript(36, frame37, 39, frame40);
}
function frame37(){
stop();
}
function frame40(){
stop();
}
}
}//package Red_fla
Section 98
//ruka_2 (Shvabra_fla.ruka_2)
package Shvabra_fla {
import flash.display.*;
public dynamic class ruka_2 extends MovieClip {
public function ruka_2(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Shvabra_fla
Section 99
//sound_slayder_2 (SoundBtn_fla.sound_slayder_2)
package SoundBtn_fla {
import flash.display.*;
public dynamic class sound_slayder_2 extends MovieClip {
public var inner:MovieClip;
}
}//package SoundBtn_fla
Section 100
//scene_11 (spider_die_fla.scene_11)
package spider_die_fla {
import flash.events.*;
import flash.display.*;
public dynamic class scene_11 extends MovieClip {
public var label:MovieClip;
public function scene_11(){
addFrameScript(618, frame619);
}
function frame619(){
dispatchEvent(new Event("spiderDieingComplete", true));
}
}
}//package spider_die_fla
Section 101
//spider_razvorot_9 (spider_eat_fla.spider_razvorot_9)
package spider_eat_fla {
import flash.display.*;
public dynamic class spider_razvorot_9 extends MovieClip {
public function spider_razvorot_9(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package spider_eat_fla
Section 102
//Timeline_2 (spider_eat_fla.Timeline_2)
package spider_eat_fla {
import flash.display.*;
public dynamic class Timeline_2 extends MovieClip {
public function Timeline_2(){
addFrameScript(88, frame89);
}
function frame89(){
stop();
}
}
}//package spider_eat_fla
Section 103
//Arrow_mc (Arrow_mc)
package {
import flash.display.*;
public dynamic class Arrow_mc extends MovieClip {
}
}//package
Section 104
//Blue_dieing_mc (Blue_dieing_mc)
package {
import flash.display.*;
public dynamic class Blue_dieing_mc extends MovieClip {
public function Blue_dieing_mc(){
addFrameScript(36, frame37, 39, frame40);
}
function frame37(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 105
//Blue_flying_mc (Blue_flying_mc)
package {
import flash.display.*;
public dynamic class Blue_flying_mc extends MovieClip {
}
}//package
Section 106
//Blue_sitting_mc (Blue_sitting_mc)
package {
import flash.display.*;
public dynamic class Blue_sitting_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 107
//Border (Border)
package {
import flash.display.*;
public dynamic class Border extends MovieClip {
public var marker_potolok1:Marker;
public var marker_potolok2:Marker;
public var marker_potolok4:Marker;
public var marker_potolok3:Marker;
public var bounds:MovieClip;
public var inner:MovieClip;
}
}//package
Section 108
//Butterfly_dieing_mc (Butterfly_dieing_mc)
package {
import flash.display.*;
public dynamic class Butterfly_dieing_mc extends MovieClip {
public function Butterfly_dieing_mc(){
addFrameScript(36, frame37, 39, frame40);
}
function frame40(){
stop();
}
function frame37(){
stop();
}
}
}//package
Section 109
//Butterfly_flying_mc (Butterfly_flying_mc)
package {
import flash.display.*;
public dynamic class Butterfly_flying_mc extends MovieClip {
}
}//package
Section 110
//Butterfly_sitting_mc (Butterfly_sitting_mc)
package {
import flash.display.*;
public dynamic class Butterfly_sitting_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 111
//Chrysalis_blue_mc (Chrysalis_blue_mc)
package {
import flash.display.*;
public dynamic class Chrysalis_blue_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 112
//Chrysalis_mega_mc (Chrysalis_mega_mc)
package {
import flash.display.*;
public dynamic class Chrysalis_mega_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 113
//Chrysalis_metall_mc (Chrysalis_metall_mc)
package {
import flash.display.*;
public dynamic class Chrysalis_metall_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 114
//Chrysalis_red_mc (Chrysalis_red_mc)
package {
import flash.display.*;
public dynamic class Chrysalis_red_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 115
//Chrysalis_yellow_mc (Chrysalis_yellow_mc)
package {
import flash.display.*;
public dynamic class Chrysalis_yellow_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 116
//ComicSansMS (ComicSansMS)
package {
import flash.text.*;
public dynamic class ComicSansMS extends Font {
}
}//package
Section 117
//Credits_mc (Credits_mc)
package {
import flash.display.*;
public dynamic class Credits_mc extends MovieClip {
public var menuBtn:SimpleButton;
}
}//package
Section 118
//Dark_mc (Dark_mc)
package {
import flash.display.*;
public dynamic class Dark_mc extends MovieClip {
public function Dark_mc(){
addFrameScript(212, frame213);
}
function frame213(){
stop();
}
}
}//package
Section 119
//Dead_mc (Dead_mc)
package {
import flash.display.*;
public dynamic class Dead_mc extends MovieClip {
public var head:MovieClip;
public var deadbody:MovieClip;
public function Dead_mc(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
head.play();
}
}
}//package
Section 120
//Dust_mc (Dust_mc)
package {
import flash.display.*;
public dynamic class Dust_mc extends MovieClip {
public function Dust_mc(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
}
}
}//package
Section 121
//Error_mc (Error_mc)
package {
import flash.display.*;
public dynamic class Error_mc extends MovieClip {
}
}//package
Section 122
//FinalScene_mc (FinalScene_mc)
package {
import flash.display.*;
public dynamic class FinalScene_mc extends MovieClip {
public var inner:MovieClip;
public var skipFinal:SimpleButton;
public function FinalScene_mc(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package
Section 123
//girl_jump (girl_jump)
package {
import flash.display.*;
public dynamic class girl_jump extends MovieClip {
}
}//package
Section 124
//girl_left (girl_left)
package {
import flash.display.*;
public dynamic class girl_left extends MovieClip {
}
}//package
Section 125
//girl_right (girl_right)
package {
import flash.display.*;
public dynamic class girl_right extends MovieClip {
}
}//package
Section 126
//Gothic (Gothic)
package {
import flash.text.*;
public dynamic class Gothic extends Font {
}
}//package
Section 127
//Hand_mc (Hand_mc)
package {
import flash.display.*;
public dynamic class Hand_mc extends MovieClip {
public var hand:MovieClip;
}
}//package
Section 128
//Help_mc (Help_mc)
package {
import flash.display.*;
public dynamic class Help_mc extends MovieClip {
public var pages:MovieClip;
public var menuBtn:SimpleButton;
}
}//package
Section 129
//LampaContainer (LampaContainer)
package {
import flash.display.*;
public dynamic class LampaContainer extends MovieClip {
}
}//package
Section 130
//Limit (Limit)
package {
import flash.display.*;
public dynamic class Limit extends MovieClip {
}
}//package
Section 131
//MainMenu_mc (MainMenu_mc)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class MainMenu_mc extends MovieClip {
public var menuHelp:SimpleButton;
public var but00:SimpleButton;
public var nemuPlay:SimpleButton;
public var menuTitles:SimpleButton;
public function MainMenu_mc(){
addFrameScript(0, frame1);
}
public function openUrl(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://minijuegos.com/");
navigateToURL(_local2);
trace("here");
}
function frame1(){
but00.addEventListener(MouseEvent.CLICK, openUrl);
}
}
}//package
Section 132
//Marker (Marker)
package {
import flash.display.*;
public dynamic class Marker extends MovieClip {
}
}//package
Section 133
//Mega_flying_normal_mc (Mega_flying_normal_mc)
package {
import flash.display.*;
public dynamic class Mega_flying_normal_mc extends MovieClip {
}
}//package
Section 134
//Mega_flying1_mc (Mega_flying1_mc)
package {
import flash.display.*;
public dynamic class Mega_flying1_mc extends MovieClip {
}
}//package
Section 135
//Mega_flying2_mc (Mega_flying2_mc)
package {
import flash.display.*;
public dynamic class Mega_flying2_mc extends MovieClip {
}
}//package
Section 136
//Mega_flying3_mc (Mega_flying3_mc)
package {
import flash.display.*;
public dynamic class Mega_flying3_mc extends MovieClip {
}
}//package
Section 137
//Mega_flying4_mc (Mega_flying4_mc)
package {
import flash.display.*;
public dynamic class Mega_flying4_mc extends MovieClip {
}
}//package
Section 138
//Mega_sitting_normal_mc (Mega_sitting_normal_mc)
package {
import flash.display.*;
public dynamic class Mega_sitting_normal_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 139
//Mega_sitting1_mc (Mega_sitting1_mc)
package {
import flash.display.*;
public dynamic class Mega_sitting1_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 140
//Mega_sitting2_mc (Mega_sitting2_mc)
package {
import flash.display.*;
public dynamic class Mega_sitting2_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 141
//Mega_sitting3_mc (Mega_sitting3_mc)
package {
import flash.display.*;
public dynamic class Mega_sitting3_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 142
//Mega_sitting4_mc (Mega_sitting4_mc)
package {
import flash.display.*;
public dynamic class Mega_sitting4_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 143
//Metall_flying_mc (Metall_flying_mc)
package {
import flash.display.*;
public dynamic class Metall_flying_mc extends MovieClip {
}
}//package
Section 144
//Metall_flying1_mc (Metall_flying1_mc)
package {
import flash.display.*;
public dynamic class Metall_flying1_mc extends MovieClip {
public var part2:MovieClip;
public var part4:MovieClip;
public var part3:MovieClip;
public var part1:MovieClip;
}
}//package
Section 145
//Metall_sitting_mc (Metall_sitting_mc)
package {
import flash.display.*;
public dynamic class Metall_sitting_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 146
//Metall_sitting1_mc (Metall_sitting1_mc)
package {
import flash.display.*;
public dynamic class Metall_sitting1_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 147
//MovesBonus_mc (MovesBonus_mc)
package {
import flash.display.*;
public dynamic class MovesBonus_mc extends MovieClip {
public var inner:MovieClip;
public function MovesBonus_mc(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package
Section 148
//myStartFont (myStartFont)
package {
import flash.text.*;
public dynamic class myStartFont extends Font {
}
}//package
Section 149
//NextLevel_mc (NextLevel_mc)
package {
import flash.display.*;
public dynamic class NextLevel_mc extends MovieClip {
public var inner:MovieClip;
public function NextLevel_mc(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package
Section 150
//pause_label (pause_label)
package {
import flash.display.*;
public dynamic class pause_label extends MovieClip {
}
}//package
Section 151
//Pause_mini_bt (Pause_mini_bt)
package {
import flash.display.*;
public dynamic class Pause_mini_bt extends SimpleButton {
}
}//package
Section 152
//PauseBlock_mc (PauseBlock_mc)
package {
import flash.display.*;
public dynamic class PauseBlock_mc extends MovieClip {
public var btnPlay:Pause_mini_bt;
public var helpBtn:SimpleButton;
public var exitBtn:SimpleButton;
}
}//package
Section 153
//Preloader_mc (Preloader_mc)
package {
import flash.display.*;
public dynamic class Preloader_mc extends MovieClip {
public var progress:MovieClip;
}
}//package
Section 154
//Red_dieing_mc (Red_dieing_mc)
package {
import flash.display.*;
public dynamic class Red_dieing_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 155
//Red_flying_mc (Red_flying_mc)
package {
import flash.display.*;
public dynamic class Red_flying_mc extends MovieClip {
}
}//package
Section 156
//Red_sitting_mc (Red_sitting_mc)
package {
import flash.display.*;
public dynamic class Red_sitting_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 157
//Results_mc (Results_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Results_mc extends MovieClip {
public var wallpaper:MovieClip;
public var name1:TextField;
public var name2:TextField;
public var name3:TextField;
public var name4:TextField;
public var name5:TextField;
public var name6:TextField;
public var name8:TextField;
public var name7:TextField;
public var name9:TextField;
public var scoreCurrent:TextField;
public var submitBtn:SimpleButton;
public var menuFromResult:SimpleButton;
public var error_clip:Error_mc;
public var score10:TextField;
public var score1:TextField;
public var score2:TextField;
public var score3:TextField;
public var score5:TextField;
public var score6:TextField;
public var score7:TextField;
public var score8:TextField;
public var score9:TextField;
public var score4:TextField;
public var name10:TextField;
public var placeCurrent:TextField;
public var nameInput:TextField;
}
}//package
Section 158
//Satisfaction_mc (Satisfaction_mc)
package {
import flash.display.*;
public dynamic class Satisfaction_mc extends MovieClip {
public var label:MovieClip;
public var spider:MovieClip;
}
}//package
Section 159
//ScoresNew_mc (ScoresNew_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ScoresNew_mc extends MovieClip {
public var scoressTxt:TextField;
}
}//package
Section 160
//ShadowBeforeTutor_mc (ShadowBeforeTutor_mc)
package {
import flash.display.*;
public dynamic class ShadowBeforeTutor_mc extends MovieClip {
public function ShadowBeforeTutor_mc(){
addFrameScript(18, this.frame19);
}
function frame19(){
stop();
}
}
}//package
Section 161
//Shvabra_mc (Shvabra_mc)
package {
import flash.display.*;
public dynamic class Shvabra_mc extends MovieClip {
public var middleLimit:Limit;
public var hitBounds:MovieClip;
public var leftLimit:Limit;
public var bottomLimit:Limit;
public var rightLimit:Limit;
public function Shvabra_mc(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package
Section 162
//Spider_eating_mc (Spider_eating_mc)
package {
import flash.display.*;
public dynamic class Spider_eating_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 163
//Spider_going_mc (Spider_going_mc)
package {
import flash.display.*;
public dynamic class Spider_going_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 164
//Spider_turn_mc (Spider_turn_mc)
package {
import flash.display.*;
public dynamic class Spider_turn_mc extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 165
//SpiderBig_mc (SpiderBig_mc)
package {
import flash.display.*;
public dynamic class SpiderBig_mc extends MovieClip {
}
}//package
Section 166
//SpiderDie_mc (SpiderDie_mc)
package {
import flash.display.*;
public dynamic class SpiderDie_mc extends MovieClip {
public var inner:MovieClip;
public var skipFinal:SimpleButton;
public function SpiderDie_mc(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package
Section 167
//tak (tak)
package {
import flash.media.*;
public dynamic class tak extends Sound {
}
}//package
Section 168
//tik (tik)
package {
import flash.media.*;
public dynamic class tik extends Sound {
}
}//package
Section 169
//TimeInd_mc (TimeInd_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TimeInd_mc extends MovieClip {
public var timeTxt:TextField;
}
}//package
Section 170
//Tutorial_mc (Tutorial_mc)
package {
import flash.events.*;
import flash.display.*;
public dynamic class Tutorial_mc extends MovieClip {
public var nextPageBtn:SimpleButton;
public var skipAndPlay:SimpleButton;
public function Tutorial_mc(){
addFrameScript(0, this.frame1);
}
public function onClick(_arg1:Event):void{
nextFrame();
}
function frame1(){
stop();
this.nextPageBtn.addEventListener(MouseEvent.CLICK, this.onClick);
}
}
}//package
Section 171
//TV_set_mc (TV_set_mc)
package {
import flash.display.*;
public dynamic class TV_set_mc extends MovieClip {
public var tvbody:MovieClip;
public function TV_set_mc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 172
//Wasp_dieing_mc (Wasp_dieing_mc)
package {
import flash.display.*;
public dynamic class Wasp_dieing_mc extends MovieClip {
}
}//package
Section 173
//Wasp_flying_mc (Wasp_flying_mc)
package {
import flash.display.*;
public dynamic class Wasp_flying_mc extends MovieClip {
}
}//package
Section 174
//Wasp_sitting_mc (Wasp_sitting_mc)
package {
import flash.display.*;
public dynamic class Wasp_sitting_mc extends MovieClip {
}
}//package
Section 175
//Wasp_stinging_mc (Wasp_stinging_mc)
package {
import flash.display.*;
public dynamic class Wasp_stinging_mc extends MovieClip {
}
}//package
Section 176
//WaveInd_mc (WaveInd_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class WaveInd_mc extends MovieClip {
public var waveTxt:TextField;
}
}//package
Section 177
//VolumeControl_mc (VolumeControl_mc)
package {
import flash.display.*;
public dynamic class VolumeControl_mc extends MovieClip {
public var slider_mc:MovieClip;
public var volume_mc:MovieClip;
}
}//package