Section 1
//MD5 (classes.crypto.MD5)
package classes.crypto {
import classes.utils.*;
public class MD5 {
private function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private function createBlocks(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
public function hash(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package classes.crypto
Section 2
//BulletEvents (classes.events.BulletEvents)
package classes.events {
import flash.events.*;
public class BulletEvents extends Event {
private var event_value;
public static const BULLET_ACTION_FLY:String = "bullet_fly";
public static const BULLET_CHANGE_ACTION:String = "bullet_change_action";
public static const BULLET_ACTION_STAND:String = "bullet_stand";
public function BulletEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("Bullet Event"));
}
public function get action(){
return (event_value);
}
public function set action(_arg1):void{
event_value = _arg1;
}
}
}//package classes.events
Section 3
//EnemyEvents (classes.events.EnemyEvents)
package classes.events {
import flash.events.*;
public class EnemyEvents extends Event {
private var enemy_value;
public static const ENEMY_ACTION_JUMP:String = "enmey_jump";
public static const ENEMY_ACTION_FLY:String = "enemy_fly";
public static const ENEMY_ACTION_MOVE:String = "enemy_move";
public static const ENEMY_ACTION_STAND:String = "enemy_stand";
public static const ENEMY_ACTION_CRACH:String = "enemy_crach";
public static const ENEMY_ACTION_TARGET:String = "enemy_target";
public static const ENEMY_ACTION_SLEEP:String = "enemy_sleep";
public static const ENEMY_CHANGE_ACTION:String = "enemy_change_action";
public static const ENEMY_CHANGE_DURATION:String = "enemy_change_duration";
public static const ENEMY_ACTION_BOSS:String = "enemy_boss";
public function EnemyEvents(_arg1:String){
super(_arg1);
}
public function set action(_arg1):void{
enemy_value = _arg1;
}
override public function toString():String{
return (formatToString("Enemy Event"));
}
public function get action(){
return (enemy_value);
}
}
}//package classes.events
Section 4
//GameAreaEvents (classes.events.GameAreaEvents)
package classes.events {
import flash.events.*;
public class GameAreaEvents extends Event {
private var game_area_value;
public static const GAME_AREA_MENU:String = "menu";
public static const GAME_AREA_INTRO:String = "intro";
public static const GAME_AREA_RELEASE:String = "release";
public static const GAME_AREA_WIN_INTRO:String = "win_intro";
public static const GAME_AREA_SCORE:String = "score";
public static const GAME_AREA_CHANGE:String = "game_area_update";
public static const GAME_AREA_GAME:String = "game";
public static const GAME_AREA_LANGUAGE:String = "language";
public static const GAME_AREA_MAP:String = "map";
public function GameAreaEvents(_arg1:String){
super(_arg1);
}
public function set gameAreaValue(_arg1):void{
game_area_value = _arg1;
}
override public function toString():String{
return (formatToString("Game Area Event"));
}
public function get gameAreaValue(){
return (game_area_value);
}
}
}//package classes.events
Section 5
//GameEvents (classes.events.GameEvents)
package classes.events {
import flash.events.*;
public class GameEvents extends Event {
private var game_value;
public static const GAME_OVER:String = "game_over";
public static const GAME_CHANGE_LEVEL:String = "game_change_level";
public static const GAME_HELP_CLOSE:String = "game_help_close";
public static const GAME_PAUSE:String = "game_pause";
public static const GAME_CHANGE_SCORE:String = "game_change_score";
public static const GAME_TELEPORT:String = "game_teleport";
public static const GAME_RADAR:String = "game_radar";
public static const GAME_REMOVE_ENEMY:String = "game_remove_enemy";
public static const GAME_ADD_ENEMY:String = "game_add_enemy";
public static const GAME_CHANGE_FINAL_ACTION:String = "game_change_final_action";
public static const GAME_MISSION_COMPLITE:String = "game_mission_complite";
public static const GAME_REMOVE_BONUS:String = "game_remove_bonus";
public static const GAME_HELP_OPEN:String = "game_help_open";
public static const GAME_UPDATE:String = "game_update";
public static const GAME_MISSION_FAIL:String = "game_mission_fail";
public function GameEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("Game Event"));
}
public function set gameValue(_arg1):void{
game_value = _arg1;
}
public function get gameValue(){
return (game_value);
}
}
}//package classes.events
Section 6
//ObjectOfPlanetEvents (classes.events.ObjectOfPlanetEvents)
package classes.events {
import flash.events.*;
public class ObjectOfPlanetEvents extends Event {
private var value;
public static const OBJECT_PLANET_COLLIDE:String = "object_of_planet_collide";
public function ObjectOfPlanetEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("ObjectOfPlanetEvents Event"));
}
public function get action(){
return (this.value);
}
public function set action(_arg1):void{
this.value = _arg1;
}
}
}//package classes.events
Section 7
//PlayerEvents (classes.events.PlayerEvents)
package classes.events {
import flash.events.*;
public class PlayerEvents extends Event {
private var player_value;
public static const PLAYER_COLLIDE:String = "player_collide";
public static const PLAYER_CHANGE_SUPER_ATTACK:String = "player_change_superattack";
public static const PLAYER_CHANGE_ACTION:String = "player_change_action";
public static const PLAYER_ACTION_JUMP:String = "player_jump";
public static const PLAYER_SUPER_ATTACK:String = "player_super_attack";
public static const PLAYER_ACTION_STAND:String = "player_stand";
public static const PLAYER_ACTION_SIT:String = "player_sit";
public static const PLAYER_MINUS_LIVE:String = "player_minus_live";
public static const PLAYER_CHANGE_WEAPON_POWER:String = "player_change_weapon_power";
public static const PLAYER_ACTION_MOVE:String = "player_move";
public static const PLAYER_ACTION_FLY:String = "player_fly";
public static const PLAYER_CHANGE_WEAPON:String = "player_change_weapon";
public static const PLAYER_CHANGE_LIVE:String = "player_change_live";
public function PlayerEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("Player Event"));
}
public function get action(){
return (player_value);
}
public function set action(_arg1):void{
player_value = _arg1;
}
}
}//package classes.events
Section 8
//ScoreEvents (classes.events.ScoreEvents)
package classes.events {
import flash.events.*;
public class ScoreEvents extends Event {
private var score_value;
public static const SCORE_ACTION_SUBMIT:String = "score_action_submit";
public function ScoreEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("Score Event"));
}
public function get action(){
return (score_value);
}
public function set action(_arg1):void{
score_value = _arg1;
}
}
}//package classes.events
Section 9
//StoneEvents (classes.events.StoneEvents)
package classes.events {
import flash.events.*;
public class StoneEvents extends Event {
private var stone_value;
public static const STONE_ACTION_FLY:String = "stone_move";
public static const STONE_CHANGE_ACTION:String = "stone_change_action";
public static const STONE_ACTION_CRACH:String = "stone_fly";
public function StoneEvents(_arg1:String){
super(_arg1);
}
override public function toString():String{
return (formatToString("Stone Event"));
}
public function get action(){
return (stone_value);
}
public function set action(_arg1):void{
stone_value = _arg1;
}
}
}//package classes.events
Section 10
//GravityGenerator (classes.force.GravityGenerator)
package classes.force {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.force.*;
import org.generalrelativity.foam.dynamics.element.*;
public class GravityGenerator implements IForceGenerator {
protected var _torque:Number;
protected var _gravitation:Number;
protected var _thrust:Number;
protected var _goal:IBody;
public function GravityGenerator(_arg1:IBody, _arg2){
_goal = _arg1;
_gravitation = _arg2;
thrust = 0;
torque = 0;
}
public function set thrust(_arg1:Number):void{
_thrust = _arg1;
}
public function set torque(_arg1:Number):void{
_torque = _arg1;
}
public function generate(_arg1:ISimulatable):void{
var v:Vector;
var kof:Number;
var element = _arg1;
try {
v = new Vector((_goal.x - element.x), (_goal.y - element.y));
v.normalize();
kof = _gravitation;
IBody(element).vx = (IBody(element).vx + (v.x * kof));
IBody(element).vy = (IBody(element).vy + (v.y * kof));
} catch(error:TypeError) {
};
}
}
}//package classes.force
Section 11
//gameForm (classes.gamearea.gameForm)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
public class gameForm extends MovieClip {
public function gameForm(){
ini();
}
public function ini():void{
}
public function changeGameAreaEvent(_arg1:String){
var _local2:GameAreaEvents;
_local2 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
_local2.gameAreaValue = _arg1;
stage.dispatchEvent(_local2);
}
public function clearEvents():void{
}
}
}//package classes.gamearea
Section 12
//gameFormIntro (classes.gamearea.gameFormIntro)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
public class gameFormIntro extends gameForm {
public var radar:MovieClip;
public var tel:MovieClip;
public var skip_title_mc:skipBtnText;
public var skip_btn:SimpleButton;
public var wall:MovieClip;
public function gameFormIntro(){
addFrameScript(0, frame1, 34, frame35, 172, frame173, 184, frame185, 390, frame391, 404, frame405, 434, frame435, 453, frame454, 459, frame460);
super();
}
function frame435(){
MovieClip(this["tel"]).play();
}
function frame391(){
stop();
}
public function iniEvents():void{
stage.frameRate = 40;
(this["skip_btn"] as SimpleButton).addEventListener(MouseEvent.CLICK, skipAction);
this.addEventListener(Event.ENTER_FRAME, update);
}
function frame173(){
MovieClip(this["tel"]).play();
stop();
}
function frame185(){
stop();
}
function frame1(){
stop();
}
function frame454(){
stop();
}
function frame460(){
stop();
}
public function skipAction(_arg1:MouseEvent=null):void{
stage.frameRate = Global._framerate;
Global.sound_interface.playSound(null, "s_click");
clearEvents();
super.changeGameAreaEvent(GameAreaEvents.GAME_AREA_MENU);
}
function frame35(){
stop();
}
function frame405(){
MovieClip(this["tel"]).play();
stop();
}
public function update(_arg1:Event=null):void{
if (this.currentFrame == this.totalFrames){
skipAction();
};
if (this.currentFrame >= 1){
(this["skip_btn"] as SimpleButton).visible = true;
(this["skip_title_mc"] as MovieClip).visible = true;
};
}
override public function clearEvents():void{
(this["skip_btn"] as SimpleButton).removeEventListener(MouseEvent.CLICK, skipAction);
this.removeEventListener(Event.ENTER_FRAME, update);
}
override public function ini():void{
(this["skip_btn"] as SimpleButton).visible = false;
(this["skip_title_mc"] as MovieClip).visible = false;
super.ini();
iniEvents();
}
}
}//package classes.gamearea
Section 13
//gameFormLanguage (classes.gamearea.gameFormLanguage)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
import flash.text.*;
public class gameFormLanguage extends gameForm {
public var italicBth:SimpleButton;
public var info_text:TextField;
public var brazileBth:SimpleButton;
public var frenchBth:SimpleButton;
public var mexicoBth:SimpleButton;
public var spanishBth:SimpleButton;
public var russianBth:SimpleButton;
public var australiaBth:SimpleButton;
public var polandBth:SimpleButton;
public var englishBth:SimpleButton;
public var ukraineBth:SimpleButton;
public var portugeseBth:SimpleButton;
public var germanBth:SimpleButton;
public static var arr:Array = new Array();
public static var ESP:String = "ESP";
public static var UKR:String = "UKR";
public static var POL:String = "POL";
public static var RUS:String = "RUS";
public static var PRT:String = "PRT";
public static var DEU:String = "DEU";
public static var FRA:String = "FRA";
public static var ITA:String = "ITA";
public static var ENG:String = "ENG";
public function gameFormLanguage(){
addFrameScript(0, frame1);
super();
}
public function iniEvents():void{
var _local1:String;
var _local2:SimpleButton;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.addEventListener(MouseEvent.CLICK, selectLanguage);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
_local2.addEventListener(MouseEvent.ROLL_OUT, outBtn);
};
}
public function outBtn(_arg1:MouseEvent):void{
var _local2:SimpleButton;
_local2 = (_arg1.target as SimpleButton);
(this["info_text"] as TextField).text = "";
}
function frame1(){
}
public function selectLanguage(_arg1:MouseEvent=null):void{
var _local2:SimpleButton;
Global.sound_interface.playSound(null, "s_click");
clearEvents();
_local2 = (_arg1.target as SimpleButton);
Global._language = arr[_local2.name][2];
super.changeGameAreaEvent(GameAreaEvents.GAME_AREA_INTRO);
}
override public function clearEvents():void{
var _local1:String;
var _local2:SimpleButton;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.removeEventListener(MouseEvent.CLICK, selectLanguage);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
_local2.removeEventListener(MouseEvent.ROLL_OUT, outBtn);
};
}
override public function ini():void{
super.ini();
iniEvents();
}
public function overBtn(_arg1:MouseEvent):void{
var _local2:SimpleButton;
Global.sound_interface.playSound(null, "s_over");
_local2 = (_arg1.target as SimpleButton);
(this["info_text"] as TextField).text = arr[_local2.name][1];
}
public static function checkLanguage(_arg1:String):Boolean{
var _local2:String;
var _local3:Number;
for (_local2 in arr) {
_local3 = (arr[_local2] as Array).indexOf(_arg1);
if (_local3 != -1){
return (true);
};
};
return (false);
}
arr["englishBth"] = ["США и Британия", "English", ENG];
arr["spanishBth"] = ["Испания", "Español", ESP];
arr["italicBth"] = ["Италия", "Italiana", ITA];
arr["russianBth"] = ["Россия", "Русский", RUS];
arr["germanBth"] = ["Германия", "Deutsche", DEU];
arr["frenchBth"] = ["Франция", "Français", FRA];
arr["portugeseBth"] = ["Португалия", "Portuguesa", PRT];
arr["brazileBth"] = ["Бразилия", "Portuguesa", PRT];
arr["mexicoBth"] = ["Мексика", "Español", ESP];
arr["ukraineBth"] = ["Украина", "Українська", UKR];
arr["australiaBth"] = ["Австалия", "English", ENG];
arr["polandBth"] = ["Польша", "Polski", POL];
}
}//package classes.gamearea
Section 14
//gameFormMainMenu (classes.gamearea.gameFormMainMenu)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
public class gameFormMainMenu extends gameForm {
public var viewTopScoreBtn:SimpleButton;
public var putThisGameText_mc:putThisGametext;
public var sendToFriendsBtn:SimpleButton;
public var playGameBtn:SimpleButton;
public var playMoreGamesText_mc:playMoreGamesText;
public var introBtn:SimpleButton;
public var youtubeBtn:SimpleButton;
public var arr:Array;
public var putGameBtn:SimpleButton;
public var viewTopScoreText_mc:viewTopScoreText;
public var gamezheroBtn:SimpleButton;
public var playMoreGamesBtn:SimpleButton;
public var sendToFriendsText_mc:sendToFriendsText;
public var introText_mc:introText;
public var playGametext_mc:playGameText;
public function gameFormMainMenu(){
arr = new Array();
Global._current_level = 0;
Global.clearAll();
arr["sendToFriendsBtn"] = {action:"link", value:Global._urls["send_to_friends"]};
arr["viewTopScoreBtn"] = {action:"link", value:Global._urls["view_top_score"]};
arr["putGameBtn"] = {action:"link", value:Global._urls["put_this_game"]};
arr["gamezheroBtn"] = {action:"link", value:Global._urls["zorro_logo"]};
arr["playMoreGamesBtn"] = {action:"link", value:Global._urls["play_more_games"]};
arr["introBtn"] = {action:"game", value:GameAreaEvents.GAME_AREA_INTRO};
arr["playGameBtn"] = {action:"game", value:GameAreaEvents.GAME_AREA_MAP};
arr["youtubeBtn"] = {action:"link", value:Global._urls["youtube"]};
super();
}
public function iniEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = this[_local1];
_local2.addEventListener(MouseEvent.CLICK, action);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
};
}
public function action(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:Object;
Global.sound_interface.playSound(null, "s_click");
_local2 = _arg1.target.name;
_local3 = arr[_local2];
switch (_local3.action){
case "link":
Global.getURL(_local3.value);
break;
case "game":
super.changeGameAreaEvent(_local3.value);
clearEvents();
break;
};
}
override public function clearEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = this[_local1];
_local2.removeEventListener(MouseEvent.CLICK, action);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
};
}
override public function ini():void{
super.ini();
iniEvents();
}
public function overBtn(_arg1:MouseEvent=null):void{
var _local2:String;
Global.sound_interface.playSound(null, "s_over");
_local2 = _arg1.target.name;
}
}
}//package classes.gamearea
Section 15
//gameFormMap (classes.gamearea.gameFormMap)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
import flash.text.*;
public class gameFormMap extends gameForm {
public var arr:Array;
public var scoreInfo:TextField;
public var mainMenuBtn:SimpleButton;
public var right1Btn:SimpleButton;
public var h1:MovieClip;
public var h2:MovieClip;
public var h3:MovieClip;
public var h4:MovieClip;
public var h5:MovieClip;
public var right2Btn:SimpleButton;
public var left1Btn:SimpleButton;
public var playMoreGamesText_mc:playMoreGamesText;
public var l0:MovieClip;
public var l1:MovieClip;
public var l3:MovieClip;
public var l5:MovieClip;
public var l8:MovieClip;
public var l2:MovieClip;
public var l4:MovieClip;
public var l7:MovieClip;
public var l6:MovieClip;
public var l9:MovieClip;
public var left2Btn:SimpleButton;
public var man:MovieClip;
public var l10:MovieClip;
public var l13:MovieClip;
public var l14:MovieClip;
public var l15:MovieClip;
public var l16:MovieClip;
public var l17:MovieClip;
public var l12:MovieClip;
public var l18:MovieClip;
public var playMoreGamesBtn:SimpleButton;
public var l20:MovieClip;
public var l22:MovieClip;
public var l23:MovieClip;
public var l21:MovieClip;
public var l24:MovieClip;
public var l19:MovieClip;
public var l11:MovieClip;
public var menu_title_mc:mainmenu;
public function gameFormMap(){
var _local1:uint;
var _local2:String;
arr = new Array();
_local1 = 0;
while (_local1 < Global._max_level) {
_local2 = ("l" + _local1);
arr[_local2] = {action:"game", value:GameAreaEvents.GAME_AREA_GAME, index:_local1, how:false};
_local1++;
};
arr["mainMenuBtn"] = {action:"game", value:GameAreaEvents.GAME_AREA_MENU, how:true};
arr["playMoreGamesBtn"] = {action:"link", value:Global._urls["play_more_games"], how:true};
arr["left1Btn"] = {action:"skin", value:-1, index:"Uho", how:true};
arr["right1Btn"] = {action:"skin", value:1, index:"Uho", how:true};
arr["left2Btn"] = {action:"skin", value:-1, index:"Lik", how:true};
arr["right2Btn"] = {action:"skin", value:1, index:"Lik", how:true};
super();
}
public function iniEvents():void{
var _local1:String;
var _local2:*;
var _local3:uint;
var _local4:SimpleButton;
_local3 = 0;
while (_local3 < Global._max_level) {
_local1 = ("l" + _local3);
_local2 = this[_local1];
if (Global._game_stored_data.data["map"][_local3].lock == false){
if (Global._win[_local3]){
_local2.gotoAndStop("win");
_local2.level.text = Global._win[_local3];
} else {
_local2.gotoAndStop("play");
};
_local2.addEventListener(MouseEvent.CLICK, action);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
(_local2 as MovieClip).mouseChildren = false;
(_local2 as MovieClip).buttonMode = true;
(_local2 as MovieClip).useHandCursor = true;
} else {
_local2.gotoAndStop("lock");
};
_local3++;
};
for (_local1 in arr) {
if (arr[_local1].how == true){
_local4 = this[_local1];
_local4.addEventListener(MouseEvent.CLICK, action);
_local4.addEventListener(MouseEvent.ROLL_OVER, overBtn);
};
};
}
public function action(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:Object;
var _local4:MovieClip;
var _local5:*;
Global.sound_interface.playSound(null, "s_click");
_local2 = _arg1.target.name;
_local3 = arr[_local2];
switch (_local3.action){
case "link":
Global.getURL(_local3.value);
break;
case "game":
if (!isNaN(_local3.index)){
Global._current_level = _local3.index;
Global.iniLevel();
super.changeGameAreaEvent(_local3.value);
} else {
if (Global.getGlobalScore() == 0){
super.changeGameAreaEvent(_local3.value);
} else {
super.changeGameAreaEvent(GameAreaEvents.GAME_AREA_SCORE);
};
};
clearEvents();
break;
case "skin":
_local4 = this["man"][_local3.index];
_local5 = (_local4.currentFrame + _local3.value);
if (_local5 <= 0){
_local5 = _local4.totalFrames;
};
if (_local5 > _local4.totalFrames){
_local5 = 1;
};
Global._game_stored_data.data["skin"][_local3.index] = _local5;
_local4.gotoAndStop(_local5);
break;
};
}
public function overBtn(_arg1:MouseEvent=null):void{
var _local2:String;
Global.sound_interface.playSound(null, "s_over");
_local2 = _arg1.target.name;
}
private function iniSkin():void{
var _local1:String;
for (_local1 in Global._game_stored_data.data["skin"]) {
this["man"][_local1].gotoAndStop(Global._game_stored_data.data["skin"][_local1]);
};
}
override public function clearEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = this[_local1];
_local2.removeEventListener(MouseEvent.CLICK, action);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
};
}
override public function ini():void{
var _local1:uint;
var _local2:String;
super.ini();
if (Global._game_stored_data.data["map"] == undefined){
Global._game_stored_data.data["map"] = new Array();
_local1 = 0;
while (_local1 < Global._max_level) {
Global._game_stored_data.data["map"][_local1] = {lock:true};
if (_local1 == 0){
Global._game_stored_data.data["map"][_local1].lock = false;
};
_local1++;
};
};
if (Global._game_stored_data.data["skin"] == undefined){
Global._game_stored_data.data["skin"] = new Object();
for (_local2 in arr) {
if (arr[_local2].action == "skin"){
Global._game_stored_data.data["skin"][arr[_local2].index] = 1;
};
};
};
iniSkin();
iniEvents();
(this["scoreInfo"] as TextField).text = (Global._bonus_info as String);
Global._bonus_info = "";
_local1 = 0;
while (_local1 < Global._live) {
(this[("h" + (_local1 + 1))] as MovieClip).gotoAndStop(2);
_local1++;
};
}
}
}//package classes.gamearea
Section 16
//gameFormRelease (classes.gamearea.gameFormRelease)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
import flash.text.*;
public class gameFormRelease extends gameForm {
public var arr:Array;
public var gamezheroBtn:SimpleButton;
public var t_time2:TextField;
public var t_time:TextField;
public var playGametext_mc:playGameText;
public function gameFormRelease(){
arr = new Array();
arr["gamezheroBtn"] = {action:"link", value:Global._urls["release"]};
super();
}
public function iniEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.addEventListener(MouseEvent.CLICK, action);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
};
this.addEventListener(Event.ENTER_FRAME, update);
}
public function action(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:Object;
Global.sound_interface.playSound(null, "s_click");
_local2 = _arg1.target.name;
_local3 = arr[_local2];
switch (_local3.action){
case "link":
Global.getURL(_local3.value);
break;
case "game":
clearEvents();
super.changeGameAreaEvent(_local3.value);
break;
};
}
public function update(_arg1:Event=null):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:GameAreaEvents;
(this["t_time2"] as TextField).text = Global.release_data.toString();
_local2 = (Global.release_data.getTime() - new Date().getTime());
_local3 = (((_local2 / 1000) / 60) / 60);
_local4 = (((_local2 - (((Math.floor(_local3) * 60) * 60) * 1000)) / 1000) / 60);
_local5 = (((_local2 - (((Math.floor(_local3) * 60) * 60) * 1000)) - ((Math.floor(_local4) * 60) * 1000)) / 1000);
_local6 = String(Math.floor(_local3));
_local7 = String(Math.floor(_local4));
_local8 = String(Math.floor(_local5));
if (String(Math.floor(_local3)).length < 2){
_local6 = ("0" + _local6);
};
if (String(Math.floor(_local4)).length < 2){
_local7 = ("0" + _local7);
};
if (String(Math.floor(_local5)).length < 2){
_local8 = ("0" + _local8);
};
(this["t_time"] as TextField).text = ((((_local6 + ":") + _local7) + ":") + _local8);
if (_local2 <= 1000){
clearEvents();
_local9 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
if (gameFormLanguage.checkLanguage(Global._language) == false){
_local9.gameAreaValue = GameAreaEvents.GAME_AREA_LANGUAGE;
} else {
_local9.gameAreaValue = GameAreaEvents.GAME_AREA_INTRO;
};
stage.dispatchEvent(_local9);
};
}
override public function clearEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.removeEventListener(MouseEvent.CLICK, action);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
};
this.removeEventListener(Event.ENTER_FRAME, update);
}
override public function ini():void{
super.ini();
iniEvents();
}
public function overBtn(_arg1:MouseEvent=null):void{
var _local2:String;
Global.sound_interface.playSound(null, "s_over");
_local2 = _arg1.target.name;
}
}
}//package classes.gamearea
Section 17
//gameFormScore (classes.gamearea.gameFormScore)
package classes.gamearea {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
public class gameFormScore extends gameForm {
public var viewTopScoreBtn:SimpleButton;
public var gameOverText:GameOverCongratulation0015;
public var arr:Array;
public var mainMenuBtn:SimpleButton;
public var viewTopScoreText_mc:viewTopScoreText;
public var gamezheroBtn:SimpleButton;
public var menu_title_mc:mainmenu;
public function gameFormScore(){
arr = new Array();
arr["mainMenuBtn"] = {action:"game", value:GameAreaEvents.GAME_AREA_MENU};
arr["viewTopScoreBtn"] = {action:"link", value:Global._urls["view_top_score"]};
arr["gamezheroBtn"] = {action:"link", value:Global._urls["zorro_logo"]};
super();
}
public function iniEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.addEventListener(MouseEvent.CLICK, action);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
};
stage.addEventListener(ScoreEvents.SCORE_ACTION_SUBMIT, submitScore);
}
public function action(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:Object;
Global.sound_interface.playSound(null, "s_click");
_local2 = _arg1.target.name;
_local3 = arr[_local2];
switch (_local3.action){
case "link":
Global.getURL(_local3.value);
break;
case "game":
clearEvents();
super.changeGameAreaEvent(_local3.value);
break;
};
}
public function submitScore(_arg1:ScoreEvents=null):void{
clearEvents();
super.changeGameAreaEvent(GameAreaEvents.GAME_AREA_MENU);
}
override public function clearEvents():void{
var _local1:String;
var _local2:*;
for (_local1 in arr) {
_local2 = (this[_local1] as SimpleButton);
_local2.removeEventListener(MouseEvent.CLICK, action);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
};
stage.removeEventListener(ScoreEvents.SCORE_ACTION_SUBMIT, submitScore);
}
override public function ini():void{
var _local1:Boolean;
var _local2:uint;
super.ini();
iniEvents();
_local1 = true;
_local2 = 0;
while (_local2 < Global._max_level) {
if (Global._win[_local2] != true){
_local1 = false;
break;
};
_local2++;
};
if (_local1 == true){
this.gotoAndStop("win");
} else {
this.gotoAndStop("lost");
};
}
public function overBtn(_arg1:MouseEvent=null):void{
var _local2:String;
Global.sound_interface.playSound(null, "s_over");
_local2 = _arg1.target.name;
}
}
}//package classes.gamearea
Section 18
//gameFormWinIntro (classes.gamearea.gameFormWinIntro)
package classes.gamearea {
import classes.events.*;
import flash.events.*;
import classes.*;
public class gameFormWinIntro extends gameForm {
public function gameFormWinIntro(){
addFrameScript(195, frame196);
super();
}
public function iniEvents():void{
stage.frameRate = 40;
this.addEventListener(Event.ENTER_FRAME, update);
}
function frame196(){
stop();
}
public function skipAction(_arg1:MouseEvent=null):void{
stage.frameRate = Global._framerate;
clearEvents();
super.changeGameAreaEvent(GameAreaEvents.GAME_AREA_SCORE);
}
public function update(_arg1:Event=null):void{
if (this.currentFrame == this.totalFrames){
skipAction();
};
}
override public function clearEvents():void{
this.removeEventListener(Event.ENTER_FRAME, update);
}
override public function ini():void{
super.ini();
iniEvents();
}
}
}//package classes.gamearea
Section 19
//MultiText (classes.gamearea.MultiText)
package classes.gamearea {
import flash.display.*;
import classes.*;
public class MultiText extends MovieClip {
public function MultiText(){
this.mouseEnabled = false;
gotoAndStop(Global._language);
}
}
}//package classes.gamearea
Section 20
//BtnSoundControl (classes.gameInterface.BtnSoundControl)
package classes.gameInterface {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class BtnSoundControl extends MovieClip {
public var begun:MovieClip;
public var flag:Boolean;// = false
public var current_volume:Number;
public var dx:Number;
public var xMax:Number;// = 46
public var x0:Number;// = 2
public static var CHANGE:String = "change";
public function BtnSoundControl(){
x0 = 2;
xMax = 46;
dx = (xMax - x0);
current_volume = x0;
flag = false;
super();
this.addEventListener(Event.ENTER_FRAME, ini);
}
public function ini(_arg1:Event=null):void{
this.removeEventListener(Event.ENTER_FRAME, ini);
this["begun"].buttonMode = true;
this["begun"].useHandCursor = true;
this["begun"].mouseChildren = false;
this["begun"].addEventListener(MouseEvent.MOUSE_DOWN, downAction);
stage.addEventListener(MouseEvent.MOUSE_UP, upAction);
}
public function moveAction(_arg1:MouseEvent=null):void{
var _local2:Event;
current_volume = (((this["begun"] as MovieClip).x - x0) / dx);
_local2 = new Event(CHANGE);
this.dispatchEvent(_local2);
}
public function downAction(_arg1:MouseEvent=null):void{
var _local2:Number;
_local2 = (this["begun"] as MovieClip).y;
this["begun"].startDrag(false, new Rectangle(x0, _local2, (x0 + dx), 0));
this["begun"].addEventListener(MouseEvent.MOUSE_MOVE, moveAction);
}
public function enable(_arg1:Boolean=true):void{
if (_arg1){
ini();
this["begun"].alpha = 1;
} else {
clearEvents();
this["begun"].enabled = false;
this["begun"].alpha = 0.5;
};
}
public function set volue(_arg1:Number):void{
current_volume = _arg1;
update();
}
public function upAction(_arg1:MouseEvent=null):void{
this["begun"].stopDrag();
this["begun"].removeEventListener(MouseEvent.MOUSE_MOVE, moveAction);
}
public function get volue():Number{
return (current_volume);
}
public function update():void{
(this["begun"] as MovieClip).x = (x0 + Math.round((current_volume * dx)));
}
public function clearEvents():void{
this["begun"].removeEventListener(MouseEvent.MOUSE_DOWN, downAction);
stage.removeEventListener(MouseEvent.MOUSE_UP, upAction);
this["begun"].removeEventListener(MouseEvent.MOUSE_MOVE, moveAction);
}
}
}//package classes.gameInterface
Section 21
//PauseMenu (classes.gameInterface.PauseMenu)
package classes.gameInterface {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import classes.*;
import flash.text.*;
public class PauseMenu extends MovieClip {
public var exitGameBtn:MovieClip;
public var musicGameBtn:MovieClip;
public var playGameBtn:MovieClip;
public var soundControl:BtnSoundControl;
public var txt:TextField;
public var soundGameBtn:MovieClip;
public var musicControl:BtnSoundControl;
private var PAR:MovieClip;
private var arr:Array;
public var gamezheroBtn:MovieClip;
private var PAR2:MovieClip;
private var CURRENT_QUALITY:String;
public static const BTN_EXIT:String = "exitGameBtn";
public static const BTN_PLAY:String = "playGameBtn";
public static const BTN_MUSIC:String = "musicGameBtn";
public static const BTN_SOUND:String = "soundGameBtn";
public static const BTN_GAMEZHERO:String = "gamezheroBtn";
public function PauseMenu(_arg1:MovieClip){
arr = new Array();
super();
addFrameScript(16, frame17);
PAR = _arg1;
PAR2 = MovieClip(_arg1);
PAR2.addChild(this);
arr[BTN_GAMEZHERO] = {action:"link", value:Global._urls["zorro_logo"]};
arr[BTN_PLAY] = {action:"action", value:"continue"};
arr[BTN_EXIT] = {action:"action", value:"menu"};
arr[BTN_SOUND] = {action:"action", value:"sound"};
arr[BTN_MUSIC] = {action:"action", value:"music"};
CURRENT_QUALITY = stage.quality;
stage.quality = "BEST";
Global.music_game.setMusicVolume(0);
this.addEventListener(Event.ENTER_FRAME, ini);
}
public function ini(_arg1:Event=null):void{
this.removeEventListener(Event.ENTER_FRAME, ini);
iniEvents();
musicGameAction(true);
soundGameAction(true);
}
public function buttonAction(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:Object;
Global.sound_interface.playSound(null, "s_click");
_local2 = _arg1.target.name;
_local3 = arr[_local2];
switch (_local3.action){
case "link":
Global.getURL(_local3.value);
break;
case "action":
switch (_local3.value){
case "continue":
playGameAction();
clearEvents();
break;
case "menu":
exitGameAction();
clearEvents();
break;
case "sound":
soundGameAction();
break;
case "music":
musicGameAction();
break;
};
break;
};
}
private function playGameAction():void{
stage.quality = CURRENT_QUALITY;
Global.iniSoundAndMusic();
PAR.pauseGame(false);
action();
}
public function changeSoundControl(_arg1:Event=null):void{
Global._sound_volume_game = (this["soundControl"] as BtnSoundControl).volue;
}
public function iniEvents():void{
var _local1:String;
var _local2:MovieClip;
for (_local1 in arr) {
_local2 = this[_local1];
_local2.buttonMode = true;
_local2.useHandCursor = true;
_local2.mouseChildren = false;
_local2.addEventListener(MouseEvent.CLICK, buttonAction);
_local2.addEventListener(MouseEvent.ROLL_OVER, overBtn);
_local2.addEventListener(MouseEvent.ROLL_OUT, outBtn);
};
(this["soundControl"] as BtnSoundControl).addEventListener(BtnSoundControl.CHANGE, changeSoundControl);
(this["musicControl"] as BtnSoundControl).addEventListener(BtnSoundControl.CHANGE, changeMusicControl);
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function outBtn(_arg1:MouseEvent=null):void{
(this["txt"] as TextField).text = "";
}
public function actionGameOver(_arg1:GameEvents=null):void{
remove();
}
private function soundGameAction(_arg1:Boolean=false):void{
if (_arg1 == false){
Global._game_stored_data.data.soundVolumeFlag = ((Global._game_stored_data.data.soundVolumeFlag == 1)) ? 0 : 1;
};
this["soundGameBtn"].gotoAndStop(((Global._game_stored_data.data.soundVolumeFlag == 1)) ? 2 : 1);
(this["soundControl"] as BtnSoundControl).volue = (Global._game_stored_data.data.soundVolumeFlag) ? Global._sound_volume_game : 0;
(this["soundControl"] as BtnSoundControl).enable(Global._game_stored_data.data.soundVolumeFlag);
}
public function action():void{
(this as MovieClip).addEventListener(Event.ENTER_FRAME, closeAction);
}
public function changeMusicControl(_arg1:Event=null):void{
Global._music_volume_game = (this["musicControl"] as BtnSoundControl).volue;
}
private function closeAction(_arg1:Event):void{
this.gotoAndStop((this.currentFrame + 1));
if (this.currentFrame == this.totalFrames){
(this as MovieClip).removeEventListener(Event.ENTER_FRAME, closeAction);
this.remove();
};
}
function frame17(){
stop();
}
public function remove():void{
this.clearEvents();
if ((PAR2 as MovieClip).contains(this)){
PAR2.removeChild(this);
};
}
private function exitGameAction():void{
stage.quality = CURRENT_QUALITY;
PAR.missionFail();
}
private function musicGameAction(_arg1:Boolean=false):void{
if (_arg1 == false){
Global._game_stored_data.data.musicVolumeFlag = ((Global._game_stored_data.data.musicVolumeFlag == 1)) ? 0 : 1;
};
this["musicGameBtn"].gotoAndStop(((Global._game_stored_data.data.musicVolumeFlag == 1)) ? 2 : 1);
(this["musicControl"] as BtnSoundControl).volue = (Global._game_stored_data.data.musicVolumeFlag) ? Global._music_volume_game : 0;
(this["musicControl"] as BtnSoundControl).enable(Global._game_stored_data.data.musicVolumeFlag);
}
public function clearEvents():void{
var _local1:String;
var _local2:MovieClip;
(this as MovieClip).removeEventListener(Event.ENTER_FRAME, ini);
for (_local1 in arr) {
_local2 = (this[_local1] as MovieClip);
_local2.removeEventListener(MouseEvent.CLICK, action);
_local2.removeEventListener(MouseEvent.ROLL_OVER, overBtn);
_local2.removeEventListener(MouseEvent.ROLL_OUT, outBtn);
};
(this["soundControl"] as BtnSoundControl).removeEventListener(BtnSoundControl.CHANGE, changeSoundControl);
(this["musicControl"] as BtnSoundControl).removeEventListener(BtnSoundControl.CHANGE, changeMusicControl);
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function overBtn(_arg1:MouseEvent=null):void{
var btn_name:String;
var event = _arg1;
Global.sound_interface.playSound(null, "s_over");
btn_name = event.target.name;
try {
(this["txt"] as TextField).text = Global.pauseLanguage[Global._language][btn_name];
} catch(e:Error) {
};
}
}
}//package classes.gameInterface
Section 22
//FlashChecker (classes.gamezhero.FlashChecker)
package classes.gamezhero {
import flash.display.*;
public dynamic class FlashChecker extends MovieClip {
public var b:SimpleButton;
public function FlashChecker(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package classes.gamezhero
Section 23
//GamePreloader (classes.gamezhero.GamePreloader)
package classes.gamezhero {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.ui.*;
public class GamePreloader extends MovieClip {
private var obj:Object;
private var urls:Dictionary;
public var bg:MovieClip;
public var intro:MovieClip;
private var par:MovieClip;
public static const finish:String = "PRELOAD_COMPLETE";
public function GamePreloader(_arg1:MovieClip, _arg2:Object):void{
var _local3:ContextMenu;
var _local4:ContextMenuBuiltInItems;
var _local5:String;
var _local6:ContextMenuItem;
urls = new Dictionary();
super();
obj = _arg2;
par = _arg1;
par.addChild(this);
stage.addEventListener(Event.RESIZE, resizeStage);
this.addEventListener(Event.ENTER_FRAME, iniPreloader);
resizeStage(null);
_local3 = new ContextMenu();
_local3.hideBuiltInItems();
_local4 = _local3.builtInItems;
_local4.quality = true;
for (_local5 in _arg2.gamezhero_menu) {
_local6 = new ContextMenuItem(_local5);
_local6.caption = _local5;
urls[_local6] = _arg2.gamezhero_menu[_local5];
_local6.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, getURLContextMenu);
_local3.customItems.push(_local6);
};
par.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
par.loaderInfo.addEventListener(Event.COMPLETE, comp);
this.parent.contextMenu = _local3;
this.addEventListener(MouseEvent.MOUSE_DOWN, getURLPreloader);
this.useHandCursor = true;
this.buttonMode = true;
}
public function comp(_arg1:Event=null):void{
}
public function action(_arg1:Event=null):void{
var _local2:Event;
this.removeEventListener(Event.ENTER_FRAME, iniPreloader);
stage.removeEventListener(Event.RESIZE, resizeStage);
par.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
par.loaderInfo.removeEventListener(Event.COMPLETE, comp);
_local2 = new Event(finish);
this.dispatchEvent(_local2);
par.removeChild(this);
}
public function getURLPreloader(_arg1:MouseEvent=null):void{
getURL(obj.gamezhero_url);
}
public function getURL(_arg1:String):void{
var _local2:URLRequest;
_local2 = new URLRequest(_arg1);
navigateToURL(_local2, "_blank");
}
public function ioErrorHandler(_arg1:Event):void{
}
public function resizeStage(_arg1:Event):void{
this["bg"].width = Math.round(stage.stageWidth);
this["bg"].height = Math.round(stage.stageHeight);
this["intro"].x = Math.round((stage.stageWidth / 2));
this["intro"].y = Math.round((stage.stageHeight / 2));
}
public function getURLContextMenu(_arg1:ContextMenuEvent=null):void{
getURL(urls[_arg1.target]);
}
public function iniPreloader(_arg1:Event):void{
var _local2:Number;
_local2 = (-128 + (132 * (par.loaderInfo.bytesLoaded / par.loaderInfo.bytesTotal)));
this["intro"]["pr"]["begun"].x = (this["intro"]["pr"]["begun"].x - ((this["intro"]["pr"]["begun"].x - _local2) / 5));
if (par.loaderInfo.bytesLoaded != par.loaderInfo.bytesTotal){
if (this["intro"].currentLabel == "stopFrame"){
this["intro"].stop();
};
} else {
if (this["intro"].currentLabel == "stopFrame"){
this["intro"].play();
};
if (this["intro"].currentFrame == this["intro"].totalFrames){
this["intro"].stop();
action();
};
if (obj.debug){
action();
};
};
}
}
}//package classes.gamezhero
Section 24
//SubmitArea (classes.gamezhero.SubmitArea)
package classes.gamezhero {
import flash.display.*;
import flash.events.*;
import classes.*;
import classes.crypto.*;
import classes.utils.*;
import flash.text.*;
import flash.system.*;
public class SubmitArea extends MovieClip {
public var submitTopScoreText:submitTopScoreHeaderText;
public var infoText:TextField;
public var score;
public var secret:MD5;
public var scoreLibrary:ClassLoader;
public var versionGame:String;// = "1.0"
public function SubmitArea():void{
versionGame = "1.0";
super();
Security.allowDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "*.gamezhero.com");
secret = new MD5();
scoreLibrary = new ClassLoader();
scoreLibrary.addEventListener(ClassLoader.LOAD_ERROR, loadErrorHandler);
scoreLibrary.addEventListener(ClassLoader.CLASS_LOADED, classLoadedHandler);
scoreLibrary.load(((Global._urls["score"] + "?") + new Date().getTime()));
infoText.text = "loading score...";
}
public function loadErrorHandler(_arg1:Event=null):void{
(infoText as TextField).text = "error loading";
}
public function diactivateAllEvents():void{
scoreLibrary.removeEventListener(ClassLoader.LOAD_ERROR, loadErrorHandler);
scoreLibrary.removeEventListener(ClassLoader.CLASS_LOADED, classLoadedHandler);
}
public function continueAction(_arg1:String=""):void{
(parent as MovieClip).submitScore();
Global._game_stored_data.data["player_name"] = _arg1;
}
public function classLoadedHandler(_arg1:Event=null):void{
var _local2:Class;
var _local3:String;
_local2 = scoreLibrary.getClass("Score");
if (!Global._game_stored_data.data["player_name"]){
Global._game_stored_data.data["player_name"] = "";
};
_local3 = Global._language;
score = new _local2((this as MovieClip), Global._game_stored_data.data["player_name"], Global.getGlobalScore(), _local3);
this.addChild(score);
}
}
}//package classes.gamezhero
Section 25
//Music (classes.media.Music)
package classes.media {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class Music {
public var musicInArr:Array;
private var musicArch:Dictionary;
public var musicVolume:Number;// = 0.5
private var musicArchByID:Object;
public var musicOutArr:Array;
public var timerSub:Timer;
private var activeMusic:String;// = ""
public function Music(){
musicArch = new Dictionary();
musicArchByID = new Object();
activeMusic = "";
musicVolume = 0.5;
musicOutArr = new Array();
musicInArr = new Array();
timerSub = new Timer(50, 0);
super();
}
public function stopMusics():void{
var _local1:*;
var _local2:*;
for (_local1 in musicArchByID) {
musicOut(_local1);
};
for (_local2 in musicArch) {
};
(activeMusic = "");
}
public function playMusic(_arg1:String, _arg2:String, _arg3:Number=0):void{
var soundFactory:Sound;
var sndClass:Class;
var id = _arg1;
var sName = _arg2;
var step = _arg3;
if (activeMusic != id){
musicOut(activeMusic);
activeMusic = id;
try {
sndClass = (getDefinitionByName(sName) as Class);
} catch(e:ReferenceError) {
return;
};
soundFactory = (new (sndClass) as Sound);
iniMusic(id, soundFactory, step);
musicIn(activeMusic);
};
}
private function completeHandler(_arg1:Event):void{
var _local2:*;
var _local3:String;
var _local4:Sound;
_local2 = _arg1.target;
if (musicArch[_local2].loopFlag == "infinity"){
_local3 = musicArch[_local2].id;
_local4 = musicArch[_local2].sound;
iniMusic(_local3, _local4);
};
delete musicArch[_local2];
}
public function setMusicVolume(_arg1:Number):void{
var _local2:*;
var _local3:SoundTransform;
musicVolume = _arg1;
for (_local2 in musicArch) {
_local3 = _local2.soundTransform;
_local3.volume = musicVolume;
_local2.soundTransform = _local3;
};
}
public function iniMusic(_arg1:String, _arg2:Sound, _arg3:Number=0):void{
var _local4:Number;
var _local5:SoundChannel;
var _local6:SoundTransform;
_local4 = 1000;
_local5 = _arg2.play(0, _local4);
_local6 = _local5.soundTransform;
_local6.pan = 0;
_local6.volume = ((_arg3)>musicVolume) ? musicVolume : _arg3;
_local5.soundTransform = _local6;
_local5.addEventListener(Event.SOUND_COMPLETE, completeHandler);
musicArch[_local5] = {id:_arg1, sound:_arg2};
musicArchByID[_arg1] = _local5;
}
public function musicOut(_arg1:String):void{
if (musicArchByID[_arg1] != undefined){
musicOutArr.push(_arg1);
timerSub.addEventListener("timer", updateMusicValue);
timerSub.start();
};
}
public function musicIn(_arg1:String):void{
if (musicArchByID[_arg1] != undefined){
musicInArr.push(_arg1);
timerSub.addEventListener("timer", updateMusicValue);
timerSub.start();
};
}
private function updateMusicValue(_arg1:TimerEvent=null):void{
var _local2:Number;
var _local3:SoundTransform;
var _local4:SoundChannel;
_local2 = 0;
while (_local2 < musicInArr.length) {
_local4 = musicArchByID[musicInArr[_local2]];
_local3 = _local4.soundTransform;
_local3.volume = (_local3.volume + 0.025);
_local3.volume = ((_local3.volume)>=musicVolume) ? musicVolume : _local3.volume;
_local4.soundTransform = _local3;
if (_local3.volume == musicVolume){
musicInArr.splice(_local2, 1);
_local2--;
};
_local2++;
};
_local2 = 0;
while (_local2 < musicOutArr.length) {
_local4 = musicArchByID[musicOutArr[_local2]];
_local3 = _local4.soundTransform;
_local3.volume = (_local3.volume - 0.1);
_local3.volume = ((_local3.volume)<=0) ? 0 : _local3.volume;
_local4.soundTransform = _local3;
if (_local3.volume == 0){
_local4.stop();
musicOutArr.splice(_local2, 1);
_local2--;
};
_local2++;
};
if ((((musicInArr.length == 0)) && ((musicOutArr.length == 0)))){
timerSub.removeEventListener("timer", updateMusicValue);
timerSub.stop();
};
}
}
}//package classes.media
Section 26
//SoundFX (classes.media.SoundFX)
package classes.media {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class SoundFX {
private var soundArch:Dictionary;
public var soundVolume:Number;// = 0.5
private var soundArchByID:Object;
public function SoundFX(){
soundArch = new Dictionary();
soundArchByID = new Object();
soundVolume = 0.5;
super();
}
public function stopSounds():void{
var _local1:*;
for (_local1 in soundArch) {
_local1.stop();
_local1.addEventListener(Event.SOUND_COMPLETE, completeHandler);
delete soundArch[_local1];
};
soundArchByID = new Object();
soundArch = new Dictionary();
}
public function iniSound(_arg1, _arg2:Sound, _arg3:Number, _arg4, _arg5:Number):SoundChannel{
var _local6:Number;
var _local7:SoundChannel;
var _local8:SoundTransform;
_local6 = ((_arg4)=="infinity") ? 1000 : _arg4;
_local7 = _arg2.play(0, _local6);
_local8 = _local7.soundTransform;
_local8.pan = _arg3;
_local8.volume = (soundVolume * _arg5);
_local7.soundTransform = _local8;
_local7.addEventListener(Event.SOUND_COMPLETE, completeHandler);
soundArch[_local7] = {id:_arg1, sound:_arg2, loopFlag:_arg4, pan:_arg3, kof:_arg5};
if (_arg1 != null){
soundArchByID[_arg1] = _local7;
};
return (_local7);
}
public function setPanByID(_arg1:String, _arg2:Number):void{
var _local3:*;
var _local4:SoundTransform;
_local3 = soundArchByID[_arg1];
if (_local3 != undefined){
_local4 = _local3.soundTransform;
soundArch[_local3].pan = _arg2;
_local4.pan = _arg2;
_local3.soundTransform = _local4;
};
}
private function completeHandler(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:Sound;
var _local5:*;
var _local6:Number;
var _local7:Number;
_local2 = _arg1.target;
_local3 = soundArch[_local2].id;
if (soundArch[_local2].loopFlag == "infinity"){
_local4 = soundArch[_local2].sound;
_local5 = soundArch[_local2].loopFlag;
_local6 = soundArch[_local2].pan;
_local7 = soundArch[_local2].kof;
iniSound(_local3, _local4, _local5, _local6, _local7);
};
delete soundArch[_local2];
delete soundArchByID[_local3];
}
public function setSoundVolume(_arg1:Number):void{
var _local2:*;
var _local3:SoundTransform;
soundVolume = _arg1;
for (_local2 in soundArch) {
_local3 = _local2.soundTransform;
_local3.volume = (soundVolume * soundArch[_local2].kof);
_local2.soundTransform = _local3;
};
}
public function setVolumeKofByID(_arg1:String, _arg2:Number):void{
var _local3:*;
var _local4:SoundTransform;
_local3 = soundArchByID[_arg1];
if (_local3 != undefined){
soundArch[_local3].kof = _arg2;
_local4 = _local3.soundTransform;
_local4.volume = (soundVolume * soundArch[_local3].kof);
_local3.soundTransform = _local4;
};
}
public function playSound(_arg1, _arg2:String, _arg3=0, _arg4:Number=0, _arg5:Number=1):SoundChannel{
var sndClass:Class;
var soundFactory:Sound;
var id = _arg1;
var sName = _arg2;
var loopFlag = _arg3;
var pan = _arg4;
var kof = _arg5;
if (soundArchByID[id] == undefined){
try {
sndClass = (getDefinitionByName(sName) as Class);
soundFactory = (new (sndClass) as Sound);
} catch(e:ReferenceError) {
return (null);
};
return (iniSound(id, soundFactory, pan, loopFlag, kof));
//unresolved jump
};
return (null);
}
public function removeSoundByID(_arg1:String):void{
var _local2:*;
_local2 = soundArchByID[_arg1];
if (_local2 != undefined){
_local2.stop();
_local2.addEventListener(Event.SOUND_COMPLETE, completeHandler);
delete soundArch[_local2];
};
}
}
}//package classes.media
Section 27
//ClassLoader (classes.utils.ClassLoader)
package classes.utils {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class ClassLoader extends EventDispatcher {
private var loader:Loader;
private var request:URLRequest;
private var swfLib:String;
private var loadedClass:Class;
public static var CLASS_LOADED:String = "classLoaded";
public static var LOAD_ERROR:String = "loadError";
public function ClassLoader(){
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
}
public function getClass(_arg1:String):Class{
var className = _arg1;
try {
return ((loader.contentLoaderInfo.applicationDomain.getDefinition(className) as Class));
} catch(e:Error) {
};
return (null);
}
private function securityErrorHandler(_arg1:Event):void{
dispatchEvent(new Event(ClassLoader.LOAD_ERROR));
}
private function completeHandler(_arg1:Event):void{
dispatchEvent(new Event(ClassLoader.CLASS_LOADED));
}
private function ioErrorHandler(_arg1:Event):void{
dispatchEvent(new Event(ClassLoader.LOAD_ERROR));
}
public function load(_arg1:String):void{
var _local2:LoaderContext;
swfLib = _arg1;
request = new URLRequest(swfLib);
_local2 = new LoaderContext();
_local2.applicationDomain = new ApplicationDomain();
loader.load(request, _local2);
}
}
}//package classes.utils
Section 28
//IntUtil (classes.utils.IntUtil)
package classes.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package classes.utils
Section 29
//Bonus (classes.Bonus)
package classes {
import classes.events.*;
import flash.display.*;
import classes.force.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Bonus extends Ground {
public function Bonus(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "bonus";
_body._type = "bonus";
(this._body as SimpleParticle).addIgnoreType("player");
(this._body as SimpleParticle).addIgnoreType("stone");
(this._body as SimpleParticle).addIgnoreType("bullet");
(this._body as SimpleParticle).addIgnoreType("enemy_0");
(this._body as SimpleParticle).addIgnoreType("enemy_1");
(this._body as SimpleParticle).addIgnoreType("enemy_2");
(this._body as SimpleParticle).addIgnoreType("enemy_3");
(this._body as SimpleParticle).addIgnoreType("enemy_4");
_ground_skin.gotoAndStop(1);
}
override public function remove(_arg1:Boolean=true):void{
if (_arg1 == false){
this.changeGameEvent(GameEvents.GAME_CHANGE_SCORE, _object_score);
this.changeGameEvent(GameEvents.GAME_REMOVE_BONUS);
};
clearEvents();
super.remove();
}
override public function drawInPlanet():void{
}
override public function update(_arg1:GameEvents=null):void{
if (_ground_skin.currentFrame == _ground_skin.totalFrames){
this.remove(false);
} else {
_ground_skin.gotoAndStop((_ground_skin.currentFrame + 1));
};
}
public function updateCollide(_arg1:ObjectOfPlanetEvents){
var _local2:*;
_local2 = _arg1.action;
if (SimpleParticle(_local2._body)._type == "player"){
Global.sound_game.playSound(null, "s_bonus");
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
};
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
super.ini(_arg1);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
}
}
}//package classes
Section 30
//Bullet (classes.Bullet)
package classes {
import classes.events.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
import classes.force.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Bullet extends ObjectOfPlanet implements IGameObject {
public var _type:Number;
public var _pause_counter:Number;
public var _bullet_skin:MovieClip;
public var _bullet_skin_vertices:Array;
public var _bullet_skin_class:String;
public var _collideDetector:IFineCollisionDetector;
public function Bullet(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
var _local5:Point;
var _local6:Number;
var _local7:Number;
var _local8:uint;
super(_arg1, _arg2, _arg3, _arg4, true, 40);
_bullet_skin_class = _arg2["skinClass"];
_bullet_skin_vertices = _arg2["vertices"];
_local5 = this.getPosition();
_local6 = _local5.x;
_local7 = _local5.y;
_body = new RigidBody(_local6, _local7, _object_mass, _bullet_skin_vertices, 0, 0, _object_friction, _object_elasticity, 0, 0);
_body._name = "bullet";
_body._type = "bullet";
_body._goal = this;
(this._body as SimpleParticle).addIgnoreType("player");
(this._body as SimpleParticle).addIgnoreType("help");
(this._body as SimpleParticle).addIgnoreType("bonus");
_type = _arg2.type;
_local8 = 0;
while (_local8 < 5) {
if (_local8 != _type){
(this._body as SimpleParticle).addIgnoreType(("enemy_" + _local8));
};
_local8++;
};
IBody(_body).vx = _arg2["direction"].x;
IBody(_body).vy = _arg2["direction"].y;
IBody(_body).av = ((10 * Math.PI) / 180);
IBody(_body).x = _arg2["pos"].x;
IBody(_body).y = _arg2["pos"].y;
_body.addForceGenerator(_gravity);
_engine.addElement(_body, true, Boolean(Global._rander));
_collideDetector = new SATCollisionFactory().getCollisionDetector(_body, _planet._body);
ini(_arg2);
}
public function changeAction(_arg1:BulletEvents):void{
switch (String(_arg1.action)){
case BulletEvents.BULLET_ACTION_FLY:
break;
case BulletEvents.BULLET_ACTION_STAND:
_bullet_skin.gotoAndStop(2);
break;
};
_object_action = _arg1.action;
}
private function bulletFly(_arg1:BulletEvents):void{
updateParams();
if (Math.abs(IBody(_body).velocity.magnitude) < 0.2){
changeActionEvent(BulletEvents.BULLET_ACTION_STAND);
};
updateSkin(true);
}
public function changeActionEvent(_arg1:String){
var _local2:BulletEvents;
if (_arg1 != _object_action){
_local2 = new BulletEvents(BulletEvents.BULLET_CHANGE_ACTION);
_local2.action = _arg1;
this.dispatchEvent(_local2);
};
}
override public function remove(_arg1:Boolean=true):void{
super.remove(_arg1);
clearEvents();
_engine.removeElement(ISimulatable(_body));
_goal["gameContainer"].removeChild(this);
}
public function update(_arg1:GameEvents=null):void{
this.dispatchEvent(new BulletEvents(String(_object_action)));
}
public function updateCollide(_arg1:ObjectOfPlanetEvents=null):void{
var _local2:*;
var _local3:Number;
_local2 = _arg1.action;
_local3 = Math.sqrt(((_body.vx * _body.vx) + (_body.vy * _body.vy)));
if (SimpleParticle(_local2._body)._type == "stone"){
_local2.minisArmor(_local3);
};
if (SimpleParticle(_local2._body)._type.indexOf("enemy") != -1){
if ((((_local2._type == this._type)) || ((_local2._type == 5)))){
_local2.minisArmor(_local3);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
Global.sound_game.playSound(null, "s_enemy_popal", 0, 0, (_local3 / 30));
};
};
if (!(((SimpleParticle(_local2._body)._type == "player")) || ((SimpleParticle(_local2._body)._type == "help")))){
changeActionEvent(BulletEvents.BULLET_ACTION_STAND);
};
switch (SimpleParticle(_local2._body)._type){
case "stone":
Global.sound_game.playSound(null, "s_popal", 0, 0, (_local3 / 30));
break;
case "planet":
if (_local3 > 10){
Global.sound_game.playSound(null, "s_popal", 0, 0, (_local3 / 100));
};
break;
case "ground":
Global.sound_game.playSound(null, "s_popal", 0, 0, (_local3 / 30));
break;
case "volcan":
Global.sound_game.playSound(null, "s_popal", 0, 0, (_local3 / 30));
break;
case "enemy":
break;
};
}
override public function clearEvents():void{
super.clearEvents();
this.removeEventListener(BulletEvents.BULLET_CHANGE_ACTION, changeAction);
this.removeEventListener(BulletEvents.BULLET_ACTION_STAND, bulletStand);
this.removeEventListener(BulletEvents.BULLET_ACTION_FLY, bulletFly);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
var ClassSkin:Class;
var obj = _arg1;
var how = _arg2;
super.ini(obj);
try {
ClassSkin = (getDefinitionByName(_bullet_skin_class) as Class);
if (ClassSkin != null){
_bullet_skin = MovieClip(new (ClassSkin));
this.addChild(_bullet_skin);
};
} catch(e:Error) {
};
this.addEventListener(BulletEvents.BULLET_CHANGE_ACTION, changeAction);
this.addEventListener(BulletEvents.BULLET_ACTION_STAND, bulletStand);
this.addEventListener(BulletEvents.BULLET_ACTION_FLY, bulletFly);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
changeActionEvent(BulletEvents.BULLET_ACTION_FLY);
}
private function bulletStand(_arg1:BulletEvents):void{
var _local2:Number;
updateParams();
if (_bullet_skin.skin){
_local2 = (_bullet_skin.skin.currentFrame + 1);
if (_local2 >= _bullet_skin.skin.totalFrames){
remove();
} else {
_bullet_skin.skin.gotoAndStop(_local2);
};
};
updateSkin(true);
}
}
}//package classes
Section 31
//Enemy (classes.Enemy)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
import classes.force.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Enemy extends ObjectOfPlanet implements IGameObject {
public var _player:Player;
public var _enemy_armor:Number;
public var _type:Number;
public var _enemy_armor_max:Number;
public var _enemy_strategy:String;
public var _enemy_direction_type:String;
public var _enemy_action:Object;
public var _enemy_move_type:String;
public var _pause_counter:Number;
public var _enemy_live_skin:MovieClip;
public var ENEMY_JUMP_KOF:Number;// = 16
public var _enemy_wave:Array;
public var ENEMY_AV_SPPED_MAX:Number;// = 8
public var _enemy_radius:Number;
public var ENEMY_AV_SPPED_DX:Number;// = 0.4
public var ENEMY_FLY_RADIUS:Number;// = 600
public var _enemy_skin:MovieClip;
public var _enemy_super_attach:uint;// = 10
public var _enemy_skin_class:String;
public var ENEMY_SLIP:Number;// = 0
public var _collideDetector:IFineCollisionDetector;
public var ENEMY_AV_BREAK_KOF:Number;// = 0.1
public var _enemy_child:Array;
public function Enemy(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet, _arg5:Player){
var _local6:Point;
var _local7:Number;
var _local8:Number;
_enemy_action = new Object();
_enemy_child = new Array();
_enemy_wave = new Array();
_enemy_super_attach = 10;
ENEMY_AV_SPPED_MAX = 8;
ENEMY_AV_SPPED_DX = 0.4;
ENEMY_AV_BREAK_KOF = 0.1;
ENEMY_JUMP_KOF = 16;
ENEMY_FLY_RADIUS = 600;
ENEMY_SLIP = 0;
_pause_counter = 0;
ENEMY_AV_SPPED_MAX = _arg2["params"].speed_max;
ENEMY_AV_SPPED_DX = _arg2["params"].speed_dx;
ENEMY_AV_BREAK_KOF = _arg2["params"].brake_kof;
ENEMY_JUMP_KOF = _arg2["params"].jump_kof;
ENEMY_FLY_RADIUS = _arg2["params"].fly_radius;
ENEMY_SLIP = _arg2["params"].slip;
_enemy_skin_class = _arg2["skinClass"];
_player = _arg5;
_enemy_direction_type = _arg2.directionType;
_enemy_strategy = _arg2.strategy;
_enemy_move_type = _arg2.moveType;
_enemy_radius = _arg2["physics"].radius;
_enemy_armor = _arg2.armor;
_enemy_child = _arg2.child;
_enemy_wave = _arg2.wave;
_enemy_action = _arg2.action;
super(_arg1, _arg2, _arg3, _arg4, true, (_enemy_radius * 2));
_local6 = this.getPosition();
_local7 = _local6.x;
_local8 = _local6.y;
_body = new Circle(_local7, _local8, _enemy_radius, _object_mass, 0, 0, _object_friction, _object_elasticity, 0, 0);
_type = _arg2.type;
_body._name = ("enemy_" + _type);
_body._type = ("enemy_" + _type);
_body._goal = this;
_body.addForceGenerator(_gravity);
_engine.addElement(_body, true, Boolean(Global._rander));
_collideDetector = new SATCollisionFactory().getCollisionDetector(_body, _planet._body);
ini(_arg2);
}
public function changeSkinDuration(_arg1:EnemyEvents=null):void{
_enemy_skin.gotoAndStop(_enemy_direction_type);
}
public function changeAction(_arg1:EnemyEvents):void{
switch (String(_arg1.action)){
case EnemyEvents.ENEMY_ACTION_STAND:
_pause_counter = ENEMY_SLIP;
break;
case EnemyEvents.ENEMY_ACTION_JUMP:
_pause_counter = 10;
_body.vx = (_body.vx + (_object_direction.x * ENEMY_JUMP_KOF));
_body.vy = (_body.vy + (_object_direction.y * ENEMY_JUMP_KOF));
jumpSkin();
break;
case EnemyEvents.ENEMY_ACTION_MOVE:
break;
case EnemyEvents.ENEMY_ACTION_FLY:
break;
};
_object_action = _arg1.action;
}
public function iniWaveChild(_arg1:Array, _arg2:Boolean=false):void{
var i:*;
var arr = _arg1;
var how = _arg2;
for (i in arr) {
if (how == false){
arr[i].pos.angle = ((_object_pos_angle + 180) + (i * 2));
arr[i].pos.radius = (_object_pos_radius + (i * 10));
};
try {
arr[i].vx = _body.vx;
arr[i].vy = _body.vy;
} catch(e:Error) {
};
if (ENEMY_FLY_RADIUS){
if (!arr[i].params.fly_radius){
arr[i].params.fly_radius = ENEMY_FLY_RADIUS;
};
};
_goal.createEnemy(arr[i]);
};
}
public function changeActionEvent(_arg1:String){
var _local2:EnemyEvents;
if (_arg1 != _object_action){
_local2 = new EnemyEvents(EnemyEvents.ENEMY_CHANGE_ACTION);
_local2.action = _arg1;
this.dispatchEvent(_local2);
};
}
private function enemyFlying(_arg1:EnemyEvents):void{
updateParams();
updateMove();
if (!isNaN(_object_direction.x)){
if (super._object_pos_radius > ENEMY_FLY_RADIUS){
_body.vx = (_body.vx - (_object_direction.x * ENEMY_AV_SPPED_DX));
_body.vy = (_body.vy - (_object_direction.y * ENEMY_AV_SPPED_DX));
} else {
_body.vx = (_body.vx + (_object_direction.x * ENEMY_AV_SPPED_DX));
_body.vy = (_body.vy + (_object_direction.y * ENEMY_AV_SPPED_DX));
};
};
checkDuration();
updateSkin();
}
private function updateMove():void{
if (_enemy_direction_type == "left"){
this.updateLeftMove(this.ENEMY_AV_SPPED_MAX, this.ENEMY_AV_SPPED_DX);
};
if (_enemy_direction_type == "right"){
this.updateRightMove(this.ENEMY_AV_SPPED_MAX, this.ENEMY_AV_SPPED_DX);
};
}
override public function remove(_arg1:Boolean=true):void{
Global.sound_game.playSound("s_enemy_die", "s_enemy_die");
if (_arg1 == false){
this.changeGameEvent(GameEvents.GAME_CHANGE_SCORE, _object_score);
};
changeGameEvent(GameEvents.GAME_REMOVE_ENEMY, this);
super.remove(_arg1);
clearEvents();
_engine.removeElement(_body);
_goal["gameContainer"].removeChild(this);
}
public function update(_arg1:GameEvents=null):void{
this.dispatchEvent(new EnemyEvents(String(_object_action)));
}
private function checkDuration():void{
var _local1:String;
var _local2:Vector;
var _local3:EnemyEvents;
_local1 = _enemy_direction_type;
if (_enemy_strategy == "intellect"){
_local2 = super.getVectorFromObject(this, _player);
_local2.normalize();
if (_object_direction.cross(_local2) > 0){
_enemy_direction_type = "left";
} else {
_enemy_direction_type = "right";
};
};
if (_enemy_strategy == "coward"){
_local2 = super.getVectorFromObject(this, _player);
_local2.normalize();
if (_object_direction.cross(_local2) < 0){
_enemy_direction_type = "left";
} else {
_enemy_direction_type = "right";
};
};
if (_local1 != _enemy_direction_type){
_local3 = new EnemyEvents(EnemyEvents.ENEMY_CHANGE_DURATION);
this.dispatchEvent(_local3);
};
}
public function jumpSkin():void{
switch (this._type){
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
this._enemy_skin.skin.play();
break;
};
}
public function show(_arg1:GameEvents=null):void{
this.alpha = (this.alpha + 0.2);
this.scaleX = this.alpha;
this.scaleY = this.alpha;
if (this.alpha >= 1){
this.alpha = 1;
this.scaleX = 1;
this.scaleY = 1;
stage.removeEventListener(GameEvents.GAME_UPDATE, show);
};
}
private function enemyBoss(_arg1:EnemyEvents):void{
updateParams();
_body.av = 0;
_body.vx = 0;
_body.vy = 0;
}
private function enemyStand(_arg1:EnemyEvents):void{
updateParams();
_pause_counter--;
if ((((_pause_counter <= 0)) && (checkJump()))){
changeActionEvent(EnemyEvents.ENEMY_ACTION_JUMP);
};
checkDuration();
updateSkin();
}
public function enemyCrach(_arg1:EnemyEvents=null):void{
updateParams();
updateMove();
checkDuration();
updateSkin();
_enemy_live_skin.visible = false;
this.alpha = (this.alpha - 0.2);
this.scaleX = this.alpha;
this.scaleY = this.alpha;
if (this.alpha <= 0){
crach();
this.removeEventListener(EnemyEvents.ENEMY_ACTION_CRACH, enemyCrach);
};
}
private function updateRolling():void{
var _local1:Number;
_local1 = 1;
if (_enemy_direction_type == "left"){
this.updateLeftRolling(this.ENEMY_AV_SPPED_MAX, this.ENEMY_AV_SPPED_DX);
this.updateLeftMove(2, 1);
};
if (_enemy_direction_type == "right"){
this.updateRightRolling(this.ENEMY_AV_SPPED_MAX, this.ENEMY_AV_SPPED_DX);
this.updateRightMove(2, 1);
};
}
private function enemySuperFlying(_arg1:EnemyEvents):void{
var foo:Number;
var event = _arg1;
updateParams();
updateMove();
if (!isNaN(_object_direction.x)){
foo = ENEMY_FLY_RADIUS;
try {
foo = (((this._goal as Game).player._object_pos_radius + this._enemy_radius) + 30);
} catch(e:Error) {
};
if (super._object_pos_radius > foo){
_body.vx = (_body.vx - (_object_direction.x * ENEMY_AV_SPPED_DX));
_body.vy = (_body.vy - (_object_direction.y * ENEMY_AV_SPPED_DX));
} else {
_body.vx = (_body.vx + (_object_direction.x * ENEMY_AV_SPPED_DX));
_body.vy = (_body.vy + (_object_direction.y * ENEMY_AV_SPPED_DX));
};
};
checkDuration();
updateSkin();
}
public function finalAction():void{
if (_enemy_action != null){
this.changeGameEvent(GameEvents.GAME_CHANGE_FINAL_ACTION, _enemy_action.change_strategy);
};
}
public function updateCollide(_arg1:ObjectOfPlanetEvents=null):void{
var _local2:*;
_local2 = _arg1.action;
if ((SimpleParticle(_local2._body)._name == "ground")){
changeDuration();
};
}
private function changeDuration():void{
var _local1:EnemyEvents;
if (_enemy_strategy == "sense"){
if (_enemy_direction_type == "left"){
_enemy_direction_type = "right";
} else {
_enemy_direction_type = "left";
};
_local1 = new EnemyEvents(EnemyEvents.ENEMY_CHANGE_DURATION);
this.dispatchEvent(_local1);
};
}
private function enemyMove(_arg1:EnemyEvents):void{
updateParams();
updateMove();
checkDuration();
updateSkin();
}
public function minusLive(_arg1:PlayerEvents=null):void{
var _local2:Vector;
var _local3:Number;
_local2 = super.getVectorFromObject(this, _player);
if (_arg1.action){
_local3 = (_arg1.action / 4);
} else {
_local3 = 25;
};
_local2.normalize();
_body.vx = (_body.vx + (_local2.x * _local3));
_body.vy = (_body.vy + (_local2.y * _local3));
}
public function changeFinalAction(_arg1:GameEvents):void{
var _local2:*;
_local2 = _arg1.gameValue;
if (_enemy_strategy == "intellect"){
_enemy_strategy = String("coward");
} else {
_enemy_strategy = String("intellect");
};
}
private function enemyRolling(_arg1:EnemyEvents):void{
var _local2:Number;
var _local3:Number;
updateParams();
updateRolling();
checkDuration();
updateSkin(true);
_local2 = (this._enemy_radius + 15);
_local3 = ((this._object_pos_angle_rad - ((Math.PI / 180) * this.rotation)) + Math.PI);
_enemy_live_skin.x = (_local2 * Math.cos(_local3));
_enemy_live_skin.y = (_local2 * Math.sin(_local3));
_enemy_live_skin.rotation = (((_local3 + (Math.PI / 2)) * 180) / Math.PI);
}
public function superAttach(_arg1:GameEvents=null):void{
var event = _arg1;
try {
_enemy_super_attach--;
root.x = (7 - (Math.random() * 14));
root.y = (7 - (Math.random() * 14));
if (_enemy_super_attach <= 0){
root.x = 0;
root.y = 0;
stage.removeEventListener(GameEvents.GAME_UPDATE, superAttach);
};
} catch(e:Error) {
};
}
public function minisArmor(_arg1:Number=0):void{
_enemy_armor = (_enemy_armor - 1);
if (_enemy_wave[_enemy_armor]){
_enemy_super_attach = 10;
stage.addEventListener(GameEvents.GAME_UPDATE, superAttach);
iniWaveChild(_enemy_wave[_enemy_armor], true);
Global.sound_game.playSound(null, "s_wave");
};
if (_enemy_armor <= 0){
_enemy_armor = 0;
changeActionEvent(EnemyEvents.ENEMY_ACTION_CRACH);
};
_enemy_live_skin.gotoAndStop((Math.round(((100 * _enemy_armor) / _enemy_armor_max)) + 1));
}
public function crach():void{
iniWaveChild(_enemy_child);
finalAction();
remove(false);
}
override public function clearEvents():void{
root.x = 0;
root.y = 0;
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_UPDATE, show);
this.removeEventListener(EnemyEvents.ENEMY_CHANGE_ACTION, changeAction);
stage.removeEventListener(PlayerEvents.PLAYER_MINUS_LIVE, minusLive);
stage.removeEventListener(PlayerEvents.PLAYER_SUPER_ATTACK, minusLive);
stage.removeEventListener(GameEvents.GAME_CHANGE_FINAL_ACTION, changeFinalAction);
switch (this._enemy_move_type){
case "jumping":
this.removeEventListener(EnemyEvents.ENEMY_ACTION_JUMP, enemyJump);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_STAND, enemyStand);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyMove);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFly);
break;
case "sleep":
this.removeEventListener(EnemyEvents.ENEMY_ACTION_JUMP, enemyJump);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_STAND, enemyStand);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyMove);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFly);
break;
case "superflying":
this.removeEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemySuperFlying);
break;
case "flying":
this.removeEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFlying);
break;
case "rolling":
this.removeEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyRolling);
break;
};
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
this.removeEventListener(EnemyEvents.ENEMY_CHANGE_DURATION, changeSkinDuration);
this.removeEventListener(EnemyEvents.ENEMY_ACTION_CRACH, enemyCrach);
stage.removeEventListener(GameEvents.GAME_UPDATE, superAttach);
}
private function enemyFly(_arg1:EnemyEvents):void{
updateParams();
updateMove();
_pause_counter--;
if ((((_pause_counter <= 0)) && (checkJump()))){
changeActionEvent(EnemyEvents.ENEMY_ACTION_STAND);
};
checkDuration();
updateSkin();
}
private function enemyJump(_arg1:EnemyEvents):void{
updateParams();
updateMove();
if (checkJump()){
changeActionEvent(EnemyEvents.ENEMY_ACTION_FLY);
};
checkDuration();
updateSkin();
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
var ClassSkin:Class;
var obj = _arg1;
var how = _arg2;
super.ini(obj);
try {
ClassSkin = (getDefinitionByName(_enemy_skin_class) as Class);
if (ClassSkin != null){
_enemy_skin = MovieClip(new (ClassSkin));
_enemy_skin.gotoAndStop(_enemy_direction_type);
this.addChild(_enemy_skin);
};
} catch(e:Error) {
};
_enemy_live_skin = new LiveEnemy();
_enemy_live_skin.gotoAndStop(100);
_enemy_armor_max = _enemy_armor;
this.addChild(_enemy_live_skin);
_enemy_live_skin.y = (_enemy_live_skin.y - (this._enemy_radius + 15));
stage.addEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_UPDATE, show);
this.addEventListener(EnemyEvents.ENEMY_CHANGE_ACTION, changeAction);
stage.addEventListener(PlayerEvents.PLAYER_MINUS_LIVE, minusLive);
stage.addEventListener(PlayerEvents.PLAYER_SUPER_ATTACK, minusLive);
stage.addEventListener(GameEvents.GAME_CHANGE_FINAL_ACTION, changeFinalAction);
switch (this._enemy_move_type){
case "jumping":
this.addEventListener(EnemyEvents.ENEMY_ACTION_JUMP, enemyJump);
this.addEventListener(EnemyEvents.ENEMY_ACTION_STAND, enemyStand);
this.addEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyMove);
this.addEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFly);
changeActionEvent(EnemyEvents.ENEMY_ACTION_FLY);
break;
case "sleep":
ENEMY_AV_SPPED_MAX = 1;
ENEMY_AV_SPPED_DX = 1;
ENEMY_AV_BREAK_KOF = 1;
ENEMY_JUMP_KOF = 0;
ENEMY_SLIP = 0;
this.addEventListener(EnemyEvents.ENEMY_ACTION_JUMP, enemyJump);
this.addEventListener(EnemyEvents.ENEMY_ACTION_STAND, enemyStand);
this.addEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyMove);
this.addEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFly);
changeActionEvent(EnemyEvents.ENEMY_ACTION_FLY);
break;
case "flying":
this.addEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemyFlying);
changeActionEvent(EnemyEvents.ENEMY_ACTION_FLY);
_body.removeForceGenerator(_gravity);
break;
case "superflying":
this.addEventListener(EnemyEvents.ENEMY_ACTION_FLY, enemySuperFlying);
changeActionEvent(EnemyEvents.ENEMY_ACTION_FLY);
_body.removeForceGenerator(_gravity);
break;
case "rolling":
this.addEventListener(EnemyEvents.ENEMY_ACTION_MOVE, enemyRolling);
changeActionEvent(EnemyEvents.ENEMY_ACTION_MOVE);
break;
case "boss":
this.addEventListener(EnemyEvents.ENEMY_ACTION_BOSS, enemyBoss);
changeActionEvent(EnemyEvents.ENEMY_ACTION_BOSS);
break;
};
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
this.addEventListener(EnemyEvents.ENEMY_CHANGE_DURATION, changeSkinDuration);
this.addEventListener(EnemyEvents.ENEMY_ACTION_CRACH, enemyCrach);
this.alpha = 0;
this.scaleX = 0;
this.scaleY = 0;
changeGameEvent(GameEvents.GAME_ADD_ENEMY, this);
Global.sound_game.playSound(null, "s_enemy_show");
}
public function attackSkin():void{
Global.sound_game.playSound("attack", ("s_enemy_atack" + Math.round((1 + Math.random()))));
switch (this._type){
case 0:
break;
case 1:
this._enemy_skin.skin.play();
break;
case 2:
break;
case 3:
break;
case 4:
break;
};
}
}
}//package classes
Section 32
//Exit (classes.Exit)
package classes {
import classes.events.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import classes.force.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Exit extends Stone {
public var helpID:Number;// = 0
public var _colideFlag:Boolean;// = false
public var _helpFlag:Boolean;// = false
public var _collideDetector:IFineCollisionDetector;
public function Exit(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
_colideFlag = false;
_helpFlag = false;
helpID = 0;
helpID = Number(_arg2.helpID);
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "exit";
_body._type = "exit";
(this._body as SimpleParticle).addIgnoreType("player");
(this._body as SimpleParticle).addIgnoreType("stone");
(this._body as SimpleParticle).addIgnoreType("bullet");
(this._body as SimpleParticle).addIgnoreType("enemy_0");
(this._body as SimpleParticle).addIgnoreType("enemy_1");
(this._body as SimpleParticle).addIgnoreType("enemy_2");
(this._body as SimpleParticle).addIgnoreType("enemy_3");
(this._body as SimpleParticle).addIgnoreType("enemy_4");
(this._body as SimpleParticle).addIgnoreType("teleport");
(this._body as SimpleParticle).addIgnoreType("volcan");
(this._body as SimpleParticle).addIgnoreType("bonus");
this._stone_skin.gotoAndStop(1);
_collideDetector = new SATCollisionFactory().getCollisionDetector(_body, (Global._game as Game).player._body);
}
override public function update(_arg1:GameEvents=null):void{
var _local2:Boolean;
super.update(_arg1);
_local2 = _collideDetector.hasCollision();
if (!_local2){
_colideFlag = false;
this._stone_skin.gotoAndStop((this._stone_skin.currentFrame - 1));
} else {
_colideFlag = true;
this._stone_skin.gotoAndStop((this._stone_skin.currentFrame + 1));
if (this._stone_skin.currentFrame == this._stone_skin.totalFrames){
Global.sound_game.playSound("lift", "s_lift");
};
if (((!((helpID == 0))) && ((_helpFlag == false)))){
_helpFlag = true;
changeGameEvent(GameEvents.GAME_HELP_OPEN, helpID);
};
};
}
public function teleport(_arg1:GameEvents=null):void{
if (_colideFlag){
this.changeGameEvent(GameEvents.GAME_MISSION_COMPLITE);
};
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_TELEPORT, teleport);
}
override public function stoneFly(_arg1:StoneEvents=null):void{
updateParams();
updateSkin(false);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
super.ini(_arg1);
stage.addEventListener(GameEvents.GAME_TELEPORT, teleport);
}
}
}//package classes
Section 33
//ExitArrow (classes.ExitArrow)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import flash.geom.*;
public class ExitArrow extends MovieClip {
public var goal:MovieClip;
public var target:MovieClip;
public function ExitArrow(_arg1:MovieClip, _arg2:MovieClip, _arg3:Number, _arg4:Number){
addFrameScript(9, frame10);
goal = _arg1;
target = _arg2;
goal.addChild(this);
this.x = _arg3;
this.y = _arg4;
update();
ini();
}
public function ini():void{
stage.addEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
remove();
}
function frame10(){
stop();
}
public function remove():void{
goal.removeChild(this);
}
public function update(_arg1:GameEvents=null){
var _local2:Vector;
var _local3:Point;
var _local4:Vector;
var _local5:Number;
var _local6:Number;
_local2 = new Vector(this.x, this.y);
_local3 = new Point(target.x, target.y);
_local3 = target.parent.localToGlobal(_local3);
_local4 = new Vector(_local3.x, _local3.y);
_local5 = 0;
_local6 = 0;
if (_local3.x < 0){
_local5 = 1;
_local3.x = 0;
} else {
if (_local3.x > Global._game_width){
_local5 = 1;
_local3.x = Global._game_width;
} else {
_local5 = 0;
};
};
if (_local3.y < 0){
_local6 = 1;
_local3.y = 0;
} else {
if (_local3.y > Global._game_height){
_local6 = 1;
_local3.y = Global._game_height;
} else {
_local6 = 0;
};
};
if (((!(_local6)) && (!(_local5)))){
_local3.x = Global._game_width_2;
_local3.y = (Global._game_height_2 - 50);
};
this.x = (this.x - ((this.x - _local3.x) / 20));
this.y = (this.y - ((this.y - _local3.y) / 20));
this.rotation = ((_local2.getAngle(_local4) * 180) / Math.PI);
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
}
}//package classes
Section 34
//Game (classes.Game)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.*;
import org.generalrelativity.foam.dynamics.force.*;
import flash.events.*;
import org.generalrelativity.foam.dynamics.element.*;
import classes.force.*;
import flash.utils.*;
import classes.gameInterface.*;
public class Game extends MovieClip {
private var bullet:Array;
private var gravityGenerator:GravityGenerator;
private var volcan:Array;
private var bonus:Array;
public var score_info:ScoreInfo;
private var help:Array;
private var stars:Stars;
private var engine:Foam;
private var amount_bonus:Number;
private var ground:Array;
private var pauseFlag:Boolean;// = false
private var gameTimer:Timer;
private var enemy:Array;
public var planet:Planet;
public var dxAngle:Number;// = 0
public var gameContainer:MovieClip;
private var stone:Array;
private var amount_enemys:Number;// = 0
private var iteration:Number;// = 0
public var player:Player;
public function Game(){
iteration = 0;
dxAngle = 0;
pauseFlag = false;
amount_enemys = 0;
super();
this.addEventListener(Event.ENTER_FRAME, iniGame);
}
public function removeAllGameObjects():void{
Global.sound_interface.stopSounds();
gameTimer.removeEventListener("timer", updateGame);
gameTimer.stop();
}
public function pauseGame(_arg1:Boolean):void{
var _local2:GameEvents;
var _local3:*;
if (pauseFlag != _arg1){
pauseFlag = _arg1;
if (pauseFlag){
gameTimer.stop();
_local3 = new PauseMenu(MovieClip(this));
} else {
gameTimer.start();
pauseFlag = false;
};
_local2 = new GameEvents(GameEvents.GAME_PAUSE);
_local2.gameValue = pauseFlag;
stage.dispatchEvent(_local2);
};
}
public function removeBonus(_arg1:GameEvents=null){
amount_bonus--;
}
public function activateAction(_arg1:Event=null):void{
}
public function bmpZanaves():void{
var _local1:Number;
var _local2:Number;
var _local3:*;
var _local4:MovieClip;
var _local5:Bitmap;
_local1 = Global._game_width;
_local2 = Global._game_height;
_local3 = new BitmapData(_local1, _local2, true, 0xFFFFFF);
_local3.draw(root);
_local4 = new MovieClip();
_local5 = new Bitmap(_local3, "auto", true);
_local4.addChild((_local5 as DisplayObject));
this.addChild(_local4);
}
public function onFoamStep(_arg1:Event=null):void{
}
public function exitGame(_arg1:Number=0):void{
var _local2:String;
_local2 = "win";
if (_arg1 == 1){
_local2 = "win2";
};
}
public function createVolcan(_arg1:Object):void{
var _local2:Volcan;
_local2 = new Volcan(this, _arg1, gravityGenerator, planet);
}
public function createHelp(_arg1:Object):void{
var _local2:HelpGround;
_local2 = new HelpGround(this, _arg1, gravityGenerator, planet);
}
public function createEnemy(_arg1:Object):void{
var _local2:Enemy;
amount_enemys++;
_local2 = new Enemy(this, _arg1, gravityGenerator, planet, player);
}
public function createTeleport(_arg1:Object):Teleport{
var _local2:Teleport;
_local2 = new Teleport(this, _arg1, gravityGenerator, planet);
return (_local2);
}
public function updateGame(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Vector;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
iteration++;
engine.stepForward();
stage.dispatchEvent(new GameEvents(GameEvents.GAME_UPDATE));
_arg1.updateAfterEvent();
_local2 = stage.mouseX;
_local3 = stage.mouseY;
if (_local2 > Global._game_width){
_local2 = Global._game_width;
} else {
if (_local2 < 0){
_local2 = 0;
};
};
if (_local3 > Global._game_height){
_local3 = Global._game_height;
} else {
if (_local3 < 0){
_local3 = 0;
};
};
_local4 = ((180 / Math.PI) * Math.atan((Global._game_width_2 / player._object_pos_radius)));
_local5 = (_local2 / Global._game_width);
_local6 = (_local4 - ((_local4 * 2) * _local5));
dxAngle = (dxAngle - ((dxAngle - _local6) / 20));
_local7 = ((-(player._object_pos_angle) + 90) + dxAngle);
_local8 = new Vector((_local2 - Global._game_width_2), (_local3 - Global._game_height_2));
_local9 = (0.45 * (Math.abs(_local8.magnitude) / Global._game_width_2));
_local10 = (1 - _local9);
if (!isNaN(_local7)){
this["gameContainer"].rotation = (this["gameContainer"].rotation - (this["gameContainer"].rotation - _local7));
stars.rotation = this["gameContainer"].rotation;
_local11 = (_local10 * ((planet._planet_radius + (player._object_pos_radius - planet._planet_radius)) - 80));
_local12 = ((Global._game_height * (1 - ((0.5 * _local3) / Global._game_height))) + _local11);
_local13 = (Global._game_width_2 + (100 - (200 * _local5)));
this["gameContainer"].y = (this["gameContainer"].y - ((this["gameContainer"].y - _local12) / 10));
this["gameContainer"].x = (this["gameContainer"].x - ((this["gameContainer"].x - _local13) / 10));
this["gameContainer"].scaleX = (this["gameContainer"].scaleX - ((this["gameContainer"].scaleX - _local10) / 10));
this["gameContainer"].scaleY = this["gameContainer"].scaleX;
};
}
public function createBonus(_arg1:Object):void{
var _local2:Bonus;
amount_bonus++;
_local2 = new Bonus(this, _arg1, gravityGenerator, planet);
}
public function createJumper(_arg1:Object):void{
var _local2:Jumper;
_local2 = new Jumper(this, _arg1, gravityGenerator, planet);
}
public function createExit(_arg1:Object):void{
var _local2:Exit;
var _local3:ExitArrow;
_local2 = new Exit(this, _arg1, gravityGenerator, planet);
this.player.updateDepth();
_local3 = new ExitArrow(this, _local2, Global._game_width_2, 100);
}
public function createGround(_arg1:Object):void{
var _local2:Ground;
_local2 = new Ground(this, _arg1, gravityGenerator, planet);
}
public function clearEvents():void{
gameTimer.stop();
gameTimer.removeEventListener("timer", updateGame);
engine.removeEventListener(Foam.STEP, onFoamStep);
stage.removeEventListener(GameEvents.GAME_REMOVE_ENEMY, checkFinish);
stage.removeEventListener(GameEvents.GAME_REMOVE_BONUS, removeBonus);
stage.removeEventListener(GameEvents.GAME_MISSION_COMPLITE, missionComplite);
stage.removeEventListener(GameEvents.GAME_MISSION_FAIL, missionFail);
stage.removeEventListener(Event.DEACTIVATE, deactivateAction);
stage.removeEventListener(Event.ACTIVATE, activateAction);
this.removeEventListener(Event.ENTER_FRAME, iniGame);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
}
public function createStone(_arg1:Object):void{
var _local2:Stone;
_local2 = new Stone(this, _arg1, gravityGenerator, planet);
}
public function deactivateAction(_arg1:Event=null):void{
pauseGame(true);
}
public function checkFinish(_arg1:GameEvents=null){
var _local2:Number;
amount_enemys--;
if (amount_enemys == 0){
_local2 = Global._current_level;
createExit(Global._levels[_local2]["exit"]);
};
}
public function missionFail(_arg1:GameEvents=null):void{
var _local2:GameAreaEvents;
var _local3:int;
var _local4:GameEvents;
clearEvents();
bmpZanaves();
_local2 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
_local3 = 0;
if (Global.setNextLive() == -1){
_local3 = -1;
_local2.gameAreaValue = GameAreaEvents.GAME_AREA_SCORE;
} else {
_local3 = 0;
_local2.gameAreaValue = GameAreaEvents.GAME_AREA_MAP;
};
Global.setLevelScore(_local3);
stage.dispatchEvent(_local2);
_local4 = new GameEvents(GameEvents.GAME_OVER);
stage.dispatchEvent(_local4);
}
public function keyDownAction(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 27)) || ((_arg1.keyCode == 80)))){
pauseGame(true);
};
}
private function createLevel():void{
var _local1:Number;
var _local2:Number;
var _local3:Array;
var _local4:uint;
amount_bonus = 0;
_local1 = Global._current_level;
this["gameContainer"].x = Global._levels[_local1]["planet"].pos.x;
this["gameContainer"].y = Global._levels[_local1]["planet"].pos.y;
stars = new Stars(this, Global._levels[_local1]["planet"]);
planet = new Planet(this, Global._levels[_local1]["planet"]);
gravityGenerator = new GravityGenerator((planet._body as IBody), Global._levels[_local1]["planet"].gravitation);
Global._gravity_generator = gravityGenerator;
player = new Player(this, Global._levels[_local1]["player"], gravityGenerator, planet);
_local2 = 0;
while (_local2 < Global._levels[_local1]["ground"].length) {
createGround(Global._levels[_local1]["ground"][_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["volcan"].length) {
createVolcan(Global._levels[_local1]["volcan"][_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["jumper"].length) {
createJumper(Global._levels[_local1]["jumper"][_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["bonus"].length) {
createBonus(Global._levels[_local1]["bonus"][_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["help"].length) {
createHelp(Global._levels[_local1]["help"][_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["stone"].length) {
createStone(Global._levels[_local1]["stone"][_local2]);
_local2++;
};
_local3 = new Array();
_local2 = 0;
while (_local2 < Global._levels[_local1]["teleport"].length) {
_local3.push(createTeleport(Global._levels[_local1]["teleport"][_local2]));
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["teleport"].length) {
_local4 = Global._levels[_local1]["teleport"][_local2]["goto"];
(_local3[_local2] as Teleport).nextTeleport((_local3[_local4] as Teleport));
_local2++;
};
_local2 = 0;
while (_local2 < Global._levels[_local1]["enemy"].length) {
createEnemy(Global._levels[_local1]["enemy"][_local2]);
_local2++;
};
player.top();
engine.simulate();
gameTimer.start();
}
public function missionComplite(_arg1:GameEvents=null):void{
var _local2:GameAreaEvents;
var _local3:GameEvents;
clearEvents();
bmpZanaves();
Global.setLevelScore(1, iteration, amount_bonus, this.player._player_live);
_local2 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
if (Global.setNextLevel() == -1){
_local2.gameAreaValue = GameAreaEvents.GAME_AREA_WIN_INTRO;
} else {
_local2.gameAreaValue = GameAreaEvents.GAME_AREA_MAP;
};
stage.dispatchEvent(_local2);
_local3 = new GameEvents(GameEvents.GAME_OVER);
stage.dispatchEvent(_local3);
}
private function iniGame(_arg1:Event):void{
var _local2:GameEvents;
activateAction();
this.removeEventListener(Event.ENTER_FRAME, iniGame);
iteration = 0;
gameTimer = new Timer(Global._iteratioins, 0);
gameTimer.addEventListener("timer", updateGame);
engine = (new Foam() as Foam);
engine.addEventListener(Foam.STEP, onFoamStep, false, 0, true);
engine.useMouseDragger(false);
this["gameContainer"].addChild(engine);
engine.useMouseDragger(true);
engine.solverIterations = 1;
engine.addGlobalForceGenerator(new Gravity(new Vector(0, 0)));
engine.addGlobalForceGenerator(new Friction(0.01));
stage.addEventListener(GameEvents.GAME_REMOVE_ENEMY, checkFinish);
stage.addEventListener(GameEvents.GAME_REMOVE_BONUS, removeBonus);
stage.addEventListener(GameEvents.GAME_MISSION_COMPLITE, missionComplite);
stage.addEventListener(GameEvents.GAME_MISSION_FAIL, missionFail);
stage.addEventListener(Event.DEACTIVATE, deactivateAction);
stage.addEventListener(Event.ACTIVATE, activateAction);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
Global.iniGame(this, engine);
createLevel();
}
}
}//package classes
Section 35
//GameArea (classes.GameArea)
package classes {
import classes.events.*;
import flash.display.*;
import flash.events.*;
import flash.net.*;
import classes.gamearea.*;
public class GameArea extends MovieClip {
public var bg:Stars;
public var gOpen:Gate;
public var lang_mc:gameFormLanguage;
public var planet:Planet;
public var gClose:Gate;
public var game:Game;
public function GameArea(){
ini();
}
public function closeGate():void{
gClose = new Gate(this, true);
gOpen = null;
}
private function onReceivedError(_arg1:SecurityErrorEvent=null):void{
iniRelese();
}
private function createMask(){
var _local1:Sprite;
_local1 = new Sprite();
_local1.graphics.lineStyle(1, 0xFF0000, 100);
_local1.graphics.beginFill(0xFF0000, 100);
_local1.graphics.moveTo(0, 0);
_local1.graphics.lineTo(Global._game_width, 0);
_local1.graphics.lineTo(Global._game_width, Global._game_height);
_local1.graphics.lineTo(0, Global._game_height);
_local1.graphics.moveTo(0, 0);
_local1.visible = false;
parent.addChild(_local1);
this.mask = _local1;
}
private function ini():void{
var s_lc:LocalConnection;
createMask();
this.gotoAndStop(1);
stage.addEventListener(GameAreaEvents.GAME_AREA_CHANGE, changeGameArea);
if (checkReleaseGamezhero() == true){
iniGoto();
} else {
s_lc = new LocalConnection();
s_lc.addEventListener(StatusEvent.STATUS, onConnStatus);
s_lc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onReceivedError);
try {
s_lc.send(("gamezhero1" + String(Global.gamezhero_code)), "checkPopUp");
} catch(error:ArgumentError) {
iniRelese();
};
};
}
private function iniGoto():void{
var _local1:GameAreaEvents;
_local1 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
if (gameFormLanguage.checkLanguage(Global._language) == false){
_local1.gameAreaValue = GameAreaEvents.GAME_AREA_LANGUAGE;
} else {
_local1.gameAreaValue = GameAreaEvents.GAME_AREA_INTRO;
};
changeGameArea(_local1);
}
private function iniRelese():void{
var _local1:GameAreaEvents;
_local1 = new GameAreaEvents(GameAreaEvents.GAME_AREA_CHANGE);
_local1.gameAreaValue = GameAreaEvents.GAME_AREA_RELEASE;
changeGameArea(_local1);
}
private function onConnStatus(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
iniGoto();
break;
case "error":
iniRelese();
break;
};
}
public function changeGameArea(_arg1:GameAreaEvents=null):void{
var _local2:String;
_local2 = _arg1.gameAreaValue;
if (!gOpen){
gOpen = new Gate(this, false, this, _local2, closeGate);
stage.quality = StageQuality.HIGH;
switch (_local2){
case GameAreaEvents.GAME_AREA_INTRO:
Global.music_game.stopMusics();
Global.music_interface.playMusic("interface", "m_interface");
break;
case GameAreaEvents.GAME_AREA_MAP:
Global.music_game.stopMusics();
Global.music_interface.playMusic("interface", "m_interface");
break;
case GameAreaEvents.GAME_AREA_MENU:
Global.music_game.stopMusics();
Global.music_interface.playMusic("interface", "m_interface");
break;
case GameAreaEvents.GAME_AREA_SCORE:
Global.music_game.stopMusics();
Global.music_interface.playMusic("interface", "m_interface");
break;
case GameAreaEvents.GAME_AREA_GAME:
stage.quality = StageQuality.MEDIUM;
Global.music_interface.stopMusics();
Global.iniSoundAndMusic();
Global.music_game.playMusic("game", "m_game");
break;
case GameAreaEvents.GAME_AREA_WIN_INTRO:
break;
};
};
}
private function checkReleaseGamezhero():Boolean{
var _local1:Date;
_local1 = new Date();
if (Global.release_data.getTime() > _local1.getTime()){
return (false);
};
return (true);
}
}
}//package classes
Section 36
//Gate (classes.Gate)
package classes {
import flash.display.*;
import flash.events.*;
public class Gate extends MovieClip {
public var ACTION_FRAME;
public var GOAL:MovieClip;
public var ACTION_GOAL:MovieClip;
public var CLOSE_FLAG:Boolean;
public var ACTION_FUNCTION:Function;
public function Gate(_arg1:MovieClip, _arg2:Boolean=true, _arg3:MovieClip=null, _arg4=1, _arg5:Function=null){
addFrameScript(0, frame1, 14, frame15);
GOAL = _arg1;
CLOSE_FLAG = _arg2;
ACTION_GOAL = _arg3;
ACTION_FRAME = _arg4;
ACTION_FUNCTION = _arg5;
GOAL.addChild(this);
ini();
this.addEventListener(Event.ENTER_FRAME, update);
}
private function ini():void{
if (CLOSE_FLAG == true){
this.gotoAndStop("close");
} else {
this.gotoAndStop("open");
};
}
public function setActionFrame(_arg1):void{
ACTION_FRAME = _arg1;
}
private function action():void{
this.removeEventListener(Event.ENTER_FRAME, update);
if (((!((ACTION_GOAL == null))) && (!((ACTION_FRAME == null))))){
ACTION_GOAL.gotoAndStop(ACTION_FRAME);
};
if (ACTION_FUNCTION != null){
ACTION_FUNCTION.call(null);
};
GOAL.removeChild(this);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
private function update(_arg1:Event):void{
this.gotoAndStop((this.currentFrame + 1));
if (CLOSE_FLAG == true){
if (this.currentLabel == "open"){
action();
};
} else {
if (this.currentLabel == "close2"){
Global.sound_game.playSound(null, "s_vorota");
action();
};
};
}
}
}//package classes
Section 37
//Global (classes.Global)
package classes {
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.*;
import classes.force.*;
import classes.crypto.*;
import classes.media.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.enum.*;
import flash.net.*;
import classes.gamearea.*;
import classes.gameInterface.*;
public class Global {
var fooItem:Object;
var _enemy_gallery:Object;
public static var sound_interface:SoundFX;
public static var _exit_gallery:Object = new Object();
public static var _win:Array;
public static var sound_game:SoundFX;
public static var _bonus_gallery:Object = new Object();
public static var _current_level:Number = 0;
public static var _help_gallery:Object = new Object();
public static var _sound_volume_game:Number = 0.3;
public static var gamezhero_code:Number;
public static var _framerate:uint = 25;
public static var open_level:Object = new Array();
public static var _music_volume_interface:Number = 1;
public static var _game_height:Number = 400;
public static var _game_stored_data:SharedObject = SharedObject.getLocal("super_doctor_zed-gamezhero.com");
public static var _huy:String = "хуйпросыш";
public static var _music_volume_game:Number = 0.4;
public static var _engine:Foam;
public static var _max_live:Number = 5;
public static var _max_level:Number = 25;
public static var _bonus_info:String = "";
public static var pauseLanguage:Object = new Object();
public static var _stone_gallery:Object = new Object();
public static var _game_width_2:Number = (_game_width / 2);
public static var _jumper_gallery:Object = new Object();
public static var _levels:Array = new Array();
public static var _score:Array = new Array();
public static var _teleport_gallery:Object = new Object();
public static var music_interface:Music;
public static var _key:Array;
public static var _sound_volume_interface:Number = 0.5;
public static var _gravity_generator:GravityGenerator;
public static var _rander:Boolean = false;
public static var _language:String;
public static var _ground_gallery:Object = new Object();
public static var _volcano_gallery:Object = new Object();
public static var _game_height_2:Number = (_game_height / 2);
public static var _urls:Array = new Array();
public static var _live:Number = 0;
public static var music_game:Music;
public static var _game:MovieClip;
public static var _keys:Object = new Object();
public static var _game_width:Number = 550;
public static var _iteratioins:uint = 20;
public static var release_data:Date = new Date(Date.UTC(2008, 6, 4, 0, 0, 0, 0));
public function Global(){
_enemy_gallery = new Object();
super();
}
public static function iniLevel():void{
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:Number;
var _local5:Boolean;
var _local6:Array;
var _local7:Array;
var _local8:Object;
var _local9:Object;
var _local10:Object;
var _local11:Object;
var _local12:Object;
switch (_current_level){
case 0:
_levels[0] = new Object();
_levels[0]["level"] = {bonus_score:(10 * 2), time_max:25000, time_min:10000};
_levels[0]["planet"] = {skinName:((5 * 0) + 1), strasSkinName:1, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:null, h:null};
_levels[0]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[0]["ground"] = new Array();
_levels[0]["ground"][0] = new Object();
_levels[0]["ground"][0] = clone(_ground_gallery["rock_1_small"]);
_levels[0]["ground"][0].pos = {angle:130, radius:_levels[0]["planet"]["radius"]};
_levels[0]["ground"][1] = new Object();
_levels[0]["ground"][1] = clone(_ground_gallery["rock_1_small"]);
_levels[0]["ground"][1].pos = {angle:230, radius:_levels[0]["planet"]["radius"]};
_levels[0]["volcan"] = new Array();
_levels[0]["jumper"] = new Array();
_levels[0]["stone"] = new Array();
_levels[0]["bonus"] = new Array();
_levels[0]["bonus"][0] = new Object();
_levels[0]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][0].pos = {angle:150, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["bonus"][1] = new Object();
_levels[0]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][1].pos = {angle:210, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["enemy"] = new Array();
_levels[0]["enemy"][0] = clone(_levels["enemy_superfly_small"]);
_levels[0]["enemy"][0].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 50)};
_levels[0]["enemy"][0].moveType = "sleep";
_levels[0]["enemy"][1] = clone(_levels["enemy_rotator_small"]);
_levels[0]["enemy"][1].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 70)};
_levels[0]["enemy"][1].moveType = "sleep";
_levels[0]["enemy"][2] = clone(_levels["enemy_move_small"]);
_levels[0]["enemy"][2].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 90)};
_levels[0]["enemy"][2].moveType = "sleep";
_levels[0]["enemy"][3] = clone(_levels["enemy_fly_small"]);
_levels[0]["enemy"][3].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 110)};
_levels[0]["enemy"][3].moveType = "sleep";
_levels[0]["enemy"][4] = clone(_levels["enemy_jump_small"]);
_levels[0]["enemy"][4].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 120)};
_levels[0]["enemy"][4].moveType = "sleep";
_levels[0]["help"] = new Array();
_levels[0]["help"][0] = clone(_help_gallery["help_1"]);
_levels[0]["help"][0].pos = {angle:0, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][0].helpID = 1;
_levels[0]["help"][1] = clone(_help_gallery["help_1"]);
_levels[0]["help"][1].pos = {angle:80, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][1].helpID = 2;
_levels[0]["help"][2] = clone(_help_gallery["help_1"]);
_levels[0]["help"][2].pos = {angle:-80, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][2].helpID = 2;
_levels[0]["help"][3] = clone(_help_gallery["help_1"]);
_levels[0]["help"][3].pos = {angle:40, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][3].helpID = 10;
_levels[0]["help"][4] = clone(_help_gallery["help_1"]);
_levels[0]["help"][4].pos = {angle:-40, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][4].helpID = 10;
_levels[0]["exit"] = new Object();
_levels[0]["exit"] = clone(_exit_gallery);
_levels[0]["exit"].pos = {angle:180, radius:(_levels[0]["planet"]["radius"] + 500)};
_levels[0]["exit"].helpID = 3;
_levels[0]["teleport"] = new Array();
break;
case 1:
_levels[1] = new Object();
_levels[1]["level"] = {bonus_score:(20 * 2), time_max:25000, time_min:10000};
_levels[1]["planet"] = {skinName:((1 * 5) + 1), strasSkinName:2, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:null, h:null};
_levels[1]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[1]["ground"] = new Array();
_levels[1]["volcan"] = new Array();
_levels[1]["volcan"][0] = new Object();
_levels[1]["volcan"][0] = clone(_volcano_gallery["volcano_2_small"], true);
_levels[1]["volcan"][0].pos = {angle:60, radius:_levels[1]["planet"]["radius"]};
_levels[1]["volcan"][1] = new Object();
_levels[1]["volcan"][1] = clone(_volcano_gallery["volcano_2_small"], true);
_levels[1]["volcan"][1].pos = {angle:180, radius:_levels[1]["planet"]["radius"]};
_levels[1]["volcan"][2] = new Object();
_levels[1]["volcan"][2] = clone(_volcano_gallery["volcano_2_small"], true);
_levels[1]["volcan"][2].pos = {angle:-60, radius:_levels[1]["planet"]["radius"]};
_levels[1]["jumper"] = new Array();
_levels[1]["stone"] = new Array();
_levels[1]["bonus"] = new Array();
_levels[1]["bonus"][0] = new Object();
_levels[1]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][0].pos = {angle:60, radius:(_levels[1]["planet"]["radius"] + 120)};
_levels[1]["bonus"][1] = new Object();
_levels[1]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][1].pos = {angle:60, radius:(_levels[1]["planet"]["radius"] + 220)};
_levels[1]["bonus"][2] = new Object();
_levels[1]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][2].pos = {angle:60, radius:(_levels[1]["planet"]["radius"] + 320)};
_levels[1]["bonus"][3] = new Object();
_levels[1]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][3].pos = {angle:180, radius:(_levels[1]["planet"]["radius"] + 120)};
_levels[1]["bonus"][4] = new Object();
_levels[1]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][4].pos = {angle:180, radius:(_levels[1]["planet"]["radius"] + 220)};
_levels[1]["bonus"][5] = new Object();
_levels[1]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][5].pos = {angle:180, radius:(_levels[1]["planet"]["radius"] + 320)};
_levels[1]["bonus"][6] = new Object();
_levels[1]["bonus"][6] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][6].pos = {angle:-60, radius:(_levels[1]["planet"]["radius"] + 120)};
_levels[1]["bonus"][7] = new Object();
_levels[1]["bonus"][7] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][7].pos = {angle:-60, radius:(_levels[1]["planet"]["radius"] + 220)};
_levels[1]["bonus"][8] = new Object();
_levels[1]["bonus"][8] = clone(_bonus_gallery["bonus_1"]);
_levels[1]["bonus"][8].pos = {angle:-60, radius:(_levels[1]["planet"]["radius"] + 320)};
_levels[1]["enemy"] = new Array();
_levels[1]["enemy"][0] = clone(_levels["enemy_rotator_medium"]);
_levels[1]["enemy"][0].pos = {angle:170, radius:_levels[1]["planet"]["radius"]};
_levels[1]["enemy"][1] = clone(_levels["enemy_rotator_medium"]);
_levels[1]["enemy"][1].pos = {angle:190, radius:_levels[1]["planet"]["radius"]};
_levels[1]["help"] = new Array();
_levels[1]["help"][0] = clone(_help_gallery["help_1"]);
_levels[1]["help"][0].pos = {angle:0, radius:(_levels[1]["planet"]["radius"] + 100)};
_levels[1]["help"][0].helpID = 5;
_levels[1]["exit"] = new Object();
_levels[1]["exit"] = clone(_exit_gallery);
_levels[1]["exit"].pos = {angle:120, radius:(_levels[1]["planet"]["radius"] + 1000)};
_levels[1]["teleport"] = new Array();
break;
case 2:
_levels[2] = new Object();
_levels[2]["level"] = {bonus_score:(30 * 2), time_max:25000, time_min:10000};
_levels[2]["planet"] = {skinName:((2 * 5) + 1), strasSkinName:3, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[2]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[2]["ground"] = new Array();
_levels[2]["ground"][0] = new Object();
_levels[2]["ground"][0] = clone(_ground_gallery["rock_3_big"]);
_levels[2]["ground"][0].pos = {angle:150, radius:_levels[2]["planet"]["radius"]};
_levels[2]["ground"][1] = new Object();
_levels[2]["ground"][1] = clone(_ground_gallery["rock_3_big"]);
_levels[2]["ground"][1].pos = {angle:210, radius:_levels[2]["planet"]["radius"]};
_levels[2]["volcan"] = new Array();
_levels[2]["jumper"] = new Array();
_levels[2]["stone"] = new Array();
_levels[2]["stone"][0] = new Object();
_levels[2]["stone"][0] = clone(_stone_gallery["stone_3_big"]);
_levels[2]["stone"][0].pos = {angle:50, radius:_levels[2]["planet"]["radius"]};
_levels[2]["stone"][1] = new Object();
_levels[2]["stone"][1] = clone(_stone_gallery["stone_3_big"]);
_levels[2]["stone"][1].pos = {angle:-50, radius:_levels[2]["planet"]["radius"]};
_levels[2]["bonus"] = new Array();
_levels[2]["bonus"][0] = new Object();
_levels[2]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][0].pos = {angle:150, radius:(_levels[2]["planet"]["radius"] + 280)};
_levels[2]["bonus"][1] = new Object();
_levels[2]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][1].pos = {angle:150, radius:(_levels[2]["planet"]["radius"] + 380)};
_levels[2]["bonus"][2] = new Object();
_levels[2]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][2].pos = {angle:150, radius:(_levels[2]["planet"]["radius"] + 480)};
_levels[2]["bonus"][3] = new Object();
_levels[2]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][3].pos = {angle:210, radius:(_levels[2]["planet"]["radius"] + 280)};
_levels[2]["bonus"][4] = new Object();
_levels[2]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][4].pos = {angle:210, radius:(_levels[2]["planet"]["radius"] + 380)};
_levels[2]["bonus"][5] = new Object();
_levels[2]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[2]["bonus"][5].pos = {angle:210, radius:(_levels[2]["planet"]["radius"] + 480)};
_levels[2]["enemy"] = new Array();
_levels[2]["enemy"][0] = clone(_levels["enemy_move_medium"]);
_levels[2]["enemy"][0].pos = {angle:70, radius:_levels[2]["planet"]["radius"]};
_levels[2]["help"] = new Array();
_levels[2]["help"][0] = clone(_help_gallery["help_1"]);
_levels[2]["help"][0].pos = {angle:110, radius:(_levels[2]["planet"]["radius"] + 100)};
_levels[2]["help"][0].helpID = 6;
_levels[2]["help"][1] = clone(_help_gallery["help_1"]);
_levels[2]["help"][1].pos = {angle:-110, radius:(_levels[2]["planet"]["radius"] + 100)};
_levels[2]["help"][1].helpID = 6;
_levels[2]["exit"] = new Object();
_levels[2]["exit"] = clone(_exit_gallery);
_levels[2]["exit"].pos = {angle:180, radius:(_levels[2]["planet"]["radius"] + 500)};
_levels[2]["teleport"] = new Array();
break;
case 3:
_levels[3] = new Object();
_levels[3]["level"] = {bonus_score:(40 * 2), time_max:25000, time_min:10000};
_levels[3]["planet"] = {skinName:((3 * 5) + 1), strasSkinName:4, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:3, h:3};
_levels[3]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[3]["ground"] = new Array();
_levels[3]["ground"][0] = new Object();
_levels[3]["ground"][0] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][0].pos = {angle:180, radius:(_levels[3]["planet"]["radius"] + 100)};
_levels[3]["ground"][1] = new Object();
_levels[3]["ground"][1] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][1].pos = {angle:210, radius:(_levels[3]["planet"]["radius"] + 200)};
_levels[3]["ground"][2] = new Object();
_levels[3]["ground"][2] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][2].pos = {angle:150, radius:(_levels[3]["planet"]["radius"] + 200)};
_levels[3]["ground"][3] = new Object();
_levels[3]["ground"][3] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][3].pos = {angle:235, radius:(_levels[3]["planet"]["radius"] + 300)};
_levels[3]["ground"][4] = new Object();
_levels[3]["ground"][4] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][4].pos = {angle:125, radius:(_levels[3]["planet"]["radius"] + 300)};
_levels[3]["ground"][5] = new Object();
_levels[3]["ground"][5] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][5].pos = {angle:265, radius:(_levels[3]["planet"]["radius"] + 400)};
_levels[3]["ground"][6] = new Object();
_levels[3]["ground"][6] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][6].pos = {angle:90, radius:(_levels[3]["planet"]["radius"] + 400)};
_levels[3]["ground"][7] = new Object();
_levels[3]["ground"][7] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][7].pos = {angle:(180 + 4), radius:(_levels[3]["planet"]["radius"] + 400)};
_levels[3]["ground"][8] = new Object();
_levels[3]["ground"][8] = clone(_ground_gallery["step_4"]);
_levels[3]["ground"][8].pos = {angle:(180 - 4), radius:(_levels[3]["planet"]["radius"] + 400)};
_levels[3]["volcan"] = new Array();
_levels[3]["jumper"] = new Array();
_levels[3]["stone"] = new Array();
_levels[3]["bonus"] = new Array();
_levels[3]["bonus"][0] = new Object();
_levels[3]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][0].pos = {angle:180, radius:((_levels[3]["planet"]["radius"] + 100) + 100)};
_levels[3]["bonus"][1] = new Object();
_levels[3]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][1].pos = {angle:210, radius:((_levels[3]["planet"]["radius"] + 200) + 100)};
_levels[3]["bonus"][2] = new Object();
_levels[3]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][2].pos = {angle:150, radius:((_levels[3]["planet"]["radius"] + 200) + 100)};
_levels[3]["bonus"][3] = new Object();
_levels[3]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][3].pos = {angle:235, radius:((_levels[3]["planet"]["radius"] + 300) + 100)};
_levels[3]["bonus"][4] = new Object();
_levels[3]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][4].pos = {angle:125, radius:((_levels[3]["planet"]["radius"] + 300) + 100)};
_levels[3]["bonus"][5] = new Object();
_levels[3]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][5].pos = {angle:265, radius:((_levels[3]["planet"]["radius"] + 400) + 100)};
_levels[3]["bonus"][6] = new Object();
_levels[3]["bonus"][6] = clone(_bonus_gallery["bonus_1"]);
_levels[3]["bonus"][6].pos = {angle:90, radius:((_levels[3]["planet"]["radius"] + 400) + 100)};
_levels[3]["enemy"] = new Array();
_levels[3]["enemy"][0] = clone(_levels["enemy_fly_medium"]);
_levels[3]["enemy"][0].pos = {angle:-20, radius:(_levels[3]["planet"]["radius"] + 500)};
_levels[3]["enemy"][0].params.fly_radius = (_levels[3]["planet"]["radius"] + 500);
_levels[3]["enemy"][1] = clone(_levels["enemy_fly_medium"]);
_levels[3]["enemy"][1].pos = {angle:20, radius:(_levels[3]["planet"]["radius"] + 600)};
_levels[3]["enemy"][1].params.fly_radius = (_levels[3]["planet"]["radius"] + 600);
_levels[3]["help"] = new Array();
_levels[3]["help"][0] = clone(_help_gallery["help_1"]);
_levels[3]["help"][0].pos = {angle:0, radius:(_levels[3]["planet"]["radius"] + 100)};
_levels[3]["help"][0].helpID = 7;
_levels[3]["help"][1] = clone(_help_gallery["help_1"]);
_levels[3]["help"][1].pos = {angle:45, radius:(_levels[3]["planet"]["radius"] + 100)};
_levels[3]["help"][1].helpID = 9;
_levels[3]["help"][2] = clone(_help_gallery["help_1"]);
_levels[3]["help"][2].pos = {angle:-45, radius:(_levels[3]["planet"]["radius"] + 100)};
_levels[3]["help"][2].helpID = 9;
_levels[3]["exit"] = new Object();
_levels[3]["exit"] = clone(_exit_gallery);
_levels[3]["exit"].pos = {angle:180, radius:(_levels[3]["planet"]["radius"] + 110)};
_levels[3]["exit"].physics.mass = Simplification.INFINITE_MASS;
_levels[3]["teleport"] = new Array();
break;
case 4:
_levels[4] = new Object();
_levels[4]["level"] = {bonus_score:(50 * 2), time_max:25000, time_min:10000};
_levels[4]["planet"] = {skinName:((4 * 5) + 1), strasSkinName:5, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:5, h:5};
_levels[4]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[4]["ground"] = new Array();
_levels[4]["ground"][0] = new Object();
_levels[4]["ground"][0] = clone(_ground_gallery["rock_5_big"]);
_levels[4]["ground"][0].pos = {angle:90, radius:_levels[4]["planet"]["radius"]};
_levels[4]["ground"][1] = new Object();
_levels[4]["ground"][1] = clone(_ground_gallery["rock_5_big"]);
_levels[4]["ground"][1].pos = {angle:-90, radius:_levels[4]["planet"]["radius"]};
_levels[4]["ground"][2] = new Object();
_levels[4]["ground"][2] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][2].pos = {angle:(180 - 20), radius:(_levels[4]["planet"]["radius"] + 200)};
_levels[4]["ground"][3] = new Object();
_levels[4]["ground"][3] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][3].pos = {angle:(180 + 20), radius:(_levels[4]["planet"]["radius"] + 200)};
_levels[4]["ground"][4] = new Object();
_levels[4]["ground"][4] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][4].pos = {angle:(180 - 10), radius:(_levels[4]["planet"]["radius"] + 400)};
_levels[4]["ground"][5] = new Object();
_levels[4]["ground"][5] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][5].pos = {angle:(180 + 10), radius:(_levels[4]["planet"]["radius"] + 400)};
_levels[4]["ground"][6] = new Object();
_levels[4]["ground"][6] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][6].pos = {angle:(180 - 6), radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["ground"][7] = new Object();
_levels[4]["ground"][7] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][7].pos = {angle:(180 - 12), radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["ground"][8] = new Object();
_levels[4]["ground"][8] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][8].pos = {angle:(180 + 6), radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["ground"][9] = new Object();
_levels[4]["ground"][9] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][9].pos = {angle:(180 + 12), radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["ground"][10] = new Object();
_levels[4]["ground"][10] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][10].pos = {angle:(180 - 5), radius:(_levels[4]["planet"]["radius"] + 800)};
_levels[4]["ground"][11] = new Object();
_levels[4]["ground"][11] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][11].pos = {angle:(180 + 5), radius:(_levels[4]["planet"]["radius"] + 800)};
_levels[4]["ground"][12] = new Object();
_levels[4]["ground"][12] = clone(_ground_gallery["step_5"]);
_levels[4]["ground"][12].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 1000)};
_levels[4]["volcan"] = new Array();
_levels[4]["jumper"] = new Array();
_levels[4]["jumper"][0] = new Object();
_levels[4]["jumper"][0] = clone(_jumper_gallery["jumper_1"]);
_levels[4]["jumper"][0].pos = {angle:180, radius:_levels[4]["planet"]["radius"]};
_levels[4]["stone"] = new Array();
_levels[4]["bonus"] = new Array();
_levels[4]["bonus"][0] = new Object();
_levels[4]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][0].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 200)};
_levels[4]["bonus"][1] = new Object();
_levels[4]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][1].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 300)};
_levels[4]["bonus"][2] = new Object();
_levels[4]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][2].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 400)};
_levels[4]["bonus"][3] = new Object();
_levels[4]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][3].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 500)};
_levels[4]["bonus"][4] = new Object();
_levels[4]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][4].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["bonus"][5] = new Object();
_levels[4]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][5].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 700)};
_levels[4]["bonus"][6] = new Object();
_levels[4]["bonus"][6] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][6].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 800)};
_levels[4]["bonus"][7] = new Object();
_levels[4]["bonus"][7] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][7].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 200)};
_levels[4]["bonus"][8] = new Object();
_levels[4]["bonus"][8] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][8].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 300)};
_levels[4]["bonus"][9] = new Object();
_levels[4]["bonus"][9] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][9].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 400)};
_levels[4]["bonus"][10] = new Object();
_levels[4]["bonus"][10] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][10].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 500)};
_levels[4]["bonus"][11] = new Object();
_levels[4]["bonus"][11] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][11].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 600)};
_levels[4]["bonus"][12] = new Object();
_levels[4]["bonus"][12] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][12].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 700)};
_levels[4]["bonus"][13] = new Object();
_levels[4]["bonus"][13] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][13].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 800)};
_levels[4]["bonus"][14] = new Object();
_levels[4]["bonus"][14] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][14].pos = {angle:(180 - 6), radius:((_levels[4]["planet"]["radius"] + 600) + 100)};
_levels[4]["bonus"][15] = new Object();
_levels[4]["bonus"][15] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][15].pos = {angle:(180 + 6), radius:((_levels[4]["planet"]["radius"] + 600) + 100)};
_levels[4]["bonus"][16] = new Object();
_levels[4]["bonus"][16] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][16].pos = {angle:(180 - 5), radius:((_levels[4]["planet"]["radius"] + 800) + 100)};
_levels[4]["bonus"][17] = new Object();
_levels[4]["bonus"][17] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][17].pos = {angle:(180 + 5), radius:((_levels[4]["planet"]["radius"] + 800) + 100)};
_levels[4]["bonus"][18] = new Object();
_levels[4]["bonus"][18] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][18].pos = {angle:(180 - 12), radius:((_levels[4]["planet"]["radius"] + 600) + 100)};
_levels[4]["bonus"][19] = new Object();
_levels[4]["bonus"][19] = clone(_bonus_gallery["bonus_1"]);
_levels[4]["bonus"][19].pos = {angle:(180 + 12), radius:((_levels[4]["planet"]["radius"] + 600) + 100)};
_levels[4]["enemy"] = new Array();
_levels[4]["enemy"][0] = clone(_levels["enemy_jump_medium"]);
_levels[4]["enemy"][0].pos = {angle:-180, radius:_levels[4]["planet"]["radius"]};
_levels[4]["enemy"][0].params.fly_radius = (_levels[4]["planet"]["radius"] + 400);
_levels[4]["enemy"][0].child = [clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"])];
_levels[4]["enemy"][1] = clone(_levels["enemy_jump_medium"]);
_levels[4]["enemy"][1].pos = {angle:60, radius:_levels[4]["planet"]["radius"]};
_levels[4]["enemy"][1].params.fly_radius = (_levels[4]["planet"]["radius"] + 1200);
_levels[4]["enemy"][1].child = [clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"])];
_levels[4]["enemy"][1].child = [clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"])];
_levels[4]["help"] = new Array();
_levels[4]["help"][0] = clone(_help_gallery["help_1"]);
_levels[4]["help"][0].pos = {angle:(180 - 20), radius:(_levels[4]["planet"]["radius"] + 100)};
_levels[4]["help"][0].helpID = 8;
_levels[4]["help"][1] = clone(_help_gallery["help_1"]);
_levels[4]["help"][1].pos = {angle:(180 + 20), radius:(_levels[4]["planet"]["radius"] + 100)};
_levels[4]["help"][1].helpID = 8;
_levels[4]["help"][2] = clone(_help_gallery["help_1"]);
_levels[4]["help"][2].pos = {angle:(180 + 60), radius:(_levels[4]["planet"]["radius"] + 100)};
_levels[4]["help"][2].helpID = 11;
_levels[4]["help"][3] = clone(_help_gallery["help_1"]);
_levels[4]["help"][3].pos = {angle:(180 - 60), radius:(_levels[4]["planet"]["radius"] + 100)};
_levels[4]["help"][3].helpID = 11;
_levels[4]["exit"] = new Object();
_levels[4]["exit"] = clone(_exit_gallery);
_levels[4]["exit"].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 110)};
_levels[4]["teleport"] = new Array();
_levels[4]["teleport"][0] = clone(_teleport_gallery);
_levels[4]["teleport"][0].pos = {angle:180, radius:(_levels[4]["planet"]["radius"] + 1050)};
_levels[4]["teleport"][0].goto = 1;
_levels[4]["teleport"][0].helpID = 4;
_levels[4]["teleport"][1] = clone(_teleport_gallery);
_levels[4]["teleport"][1].pos = {angle:0, radius:(_levels[4]["planet"]["radius"] + 1000)};
_levels[4]["teleport"][1].goto = 0;
break;
case 5:
_levels[5] = new Object();
_levels[5]["level"] = {bonus_score:(60 * 2), time_max:25000, time_min:10000};
_levels[5]["planet"] = {skinName:((0 * 5) + 2), strasSkinName:1, radius:250, pos:{x:_game_width_2, y:Number((_game_height - 50))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:null, h:null};
_levels[5]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[5]["ground"] = new Array();
_levels[5]["volcan"] = new Array();
_levels[5]["volcan"][0] = new Object();
_levels[5]["volcan"][0] = clone(_volcano_gallery["volcano_1_medium"], true);
_levels[5]["volcan"][0].pos = {angle:45, radius:_levels[5]["planet"]["radius"]};
_levels[5]["volcan"][1] = new Object();
_levels[5]["volcan"][1] = clone(_volcano_gallery["volcano_1_small"], true);
_levels[5]["volcan"][1].pos = {angle:(45 + 90), radius:_levels[5]["planet"]["radius"]};
_levels[5]["volcan"][2] = new Object();
_levels[5]["volcan"][2] = clone(_volcano_gallery["volcano_1_medium"], true);
_levels[5]["volcan"][2].pos = {angle:(45 + 180), radius:_levels[5]["planet"]["radius"]};
_levels[5]["volcan"][3] = new Object();
_levels[5]["volcan"][3] = clone(_volcano_gallery["volcano_1_small"], true);
_levels[5]["volcan"][3].pos = {angle:(45 + 270), radius:_levels[5]["planet"]["radius"]};
_levels[5]["jumper"] = new Array();
_levels[5]["stone"] = new Array();
_levels[5]["bonus"] = new Array();
_levels[5]["bonus"][0] = new Object();
_levels[5]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][0].pos = {angle:45, radius:(_levels[5]["planet"]["radius"] + 200)};
_levels[5]["bonus"][1] = new Object();
_levels[5]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][1].pos = {angle:45, radius:(_levels[5]["planet"]["radius"] + 300)};
_levels[5]["bonus"][2] = new Object();
_levels[5]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][2].pos = {angle:45, radius:(_levels[5]["planet"]["radius"] + 400)};
_levels[5]["bonus"][3] = new Object();
_levels[5]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][3].pos = {angle:45, radius:(_levels[5]["planet"]["radius"] + 500)};
_levels[5]["bonus"][4] = new Object();
_levels[5]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][4].pos = {angle:45, radius:(_levels[5]["planet"]["radius"] + 600)};
_levels[5]["bonus"][5] = new Object();
_levels[5]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][5].pos = {angle:(45 + 180), radius:(_levels[5]["planet"]["radius"] + 200)};
_levels[5]["bonus"][6] = new Object();
_levels[5]["bonus"][6] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][6].pos = {angle:(45 + 180), radius:(_levels[5]["planet"]["radius"] + 300)};
_levels[5]["bonus"][7] = new Object();
_levels[5]["bonus"][7] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][7].pos = {angle:(45 + 180), radius:(_levels[5]["planet"]["radius"] + 400)};
_levels[5]["bonus"][8] = new Object();
_levels[5]["bonus"][8] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][8].pos = {angle:(45 + 180), radius:(_levels[5]["planet"]["radius"] + 500)};
_levels[5]["bonus"][9] = new Object();
_levels[5]["bonus"][9] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][9].pos = {angle:(45 + 180), radius:(_levels[5]["planet"]["radius"] + 600)};
_levels[5]["bonus"][10] = new Object();
_levels[5]["bonus"][10] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][10].pos = {angle:(45 + 90), radius:(_levels[5]["planet"]["radius"] + 200)};
_levels[5]["bonus"][11] = new Object();
_levels[5]["bonus"][11] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][11].pos = {angle:(45 + 90), radius:(_levels[5]["planet"]["radius"] + 300)};
_levels[5]["bonus"][12] = new Object();
_levels[5]["bonus"][12] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][12].pos = {angle:(45 + 90), radius:(_levels[5]["planet"]["radius"] + 400)};
_levels[5]["bonus"][13] = new Object();
_levels[5]["bonus"][13] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][13].pos = {angle:(45 + 90), radius:(_levels[5]["planet"]["radius"] + 500)};
_levels[5]["bonus"][14] = new Object();
_levels[5]["bonus"][14] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][14].pos = {angle:(45 + 270), radius:(_levels[5]["planet"]["radius"] + 200)};
_levels[5]["bonus"][15] = new Object();
_levels[5]["bonus"][15] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][15].pos = {angle:(45 + 270), radius:(_levels[5]["planet"]["radius"] + 300)};
_levels[5]["bonus"][16] = new Object();
_levels[5]["bonus"][16] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][16].pos = {angle:(45 + 270), radius:(_levels[5]["planet"]["radius"] + 400)};
_levels[5]["bonus"][17] = new Object();
_levels[5]["bonus"][17] = clone(_bonus_gallery["bonus_1"]);
_levels[5]["bonus"][17].pos = {angle:(45 + 270), radius:(_levels[5]["planet"]["radius"] + 500)};
_levels[5]["enemy"] = new Array();
_levels[5]["enemy"][0] = clone(_levels["enemy_superfly_medium"]);
_levels[5]["enemy"][0].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 50)};
_levels[5]["enemy"][1] = clone(_levels["enemy_superfly_medium"]);
_levels[5]["enemy"][1].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 70)};
_levels[5]["enemy"][2] = clone(_levels["enemy_superfly_medium"]);
_levels[5]["enemy"][2].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 90)};
_levels[5]["enemy"][3] = clone(_levels["enemy_superfly_medium"]);
_levels[5]["enemy"][3].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 110)};
_levels[5]["enemy"][4] = clone(_levels["enemy_superfly_medium"]);
_levels[5]["enemy"][4].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 120)};
_levels[5]["help"] = new Array();
_levels[5]["exit"] = new Object();
_levels[5]["exit"] = clone(_exit_gallery);
_levels[5]["exit"].pos = {angle:180, radius:(_levels[5]["planet"]["radius"] + 500)};
_levels[5]["teleport"] = new Array();
break;
case 6:
_levels[6] = new Object();
_levels[6]["level"] = {bonus_score:(70 * 2), time_max:25000, time_min:10000};
_levels[6]["planet"] = {skinName:((1 * 5) + 2), strasSkinName:2, radius:250, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.5, h:1.5};
_levels[6]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[6]["ground"] = new Array();
_local4 = 12;
_local2 = 0;
_local1 = 0;
while (_local1 < 30) {
if (((!((_local1 == 0))) && (!((_local1 == 15))))){
_levels[6]["ground"][_local2] = clone(_ground_gallery["step_2"]);
_levels[6]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:493};
_local2++;
};
_local1++;
};
_levels[6]["volcan"] = new Array();
_levels[6]["jumper"] = new Array();
_levels[6]["jumper"][0] = new Object();
_levels[6]["jumper"][0] = clone(_jumper_gallery["jumper_1"]);
_levels[6]["jumper"][0].pos = {angle:0, radius:_levels[6]["planet"]["radius"]};
_levels[6]["jumper"][0].type = "static";
_levels[6]["jumper"][0].n = 3;
_levels[6]["jumper"][1] = new Object();
_levels[6]["jumper"][1] = clone(_jumper_gallery["jumper_1"]);
_levels[6]["jumper"][1].pos = {angle:180, radius:_levels[6]["planet"]["radius"]};
_levels[6]["jumper"][1].type = "static";
_levels[6]["jumper"][1].n = 3;
_local2 = 2;
_local4 = 12;
_local1 = 1;
while (_local1 < 30) {
if (((((((_local1 % 5) == 0)) && (!((_local1 == 0))))) && (!((_local1 == 15))))){
_levels[6]["jumper"][_local2] = new Object();
_levels[6]["jumper"][_local2] = clone(_jumper_gallery["jumper_1"]);
_levels[6]["jumper"][_local2].pos = {angle:(_local4 * _local1), radius:(493 + 5)};
_levels[6]["jumper"][_local2].type = "static";
_levels[6]["jumper"][_local2].n = 2;
_local2++;
};
_local1++;
};
_levels[6]["stone"] = new Array();
_levels[6]["bonus"] = new Array();
_local2 = 0;
_local1 = 0;
while (_local1 < 5) {
_levels[6]["bonus"][_local2] = new Object();
_levels[6]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[6]["bonus"][_local2].pos = {angle:0, radius:((_levels[6]["planet"]["radius"] + 120) + (_local1 * 100))};
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 5) {
_levels[6]["bonus"][_local2] = new Object();
_levels[6]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[6]["bonus"][_local2].pos = {angle:180, radius:((_levels[6]["planet"]["radius"] + 120) + (_local1 * 100))};
_local2++;
_local1++;
};
_local4 = 12;
_local1 = 1;
while (_local1 < 30) {
if (((((((_local1 % 5) == 0)) && (!((_local1 == 0))))) && (!((_local1 == 15))))){
_local3 = 0;
while (_local3 < 5) {
_levels[6]["bonus"][_local2] = new Object();
_levels[6]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[6]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[6]["planet"]["radius"] + 370) + (100 * _local3))};
_local2++;
_local3++;
};
};
_local1++;
};
_levels[6]["enemy"] = new Array();
_local2 = 0;
_local1 = 0;
while (_local1 < 3) {
_levels[6]["enemy"][_local2] = clone(_levels["enemy_rotator_medium"]);
_levels[6]["enemy"][_local2].pos = {angle:(45 + (60 * _local2)), radius:_levels[6]["planet"]["radius"]};
_levels[6]["enemy"][_local2].strategy = "stupid";
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 3) {
_levels[6]["enemy"][_local2] = clone(_levels["enemy_jump_medium"]);
_levels[6]["enemy"][_local2].pos = {angle:(45 + (60 * _local2)), radius:_levels[6]["planet"]["radius"]};
_levels[6]["enemy"][_local2].strategy = "stupid";
_levels[6]["enemy"][_local2].directionType = "right";
_local2++;
_local1++;
};
_levels[6]["help"] = new Array();
_levels[6]["exit"] = new Object();
_levels[6]["exit"] = clone(_exit_gallery);
_levels[6]["exit"].pos = {angle:0, radius:(_levels[6]["planet"]["radius"] + 800)};
_levels[6]["teleport"] = new Array();
break;
case 7:
_levels[7] = new Object();
_levels[7]["level"] = {bonus_score:(80 * 2), time_max:25000, time_min:10000};
_levels[7]["planet"] = {skinName:((2 * 5) + 2), strasSkinName:3, radius:250, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[7]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[7]["ground"] = new Array();
_local2 = 0;
_local4 = 10;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 4) == 0){
_levels[7]["ground"][_local2] = new Object();
_levels[7]["ground"][_local2] = clone(_ground_gallery["rock_3_medium"]);
_levels[7]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:_levels[7]["planet"]["radius"]};
_local2++;
};
_local1++;
};
_local4 = 10;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 2)){
_levels[7]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[7]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:550};
_local2++;
};
_local1++;
};
_levels[7]["volcan"] = new Array();
_levels[7]["jumper"] = new Array();
_levels[7]["stone"] = new Array();
_levels[7]["bonus"] = new Array();
_local4 = 10;
_local2 = 0;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 2) == 0){
_levels[7]["bonus"][_local2] = new Object();
_levels[7]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[7]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:(550 + 100)};
_local2++;
};
_local1++;
};
_levels[7]["enemy"] = new Array();
_local2 = 0;
_local1 = 0;
while (_local1 < 6) {
_levels[7]["enemy"][_local2] = clone(_levels["enemy_move_medium"]);
_levels[7]["enemy"][_local2].pos = {angle:(60 * _local1), radius:_levels[7]["planet"]["radius"]};
_levels[7]["enemy"][_local2].params.fly_radius = (_levels[7]["planet"]["radius"] + 700);
_levels[7]["enemy"][_local2].child = [clone(_levels["enemy_fly_small"]), clone(_levels["enemy_move_small"])];
_local2++;
_local1++;
};
_levels[7]["help"] = new Array();
_levels[7]["exit"] = new Object();
_levels[7]["exit"] = clone(_exit_gallery);
_levels[7]["exit"].pos = {angle:0, radius:(_levels[7]["planet"]["radius"] + 850)};
_levels[7]["exit"].physics.mass = Simplification.INFINITE_MASS;
_levels[7]["teleport"] = new Array();
_levels[7]["teleport"][0] = clone(_teleport_gallery);
_levels[7]["teleport"][0].pos = {angle:0, radius:(_levels[7]["planet"]["radius"] + 1050)};
_levels[7]["teleport"][0].goto = 1;
_levels[7]["teleport"][1] = clone(_teleport_gallery);
_levels[7]["teleport"][1].pos = {angle:0, radius:(_levels[7]["planet"]["radius"] + 180)};
_levels[7]["teleport"][1].goto = 0;
break;
case 8:
_levels[8] = new Object();
_levels[8]["level"] = {bonus_score:(90 * 2), time_max:25000, time_min:10000};
_levels[8]["planet"] = {skinName:((3 * 5) + 2), strasSkinName:4, radius:250, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.8, h:1.8};
_levels[8]["player"] = {pos:{angle:1, radius:1500}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[8]["ground"] = new Array();
_local2 = 0;
_local4 = 10;
_local1 = 0;
while (_local1 < 36) {
if (((((((_local1 % 6) == 0)) || (((_local1 % 6) == 1)))) || (((_local1 % 6) == 5)))){
_levels[8]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[8]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:550};
_local2++;
};
_local1++;
};
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 6) == 0){
_levels[8]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[8]["ground"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:750};
_local2++;
};
_local1++;
};
_local5 = false;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 6) == 0){
_levels[8]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[8]["ground"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:400};
_local5 = !(_local5);
if (_local5){
_levels[8]["ground"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:300};
_levels[8]["ground"][_local2].movie = [{type:"up", step:2, tic:125}, {type:"wait", step:0, tic:100}, {type:"down", step:2, tic:125}, {type:"wait", step:0, tic:100}];
} else {
_levels[8]["ground"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:550};
_levels[8]["ground"][_local2].movie = [{type:"down", step:2, tic:125}, {type:"wait", step:0, tic:100}, {type:"up", step:2, tic:125}, {type:"wait", step:0, tic:100}];
};
_local2++;
};
_local1++;
};
_levels[8]["volcan"] = new Array();
_levels[8]["jumper"] = new Array();
_levels[8]["stone"] = new Array();
_levels[8]["bonus"] = new Array();
_local4 = 10;
_local2 = 0;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 3) == 0){
_levels[8]["bonus"][_local2] = new Object();
_levels[8]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[8]["bonus"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:(550 + 100)};
_local2++;
};
_local1++;
};
_levels[8]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_levels[8]["enemy"][_local2] = clone(_levels["enemy_fly_medium"]);
_levels[8]["enemy"][_local2].pos = {angle:(36 * _local1), radius:_levels[8]["planet"]["radius"]};
_local5 = !(_local5);
if (_local5){
_levels[8]["enemy"][_local2].params.fly_radius = (_levels[8]["planet"]["radius"] + 500);
_levels[8]["enemy"][_local2].child = [clone(_levels["enemy_rotator_small"]), clone(_levels["enemy_rotator_small"]), clone(_levels["enemy_rotator_small"])];
_levels[8]["enemy"][_local2].action = {change_strategy:"intellect"};
} else {
_levels[8]["enemy"][_local2].params.fly_radius = (_levels[8]["planet"]["radius"] + 400);
_levels[8]["enemy"][_local2].child = [clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"])];
_levels[8]["enemy"][_local2].strategy = "coward";
};
_local2++;
_local1++;
};
_levels[8]["help"] = new Array();
_levels[8]["exit"] = new Object();
_levels[8]["exit"] = clone(_exit_gallery);
_levels[8]["exit"].pos = {angle:30, radius:(750 + 10)};
_levels[8]["exit"].physics.mass = Simplification.INFINITE_MASS;
_levels[8]["teleport"] = new Array();
break;
case 9:
_levels[9] = new Object();
_levels[9]["level"] = {bonus_score:(100 * 2), time_max:25000, time_min:10000};
_levels[9]["planet"] = {skinName:((4 * 5) + 2), strasSkinName:5, radius:250, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[9]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[9]["ground"] = new Array();
_local2 = 0;
_local4 = 10;
_local5 = false;
_local1 = 0;
while (_local1 < 36) {
_local5 = !(_local5);
if (_local5){
_levels[9]["ground"][_local2] = clone(_ground_gallery["step_5"]);
_levels[9]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:550};
_local2++;
};
_local1++;
};
_levels[9]["volcan"] = new Array();
_local2 = 0;
_local4 = 10;
_local1 = 0;
while (_local1 < 36) {
if ((_local1 % 12) == 0){
_levels[9]["volcan"][_local2] = new Object();
_levels[9]["volcan"][_local2] = clone(_volcano_gallery["volcano_5_big"], true);
_levels[9]["volcan"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:_levels[9]["planet"]["radius"]};
_local2++;
};
_local1++;
};
_levels[9]["jumper"] = new Array();
_levels[9]["stone"] = new Array();
_levels[9]["bonus"] = new Array();
_local4 = 8;
_local2 = 0;
_local1 = 0;
while (_local1 < 45) {
if ((_local1 % 5) == 0){
_levels[9]["bonus"][_local2] = new Object();
_levels[9]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[9]["bonus"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:(550 + 100)};
_local2++;
};
_local1++;
};
_levels[9]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 3) {
_levels[9]["enemy"][_local2] = clone(_levels["enemy_jump_small"]);
_levels[9]["enemy"][_local2].pos = {angle:(60 * _local1), radius:(_levels[9]["planet"]["radius"] + 20)};
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 3) {
_levels[9]["enemy"][_local2] = clone(_levels["enemy_fly_small"]);
_levels[9]["enemy"][_local2].pos = {angle:(60 * _local1), radius:(550 + 25)};
_levels[9]["enemy"][_local2].params.fly_radius = 450;
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 3) {
_levels[9]["enemy"][_local2] = clone(_levels["enemy_fly_medium"]);
_levels[9]["enemy"][_local2].pos = {angle:(60 * _local1), radius:750};
_levels[9]["enemy"][_local2].params.fly_radius = 700;
_levels[9]["enemy"][_local2].child = [clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"])];
_local2++;
_local1++;
};
_levels[9]["help"] = new Array();
_levels[9]["exit"] = new Object();
_levels[9]["exit"] = clone(_exit_gallery);
_levels[9]["exit"].pos = {angle:0, radius:(550 + 10)};
_levels[9]["exit"].physics.mass = Simplification.INFINITE_MASS;
_levels[9]["teleport"] = new Array();
break;
case 10:
_levels[10] = new Object();
_levels[10]["level"] = {bonus_score:(110 * 2), time_max:25000, time_min:10000};
_levels[10]["planet"] = {skinName:((0 * 5) + 3), strasSkinName:1, radius:300, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[10]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[10]["ground"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local5 = !(_local5);
if (_local5){
_levels[10]["ground"][_local2] = new Object();
_levels[10]["ground"][_local2] = clone(_ground_gallery["rock_1_medium"]);
_levels[10]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:_levels[10]["planet"]["radius"]};
_local2++;
};
_local1++;
};
_levels[10]["volcan"] = new Array();
_levels[10]["jumper"] = new Array();
_levels[10]["stone"] = new Array();
_levels[10]["bonus"] = new Array();
_local4 = 8;
_local2 = 0;
_local1 = 0;
while (_local1 < 45) {
if ((_local1 % 5) == 0){
_levels[10]["bonus"][_local2] = new Object();
_levels[10]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[10]["bonus"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:(550 + 100)};
_local2++;
};
_local1++;
};
_levels[10]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 3) {
_levels[10]["enemy"][_local2] = clone(_levels["enemy_superfly_big"]);
_levels[10]["enemy"][_local2].pos = {angle:(120 * _local1), radius:(_levels[10]["planet"]["radius"] + 20)};
_local2++;
_local1++;
};
_levels[10]["help"] = new Array();
_levels[10]["exit"] = new Object();
_levels[10]["exit"] = clone(_exit_gallery);
_levels[10]["exit"].pos = {angle:90, radius:(550 + 10)};
_levels[10]["teleport"] = new Array();
break;
case 11:
_levels[11] = new Object();
_levels[11]["level"] = {bonus_score:(120 * 2), time_max:25000, time_min:10000};
_levels[11]["planet"] = {skinName:((1 * 5) + 3), strasSkinName:2, radius:300, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[11]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[11]["ground"] = new Array();
_local2 = 0;
_local4 = 180;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[11]["ground"][_local2] = clone(_ground_gallery["step_2"]);
_levels[11]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[11]["planet"]["radius"] + 100)};
_local2++;
_levels[11]["ground"][_local2] = clone(_ground_gallery["step_2"]);
_levels[11]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[11]["planet"]["radius"] + 350)};
_local2++;
_levels[11]["ground"][_local2] = clone(_ground_gallery["step_2"]);
_levels[11]["ground"][_local2].pos = {angle:((_local4 * _local1) - 20), radius:(_levels[11]["planet"]["radius"] + 200)};
_local2++;
_levels[11]["ground"][_local2] = clone(_ground_gallery["step_2"]);
_levels[11]["ground"][_local2].pos = {angle:((_local4 * _local1) + 20), radius:(_levels[11]["planet"]["radius"] + 200)};
_local2++;
_local1++;
};
_levels[11]["volcan"] = new Array();
_levels[11]["jumper"] = new Array();
_levels[11]["stone"] = new Array();
_levels[11]["bonus"] = new Array();
_local4 = 180;
_local2 = 0;
_local1 = 0;
while (_local1 < 2) {
_local3 = 0;
while (_local3 < 5) {
_levels[11]["bonus"][_local2] = new Object();
_levels[11]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[11]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:(600 + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[11]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[11]["enemy"][_local2] = clone(_levels["enemy_rotator_big"]);
_levels[11]["enemy"][_local2].pos = {angle:(180 * _local1), radius:(_levels[11]["planet"]["radius"] + 20)};
_levels[11]["enemy"][_local2].child = [clone(_levels["enemy_move_medium"]), clone(_levels["enemy_superfly_medium"])];
_local2++;
_local1++;
};
_levels[11]["help"] = new Array();
_levels[11]["exit"] = new Object();
_levels[11]["exit"] = clone(_exit_gallery);
_levels[11]["exit"].pos = {angle:90, radius:(1000 + 10)};
_levels[11]["teleport"] = new Array();
break;
case 12:
_levels[12] = new Object();
_levels[12]["level"] = {bonus_score:(130 * 2), time_max:25000, time_min:10000};
_levels[12]["planet"] = {skinName:((2 * 5) + 3), strasSkinName:3, radius:300, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[12]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[12]["ground"] = new Array();
_local2 = 0;
_local4 = 180;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[12]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[12]["ground"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[12]["planet"]["radius"] + 350)};
_local2++;
_levels[12]["ground"][_local2] = clone(_ground_gallery["rock_3_medium"]);
_levels[12]["ground"][_local2].pos = {angle:((_local4 * _local1) - 12), radius:_levels[12]["planet"]["radius"]};
_local2++;
_levels[12]["ground"][_local2] = clone(_ground_gallery["rock_3_medium"]);
_levels[12]["ground"][_local2].pos = {angle:((_local4 * _local1) + 12), radius:_levels[12]["planet"]["radius"]};
_local2++;
_local1++;
};
_levels[12]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[12]["ground"][_local2].pos = {angle:90, radius:(_levels[12]["planet"]["radius"] + 350)};
_local2++;
_local4 = 400;
_levels[12]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[12]["ground"][_local2].pos = {angle:10, radius:(_levels[12]["planet"]["radius"] + 345)};
_levels[12]["ground"][_local2].movie = [{type:"right", step:2, tic:_local4}, {type:"wait", step:0, tic:100}, {type:"left", step:2, tic:_local4}, {type:"wait", step:0, tic:100}];
_local2++;
_levels[12]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[12]["ground"][_local2].pos = {angle:(180 - 10), radius:(_levels[12]["planet"]["radius"] + 345)};
_levels[12]["ground"][_local2].movie = [{type:"left", step:2, tic:_local4}, {type:"wait", step:0, tic:100}, {type:"right", step:2, tic:_local4}, {type:"wait", step:0, tic:100}];
_local2++;
_levels[12]["volcan"] = new Array();
_levels[12]["jumper"] = new Array();
_levels[12]["stone"] = new Array();
_local4 = 180;
_local2 = 0;
_levels[12]["bonus"] = new Array();
_local4 = 180;
_local2 = 0;
_local1 = 0;
while (_local1 < 2) {
_local3 = 0;
while (_local3 < 4) {
_levels[12]["bonus"][_local2] = new Object();
_levels[12]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[12]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:(720 + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_local4 = 10;
_local1 = 0;
while (_local1 < 18) {
_levels[12]["bonus"][_local2] = new Object();
_levels[12]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[12]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:720};
_local2++;
_local1++;
};
_levels[12]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[12]["enemy"][_local2] = clone(_levels["enemy_move_big"]);
_levels[12]["enemy"][_local2].pos = {angle:((60 * _local1) + 65), radius:(_levels[12]["planet"]["radius"] + 720)};
_levels[12]["enemy"][_local2].params.fly_radius = 450;
_levels[12]["enemy"][_local2].child = [clone(_levels["enemy_fly_medium"]), clone(_levels["enemy_superfly_medium"])];
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 2) {
_levels[12]["enemy"][_local2] = clone(_levels["enemy_move_medium"]);
_levels[12]["enemy"][_local2].pos = {angle:((60 * _local1) + 70), radius:(_levels[12]["planet"]["radius"] + 520)};
_local2++;
_local1++;
};
_levels[12]["help"] = new Array();
_levels[12]["exit"] = new Object();
_levels[12]["exit"] = clone(_exit_gallery);
_levels[12]["exit"].pos = {angle:90, radius:((_levels[12]["planet"]["radius"] + 350) + 10)};
_levels[12]["exit"].physics.mass = Simplification.INFINITE_MASS;
_levels[12]["teleport"] = new Array();
break;
case 13:
_levels[13] = new Object();
_levels[13]["level"] = {bonus_score:(140 * 2), time_max:25000, time_min:10000};
_levels[13]["planet"] = {skinName:((3 * 5) + 3), strasSkinName:4, radius:300, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[13]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[13]["ground"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local3 = 0;
while (_local3 < 4) {
_levels[13]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[13]["ground"][_local2].pos = {angle:((_local4 * _local1) + (_local3 * (90 / 4))), radius:((_levels[13]["planet"]["radius"] + 100) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[13]["volcan"] = new Array();
_levels[13]["jumper"] = new Array();
_levels[13]["stone"] = new Array();
_local4 = 180;
_local2 = 0;
_levels[13]["bonus"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local3 = 0;
while (_local3 < 4) {
_levels[13]["bonus"][_local2] = new Object();
_levels[13]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[13]["bonus"][_local2].pos = {angle:((_local4 * _local1) + (_local3 * (90 / 4))), radius:(((_levels[13]["planet"]["radius"] + 100) + (100 * _local3)) + 100)};
_local2++;
_local3++;
};
_local3 = 0;
while (_local3 < 2) {
_levels[13]["bonus"][_local2] = new Object();
_levels[13]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[13]["bonus"][_local2].pos = {angle:((_local4 * _local1) + ((3 * 90) / 4)), radius:((_levels[13]["planet"]["radius"] + 600) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[13]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_levels[13]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[13]["enemy"][_local2].pos = {angle:((60 * 0) + 65), radius:(_levels[13]["planet"]["radius"] + 720)};
_levels[13]["enemy"][_local2].params.fly_radius = 750;
_levels[13]["enemy"][_local2].child = [clone(_levels["enemy_move_small"]), clone(_levels["enemy_move_small"]), clone(_levels["enemy_move_small"]), clone(_levels["enemy_move_small"])];
_local2++;
_levels[13]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[13]["enemy"][_local2].pos = {angle:((60 * 1) + 65), radius:(_levels[13]["planet"]["radius"] + 720)};
_levels[13]["enemy"][_local2].params.fly_radius = 650;
_levels[13]["enemy"][_local2].child = [clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"])];
_local2++;
_levels[13]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[13]["enemy"][_local2].pos = {angle:((60 * 2) + 65), radius:(_levels[13]["planet"]["radius"] + 720)};
_levels[13]["enemy"][_local2].params.fly_radius = 750;
_levels[13]["enemy"][_local2].child = [clone(_levels["enemy_jump_small"]), clone(_levels["enemy_jump_small"]), clone(_levels["enemy_jump_small"]), clone(_levels["enemy_jump_small"])];
_local2++;
_levels[13]["help"] = new Array();
_levels[13]["exit"] = new Object();
_levels[13]["exit"] = clone(_exit_gallery);
_levels[13]["exit"].pos = {angle:((3 * 90) / 4), radius:(_levels[13]["planet"]["radius"] + 100)};
_levels[13]["teleport"] = new Array();
break;
case 14:
_levels[14] = new Object();
_levels[14]["level"] = {bonus_score:(150 * 2), time_max:25000, time_min:10000};
_levels[14]["planet"] = {skinName:((4 * 5) + 3), strasSkinName:5, radius:300, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[14]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[14]["ground"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local6 = [0.66, 0.66, 1.32, 2, 1.32, 0.66];
_local7 = [0, 3, 1.5, 0, -1.5, -3];
_local1 = 0;
while (_local1 < 4) {
_local3 = 0;
while (_local3 < 6) {
_levels[14]["ground"][_local2] = clone(_ground_gallery["step_5"]);
_levels[14]["ground"][_local2].pos = {angle:(((_local4 * _local1) + (_local3 * (90 / 6))) + _local7[_local3]), radius:((_levels[14]["planet"]["radius"] + 100) + (100 * _local6[_local3]))};
_local2++;
_local3++;
};
_local1++;
};
_levels[14]["volcan"] = new Array();
_levels[14]["jumper"] = new Array();
_levels[14]["stone"] = new Array();
_local4 = 180;
_local2 = 0;
_levels[14]["bonus"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local6 = [0.66, 0.66, 1.32, 2, 1.32, 0.66];
_local7 = [0, 3, 1.5, 0, -1.5, -3];
_local1 = 0;
while (_local1 < 4) {
_local3 = 0;
while (_local3 < 6) {
_levels[14]["bonus"][_local2] = new Object();
_levels[14]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[14]["bonus"][_local2].pos = {angle:(((_local4 * _local1) + (_local3 * (90 / 6))) + _local7[_local3]), radius:(((_levels[14]["planet"]["radius"] + 100) + (100 * _local6[_local3])) + 150)};
_local2++;
_local3++;
};
_local1++;
};
_levels[14]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_levels[14]["enemy"][_local2] = clone(_levels["enemy_jump_big"]);
_levels[14]["enemy"][_local2].pos = {angle:((90 * _local1) + 65), radius:(_levels[14]["planet"]["radius"] + 1000)};
_levels[14]["enemy"][_local2].params.fly_radius = 750;
if ((_local1 % 2)){
_levels[14]["enemy"][_local2].strategy = "coward";
};
_levels[14]["enemy"][_local2].child = [clone(_levels["enemy_jump_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_jump_small"]), clone(_levels["enemy_jump_small"])];
_local2++;
_local1++;
};
_levels[14]["help"] = new Array();
_levels[14]["exit"] = new Object();
_levels[14]["exit"] = clone(_exit_gallery);
_levels[14]["exit"].pos = {angle:((_local4 * 0) + (3 * (90 / 6))), radius:(_levels[14]["planet"]["radius"] + 100)};
_levels[14]["teleport"] = new Array();
break;
case 15:
_levels[15] = new Object();
_levels[15]["level"] = {bonus_score:(160 * 2), time_max:25000, time_min:10000};
_levels[15]["planet"] = {skinName:((0 * 5) + 4), strasSkinName:1, radius:350, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[15]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[15]["ground"] = new Array();
_local2 = 0;
_local4 = 90;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local5 = !(_local5);
if (_local5){
_levels[15]["ground"][_local2] = new Object();
_levels[15]["ground"][_local2] = clone(_ground_gallery["rock_1_small"]);
_levels[15]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:_levels[15]["planet"]["radius"]};
_local2++;
};
_local1++;
};
_levels[15]["volcan"] = new Array();
_levels[15]["jumper"] = new Array();
_levels[15]["stone"] = new Array();
_levels[15]["bonus"] = new Array();
_local4 = 8;
_local2 = 0;
_local1 = 0;
while (_local1 < 45) {
if ((_local1 % 5) == 0){
_levels[15]["bonus"][_local2] = new Object();
_levels[15]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[15]["bonus"][_local2].pos = {angle:((_local4 * _local1) + 30), radius:(550 + 100)};
_local2++;
};
_local1++;
};
_levels[15]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 3) {
_levels[15]["enemy"][_local2] = clone(_levels["enemy_superfly_big"]);
_levels[15]["enemy"][_local2].strategy = "coward";
_levels[15]["enemy"][_local2].pos = {angle:(120 * _local1), radius:(_levels[15]["planet"]["radius"] + 20)};
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 3) {
_levels[15]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[15]["enemy"][_local2].pos = {angle:((120 * _local1) + 10), radius:(_levels[15]["planet"]["radius"] + 20)};
_levels[15]["enemy"][_local2].strategy = "coward";
_levels[15]["enemy"][_local2].params.fly_radius = 800;
_local2++;
_local1++;
};
_levels[15]["help"] = new Array();
_levels[15]["exit"] = new Object();
_levels[15]["exit"] = clone(_exit_gallery);
_levels[15]["exit"].pos = {angle:90, radius:(550 + 10)};
_levels[15]["teleport"] = new Array();
break;
case 16:
_levels[16] = new Object();
_levels[16]["level"] = {bonus_score:(170 * 2), time_max:25000, time_min:10000};
_levels[16]["planet"] = {skinName:((1 * 5) + 4), strasSkinName:2, radius:350, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[16]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[16]["ground"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[16]["ground"][_local2] = new Object();
_levels[16]["ground"][_local2] = clone(_ground_gallery["rock_2_big"]);
_levels[16]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:_levels[16]["planet"]["radius"]};
_local2++;
_local1++;
};
_levels[16]["volcan"] = new Array();
_levels[16]["jumper"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[16]["jumper"][_local2] = new Object();
_levels[16]["jumper"][_local2] = clone(_jumper_gallery["jumper_1"]);
_levels[16]["jumper"][_local2].pos = {angle:((_local4 * _local1) - 15), radius:(_levels[16]["planet"]["radius"] - 12)};
_levels[16]["jumper"][_local2].type = "static";
_levels[16]["jumper"][_local2].n = 3;
_local2++;
_levels[16]["jumper"][_local2] = new Object();
_levels[16]["jumper"][_local2] = clone(_jumper_gallery["jumper_1"]);
_levels[16]["jumper"][_local2].pos = {angle:((_local4 * _local1) + 15), radius:(_levels[16]["planet"]["radius"] - 12)};
_levels[16]["jumper"][_local2].type = "static";
_levels[16]["jumper"][_local2].n = 3;
_local2++;
_local1++;
};
_levels[16]["stone"] = new Array();
_levels[16]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_local3 = 0;
while (_local3 < 6) {
_levels[16]["bonus"][_local2] = new Object();
_levels[16]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[16]["bonus"][_local2].pos = {angle:((_local4 * _local1) + 15), radius:(550 + (100 * _local3))};
_local2++;
_local3++;
};
_local3 = 0;
while (_local3 < 6) {
_levels[16]["bonus"][_local2] = new Object();
_levels[16]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[16]["bonus"][_local2].pos = {angle:((_local4 * _local1) - 15), radius:(550 + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[16]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 3) {
_levels[16]["enemy"][_local2] = clone(_levels["enemy_move_big"]);
_levels[16]["enemy"][_local2].strategy = "coward";
_levels[16]["enemy"][_local2].pos = {angle:(120 * _local1), radius:(_levels[16]["planet"]["radius"] + 20)};
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 3) {
_levels[16]["enemy"][_local2] = clone(_levels["enemy_superfly_big"]);
_levels[16]["enemy"][_local2].pos = {angle:((120 * _local1) + 10), radius:(_levels[16]["planet"]["radius"] + 20)};
_levels[16]["enemy"][_local2].strategy = "coward";
_levels[16]["enemy"][_local2].params.fly_radius = 800;
_local2++;
_local1++;
};
_levels[16]["help"] = new Array();
_levels[16]["exit"] = new Object();
_levels[16]["exit"] = clone(_exit_gallery);
_levels[16]["exit"].pos = {angle:90, radius:(1000 + 10)};
_levels[16]["teleport"] = new Array();
break;
case 17:
_levels[17] = new Object();
_levels[17]["level"] = {bonus_score:(180 * 2), time_max:25000, time_min:10000};
_levels[17]["planet"] = {skinName:((2 * 5) + 4), strasSkinName:3, radius:350, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.5, h:1.5};
_levels[17]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[17]["ground"] = new Array();
_local2 = 0;
_local4 = (360 / 5);
_local5 = false;
_local1 = 0;
while (_local1 < 5) {
_levels[17]["ground"][_local2] = new Object();
_levels[17]["ground"][_local2] = clone(_ground_gallery["step_3"]);
_levels[17]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:(_levels[17]["planet"]["radius"] + 400)};
_local2++;
_local1++;
};
_levels[17]["volcan"] = new Array();
_levels[17]["jumper"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_levels[17]["stone"] = new Array();
_levels[17]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 5);
_local5 = false;
_local1 = 0;
while (_local1 < 5) {
_local3 = 0;
while (_local3 < 6) {
_levels[17]["bonus"][_local2] = new Object();
_levels[17]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[17]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[17]["planet"]["radius"] + 460) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[17]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_levels[17]["enemy"][_local2] = clone(_levels["enemy_superfly_medium"]);
_levels[17]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[17]["planet"]["radius"] + 20)};
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 6) {
_levels[17]["enemy"][_local2] = clone(_levels["enemy_fly_small"]);
_levels[17]["enemy"][_local2].pos = {angle:((120 * _local1) + 10), radius:(_levels[17]["planet"]["radius"] + 20)};
_levels[17]["enemy"][_local2].strategy = "coward";
_levels[17]["enemy"][_local2].params.fly_radius = 950;
_local2++;
_local1++;
};
_levels[17]["help"] = new Array();
_levels[17]["exit"] = new Object();
_levels[17]["exit"] = clone(_exit_gallery);
_levels[17]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[17]["teleport"] = new Array();
_local2 = 0;
_local4 = (360 / 5);
_local5 = false;
_local1 = 0;
while (_local1 < 5) {
_levels[17]["teleport"][_local2] = clone(_teleport_gallery);
_levels[17]["teleport"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[17]["planet"]["radius"] + 50)};
_levels[17]["teleport"][_local2].goto = (_local2 + 1);
_local2++;
_levels[17]["teleport"][_local2] = clone(_teleport_gallery);
_levels[17]["teleport"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[17]["planet"]["radius"] + 1000)};
_levels[17]["teleport"][_local2].goto = null;
_local2++;
_local1++;
};
break;
case 18:
_levels[18] = new Object();
_levels[18]["level"] = {bonus_score:(190 * 2), time_max:25000, time_min:10000};
_levels[18]["planet"] = {skinName:((3 * 5) + 4), strasSkinName:4, radius:350, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.5, h:1.5};
_levels[18]["player"] = {pos:{angle:1, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[18]["ground"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_levels[18]["ground"][_local2] = new Object();
_levels[18]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[18]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:(_levels[18]["planet"]["radius"] + 200)};
_levels[18]["ground"][_local2].movie = [{type:"right", step:4.32, tic:200}, {type:"left", step:4.32, tic:200}, {type:"wait", step:0, tic:400}];
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 10) {
_levels[18]["ground"][_local2] = new Object();
_levels[18]["ground"][_local2] = clone(_ground_gallery["step_4"]);
_levels[18]["ground"][_local2].pos = {angle:((_local1 * _local4) + (_local4 / 2)), radius:(_levels[18]["planet"]["radius"] + 300)};
_levels[18]["ground"][_local2].movie = [{type:"left", step:5.105, tic:200}, {type:"right", step:5.105, tic:200}, {type:"wait", step:0, tic:400}];
_local2++;
_local1++;
};
_levels[18]["volcan"] = new Array();
_local4 = (360 / 10);
_local5 = false;
_local2 = 0;
_local1 = 0;
while (_local1 < 10) {
_levels[18]["volcan"][_local2] = new Object();
_levels[18]["volcan"][_local2] = clone(_volcano_gallery["volcano_4_medium"], true);
_levels[18]["volcan"][_local2].pos = {angle:(_local1 * _local4), radius:_levels[18]["planet"]["radius"]};
_local2++;
_local1++;
};
_levels[18]["jumper"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_levels[18]["stone"] = new Array();
_levels[18]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_local3 = 0;
while (_local3 < 2) {
_levels[18]["bonus"][_local2] = new Object();
_levels[18]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[18]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[18]["planet"]["radius"] + 400) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[18]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[18]["enemy"][_local2] = clone(_levels["enemy_fly_medium"]);
_levels[18]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[18]["planet"]["radius"] + 20)};
_levels[18]["enemy"][_local2].params.fly_radius = (_levels[18]["planet"]["radius"] + 100);
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 6) {
_local9 = clone(_levels["enemy_jump_small"]);
_local9.strategy = "intellect";
_local9.action = {change_strategy:"intellect"};
_levels[18]["enemy"][_local2] = clone(_levels["enemy_fly_medium"]);
_levels[18]["enemy"][_local2].pos = {angle:((120 * _local1) + 10), radius:(_levels[18]["planet"]["radius"] + 500)};
if ((_local1 % 2)){
_levels[18]["enemy"][_local2].strategy = "coward";
_levels[18]["enemy"][_local2].child = [_local9, _local9];
};
_levels[18]["enemy"][_local2].action = {change_strategy:"intellect"};
_levels[18]["enemy"][_local2].params.fly_radius = (_levels[18]["planet"]["radius"] + 380);
_local2++;
_local1++;
};
_levels[18]["help"] = new Array();
_levels[18]["exit"] = new Object();
_levels[18]["exit"] = clone(_exit_gallery);
_levels[18]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[18]["teleport"] = new Array();
break;
case 19:
_levels[19] = new Object();
_levels[19]["level"] = {bonus_score:(200 * 2), time_max:25000, time_min:10000};
_levels[19]["planet"] = {skinName:((4 * 5) + 4), strasSkinName:5, radius:350, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.5, h:1.5};
_levels[19]["player"] = {pos:{angle:1, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[19]["ground"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_levels[19]["ground"][_local2] = new Object();
_levels[19]["ground"][_local2] = clone(_ground_gallery["step_5"]);
_levels[19]["ground"][_local2].pos = {angle:(_local1 * _local4), radius:(_levels[19]["planet"]["radius"] + 200)};
_local2++;
_levels[19]["ground"][_local2] = new Object();
_levels[19]["ground"][_local2] = clone(_ground_gallery["step_5"]);
_levels[19]["ground"][_local2].pos = {angle:((_local1 * _local4) + (_local4 / 2)), radius:(_levels[19]["planet"]["radius"] + 300)};
_local2++;
_local1++;
};
_levels[19]["volcan"] = new Array();
_levels[19]["jumper"] = new Array();
_local2 = 0;
_local4 = (360 / 2);
_local5 = false;
_levels[19]["stone"] = new Array();
_levels[19]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_local3 = 0;
while (_local3 < 2) {
_levels[19]["bonus"][_local2] = new Object();
_levels[19]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[19]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[19]["planet"]["radius"] + 400) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[19]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[19]["enemy"][_local2] = clone(_levels["enemy_jump_big"]);
_levels[19]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[19]["planet"]["radius"] + 1000)};
_levels[19]["enemy"][_local2].params.fly_radius = (_levels[19]["planet"]["radius"] + 100);
_levels[19]["enemy"][_local2].child = [clone(_levels["enemy_superfly_medium"]), clone(_levels["enemy_superfly_medium"])];
_levels[19]["enemy"][_local2].wave = new Array();
_levels[19]["enemy"][_local2].wave[0] = [clone(_levels["enemy_rotator_big"])];
_local2++;
_local1++;
};
_levels[19]["help"] = new Array();
_levels[19]["exit"] = new Object();
_levels[19]["exit"] = clone(_exit_gallery);
_levels[19]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[19]["teleport"] = new Array();
break;
case 20:
_levels[20] = new Object();
_levels[20]["level"] = {bonus_score:(210 * 2), time_max:25000, time_min:10000};
_levels[20]["planet"] = {skinName:((0 * 5) + 5), strasSkinName:1, radius:400, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.5, h:1.5};
_levels[20]["player"] = {pos:{angle:10, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[20]["ground"] = new Array();
_levels[20]["volcan"] = new Array();
_levels[20]["jumper"] = new Array();
_levels[20]["stone"] = new Array();
_levels[20]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_local3 = 0;
while (_local3 < 4) {
_levels[20]["bonus"][_local2] = new Object();
_levels[20]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[20]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[20]["planet"]["radius"] + 100) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[20]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 2) {
_levels[20]["enemy"][_local2] = clone(_levels["enemy_superfly_big"]);
_levels[20]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[20]["planet"]["radius"] + 1000)};
_levels[20]["enemy"][_local2].strategy = "coward";
_levels[20]["enemy"][_local2].params.fly_radius = (_levels[20]["planet"]["radius"] + 100);
_levels[20]["enemy"][_local2].child = [clone(_levels["enemy_fly_medium"]), clone(_levels["enemy_rotator_medium"])];
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 2) {
_levels[20]["enemy"][_local2] = clone(_levels["enemy_superfly_big"]);
_levels[20]["enemy"][_local2].pos = {angle:(190 + (25 * _local1)), radius:(_levels[20]["planet"]["radius"] + 1000)};
_levels[20]["enemy"][_local2].strategy = "coward";
_levels[20]["enemy"][_local2].params.fly_radius = (_levels[20]["planet"]["radius"] + 100);
_levels[20]["enemy"][_local2].child = [clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"]), clone(_levels["enemy_rotator_small"]), clone(_levels["enemy_rotator_small"])];
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 2) {
_levels[20]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[20]["enemy"][_local2].pos = {angle:(90 + (25 * _local1)), radius:(_levels[20]["planet"]["radius"] + 1000)};
_levels[20]["enemy"][_local2].strategy = "coward";
_levels[20]["enemy"][_local2].params.fly_radius = (_levels[20]["planet"]["radius"] + 100);
_levels[20]["enemy"][_local2].child = [clone(_levels["enemy_move_medium"]), clone(_levels["enemy_superfly_medium"])];
_local2++;
_local1++;
};
_local1 = 0;
while (_local1 < 2) {
_levels[20]["enemy"][_local2] = clone(_levels["enemy_fly_big"]);
_levels[20]["enemy"][_local2].pos = {angle:(100 + (25 * _local1)), radius:(_levels[20]["planet"]["radius"] + 1000)};
_levels[20]["enemy"][_local2].strategy = "coward";
_levels[20]["enemy"][_local2].params.fly_radius = (_levels[20]["planet"]["radius"] + 100);
_levels[20]["enemy"][_local2].child = [clone(_levels["enemy_move_small"]), clone(_levels["enemy_move_small"]), clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"])];
_local2++;
_local1++;
};
_levels[20]["help"] = new Array();
_levels[20]["exit"] = new Object();
_levels[20]["exit"] = clone(_exit_gallery);
_levels[20]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[20]["teleport"] = new Array();
break;
case 21:
_levels[21] = new Object();
_levels[21]["level"] = {bonus_score:(220 * 2), time_max:25000, time_min:10000};
_levels[21]["planet"] = {skinName:((1 * 5) + 5), strasSkinName:2, radius:400, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.2, h:1.2};
_levels[21]["player"] = {pos:{angle:10, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[21]["ground"] = new Array();
_levels[21]["volcan"] = new Array();
_levels[21]["jumper"] = new Array();
_levels[21]["stone"] = new Array();
_levels[21]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 10);
_local5 = false;
_local1 = 0;
while (_local1 < 10) {
_local3 = 0;
while (_local3 < 4) {
_levels[21]["bonus"][_local2] = new Object();
_levels[21]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[21]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[21]["planet"]["radius"] + 100) + (100 * _local3))};
_local2++;
_local3++;
};
_local1++;
};
_levels[21]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 1) {
_local9 = clone(_levels["enemy_rotator_medium"]);
_local9.strategy = "coward";
_local10 = clone(_levels["enemy_superfly_medium"]);
_local10.strategy = "coward";
_levels[21]["enemy"][_local2] = clone(_levels["enemy_rotator_big"]);
_levels[21]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[21]["planet"]["radius"] + 1000)};
_levels[21]["enemy"][_local2].child = [_local9, _local10, _local9, _local10];
_local11 = clone(_levels["enemy_rotator_big"]);
_local11.pos = {angle:(25 * _local1), radius:(_levels[21]["planet"]["radius"] + 1000)};
_local11.child = [_local9, _local10, _local9];
_local11.action = {change_strategy:"intellect"};
_local12 = clone(_levels["enemy_superfly_big"]);
_local12.pos = {angle:(25 * _local1), radius:(_levels[21]["planet"]["radius"] + 1000)};
_local12.child = [_local10, _local9, _local10];
_local12.wave = new Array();
_local12.wave[0] = [_local11];
_levels[21]["enemy"][_local2].wave = new Array();
_levels[21]["enemy"][_local2].wave[0] = [_local12];
_local2++;
_local1++;
};
_levels[21]["help"] = new Array();
_levels[21]["exit"] = new Object();
_levels[21]["exit"] = clone(_exit_gallery);
_levels[21]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[21]["teleport"] = new Array();
break;
case 22:
_levels[22] = new Object();
_levels[22]["level"] = {bonus_score:(230 * 2), time_max:25000, time_min:10000};
_levels[22]["planet"] = {skinName:((2 * 5) + 5), strasSkinName:3, radius:400, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.2, h:1.2};
_levels[22]["player"] = {pos:{angle:10, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[22]["ground"] = new Array();
_levels[22]["volcan"] = new Array();
_levels[22]["jumper"] = new Array();
_levels[22]["stone"] = new Array();
_levels[22]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 20);
_local5 = false;
_local1 = 0;
while (_local1 < 20) {
_local3 = 0;
while (_local3 < 1) {
_levels[22]["bonus"][_local2] = new Object();
_levels[22]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[22]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[22]["planet"]["radius"] + 100) + (100 * _local3))};
_local2++;
if ((_local1 % 2)){
_levels[22]["bonus"][_local2] = new Object();
_levels[22]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[22]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[22]["planet"]["radius"] + 100) + 300)};
_local2++;
};
_local3++;
};
_local1++;
};
_levels[22]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local9 = clone(_levels["enemy_rotator_medium"]);
_local9.strategy = "intellect";
_local9.action = {change_strategy:"intellect"};
_local10 = clone(_levels["enemy_fly_medium"]);
_local10.params.fly_radius = (_levels[22]["planet"]["radius"] + 125);
_local10.strategy = "coward";
_local10.action = {change_strategy:"intellect"};
_levels[22]["enemy"][_local2] = clone(_levels["enemy_jump_medium"]);
_levels[22]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[22]["planet"]["radius"] + 1000)};
_levels[22]["enemy"][_local2].child = [_local9, _local10];
_levels[22]["enemy"][_local2].strategy = "intellect";
_levels[22]["enemy"][_local2].action = {change_strategy:"intellect"};
_local2++;
_levels[22]["enemy"][_local2] = clone(_levels["enemy_move_medium"]);
_levels[22]["enemy"][_local2].pos = {angle:(190 + (25 * _local1)), radius:(_levels[22]["planet"]["radius"] + 1000)};
_levels[22]["enemy"][_local2].child = [_local9, _local10];
_levels[22]["enemy"][_local2].strategy = "coward";
_levels[22]["enemy"][_local2].action = {change_strategy:"intellect"};
_local2++;
_local1++;
};
_levels[22]["help"] = new Array();
_levels[22]["exit"] = new Object();
_levels[22]["exit"] = clone(_exit_gallery);
_levels[22]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[22]["teleport"] = new Array();
break;
case 23:
_levels[23] = new Object();
_levels[23]["level"] = {bonus_score:(240 * 2), time_max:25000, time_min:10000};
_levels[23]["planet"] = {skinName:((3 * 5) + 5), strasSkinName:6, radius:400, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:1.2, h:1.2};
_levels[23]["player"] = {pos:{angle:10, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[23]["ground"] = new Array();
_levels[23]["volcan"] = new Array();
_levels[23]["jumper"] = new Array();
_levels[23]["stone"] = new Array();
_levels[23]["bonus"] = new Array();
_local2 = 0;
_local4 = (360 / 20);
_local5 = false;
_local1 = 0;
while (_local1 < 20) {
_local3 = 0;
while (_local3 < 1) {
_levels[23]["bonus"][_local2] = new Object();
_levels[23]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[23]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:((_levels[23]["planet"]["radius"] + 100) + 100)};
_local2++;
if ((_local1 % 2)){
_levels[23]["bonus"][_local2] = new Object();
_levels[23]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[23]["bonus"][_local2].pos = {angle:(_local4 * _local1), radius:(_levels[23]["planet"]["radius"] + 100)};
_local2++;
};
_local3++;
};
_local1++;
};
_levels[23]["enemy"] = new Array();
_local2 = 0;
_local5 = false;
_local1 = 0;
while (_local1 < 4) {
_local9 = clone(_levels["enemy_superfly_medium"]);
_local9.strategy = "intellect";
_local9.action = {change_strategy:"intellect"};
_local10 = clone(_levels["enemy_superfly_medium"]);
_local10.strategy = "coward";
_local10.action = {change_strategy:"intellect"};
_levels[23]["enemy"][_local2] = clone(_levels["enemy_fly_medium"]);
_levels[23]["enemy"][_local2].pos = {angle:(180 + (25 * _local1)), radius:(_levels[23]["planet"]["radius"] + 1000)};
_levels[23]["enemy"][_local2].params.fly_radius = (_levels[23]["planet"]["radius"] + 125);
_levels[23]["enemy"][_local2].child = [_local9, _local10, _local9];
_levels[23]["enemy"][_local2].strategy = "intellect";
_levels[23]["enemy"][_local2].action = {change_strategy:"intellect"};
_local2++;
_levels[23]["enemy"][_local2] = clone(_levels["enemy_move_medium"]);
_levels[23]["enemy"][_local2].pos = {angle:(190 + (25 * _local1)), radius:(_levels[23]["planet"]["radius"] + 1000)};
_levels[23]["enemy"][_local2].child = [_local10, _local9, _local10];
_levels[23]["enemy"][_local2].strategy = "coward";
_levels[23]["enemy"][_local2].action = {change_strategy:"intellect"};
_local2++;
_local1++;
};
_levels[23]["help"] = new Array();
_levels[23]["exit"] = new Object();
_levels[23]["exit"] = clone(_exit_gallery);
_levels[23]["exit"].pos = {angle:((360 / 5) + ((360 / 5) / 2)), radius:(1000 + 10)};
_levels[23]["teleport"] = new Array();
break;
case 24:
_levels[24] = new Object();
_levels[24]["level"] = {bonus_score:(250 * 2), time_max:25000, time_min:10000};
_levels[24]["planet"] = {skinName:((5 * 5) + 1), strasSkinName:2, radius:200, pos:{x:_game_width_2, y:Number((_game_height - 0))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5, w:2, h:2};
_levels[24]["player"] = {pos:{angle:70, radius:800}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0, elasticity:0}}};
_levels[24]["ground"] = new Array();
_levels[24]["volcan"] = new Array();
_levels[24]["jumper"] = new Array();
_levels[24]["stone"] = new Array();
_local2 = 0;
_levels[24]["bonus"] = new Array();
_levels[24]["bonus"][_local2] = new Object();
_levels[24]["bonus"][_local2] = clone(_bonus_gallery["bonus_1"]);
_levels[24]["bonus"][_local2].pos = {angle:0, radius:(_levels[24]["planet"]["radius"] + 400)};
_local2++;
_local2 = 0;
_levels[24]["enemy"] = new Array();
_levels[24]["enemy"][_local2] = clone(_levels["enemy_boss_big"]);
_levels[24]["enemy"][_local2].pos = {angle:0, radius:(_levels[24]["planet"]["radius"] + 26)};
_levels[24]["enemy"][_local2].wave = new Array();
_local6 = new Array();
_local4 = 36;
_local1 = 0;
while (_local1 < 10) {
_local8 = clone(_levels["enemy_fly_small"]);
_local8.pos = {angle:(_local4 * _local1), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 20);
_local6.push(_local8);
_local1++;
};
_levels[24]["enemy"][_local2].wave[35] = _local6;
_local6 = new Array();
_local4 = 36;
_local1 = 0;
while (_local1 < 10) {
if ((_local1 % 2)){
_local8 = clone(_levels["enemy_superfly_medium"]);
_local8.pos = {angle:(_local4 * _local1), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 20);
_local6.push(_local8);
};
_local1++;
};
_levels[24]["enemy"][_local2].wave[30] = _local6;
_local6 = new Array();
_local4 = (360 / 5);
_local8 = clone(_levels["enemy_rotator_big"]);
_local8.pos = {angle:(_local4 * 0), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 50);
_local6.push(_local8);
_local8 = clone(_levels["enemy_fly_big"]);
_local8.pos = {angle:(_local4 * 1), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 50);
_local6.push(_local8);
_levels[24]["enemy"][_local2].wave[20] = _local6;
_local6 = new Array();
_local8 = clone(_levels["enemy_superfly_big"]);
_local8.pos = {angle:(_local4 * 2), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 50);
_local6.push(_local8);
_local8 = clone(_levels["enemy_jump_big"]);
_local8.pos = {angle:(_local4 * 3), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 50);
_local6.push(_local8);
_levels[24]["enemy"][_local2].wave[10] = _local6;
_local6 = new Array();
_local1 = 0;
while (_local1 < 10) {
_local8 = clone(_levels["enemy_fly_medium"]);
_local8.pos = {angle:(_local4 * _local1), radius:(_levels[24]["planet"]["radius"] + 600)};
_local8.params.fly_radius = (_levels[24]["planet"]["radius"] + 20);
_local6.push(_local8);
_local1++;
};
_levels[24]["enemy"][_local2].wave[0] = _local6;
_levels[24]["help"] = new Array();
_levels[24]["exit"] = new Object();
_levels[24]["exit"] = clone(_exit_gallery);
_levels[24]["exit"].pos = {angle:((3 * 90) / 4), radius:(_levels[24]["planet"]["radius"] + 1000)};
_levels[24]["teleport"] = new Array();
break;
};
}
public static function setNextLive():Number{
var _local1:Number;
_local1 = (_live - 1);
if (_local1 <= 0){
return (-1);
};
return (1);
}
public static function setNextLevel():Number{
var _local1:Number;
_local1 = (_current_level + 1);
if (_local1 >= _max_level){
return (-1);
};
return (_local1);
}
public static function clearAll():void{
var _local1:uint;
_score = new Array();
_key = new Array();
_win = new Array();
_live = _max_live;
_local1 = 0;
while (_local1 < _max_level) {
_score.push(0);
_key.push(null);
_win.push(false);
_local1++;
};
}
public static function getCurrentScore():Number{
return ((_score[_current_level] as Number));
}
public static function getURL(_arg1:String, _arg2:String="_blank"):void{
var _local3:URLRequest;
_local3 = new URLRequest(_arg1);
navigateToURL(_local3, _arg2);
}
public static function iniSoundAndMusic():void{
if (Global._game_stored_data.data.soundVolumeFlag == 1){
Global.sound_game.setSoundVolume(Global._sound_volume_game);
} else {
Global.sound_game.setSoundVolume(0);
};
if (Global._game_stored_data.data.musicVolumeFlag == 1){
Global.music_game.setMusicVolume(Global._music_volume_game);
} else {
Global.music_game.setMusicVolume(0);
};
}
public static function clone(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:ByteArray;
var _local4:Object;
_local3 = new ByteArray();
_local3.writeObject(_arg1);
_local3.position = 0;
_local4 = (_local3.readObject() as Object);
return (_local4);
}
public static function getGroundIndex(_arg1:Number):String{
var _local2:String;
_local2 = "E";
if (_arg1 <= 100){
_local2 = "A";
};
if (_arg1 <= 90){
_local2 = "B";
};
if (_arg1 <= 65){
_local2 = "C";
};
if (_arg1 <= 35){
_local2 = "D";
};
if (_arg1 <= 10){
_local2 = "E";
};
return (_local2);
}
public static function setLevelScore(_arg1:int=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{
var _local5:uint;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (_game_stored_data.data["map"] == undefined){
_game_stored_data.data["map"] = new Array();
_local5 = 0;
while (_local5 < _max_level) {
Global._game_stored_data.data["map"][_local5] = {lock:true};
if (_local5 == 0){
Global._game_stored_data.data["map"][_local5].lock = false;
};
_local5++;
};
};
if (_arg2 < _levels[_current_level]["level"].time_min){
_arg2 = _levels[_current_level]["level"].time_min;
};
if (_arg2 > _levels[_current_level]["level"].time_max){
_arg2 = _levels[_current_level]["level"].time_max;
};
_local6 = (1 - ((_arg2 - _levels[_current_level]["level"].time_min) / (_levels[_current_level]["level"].time_max - _levels[_current_level]["level"].time_min)));
_local7 = ((_levels[_current_level]["bonus"].length - _arg3) / _levels[_current_level]["bonus"].length);
_local8 = 0;
_local9 = (((_local6 + _local7) + _local8) / 2);
_local10 = Math.round((_levels[_current_level]["level"].bonus_score * _local9));
if (_arg1 == 1){
_local5 = 0;
while (_local5 < open_level[_current_level].length) {
Global._game_stored_data.data["map"][open_level[_current_level][_local5]].lock = false;
_local5++;
};
_score[_current_level] = (_score[_current_level] + _local10);
_win[_current_level] = getGroundIndex((100 * _local9));
_key[_current_level] = new MD5().hash((_score[_current_level] + _huy));
_bonus_info = (((("Score:" + String(getGlobalScore())) + " (BONUS:") + _local10) + ")");
} else {
_win[_current_level] = false;
if (_arg1 == -1){
_score[_current_level];
_key[_current_level] = new MD5().hash((_score[_current_level] + _huy));
} else {
_score[_current_level] = 0;
_key[_current_level] = null;
};
_bonus_info = String(getGlobalScore());
_live = (_live - 1);
};
}
public static function addScore(_arg1:Number):Number{
_score[_current_level] = (_score[_current_level] + _arg1);
if (_score[_current_level] < 0){
_score[_current_level] = 0;
};
return (_score[_current_level]);
}
public static function getGlobalScore(_arg1:Number=-1):Number{
var _local2:Number;
var _local3:MD5;
var _local4:uint;
_local2 = 0;
_local3 = new MD5();
_local4 = 0;
while (_local4 < _score.length) {
if (((!((_local4 == _arg1))) && ((_key[_local4] == _local3.hash((_score[_local4] + _huy)))))){
_local2 = (_local2 + _score[_local4]);
};
_local4++;
};
return (_local2);
}
public static function angleTransform(_arg1:Number):Number{
if (_arg1 > 180){
_arg1 = (_arg1 - 360);
} else {
if (_arg1 < -180){
_arg1 = (_arg1 + 360);
};
};
return (_arg1);
}
public static function iniGame(_arg1:MovieClip, _arg2:Foam):void{
_game = _arg1;
_engine = _arg2;
_score[_current_level] = 0;
_win[_current_level] = false;
}
_keys["up"] = 87;
_keys["down"] = 83;
_keys["left"] = 65;
_keys["right"] = 68;
_keys["esc"] = 27;
_keys["space"] = 32;
_keys["1"] = 49;
_keys["2"] = 50;
_keys["3"] = 51;
_keys["4"] = 52;
_keys["5"] = 53;
_keys["radar"] = 82;
_keys["attack"] = 70;
_keys["plus"] = 88;
_keys["minus"] = 90;
_keys["next"] = 69;
_keys["prev"] = 81;
_urls["send_to_friends"] = "http://www.gamezhero.com/sendtofriends/doctorzed-onlinegames.html?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=send_to_friends";
_urls["play_more_games"] = "http://www.gamezhero.com/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=more_free_games";
_urls["zorro_logo"] = "http://www.gamezhero.com/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=zorro_logo";
_urls["put_this_game"] = "http://www.gamezhero.com/freewebsitegames/doctorzed-onlinegames.html?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=free_web_site_games";
_urls["view_top_score"] = "http://www.gamezhero.com/topscore/doctorzed/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=top_score";
_urls["release"] = "http://www.gamezhero.com/online-games/arcade-games/doctorzed-onlinegames.html?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=release";
_urls["score"] = "http://files.gamezhero.com/online/doctorzed/score/score.swf";
_urls["error"] = "http://www.gamezhero.com/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=error";
_urls["preloader"] = "http://www.gamezhero.com/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=preloader";
_urls["play_more_games_context"] = "http://www.gamezhero.com/?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=context_menu";
_urls["put_this_game_context"] = "http://www.gamezhero.com/freewebsitegames/doctorzed-onlinegames.html?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=free_web_site_games_context";
_urls["send_to_friends_context"] = "http://www.gamezhero.com/sendtofriends/doctorzed-onlinegames.html?utm_campaign=doctor_zed&utm_source=doctor_zed&utm_medium=send_to_friends_context_menu";
_urls["youtube"] = "http://www.youtube.com/watch?v=sDMaV3OcGKw";
pauseLanguage[gameFormLanguage.DEU] = new Object();
pauseLanguage[gameFormLanguage.DEU][PauseMenu.BTN_EXIT] = "SPIEL VERLASSEN";
pauseLanguage[gameFormLanguage.DEU][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.DEU][PauseMenu.BTN_MUSIC] = "MUSIK";
pauseLanguage[gameFormLanguage.DEU][PauseMenu.BTN_SOUND] = "LAUT";
pauseLanguage[gameFormLanguage.DEU][PauseMenu.BTN_PLAY] = "WEITERSPIELEN";
pauseLanguage[gameFormLanguage.FRA] = new Object();
pauseLanguage[gameFormLanguage.FRA][PauseMenu.BTN_EXIT] = "QUITTER LE JEU";
pauseLanguage[gameFormLanguage.FRA][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.FRA][PauseMenu.BTN_MUSIC] = "GESTION DE MUSIQUE";
pauseLanguage[gameFormLanguage.FRA][PauseMenu.BTN_SOUND] = "GESTION DE SON";
pauseLanguage[gameFormLanguage.FRA][PauseMenu.BTN_PLAY] = "CONTINUER LE JEU";
pauseLanguage[gameFormLanguage.PRT] = new Object();
pauseLanguage[gameFormLanguage.PRT][PauseMenu.BTN_EXIT] = "SAIR DO JOGO";
pauseLanguage[gameFormLanguage.PRT][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.PRT][PauseMenu.BTN_MUSIC] = "CONTROLO DA MÚSICA";
pauseLanguage[gameFormLanguage.PRT][PauseMenu.BTN_SOUND] = "CONTROLO DO SOM";
pauseLanguage[gameFormLanguage.PRT][PauseMenu.BTN_PLAY] = "CONTINUAR O JOGO";
pauseLanguage[gameFormLanguage.ESP] = new Object();
pauseLanguage[gameFormLanguage.ESP][PauseMenu.BTN_EXIT] = "RETIRA DEL JUEGO";
pauseLanguage[gameFormLanguage.ESP][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.ESP][PauseMenu.BTN_MUSIC] = "AJUSTA LA MÚSICA";
pauseLanguage[gameFormLanguage.ESP][PauseMenu.BTN_SOUND] = "AJUSTA EL SONIDO";
pauseLanguage[gameFormLanguage.ESP][PauseMenu.BTN_PLAY] = "CONTINÚA EL JUEGO";
pauseLanguage[gameFormLanguage.RUS] = new Object();
pauseLanguage[gameFormLanguage.RUS][PauseMenu.BTN_EXIT] = "Выйти Из Игры";
pauseLanguage[gameFormLanguage.RUS][PauseMenu.BTN_GAMEZHERO] = "Играть на Gamezhero.com";
pauseLanguage[gameFormLanguage.RUS][PauseMenu.BTN_MUSIC] = "Управление Музыкой";
pauseLanguage[gameFormLanguage.RUS][PauseMenu.BTN_SOUND] = "Управление Звуком";
pauseLanguage[gameFormLanguage.RUS][PauseMenu.BTN_PLAY] = "Продолжить Игру";
pauseLanguage[gameFormLanguage.ENG] = new Object();
pauseLanguage[gameFormLanguage.ENG][PauseMenu.BTN_EXIT] = "Quit Game";
pauseLanguage[gameFormLanguage.ENG][PauseMenu.BTN_GAMEZHERO] = "Visit Gamezhero.com";
pauseLanguage[gameFormLanguage.ENG][PauseMenu.BTN_MUSIC] = "Music Control";
pauseLanguage[gameFormLanguage.ENG][PauseMenu.BTN_SOUND] = "Sound Control";
pauseLanguage[gameFormLanguage.ENG][PauseMenu.BTN_PLAY] = "Continue Game";
pauseLanguage[gameFormLanguage.UKR] = new Object();
pauseLanguage[gameFormLanguage.UKR][PauseMenu.BTN_EXIT] = "Покинути Гру";
pauseLanguage[gameFormLanguage.UKR][PauseMenu.BTN_GAMEZHERO] = "Грати На Gamezhero.com";
pauseLanguage[gameFormLanguage.UKR][PauseMenu.BTN_MUSIC] = "Керування Музикой";
pauseLanguage[gameFormLanguage.UKR][PauseMenu.BTN_SOUND] = "Керування Звуком";
pauseLanguage[gameFormLanguage.UKR][PauseMenu.BTN_PLAY] = "Продовжити Гру";
pauseLanguage[gameFormLanguage.POL] = new Object();
pauseLanguage[gameFormLanguage.POL][PauseMenu.BTN_EXIT] = "OPUŚCIĆ GRĘ";
pauseLanguage[gameFormLanguage.POL][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.POL][PauseMenu.BTN_MUSIC] = "STEROWANIE MUZYKĄ";
pauseLanguage[gameFormLanguage.POL][PauseMenu.BTN_SOUND] = "STEROWANIE DŻWIĘKIEM";
pauseLanguage[gameFormLanguage.POL][PauseMenu.BTN_PLAY] = "KONTYNUOWAĆ GRĘ";
pauseLanguage[gameFormLanguage.ITA] = new Object();
pauseLanguage[gameFormLanguage.ITA][PauseMenu.BTN_EXIT] = "USCIRE DAL GIOCO";
pauseLanguage[gameFormLanguage.ITA][PauseMenu.BTN_GAMEZHERO] = "GAMEZHERO.COM";
pauseLanguage[gameFormLanguage.ITA][PauseMenu.BTN_MUSIC] = "CONTROLLO DELLA MUSICA";
pauseLanguage[gameFormLanguage.ITA][PauseMenu.BTN_SOUND] = "CONTROLLO DEL SUONO";
pauseLanguage[gameFormLanguage.ITA][PauseMenu.BTN_PLAY] = "CONTINUARE IL GIOCO";
open_level[0] = [1, 2];
open_level[1] = [2];
open_level[2] = [3];
open_level[3] = [4];
open_level[4] = [5];
open_level[5] = [6];
open_level[6] = [7];
open_level[7] = [8];
open_level[8] = [9];
open_level[9] = [10];
open_level[10] = [11];
open_level[11] = [12];
open_level[12] = [13];
open_level[13] = [14];
open_level[14] = [15];
open_level[15] = [16];
open_level[16] = [17];
open_level[17] = [18];
open_level[18] = [19];
open_level[19] = [20];
open_level[20] = [21];
open_level[21] = [22];
open_level[22] = [23];
open_level[23] = [24];
open_level[24] = [];
_teleport_gallery = {stoneClass:"Teleport", skinClass:"teleport_1", vertices:[new Vector(-60, -120), new Vector(60, -120), new Vector(60, 0), new Vector(-60, 0)], shadow:100, pos:{angle:0, radius:600}, physics:{mass:Simplification.INFINITE_MASS, friction:0.2, elasticity:1}, score:0, armor:0, helpID:0, child:[]};
_jumper_gallery["jumper_1"] = {groundClass:"Jumper", skinClass:"jumper_skin1", vertices:[new Vector(-25, -15), new Vector(25, -15), new Vector(30, 0), new Vector(-30, 0)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:0, armor:-1, power:10, step:7, type:"dynamic", n:0};
_volcano_gallery["volcano_1_small"] = {groundClass:"Volcan", skinClass:"volcano_skin1_small", vertices:[new Vector(-17, -55), new Vector(17, -55), new Vector(30, -5), new Vector(-30, -5)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:0, armor:-1, power:20};
_volcano_gallery["volcano_1_medium"] = {groundClass:"Volcan", skinClass:"volcano_skin1_medium", vertices:[new Vector(-22, -55), new Vector(22, -55), new Vector(40, -5), new Vector(-40, -5)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:0, armor:-1, power:25};
_volcano_gallery["volcano_1_big"] = {groundClass:"Volcan", skinClass:"volcano_skin1_big", vertices:[new Vector(-29, -55), new Vector(29, -55), new Vector(53, -5), new Vector(-53, -5)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:0, armor:-1, power:30};
_volcano_gallery["volcano_2_small"] = new Object();
_volcano_gallery["volcano_2_small"] = clone(_volcano_gallery["volcano_1_small"], true);
_volcano_gallery["volcano_2_small"].skinClass = "volcano_skin2_small";
_volcano_gallery["volcano_2_medium"] = new Object();
_volcano_gallery["volcano_2_medium"] = clone(_volcano_gallery["volcano_1_medium"]);
_volcano_gallery["volcano_2_medium"].skinClass = "volcano_skin2_medium";
_volcano_gallery["volcano_2_big"] = new Object();
_volcano_gallery["volcano_2_big"] = clone(_volcano_gallery["volcano_1_big"]);
_volcano_gallery["volcano_2_big"].skinClass = "volcano_skin2_big";
_volcano_gallery["volcano_3_small"] = new Object();
_volcano_gallery["volcano_3_small"] = clone(_volcano_gallery["volcano_1_small"]);
_volcano_gallery["volcano_3_small"].skinClass = "volcano_skin3_small";
_volcano_gallery["volcano_3_medium"] = new Object();
_volcano_gallery["volcano_3_medium"] = clone(_volcano_gallery["volcano_1_medium"]);
_volcano_gallery["volcano_3_medium"].skinClass = "volcano_skin3_medium";
_volcano_gallery["volcano_3_big"] = new Object();
_volcano_gallery["volcano_3_big"] = clone(_volcano_gallery["volcano_1_big"]);
_volcano_gallery["volcano_3_big"].skinClass = "volcano_skin3_big";
_volcano_gallery["volcano_4_small"] = new Object();
_volcano_gallery["volcano_4_small"] = clone(_volcano_gallery["volcano_1_small"]);
_volcano_gallery["volcano_4_small"].skinClass = "volcano_skin4_small";
_volcano_gallery["volcano_4_medium"] = new Object();
_volcano_gallery["volcano_4_medium"] = clone(_volcano_gallery["volcano_1_medium"]);
_volcano_gallery["volcano_4_medium"].skinClass = "volcano_skin4_medium";
_volcano_gallery["volcano_4_big"] = new Object();
_volcano_gallery["volcano_4_big"] = clone(_volcano_gallery["volcano_1_big"]);
_volcano_gallery["volcano_4_big"].skinClass = "volcano_skin4_big";
_volcano_gallery["volcano_5_small"] = new Object();
_volcano_gallery["volcano_5_small"] = clone(_volcano_gallery["volcano_1_small"]);
_volcano_gallery["volcano_5_small"].skinClass = "volcano_skin5_small";
_volcano_gallery["volcano_5_medium"] = new Object();
_volcano_gallery["volcano_5_medium"] = clone(_volcano_gallery["volcano_1_medium"]);
_volcano_gallery["volcano_5_medium"].skinClass = "volcano_skin5_medium";
_volcano_gallery["volcano_5_big"] = new Object();
_volcano_gallery["volcano_5_big"] = clone(_volcano_gallery["volcano_1_big"]);
_volcano_gallery["volcano_5_big"].skinClass = "volcano_skin5_big";
_bonus_gallery["bonus_1"] = {stoneClass:"Bonus", skinClass:"bonus_skin1", vertices:[new Vector(0, -40), new Vector(40, -8), new Vector(26, 38), new Vector(-26, 38), new Vector(-40, -8)], pos:{angle:0, radius:600}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:10, armor:-1, power:40};
_help_gallery["help_1"] = {stoneClass:"HelpGround", skinClass:"help_skin1", vertices:[new Vector(-30, -30), new Vector(30, -30), new Vector(30, 30), new Vector(-30, 30)], pos:{angle:0, radius:600}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, score:0, armor:-1, power:0};
_exit_gallery = {stoneClass:"ExitGround", skinClass:"exit_skin1", vertices:[new Vector(-30, -10), new Vector(30, -10), new Vector(30, 10), new Vector(-30, 10)], shadow:140, pos:{angle:0, radius:600}, physics:{mass:20, friction:1, elasticity:1}, score:0, armor:0, helpID:0, child:[]};
_stone_gallery["stone_1_small"] = {stoneClass:"Stone", skinClass:"s_skin1_small", shadow:50, vertices:[new Vector(-1, -7), new Vector(18, -8), new Vector(18, 2), new Vector(0, 10), new Vector(-18, 3), new Vector(-9, -10)], pos:{angle:0, radius:600}, physics:{mass:10, friction:0.2, elasticity:1}, score:0, armor:0.8, child:[]};
_stone_gallery["stone_1_medium"] = {stoneClass:"Stone", skinClass:"s_skin1_medium", shadow:75, vertices:[new Vector(0, -25), new Vector(22, 3), new Vector(22, 17), new Vector(0, 26), new Vector(-23, 17), new Vector(-14, -16)], pos:{angle:0, radius:600}, physics:{mass:25, friction:0.2, elasticity:1}, score:0, armor:0.8, child:[clone(_stone_gallery["stone_1_small"]), clone(_stone_gallery["stone_1_small"])]};
_stone_gallery["stone_1_big"] = {stoneClass:"Stone", skinClass:"s_skin1_big", shadow:100, vertices:[new Vector(-1, -47), new Vector(37, -22), new Vector(37, 32), new Vector(0, 49), new Vector(-37, 32), new Vector(-39, -20)], pos:{angle:0, radius:600}, physics:{mass:50, friction:0.2, elasticity:1}, score:0, armor:0.8, child:[clone(_stone_gallery["stone_1_medium"]), clone(_stone_gallery["stone_1_medium"])]};
_stone_gallery["stone_2_small"] = new Object();
_stone_gallery["stone_2_small"] = clone(_stone_gallery["stone_1_small"]);
_stone_gallery["stone_2_small"].skinClass = "s_skin2_small";
_stone_gallery["stone_2_small"].child = [];
_stone_gallery["stone_2_medium"] = new Object();
_stone_gallery["stone_2_medium"] = clone(_stone_gallery["stone_1_medium"]);
_stone_gallery["stone_2_medium"].skinClass = "s_skin2_medium";
_stone_gallery["stone_2_medium"].child = [clone(_stone_gallery["stone_2_small"]), clone(_stone_gallery["stone_2_small"])];
_stone_gallery["stone_2_big"] = new Object();
_stone_gallery["stone_2_big"] = clone(_stone_gallery["stone_1_big"]);
_stone_gallery["stone_2_big"].skinClass = "s_skin2_big";
_stone_gallery["stone_2_big"].child = [clone(_stone_gallery["stone_2_medium"]), clone(_stone_gallery["stone_2_medium"])];
_stone_gallery["stone_3_small"] = new Object();
_stone_gallery["stone_3_small"] = clone(_stone_gallery["stone_1_small"]);
_stone_gallery["stone_3_small"].skinClass = "s_skin3_small";
_stone_gallery["stone_3_small"].child = [];
_stone_gallery["stone_3_medium"] = new Object();
_stone_gallery["stone_3_medium"] = clone(_stone_gallery["stone_1_medium"]);
_stone_gallery["stone_3_medium"].skinClass = "s_skin3_medium";
_stone_gallery["stone_3_medium"].child = [clone(_stone_gallery["stone_3_small"]), clone(_stone_gallery["stone_3_small"])];
_stone_gallery["stone_3_big"] = new Object();
_stone_gallery["stone_3_big"] = clone(_stone_gallery["stone_1_big"]);
_stone_gallery["stone_3_big"].skinClass = "s_skin3_big";
_stone_gallery["stone_3_big"].child = [clone(_stone_gallery["stone_3_medium"]), clone(_stone_gallery["stone_3_medium"])];
_stone_gallery["stone_4_small"] = new Object();
_stone_gallery["stone_4_small"] = clone(_stone_gallery["stone_1_small"]);
_stone_gallery["stone_4_small"].skinClass = "s_skin4_small";
_stone_gallery["stone_4_small"].child = [];
_stone_gallery["stone_4_medium"] = new Object();
_stone_gallery["stone_4_medium"] = clone(_stone_gallery["stone_1_medium"]);
_stone_gallery["stone_4_medium"].skinClass = "s_skin4_medium";
_stone_gallery["stone_4_medium"].child = [clone(_stone_gallery["stone_4_small"]), clone(_stone_gallery["stone_4_small"])];
_stone_gallery["stone_4_big"] = new Object();
_stone_gallery["stone_4_big"] = clone(_stone_gallery["stone_1_big"]);
_stone_gallery["stone_4_big"].skinClass = "s_skin4_big";
_stone_gallery["stone_4_big"].child = [clone(_stone_gallery["stone_4_medium"]), clone(_stone_gallery["stone_4_medium"])];
_stone_gallery["stone_5_small"] = new Object();
_stone_gallery["stone_5_small"] = clone(_stone_gallery["stone_1_small"]);
_stone_gallery["stone_5_small"].skinClass = "s_skin5_small";
_stone_gallery["stone_5_small"].child = [];
_stone_gallery["stone_5_medium"] = new Object();
_stone_gallery["stone_5_medium"] = clone(_stone_gallery["stone_1_medium"]);
_stone_gallery["stone_5_medium"].skinClass = "s_skin5_medium";
_stone_gallery["stone_5_medium"].child = [clone(_stone_gallery["stone_5_small"]), clone(_stone_gallery["stone_5_small"])];
_stone_gallery["stone_5_big"] = new Object();
_stone_gallery["stone_5_big"] = clone(_stone_gallery["stone_1_big"]);
_stone_gallery["stone_5_big"].skinClass = "s_skin5_big";
_stone_gallery["stone_5_big"].child = [clone(_stone_gallery["stone_5_medium"]), clone(_stone_gallery["stone_5_medium"])];
_ground_gallery["step_1"] = {groundClass:"Ground", skinClass:"step_skin_1", vertices:[new Vector(-40, -10), new Vector(0, -5), new Vector(40, -10), new Vector(40, 10), new Vector(0, 15), new Vector(-40, 10)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0.2, elasticity:0}, score:0, armor:-1};
_ground_gallery["step_2"] = new Object();
_ground_gallery["step_2"] = clone(_ground_gallery["step_1"]);
_ground_gallery["step_2"].skinClass = "step_skin_2";
_ground_gallery["step_3"] = new Object();
_ground_gallery["step_3"] = clone(_ground_gallery["step_1"]);
_ground_gallery["step_3"].skinClass = "step_skin_3";
_ground_gallery["step_4"] = new Object();
_ground_gallery["step_4"] = clone(_ground_gallery["step_1"]);
_ground_gallery["step_4"].skinClass = "step_skin_4";
_ground_gallery["step_5"] = new Object();
_ground_gallery["step_5"] = clone(_ground_gallery["step_1"]);
_ground_gallery["step_5"].skinClass = "step_skin_5";
_ground_gallery["rock_1_big"] = {groundClass:"Ground", skinClass:"rock_1_big", vertices:[new Vector(-30, -200), new Vector(30, -200), new Vector(50, 0), new Vector(-50, 0)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0.2, elasticity:0}, score:0, armor:-1};
_ground_gallery["rock_1_medium"] = {groundClass:"Ground", skinClass:"rock_1_medium", vertices:[new Vector(-22, -150), new Vector(23, -150), new Vector(38, 0), new Vector(-37, 0)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0.2, elasticity:0}, score:0, armor:-1};
_ground_gallery["rock_1_small"] = {groundClass:"Ground", skinClass:"rock_1_small", vertices:[new Vector(-15, -100), new Vector(15, -100), new Vector(25, 0), new Vector(-25, 0)], pos:{angle:0, radius:0}, physics:{mass:Simplification.INFINITE_MASS, friction:0.2, elasticity:0}, score:0, armor:-1};
_ground_gallery["rock_2_big"] = new Object();
_ground_gallery["rock_2_big"] = clone(_ground_gallery["rock_1_big"]);
_ground_gallery["rock_2_big"].skinClass = "rock_2_big";
_ground_gallery["rock_2_medium"] = new Object();
_ground_gallery["rock_2_medium"] = clone(_ground_gallery["rock_1_medium"]);
_ground_gallery["rock_2_medium"].skinClass = "rock_2_medium";
_ground_gallery["rock_2_small"] = new Object();
_ground_gallery["rock_2_small"] = clone(_ground_gallery["rock_1_small"]);
_ground_gallery["rock_2_small"].skinClass = "rock_2_small";
_ground_gallery["rock_3_big"] = new Object();
_ground_gallery["rock_3_big"] = clone(_ground_gallery["rock_1_big"]);
_ground_gallery["rock_3_big"].skinClass = "rock_3_big";
_ground_gallery["rock_3_medium"] = new Object();
_ground_gallery["rock_3_medium"] = clone(_ground_gallery["rock_1_medium"]);
_ground_gallery["rock_3_medium"].skinClass = "rock_3_medium";
_ground_gallery["rock_3_small"] = new Object();
_ground_gallery["rock_3_small"] = clone(_ground_gallery["rock_1_small"]);
_ground_gallery["rock_3_small"].skinClass = "rock_3_small";
_ground_gallery["rock_4_big"] = new Object();
_ground_gallery["rock_4_big"] = clone(_ground_gallery["rock_1_big"]);
_ground_gallery["rock_4_big"].skinClass = "rock_4_big";
_ground_gallery["rock_4_medium"] = new Object();
_ground_gallery["rock_4_medium"] = clone(_ground_gallery["rock_1_medium"]);
_ground_gallery["rock_4_medium"].skinClass = "rock_4_medium";
_ground_gallery["rock_4_small"] = new Object();
_ground_gallery["rock_4_small"] = clone(_ground_gallery["rock_1_small"]);
_ground_gallery["rock_4_small"].skinClass = "rock_4_small";
_ground_gallery["rock_5_big"] = new Object();
_ground_gallery["rock_5_big"] = clone(_ground_gallery["rock_1_big"]);
_ground_gallery["rock_5_big"].skinClass = "rock_5_big";
_ground_gallery["rock_5_medium"] = new Object();
_ground_gallery["rock_5_medium"] = clone(_ground_gallery["rock_1_medium"]);
_ground_gallery["rock_5_medium"].skinClass = "rock_5_medium";
_ground_gallery["rock_5_small"] = new Object();
_ground_gallery["rock_5_small"] = clone(_ground_gallery["rock_1_small"]);
_ground_gallery["rock_5_small"].skinClass = "rock_5_small";
_levels["enemy_boss_small"] = {enemyClass:"Enemy", skinClass:"e_skin_boss_small", type:5, strategy:"intellect", moveType:"boss", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:Simplification.INFINITE_MASS, friction:1, elasticity:1}, params:{speed_max:0.35, speed_dx:0.01, brake_kof:0.1, jump_kof:20, slip:15, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:20};
_levels["enemy_boss_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_5_medium", type:5, strategy:"intellect", moveType:"boss", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:Simplification.INFINITE_MASS, friction:1, elasticity:1}, params:{speed_max:0.3, speed_dx:0.01, brake_kof:0.1, jump_kof:20, slip:10, fly_radius:null}, child:[], wave:[], action:null, score:50, armor:30};
_levels["enemy_boss_big"] = {enemyClass:"Enemy", skinClass:"e_skin_boss_big", type:5, strategy:"intellect", moveType:"boss", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:100, mass:Simplification.INFINITE_MASS, friction:1, elasticity:1}, params:{speed_max:0.25, speed_dx:0.01, brake_kof:0.1, jump_kof:25, slip:5, fly_radius:null}, child:[], wave:[], action:null, score:100, armor:40};
_levels["enemy_rotator_small"] = {enemyClass:"Enemy", skinClass:"e_skin_5_small", type:1, strategy:"intellect", moveType:"rolling", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:25, friction:1, elasticity:1}, params:{speed_max:0.24, speed_dx:0.01, brake_kof:0.1, jump_kof:20, slip:15, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:2};
_levels["enemy_rotator_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_5_medium", type:1, strategy:"intellect", moveType:"rolling", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:35, friction:1, elasticity:1}, params:{speed_max:0.25, speed_dx:0.01, brake_kof:0.1, jump_kof:20, slip:10, fly_radius:null}, child:[clone(_levels["enemy_rotator_small"]), clone(_levels["enemy_rotator_small"])], wave:[], action:null, score:50, armor:6};
_levels["enemy_rotator_big"] = {enemyClass:"Enemy", skinClass:"e_skin_5_big", type:1, strategy:"intellect", moveType:"rolling", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:65, mass:55, friction:1, elasticity:1}, params:{speed_max:0.26, speed_dx:0.01, brake_kof:0.1, jump_kof:25, slip:5, fly_radius:null}, child:[clone(_levels["enemy_rotator_medium"]), clone(_levels["enemy_rotator_medium"])], wave:[], action:null, score:100, armor:10};
_levels["enemy_jump_small"] = {enemyClass:"Enemy", skinClass:"e_skin_3_small", type:4, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:25, friction:0.2, elasticity:1}, params:{speed_max:5, speed_dx:1, brake_kof:0.1, jump_kof:10, slip:15, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:2};
_levels["enemy_jump_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_3_medium", type:4, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:50, friction:0.2, elasticity:1}, params:{speed_max:6, speed_dx:1, brake_kof:0.1, jump_kof:15, slip:10, fly_radius:null}, child:[clone(_levels["enemy_jump_small"]), clone(_levels["enemy_jump_small"])], wave:[], action:null, score:50, armor:6};
_levels["enemy_jump_big"] = {enemyClass:"Enemy", skinClass:"e_skin_3_big", type:4, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:65, mass:100, friction:0.2, elasticity:1}, params:{speed_max:6, speed_dx:1, brake_kof:0.1, jump_kof:20, slip:5, fly_radius:null}, child:[clone(_levels["enemy_jump_medium"]), clone(_levels["enemy_jump_medium"])], wave:[], action:null, score:100, armor:10};
_levels["enemy_fly_small"] = {enemyClass:"Enemy", skinClass:"e_skin_2_small", type:3, strategy:"intellect", moveType:"flying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:25, friction:0.2, elasticity:1}, params:{speed_max:5, speed_dx:0.5, brake_kof:0.1, jump_kof:20, slip:15, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:2};
_levels["enemy_fly_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_2_medium", type:3, strategy:"intellect", moveType:"flying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:50, friction:0.2, elasticity:1}, params:{speed_max:6, speed_dx:0.5, brake_kof:0.1, jump_kof:25, slip:10, fly_radius:null}, child:[clone(_levels["enemy_fly_small"]), clone(_levels["enemy_fly_small"])], wave:[], action:null, score:50, armor:6};
_levels["enemy_fly_big"] = {enemyClass:"Enemy", skinClass:"e_skin_2_big", type:3, strategy:"intellect", moveType:"flying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:65, mass:100, friction:0.2, elasticity:1}, params:{speed_max:7, speed_dx:0.5, brake_kof:0.1, jump_kof:30, slip:5, fly_radius:null}, child:[clone(_levels["enemy_fly_medium"]), clone(_levels["enemy_fly_medium"])], wave:[], action:null, score:100, armor:10};
_levels["enemy_move_small"] = {enemyClass:"Enemy", skinClass:"e_skin_1_small", type:2, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:25, friction:0.2, elasticity:1}, params:{speed_max:5, speed_dx:1, brake_kof:0.1, jump_kof:3, slip:0, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:2};
_levels["enemy_move_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_1_medium", type:2, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:50, friction:0.2, elasticity:1}, params:{speed_max:6, speed_dx:1, brake_kof:0.1, jump_kof:4, slip:0, fly_radius:null}, child:[clone(_levels["enemy_move_small"]), clone(_levels["enemy_move_small"])], wave:[], action:null, score:50, armor:6};
_levels["enemy_move_big"] = {enemyClass:"Enemy", skinClass:"e_skin_1_big", type:2, strategy:"intellect", moveType:"jumping", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:65, mass:100, friction:0.2, elasticity:1}, params:{speed_max:6, speed_dx:1, brake_kof:0.1, jump_kof:5, slip:0, fly_radius:null}, child:[clone(_levels["enemy_move_medium"]), clone(_levels["enemy_move_medium"])], wave:[], action:null, score:100, armor:10};
_levels["enemy_superfly_small"] = {enemyClass:"Enemy", skinClass:"e_skin_4_small", type:0, strategy:"intellect", moveType:"superflying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:28, mass:25, friction:0.2, elasticity:1}, params:{speed_max:4, speed_dx:0.5, brake_kof:0.1, jump_kof:20, slip:15, fly_radius:null}, child:[], wave:[], action:null, score:10, armor:2};
_levels["enemy_superfly_medium"] = {enemyClass:"Enemy", skinClass:"e_skin_4_medium", type:0, strategy:"intellect", moveType:"superflying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:40, mass:50, friction:0.2, elasticity:1}, params:{speed_max:5.5, speed_dx:0.5, brake_kof:0.1, jump_kof:25, slip:10, fly_radius:null}, child:[clone(_levels["enemy_superfly_small"]), clone(_levels["enemy_superfly_small"])], wave:[], action:null, score:50, armor:6};
_levels["enemy_superfly_big"] = {enemyClass:"Enemy", skinClass:"e_skin_4_big", type:0, strategy:"intellect", moveType:"superflying", directionType:"left", pos:{angle:20, radius:500}, physics:{radius:65, mass:100, friction:0.2, elasticity:1}, params:{speed_max:7, speed_dx:0.5, brake_kof:0.1, jump_kof:30, slip:5, fly_radius:null}, child:[clone(_levels["enemy_superfly_medium"]), clone(_levels["enemy_superfly_medium"])], wave:[], action:null, score:100, armor:10};
_levels[0] = new Object();
_levels[0]["planet"] = {skinName:((5 * 4) + 2), strasSkinName:5, radius:250, pos:{x:_game_width_2, y:Number((_game_height + 50))}, physics:{mass:Simplification.INFINITE_MASS, friction:0, elasticity:0}, gravitation:0.5};
_levels[0]["player"] = {pos:{angle:90, radius:700}, physics:{mass:50, friction:0, elasticity:0}, params:{speed_max:8, speed_dx:1, brake_kof:0.2, jump_kof:15}, equipment:0, bullet:{bulletClass:"ground", vertices:[new Vector(-20, -10), new Vector(20, -10), new Vector(20, 10), new Vector(-20, 10)], pos:{angle:90, radius:700}, physics:{mass:40, friction:0.2, elasticity:1}}};
_levels[0]["ground"] = new Array();
_levels[0]["ground"][0] = new Object();
_levels[0]["ground"][0] = clone(_ground_gallery["step_1"]);
_levels[0]["ground"][0].pos = {angle:250, radius:300};
_levels[0]["ground"][0].movie = [{type:"right", step:1, tic:100}, {type:"wait", step:0, tic:100}, {type:"up", step:1, tic:100}, {type:"left", step:1, tic:100}, {type:"down", step:1, tic:100}];
_levels[0]["ground"][1] = new Object();
_levels[0]["ground"][1] = clone(_ground_gallery["step_1"]);
_levels[0]["ground"][1].pos = {angle:35, radius:400};
_levels[0]["ground"][2] = new Object();
_levels[0]["ground"][2] = clone(_ground_gallery["step_1"]);
_levels[0]["ground"][2].pos = {angle:60, radius:500};
_levels[0]["ground"][3] = new Object();
_levels[0]["ground"][3] = clone(_ground_gallery["step_1"]);
_levels[0]["ground"][3].pos = {angle:340, radius:600};
_levels[0]["ground"][4] = new Object();
_levels[0]["ground"][4] = clone(_ground_gallery["rock_1_big"]);
_levels[0]["ground"][4].pos = {angle:95, radius:_levels[0]["planet"]["radius"]};
_levels[0]["ground"][5] = new Object();
_levels[0]["ground"][5] = clone(_ground_gallery["rock_1_medium"]);
_levels[0]["ground"][5].pos = {angle:190, radius:_levels[0]["planet"]["radius"]};
_levels[0]["ground"][6] = new Object();
_levels[0]["ground"][6] = clone(_ground_gallery["rock_1_small"]);
_levels[0]["ground"][6].pos = {angle:280, radius:_levels[0]["planet"]["radius"]};
_levels[0]["stone"] = new Array();
_levels[0]["stone"][0] = new Object();
_levels[0]["stone"][0] = clone(_stone_gallery["stone_1_big"]);
_levels[0]["stone"][0].pos = {angle:0, radius:_levels[0]["planet"]["radius"]};
_levels[0]["stone"][1] = new Object();
_levels[0]["stone"][1] = clone(_stone_gallery["stone_1_medium"]);
_levels[0]["stone"][1].pos = {angle:45, radius:_levels[0]["planet"]["radius"]};
_levels[0]["stone"][2] = new Object();
_levels[0]["stone"][2] = clone(_stone_gallery["stone_1_small"]);
_levels[0]["stone"][2].pos = {angle:90, radius:_levels[0]["planet"]["radius"]};
_levels[0]["volcan"] = new Array();
_levels[0]["volcan"][0] = new Object();
_levels[0]["volcan"][0] = clone(_volcano_gallery["volcano_5_small"], true);
_levels[0]["volcan"][0].pos = {angle:360, radius:_levels[0]["planet"]["radius"]};
_levels[0]["volcan"][1] = new Object();
_levels[0]["volcan"][1] = clone(_volcano_gallery["volcano_5_medium"]);
_levels[0]["volcan"][1].pos = {angle:300, radius:_levels[0]["planet"]["radius"]};
_levels[0]["volcan"][2] = new Object();
_levels[0]["volcan"][2] = clone(_volcano_gallery["volcano_5_big"]);
_levels[0]["volcan"][2].pos = {angle:220, radius:_levels[0]["planet"]["radius"]};
_levels[0]["bonus"] = new Array();
_levels[0]["bonus"][0] = new Object();
_levels[0]["bonus"][0] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][0].pos = {angle:360, radius:(_levels[0]["planet"]["radius"] + 300)};
_levels[0]["bonus"][1] = new Object();
_levels[0]["bonus"][1] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][1].pos = {angle:360, radius:(_levels[0]["planet"]["radius"] + 400)};
_levels[0]["bonus"][2] = new Object();
_levels[0]["bonus"][2] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][2].pos = {angle:300, radius:(_levels[0]["planet"]["radius"] + 300)};
_levels[0]["bonus"][3] = new Object();
_levels[0]["bonus"][3] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][3].pos = {angle:300, radius:(_levels[0]["planet"]["radius"] + 400)};
_levels[0]["bonus"][4] = new Object();
_levels[0]["bonus"][4] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][4].pos = {angle:300, radius:(_levels[0]["planet"]["radius"] + 500)};
_levels[0]["bonus"][5] = new Object();
_levels[0]["bonus"][5] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][5].pos = {angle:20, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["bonus"][6] = new Object();
_levels[0]["bonus"][6] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][6].pos = {angle:220, radius:(_levels[0]["planet"]["radius"] + 400)};
_levels[0]["bonus"][7] = new Object();
_levels[0]["bonus"][7] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][7].pos = {angle:220, radius:(_levels[0]["planet"]["radius"] + 500)};
_levels[0]["bonus"][8] = new Object();
_levels[0]["bonus"][8] = clone(_bonus_gallery["bonus_1"]);
_levels[0]["bonus"][8].pos = {angle:220, radius:(_levels[0]["planet"]["radius"] + 600)};
_levels[0]["help"] = new Array();
_levels[0]["help"][0] = new Object();
_levels[0]["help"][0] = clone(_help_gallery["help_1"]);
_levels[0]["help"][0].pos = {angle:320, radius:(_levels[0]["planet"]["radius"] + 100)};
_levels[0]["help"][0].helpID = 1;
_levels[0]["enemy"] = new Array();
_levels[0]["enemy"][0] = new Object();
_levels[0]["enemy"][0] = clone(_levels["enemy_superfly_big"]);
_levels[0]["enemy"][0].pos = {angle:40, radius:_levels[0]["planet"]["radius"]};
}
}//package classes
Section 38
//Ground (classes.Ground)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
import classes.force.*;
import flash.utils.*;
public class Ground extends ObjectOfPlanet implements IGameObject {
public var _ground_movie:Array;
public var _ground_movie_tic:Number;// = 0
public var _ground_skin_vertices:Array;
public var _ground_movie_index:Number;// = -1
public var _ground_skin_class:String;
public var _ground_skin:MovieClip;
public function Ground(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
var foo:Point;
var _x:Number;
var _y:Number;
var g = _arg1;
var groundInfo = _arg2;
var gravity = _arg3;
var planet = _arg4;
_ground_movie_index = -1;
_ground_movie_tic = 0;
super(g, groundInfo, gravity, planet);
_ground_skin_class = groundInfo["skinClass"];
_ground_skin_vertices = groundInfo["vertices"];
foo = this.getPosition();
_x = foo.x;
_y = foo.y;
_body = new RigidBody(_x, _y, _object_mass, _ground_skin_vertices, 0, 0, _object_friction, _object_elasticity, 0, 0);
_body._name = "ground";
_body._type = "ground";
_body._goal = this;
_engine.addElement(_body, true, Boolean(Global._rander));
_ground_movie = new Array();
try {
if (groundInfo.movie.length > 0){
_ground_movie = groundInfo.movie;
};
} catch(e:Error) {
};
ini(groundInfo);
}
override public function remove(_arg1:Boolean=true):void{
super.remove(_arg1);
clearEvents();
_engine.removeElement(_body);
_goal["gameContainer"].removeChild(this);
}
public function drawInPlanet():void{
(Global._game as Game).planet.putToPlanet(this);
this.removeChild(_ground_skin);
}
public function update(_arg1:GameEvents=null):void{
updateMovie();
}
override public function clearEvents():void{
super.clearEvents();
if (_ground_movie.length > 0){
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
};
}
public function updateMovie(){
var _local1:Vector;
var _local2:Number;
super.updateParams();
_ground_movie_tic--;
if (_ground_movie_tic < 0){
_ground_movie_index++;
if (_ground_movie_index >= _ground_movie.length){
_ground_movie_index = 0;
};
_ground_movie[_ground_movie_index].type;
_ground_movie[_ground_movie_index].step;
_ground_movie_tic = _ground_movie[_ground_movie_index].tic;
};
switch (_ground_movie[_ground_movie_index].type){
case "up":
_local1 = _object_direction;
_local2 = _ground_movie[_ground_movie_index].step;
break;
case "down":
_local1 = _object_direction;
_local2 = -(_ground_movie[_ground_movie_index].step);
break;
case "left":
_local1 = _object_direction.getPerp();
_local2 = -(_ground_movie[_ground_movie_index].step);
break;
case "right":
_local1 = _object_direction.getPerp();
_local2 = _ground_movie[_ground_movie_index].step;
break;
default:
_local1 = new Vector(0, 0);
_local2 = 0;
break;
};
_body.x = (_body.x + (_local1.x * _local2));
_body.y = (_body.y + (_local1.y * _local2));
super.updateSkin();
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
var ClassSkin:Class;
var obj = _arg1;
var how = _arg2;
super.ini(obj);
try {
ClassSkin = (getDefinitionByName(_ground_skin_class) as Class);
if (ClassSkin != null){
_ground_skin = MovieClip(new (ClassSkin));
this.addChild(_ground_skin);
};
} catch(e:Error) {
return;
};
if (_ground_movie.length > 0){
stage.addEventListener(GameEvents.GAME_UPDATE, update);
} else {
drawInPlanet();
};
}
}
}//package classes
Section 39
//HelpGround (classes.HelpGround)
package classes {
import classes.events.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import classes.force.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class HelpGround extends Ground {
public var helpID:Number;
public var _collideDetector:IFineCollisionDetector;
public function HelpGround(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "help";
_body._type = "help";
helpID = _arg2.helpID;
(this._body as SimpleParticle).addIgnoreType("player");
(this._body as SimpleParticle).addIgnoreType("stone");
(this._body as SimpleParticle).addIgnoreType("bullet");
(this._body as SimpleParticle).addIgnoreType("enemy_0");
(this._body as SimpleParticle).addIgnoreType("enemy_1");
(this._body as SimpleParticle).addIgnoreType("enemy_2");
(this._body as SimpleParticle).addIgnoreType("enemy_3");
(this._body as SimpleParticle).addIgnoreType("enemy_4");
_ground_skin.gotoAndStop(1);
_collideDetector = new SATCollisionFactory().getCollisionDetector(_body, (Global._game as Game).player._body);
}
override public function remove(_arg1:Boolean=true):void{
clearEvents();
super.remove(_arg1);
}
override public function update(_arg1:GameEvents=null):void{
var _local2:Boolean;
_local2 = _collideDetector.hasCollision();
if (!_local2){
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
changeGameEvent(GameEvents.GAME_HELP_CLOSE);
};
}
public function updateCollide(_arg1:ObjectOfPlanetEvents){
var _local2:*;
_local2 = _arg1.action;
if (SimpleParticle(_local2._body)._type == "player"){
stage.addEventListener(GameEvents.GAME_UPDATE, update);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
changeGameEvent(GameEvents.GAME_HELP_OPEN, helpID);
};
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
super.ini(_arg1);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
}
}
}//package classes
Section 40
//HelpInfo (classes.HelpInfo)
package classes {
import classes.events.*;
import flash.display.*;
public class HelpInfo extends MovieClip {
public var help_current:uint;
public var help_pause:uint;
public var help_flag:uint;
public var helper:MovieClip;
public function HelpInfo(){
addFrameScript(0, frame1);
ini();
}
public function ini():void{
stage.addEventListener(GameEvents.GAME_HELP_OPEN, openHelp);
stage.addEventListener(GameEvents.GAME_HELP_CLOSE, closeHelp);
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
}
function frame1(){
stop();
}
public function closeHelp(_arg1:GameEvents=null):void{
help_flag = 0;
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
}
public function openHelp(_arg1:GameEvents=null):void{
help_flag = 1;
help_current = _arg1.gameValue;
help_pause = 35;
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
}
public function update(_arg1:GameEvents=null):void{
if (help_flag){
if ((((help_pause > 0)) && ((this.currentFrame == 1)))){
help_pause--;
};
if (help_pause == 0){
if (this.currentFrame == this.totalFrames){
if ((this["helper"] as MovieClip) != undefined){
(this["helper"] as MovieClip).gotoAndStop(help_current);
if ((this["helper"] as MovieClip).currentFrame == help_current){
Global.sound_game.playSound("alert", "s_alert");
(this["helper"] as MovieClip).gotoAndStop(help_current);
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
};
};
} else {
this.gotoAndStop((this.currentFrame + 1));
};
};
} else {
if (this.currentFrame == 1){
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
} else {
this.gotoAndStop((this.currentFrame - 1));
};
};
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_HELP_OPEN, openHelp);
stage.removeEventListener(GameEvents.GAME_HELP_CLOSE, closeHelp);
}
}
}//package classes
Section 41
//IGameObject (classes.IGameObject)
package classes {
import classes.events.*;
public interface IGameObject {
function ini(_arg1:Object, _arg2:Boolean=false):void;
function clearEvents():void;
function update(_arg1:GameEvents=null):void;
function remove(_arg1:Boolean=true):void;
function actionGameOver(_arg1:GameEvents=null):void;
}
}//package classes
Section 42
//Jumper (classes.Jumper)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import classes.force.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Jumper extends Volcan {
public var jumper_pause:Number;// = 30
public var jumper_pause_curr:Number;// = 0
public var jumper_power_curr:Number;// = 0
public var jumper_step:Number;// = 3
public var jumper_power:Number;// = 0
public var jumper_type:String;// = "static"
public function Jumper(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
jumper_pause = 30;
jumper_type = "static";
jumper_pause_curr = 0;
jumper_power_curr = 0;
jumper_step = 3;
jumper_power = 0;
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "jumper";
_body._type = "jumper";
jumper_step = _arg2.step;
jumper_power = _volcan_power;
jumper_type = _arg2.type;
jumper_power_curr = _arg2.n;
this._ground_skin["indicator"].gotoAndStop((jumper_power_curr + 1));
}
override public function update(_arg1:GameEvents=null):void{
if (jumper_type == "dynamic"){
jumper_pause_curr++;
if (jumper_pause_curr >= jumper_pause){
jumper_pause_curr = 0;
jumper_power_curr++;
if (jumper_power_curr > 5){
jumper_power_curr = 0;
};
this._ground_skin["indicator"].gotoAndStop((jumper_power_curr + 1));
};
};
}
override public function updateCollide(_arg1:ObjectOfPlanetEvents){
var _local2:*;
var _local3:Vector;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
_local2 = _arg1.action;
super.updateParams();
if (jumper_power_curr != 0){
_local3 = getVectorFromObject2(_local2, this);
_local3.normalize();
_local4 = _local3.getAngle(new Vector(0, 0));
_local5 = _local2._object_direction.getAngle(new Vector(0, 0));
_local6 = Math.cos((_local5 - _local4));
if (_local6 > 0.9){
_local3 = _object_direction;
_local3.normalize();
_local7 = (jumper_power + (jumper_step * jumper_power_curr));
_local8 = SimpleParticle(_local2._body);
_local8.vx = (_local3.x * _local7);
_local8.vy = (_local3.y * _local7);
this._ground_skin["jump"].play();
Global.sound_game.playSound(null, "s_jumper", 0, 0, (jumper_power_curr / 5));
};
};
}
}
}//package classes
Section 43
//ObjectOfPlanet (classes.ObjectOfPlanet)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.*;
import org.generalrelativity.foam.dynamics.element.*;
import flash.geom.*;
import classes.force.*;
public class ObjectOfPlanet extends MovieClip {
public var _object_pos:Point;
public var _gravity:GravityGenerator;
public var _object_speed:Number;
public var _object_mass:Number;
public var _object_armor:Number;
public var _object_action:String;
public var _shadow:Shadow;
public var _object_pos_angle_rad:Number;
public var _object_pos_radius:Number;
public var _engine:Foam;
public var _object_score:Number;
public var _object_child:Array;
public var _object_pos_angle:Number;
public var _body;
public var _object_elasticity:Number;
public var _object_friction:Number;
public var _planet:Planet;
public var _object_direction:Vector;
public var _goal:MovieClip;
public function ObjectOfPlanet(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet, _arg5:Boolean=false, _arg6:Number=100){
var _local7:*;
super();
_goal = _arg1;
_gravity = _arg3;
_engine = Global._engine;
_planet = _arg4;
for (_local7 in _arg2["vertices"]) {
_arg2["vertices"][_local7] = new Vector(_arg2["vertices"][_local7].x, _arg2["vertices"][_local7].y);
};
_object_elasticity = _arg2["physics"].elasticity;
_object_friction = _arg2["physics"].friction;
_object_mass = _arg2["physics"].mass;
_object_pos_angle = _arg2["pos"].angle;
_object_pos_radius = _arg2["pos"].radius;
_object_child = _arg2["child"];
_object_armor = _arg2["armor"];
_object_score = _arg2["score"];
_object_speed = 0;
_object_direction = new Vector(0, 0);
MovieClip(_goal["gameContainer"]).addChild(this);
if (_arg5){
_shadow = new Shadow(MovieClip(_goal), this, _arg6);
};
}
public function updateRightRolling(_arg1:Number, _arg2:Number):void{
var _local3:Number;
_local3 = _body.av;
if (_local3 < _arg1){
_body.av = (_body.av + _arg2);
};
}
public function updateFriction(_arg1:Number):void{
var _local2:Number;
var _local3:Vector;
if (!isNaN(_object_direction.x)){
_local2 = _body.velocity.cross(_object_direction);
_local2 = (_local2 * _arg1);
_local3 = _object_direction.getPerp();
_body.vx = (_body.vx + (_local3.x * _local2));
_body.vy = (_body.vy + (_local3.y * _local2));
};
}
public function ini(_arg1:Object, _arg2:Boolean=false):void{
_body.q = (((_object_pos_angle * Math.PI) / 180) + ((_arg2)==false) ? (Math.PI / 2) : 0);
this.x = IBody(_body).x;
this.y = IBody(_body).y;
this.rotation = ((_body.q * 180) / Math.PI);
if (((!(isNaN(_arg1["vx"]))) && (!(isNaN(_arg1["vx"]))))){
_body.vx = _arg1["vx"];
_body.vy = _arg1["vy"];
_body.q = (Math.random() * Math.PI);
};
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function actionGameOver(_arg1:GameEvents=null):void{
remove();
}
public function updateRightMove(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Vector;
_local3 = _body.velocity.cross(_object_direction);
if (Math.abs(_local3) < _arg1){
_local4 = _object_direction.getPerp();
_body.vx = (_body.vx + (_local4.x * _arg2));
_body.vy = (_body.vy + (_local4.y * _arg2));
};
}
public function superJump(_arg1:Number){
var _local2:Vector;
_local2 = _object_direction;
_body.vx = (_body.vx + (_local2.x * _arg1));
_body.vy = (_body.vy + (_local2.y * _arg1));
}
public function activeGameEvent(_arg1:GameEvents):void{
var _local2:GameEvents;
_local2 = new GameEvents(String(_arg1));
_local2.gameValue = this;
stage.dispatchEvent(_local2);
}
public function top():void{
MovieClip(_goal["gameContainer"]).setChildIndex(this, (MovieClip(_goal["gameContainer"]).numChildren - 1));
}
public function checkJump():Boolean{
var _local1:Boolean;
_local1 = false;
if (Math.abs(_body.velocity.cross(_object_direction.getPerp())) < 2){
_local1 = true;
};
return (_local1);
}
public function remove(_arg1:Boolean=true):void{
clearEvents();
if (_shadow){
_shadow.remove();
};
}
public function updateLeftMove(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Vector;
_local3 = _body.velocity.cross(_object_direction);
if (Math.abs(_local3) < _arg1){
_local4 = _object_direction.getPerp();
_body.vx = (_body.vx - (_local4.x * _arg2));
_body.vy = (_body.vy - (_local4.y * _arg2));
};
}
public function getPosition():Point{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = ((Math.PI * _object_pos_angle) / 180);
_local2 = (Math.cos(_local1) * _object_pos_radius);
_local3 = (Math.sin(_local1) * _object_pos_radius);
return (new Point(_local2, _local3));
}
public function getVectorFromObject(_arg1:MovieClip, _arg2:MovieClip):Vector{
var _local3:Vector;
_local3 = new Vector((_arg1._body.x - _arg2._body.x), (_arg1._body.y - _arg2._body.y));
return (_local3);
}
public function updateParams():void{
var _local1:Vector;
_local1 = getVectorFromObject(this, _planet);
_object_pos_radius = _local1.magnitude;
_local1.normalize();
_object_direction = _local1;
_object_pos_angle_rad = _object_direction.getAngle(new Vector(0, 0));
_object_pos_angle = ((180 * _object_pos_angle_rad) / Math.PI);
_object_pos = new Point(this.x, this.y);
_object_pos = _goal["gameContainer"].localToGlobal(_object_pos);
}
public function updateDepth():void{
MovieClip(_goal["gameContainer"]).removeChild(this);
MovieClip(_goal["gameContainer"]).addChild(this);
}
public function updateLeftRolling(_arg1:Number, _arg2:Number):void{
var _local3:Number;
_local3 = _body.av;
if (_local3 > -(_arg1)){
_body.av = (_body.av - _arg2);
};
}
public function updateRollingFriction(_arg1:Number):void{
var _local2:Number;
if (!isNaN(_object_direction.x)){
_local2 = _body.av;
_local2 = (_local2 * _arg1);
_body.av = (_body.av + _local2);
};
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function getVectorFromObject2(_arg1:MovieClip, _arg2:MovieClip):Vector{
var _local3:Vector;
_local3 = new Vector((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
return (_local3);
}
public function updateSkin(_arg1:Boolean=false):void{
this.x = _body.x;
this.y = _body.y;
if (_arg1){
this.rotation = ((_body.q * 180) / Math.PI);
} else {
this.rotation = (_object_pos_angle - 90);
_body.q = (_object_pos_angle_rad - (Math.PI / 2));
};
if (_shadow){
_shadow.update(this._object_pos_angle, this._object_pos_radius, _planet._planet_radius);
};
}
public function changeGameEvent(_arg1:String, _arg2=null){
var _local3:GameEvents;
_local3 = new GameEvents(_arg1);
_local3.gameValue = _arg2;
stage.dispatchEvent(_local3);
}
}
}//package classes
Section 44
//Planet (classes.Planet)
package classes {
import classes.events.*;
import flash.display.*;
import org.generalrelativity.foam.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
public class Planet extends MovieClip implements IGameObject {
public var _planet_skin:String;
public var _planet_radius:Number;
public var _mc:MovieClip;
public var _planet_elasticity:Number;
public var _engine:Foam;
public var _planet_mass:Number;
public var _body;
public var _planet_friction:Number;
public var _planet_gravitation:Number;
public var _bmp:Bitmap;
public var _planet_h;// = null
public var _planet_w;// = null
public var _goal:MovieClip;
public var _planet_bmp:BitmapData;
public function Planet(_arg1:MovieClip, _arg2:Object){
_planet_w = null;
_planet_h = null;
super();
_goal = _arg1;
_engine = Global._engine;
_planet_gravitation = _arg2["gravitation"];
_planet_radius = _arg2["radius"];
_planet_skin = _arg2["skinName"];
_planet_mass = _arg2["physics"]["mass"];
_planet_friction = _arg2["physics"]["friction"];
_planet_elasticity = _arg2["physics"]["elasticity"];
_planet_elasticity = _arg2["physics"]["elasticity"];
_planet_w = _arg2["w"];
_planet_h = _arg2["h"];
_goal["gameContainer"].addChild(this);
_body = new Circle(0, 0, _planet_radius, _planet_mass, 0, 0, _planet_friction, _planet_elasticity, 0, 0);
_body._name = "planet";
_body._type = "planet";
_body._goal = this;
_engine.addElement(_body, true, Boolean(Global._rander));
ini(_arg2);
}
public function putToPlanet(_arg1:MovieClip):void{
var _local2:Number;
var _local3:Number;
var _local4:Rectangle;
var _local5:Rectangle;
var _local6:BitmapData;
var _local7:Matrix;
var _local8:Point;
_local2 = this.width;
_local3 = this.height;
_local4 = _arg1.getBounds(_arg1.parent);
_local5 = _arg1.getBounds(_arg1);
_local6 = new BitmapData(_local4.width, _local4.height, true, 0);
_local7 = new Matrix();
_local7.rotate(((_arg1.rotation * Math.PI) / 180));
_local7.translate((_arg1.x - _local4.x), (_arg1.y - _local4.y));
_local6.draw((_arg1 as DisplayObject), _local7, null, null, null);
_local8 = new Point(((_local2 / 2) + (_local4.x - this.x)), ((_local3 / 2) + (_local4.y - this.y)));
_planet_bmp.copyPixels(_local6, new Rectangle(0, 0, _local4.width, _local4.height), _local8, null, null, true);
_mc.removeChild(_bmp);
_bmp = new Bitmap(_planet_bmp, "auto", true);
_mc.addChild((_bmp as DisplayObject));
}
public function ini(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
var _local5:Matrix;
this.gotoAndStop(_planet_skin);
_local3 = 2880;
_local4 = 2880;
if (_planet_w == null){
_local3 = Math.round(this.width);
} else {
_local3 = Math.round((this.width * _planet_w));
};
if (_planet_h == null){
_local4 = Math.round(this.height);
} else {
_local4 = Math.round((this.height * _planet_h));
};
if (_local3 > 2880){
_local3 = 2800;
};
if (_local4 > 2880){
_local4 = 2800;
};
_planet_bmp = new BitmapData(_local3, _local4, true, 0xFFFFFF);
_local5 = new Matrix(1, 0, 0, 1, (_local3 / 2), (_local4 / 2));
_planet_bmp.draw(this, _local5, null, null, null);
this.gotoAndStop("free");
_mc = new MovieClip();
_bmp = new Bitmap(_planet_bmp, "auto", true);
_mc.addChild((_bmp as DisplayObject));
this.addChild(_mc);
_mc.x = (-(_local3) / 2);
_mc.y = (-(_local4) / 2);
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
remove();
}
public function remove(_arg1:Boolean=true):void{
_planet_bmp.dispose();
_engine.removeElement(ISimulatable(_body));
MovieClip(_goal["gameContainer"]).removeChild(this);
}
public function update(_arg1:GameEvents=null):void{
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
}
}//package classes
Section 45
//Player (classes.Player)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import flash.events.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
import classes.force.*;
import ru.etcs.events.*;
import ru.etcs.ui.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Player extends ObjectOfPlanet implements IGameObject {
public const PLAYER_GUN_ANGLE_MAX:Number = 160;
public const PLAYER_GUN_ANGLE_MIN:Number = 20;
public var PLAYER_AV_SPPED_MAX:Number;// = 6
public var _player_bullet_info:Object;
public var _player_equipment:Number;
public var Uho:MovieClip;
public var _player_attack_curr:Number;// = 50
public var legs:MovieClip;
public var _gun_power_step:Number;// = 0.5
public var _player_max_live:Number;// = 100
public var _gun_pause_cur:Number;// = 0
public var _gun_type:Number;// = 0
public var _player_skin:String;
public var Lik:MovieClip;
public var Golova:MovieClip;
public var _player_attack_max:Number;// = 100
public var active_gun:MovieClip;
public var _player_attack_step:Number;// = 0.2
public var _pause_counter:Number;
public var _gun_pause:Number;// = 15
public var Tilo:MovieClip;
public var PLAYER_AV_SPPED_DX:Number;// = 0.5
public var gun1:MovieClip;
public var gun2:MovieClip;
public var _gun_power_max:Number;// = 30
public var PLAYER_AV_BREAK_KOF:Number;// = 0.01
public var _vertices;
public var _player_skin_direction:String;
public var _player_skin_legs_position:uint;
public var _player_skin_action:String;
public var PLAYER_JUMP_KOF:Number;// = 7
public var keyFlags:Object;
public var Uho2:MovieClip;
public var _gun_power:Number;// = 17
public var _player_live:Number;// = 100
public var _gun_power_min:Number;// = 10
public var _collideDetector:IFineCollisionDetector;
public function Player(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
var _local5:Point;
var _local6:Number;
var _local7:Number;
_player_attack_max = 100;
_player_attack_curr = 50;
_player_attack_step = 0.2;
_player_live = 100;
_player_max_live = 100;
PLAYER_AV_SPPED_MAX = 6;
PLAYER_AV_SPPED_DX = 0.5;
PLAYER_AV_BREAK_KOF = 0.01;
PLAYER_JUMP_KOF = 7;
_gun_pause = 15;
_gun_pause_cur = 0;
_gun_power = 17;
_gun_type = 0;
_gun_power_min = 10;
_gun_power_max = 30;
_gun_power_step = 0.5;
keyFlags = new Object();
_vertices = new Object();
super(_arg1, _arg2, _arg3, _arg4, true);
_player_skin_action = "";
_player_skin_direction = "";
_player_equipment = _arg2["equipment"];
_player_bullet_info = _arg2["bullet"];
PLAYER_AV_SPPED_MAX = _arg2["params"].speed_max;
PLAYER_AV_SPPED_DX = _arg2["params"].speed_dx;
PLAYER_AV_BREAK_KOF = _arg2["params"].brake_kof;
PLAYER_JUMP_KOF = _arg2["params"].jump_kof;
_vertices["move"] = new Array();
_vertices["move"].push(new Vector(-28, -46));
_vertices["move"].push(new Vector(-19, -66));
_vertices["move"].push(new Vector(0, -73));
_vertices["move"].push(new Vector(19, -66));
_vertices["move"].push(new Vector(28, -46));
_vertices["move"].push(new Vector(28, 62));
_vertices["move"].push(new Vector(-28, 62));
_vertices["jump"] = new Array();
_vertices["jump"].push(new Vector(0, -73));
_vertices["jump"].push(new Vector(19, -66));
_vertices["jump"].push(new Vector(28, -46));
_vertices["jump"].push(new Vector(24, 35));
_vertices["jump"].push(new Vector(19, 55));
_vertices["jump"].push(new Vector(-19, 55));
_vertices["jump"].push(new Vector(-24, 35));
_vertices["jump"].push(new Vector(-28, -46));
_vertices["jump"].push(new Vector(-19, -66));
_vertices["sit"] = new Array();
_vertices["sit"].push(new Vector(-28, -46));
_vertices["sit"].push(new Vector(-19, -66));
_vertices["sit"].push(new Vector(0, -73));
_vertices["sit"].push(new Vector(19, -66));
_vertices["sit"].push(new Vector(28, -46));
_vertices["sit"].push(new Vector(28, 40));
_vertices["sit"].push(new Vector(-28, 40));
_local5 = this.getPosition();
_local6 = _local5.x;
_local7 = _local5.y;
_body = new RigidBody(x, _local7, _object_mass, _vertices["move"], 0, 0, _object_friction, _object_elasticity, ((Math.PI * (_object_pos_angle + 90)) / 180), 0);
_body._name = "player";
_body._type = "player";
_body._goal = this;
_body.addForceGenerator(_gravity);
_engine.addElement(_body, true, Boolean(Global._rander));
_collideDetector = new SATCollisionFactory().getCollisionDetector(_body, _planet._body);
_object_direction = new Vector(0, 0);
this.gotoAndStop(1);
ini(_arg2);
}
private function changeWeapon(_arg1:PlayerEvents):void{
var _local2:Number;
_local2 = Number(_arg1.action);
_gun_type = _local2;
Global._game_stored_data.data["gun_type"] = (_gun_type + 49);
}
public function changeAction(_arg1:PlayerEvents):void{
this.removeEventListener(Event.ENTER_FRAME, legsUpdate);
switch (String(_arg1.action)){
case PlayerEvents.PLAYER_ACTION_STAND:
_player_skin_action = "stand";
_body.vertices = _vertices["move"];
break;
case PlayerEvents.PLAYER_ACTION_SIT:
_body.vertices = _vertices["sit"];
_player_skin_action = "sit";
break;
case PlayerEvents.PLAYER_ACTION_FLY:
_pause_counter = 15;
_player_skin_action = "jump";
_body.vertices = _vertices["jump"];
break;
case PlayerEvents.PLAYER_ACTION_JUMP:
_body.vertices = _vertices["jump"];
_body.vx = (_body.vx + (_object_direction.x * PLAYER_JUMP_KOF));
_body.vy = (_body.vy + (_object_direction.y * PLAYER_JUMP_KOF));
Global.sound_game.playSound(null, "s_jump");
_player_skin_action = "jump";
break;
case PlayerEvents.PLAYER_ACTION_MOVE:
_body.vertices = _vertices["move"];
_player_skin_action = "move";
this.addEventListener(Event.ENTER_FRAME, legsUpdate);
break;
};
_object_action = _arg1.action;
}
private function keyUpAction(_arg1:KeyboardEvent):void{
var _local2:GameEvents;
var _local3:GameEvents;
var _local4:Number;
var _local5:PlayerEvents;
var _local6:Number;
var _local7:PlayerEvents;
var _local8:PlayerEvents;
var _local9:PlayerSuperAttack;
var _local10:Number;
var _local11:PlayerEvents;
switch (_arg1.keyCode){
case Global._keys["up"]:
keyFlags["up"] = false;
break;
case Global._keys["down"]:
keyFlags["down"] = false;
break;
case Global._keys["left"]:
keyFlags["left"] = false;
break;
case Global._keys["right"]:
keyFlags["right"] = false;
break;
case Global._keys["space"]:
_local2 = new GameEvents(GameEvents.GAME_TELEPORT);
stage.dispatchEvent(_local2);
break;
case Global._keys["radar"]:
_local3 = new GameEvents(GameEvents.GAME_RADAR);
stage.dispatchEvent(_local3);
break;
case Global._keys["attack"]:
if (_player_attack_curr > 20){
_local8 = new PlayerEvents(PlayerEvents.PLAYER_SUPER_ATTACK);
_local8.action = _player_attack_curr;
stage.dispatchEvent(_local8);
stage.addEventListener(GameEvents.GAME_UPDATE, powerAttackUpdate);
_local9 = new PlayerSuperAttack(this, _player_attack_curr);
_player_attack_curr = 0;
Global.sound_game.playSound(null, "s_super_attack");
};
break;
case Global._keys["next"]:
_local4 = (_gun_type + 1);
if (_local4 >= 5){
_local4 = 0;
};
_local5 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_WEAPON);
_local5.action = _local4;
stage.dispatchEvent(_local5);
break;
case Global._keys["prev"]:
_local6 = (_gun_type - 1);
if (_local6 < 0){
_local6 = 4;
};
_local7 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_WEAPON);
_local7.action = _local6;
stage.dispatchEvent(_local7);
break;
};
if ((((_arg1.keyCode >= 49)) && ((_arg1.keyCode <= 53)))){
_local10 = (_arg1.keyCode - 49);
_local11 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_WEAPON);
_local11.action = _local10;
stage.dispatchEvent(_local11);
};
}
public function changeActionEvent(_arg1:String){
var _local2:PlayerEvents;
if (_arg1 != _object_action){
_local2 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_ACTION);
_local2.action = _arg1;
stage.dispatchEvent(_local2);
};
}
private function playerMove(_arg1:PlayerEvents):void{
updateParams();
updateMove();
if (((keyFlags["left"]) && (keyFlags["right"]))){
changeActionEvent(PlayerEvents.PLAYER_ACTION_STAND);
};
if (checkJump()){
if (keyFlags["up"]){
changeActionEvent(PlayerEvents.PLAYER_ACTION_JUMP);
};
} else {
changeActionEvent(PlayerEvents.PLAYER_ACTION_FLY);
};
if (keyFlags["down"]){
changeActionEvent(PlayerEvents.PLAYER_ACTION_SIT);
};
if ((((keyFlags["left"] == 0)) && ((keyFlags["right"] == 0)))){
changeActionEvent(PlayerEvents.PLAYER_ACTION_STAND);
};
updateSkinDirection();
updateSkin();
updateSkinGun();
}
public function actionMouseGlobalDown(_arg1:GlobalMouseEvent=null):void{
}
private function playerSit(_arg1:PlayerEvents):void{
updateParams();
if (!keyFlags["down"]){
changeActionEvent(PlayerEvents.PLAYER_ACTION_STAND);
};
updateFriction(PLAYER_AV_BREAK_KOF);
updateSkinDirection();
updateSkin();
updateSkinGun();
}
private function updateSkinDirection():void{
var _local1:String;
if (_object_pos.x > stage.mouseX){
_player_skin_direction = "left";
} else {
_player_skin_direction = "right";
};
_local1 = ((_player_skin_direction + "_") + _player_skin_action);
if (currentLabel != _local1){
this.gotoAndStop(_local1);
if (_player_skin_direction == "left"){
this["gun2"].visible = false;
this["gun1"].visible = true;
active_gun = this["gun1"];
} else {
this["gun2"].visible = true;
this["gun1"].visible = false;
active_gun = this["gun2"];
};
};
}
private function updateMove(_arg1:Number=1):void{
if (keyFlags["left"]){
this.updateLeftMove((this.PLAYER_AV_SPPED_MAX * _arg1), this.PLAYER_AV_SPPED_DX);
};
if (keyFlags["right"]){
this.updateRightMove((this.PLAYER_AV_SPPED_MAX * _arg1), this.PLAYER_AV_SPPED_DX);
};
}
private function changeWeaponPower(_arg1:PlayerEvents):void{
var _local2:Number;
_local2 = Number((_arg1.action as Object).power);
_gun_power = _local2;
}
override public function remove(_arg1:Boolean=true):void{
super.remove(_arg1);
clearEvents();
_engine.removeElement((_body as ISimulatable));
_goal["gameContainer"].removeChild(this);
}
private function updateUpKey():Boolean{
var _local1:*;
_local1 = false;
if (keyFlags["up"]){
_local1 = true;
changeActionEvent(PlayerEvents.PLAYER_ACTION_JUMP);
};
return (_local1);
}
public function actionMouseWheel(_arg1:GlobalMouseEvent=null, _arg2:Number=0):void{
var _local3:Number;
var _local4:Number;
var _local5:PlayerEvents;
_local3 = 0;
if (_arg1 != null){
_local3 = (Math.abs(_arg1.delta) / _arg1.delta);
} else {
_local3 = _arg2;
};
_local4 = (_gun_power + (_gun_power_step * _local3));
if (_local4 > this._gun_power_max){
_local4 = _gun_power_max;
};
if (_local4 < this._gun_power_min){
_local4 = _gun_power_min;
};
Global._game_stored_data.data["gun_power"] = _local4;
_gun_power = _local4;
_local5 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_WEAPON_POWER);
_local5.action = {power:_local4, max:_gun_power_max, min:_gun_power_min};
stage.dispatchEvent(_local5);
}
private function playerJump(_arg1:PlayerEvents):void{
updateParams();
updateMove(0.5);
if (checkJump()){
changeActionEvent(PlayerEvents.PLAYER_ACTION_FLY);
};
updateSkinDirection();
updateSkin();
updateSkinGun();
}
private function updateRightKey():Boolean{
var _local1:*;
_local1 = false;
if (keyFlags["right"]){
_local1 = true;
};
return (_local1);
}
public function update(_arg1:GameEvents=null):void{
stage.dispatchEvent(new PlayerEvents(String(_object_action)));
}
public function actionMouseGlobalUp(_arg1:GlobalMouseEvent=null):void{
}
public function powerAttackUpdate(_arg1:GameEvents=null):void{
var _local2:PlayerEvents;
_player_attack_curr = (_player_attack_curr + _player_attack_step);
if (_player_attack_curr > _player_attack_max){
_player_attack_curr = _player_attack_max;
stage.removeEventListener(GameEvents.GAME_UPDATE, powerAttackUpdate);
};
_local2 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_SUPER_ATTACK);
_local2.action = _player_attack_curr;
stage.dispatchEvent(_local2);
}
public function actionMouseUp(_arg1:MouseEvent=null):void{
}
public function createBullet():void{
var _local1:MovieClip;
var _local2:Point;
var _local3:Number;
var _local4:Bullet;
var _local5:Number;
_local1 = this.active_gun;
if (_local1["dulo"]){
_local2 = new Point(_local1["dulo"].x, _local1["dulo"].y);
_local2 = MovieClip(_local1).localToGlobal(_local2);
_local2 = MovieClip(_goal["gameContainer"]).globalToLocal(_local2);
_player_bullet_info["pos"].x = _local2.x;
_player_bullet_info["pos"].y = _local2.y;
_local3 = ((Math.PI * (_local1.rotation + this.rotation)) / 180);
_player_bullet_info["direction"] = new Vector(-(Math.cos(_local3)), -(Math.sin(_local3)));
_player_bullet_info["direction"] = Vector(_player_bullet_info["direction"]).times(_gun_power);
_player_bullet_info["skinClass"] = String(("b_skin_" + (_gun_type + 1)));
_player_bullet_info["type"] = _gun_type;
_local4 = new Bullet(this._goal, _player_bullet_info, this._gravity, this._planet);
_goal["gameContainer"].addChild(_local4);
if (_object_action != PlayerEvents.PLAYER_ACTION_SIT){
Vector(_player_bullet_info["direction"]).normalize();
_player_bullet_info["direction"] = Vector(_player_bullet_info["direction"]).times((_gun_power * 0.4));
_local5 = _body.velocity.cross(_object_direction);
if (Math.abs(_local5) < this.PLAYER_AV_SPPED_MAX){
(this._body as IBody).vx = ((this._body as IBody).vx - _player_bullet_info["direction"].x);
(this._body as IBody).vy = ((this._body as IBody).vy - _player_bullet_info["direction"].y);
};
};
};
}
public function updateCollide(_arg1:ObjectOfPlanetEvents=null){
var _local2:*;
var _local3:PlayerEvents;
var _local4:PlayerEvents;
var _local5:PlayerSuperAttack;
_local2 = _arg1.action;
if (SimpleParticle(_local2._body)._type.indexOf("enemy") != -1){
_player_live = (_player_live - 0.35);
_local3 = new PlayerEvents(PlayerEvents.PLAYER_CHANGE_LIVE);
_local3.action = {live:Math.round(_player_live), max:_player_max_live};
stage.dispatchEvent(_local3);
if (_player_live <= 0){
if (Global.setNextLive() == -1){
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
super.changeGameEvent(GameEvents.GAME_MISSION_FAIL);
} else {
_player_live = _player_max_live;
Global._live--;
_local4 = new PlayerEvents(PlayerEvents.PLAYER_MINUS_LIVE);
stage.dispatchEvent(_local4);
_local5 = new PlayerSuperAttack(this, 100);
Global.sound_game.playSound(null, "s_minus_live");
};
};
_local2.attackSkin();
};
}
private function legsUpdate(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
var _local4:Number;
_local2 = ((_player_skin_direction + "_") + _player_skin_action);
_local3 = 1;
if (this["legs"]){
if (keyFlags[_player_skin_direction]){
_local3 = 1;
} else {
_local3 = -1;
};
_local4 = (this["legs"].currentFrame + _local3);
if (_local4 > this["legs"].totalFrames){
_local4 = 1;
};
if (_local4 < 1){
_local4 = this["legs"].totalFrames;
};
this["legs"].gotoAndStop(_local4);
if ((((_local4 == 3)) || ((_local4 == 11)))){
Global.sound_game.playSound(null, "s_step", 0, 0, ((_local4 == 3)) ? 0.8 : 1);
};
};
}
private function keyDownAction(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Global._keys["up"]:
keyFlags["up"] = true;
break;
case Global._keys["down"]:
keyFlags["down"] = true;
break;
case Global._keys["left"]:
keyFlags["left"] = true;
break;
case Global._keys["right"]:
keyFlags["right"] = true;
break;
case Global._keys["plus"]:
actionMouseWheel(null, 1);
break;
case Global._keys["minus"]:
actionMouseWheel(null, -1);
break;
};
}
private function updateDownKey():Boolean{
var _local1:*;
_local1 = false;
if (keyFlags["down"]){
_local1 = true;
changeActionEvent(PlayerEvents.PLAYER_ACTION_SIT);
};
return (_local1);
}
public function actionMouseDown(_arg1:MouseEvent=null):void{
var event = _arg1;
if (_gun_pause_cur == 0){
_gun_pause_cur = _gun_pause;
stage.addEventListener(GameEvents.GAME_UPDATE, updateGun);
try {
createBullet();
Global.sound_game.playSound(null, "s_fire");
} catch(e:Error) {
};
} else {
Global.sound_game.playSound(null, "s_mimo");
};
}
private function playerStand(_arg1:PlayerEvents):void{
updateParams();
if (((((keyFlags["right"]) || (keyFlags["left"]))) && (!((((keyFlags["left"] == 1)) && ((keyFlags["right"] == 1))))))){
changeActionEvent(PlayerEvents.PLAYER_ACTION_MOVE);
};
if (checkJump()){
if (keyFlags["up"]){
changeActionEvent(PlayerEvents.PLAYER_ACTION_JUMP);
};
} else {
changeActionEvent(PlayerEvents.PLAYER_ACTION_FLY);
};
if (keyFlags["down"]){
changeActionEvent(PlayerEvents.PLAYER_ACTION_SIT);
};
updateFriction(PLAYER_AV_BREAK_KOF);
updateSkinDirection();
updateSkin();
updateSkinGun();
}
private function iniSkin():void{
var _local1:String;
for (_local1 in Global._game_stored_data.data["skin"]) {
this[_local1].gotoAndStop(Global._game_stored_data.data["skin"][_local1]);
if (_local1 == "Uho"){
this["Uho2"].gotoAndStop(Global._game_stored_data.data["skin"][_local1]);
};
};
}
public function actionPause(_arg1:GameEvents=null):void{
var _local2:Boolean;
_local2 = _arg1.gameValue;
if (_local2 == true){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpAction);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, actionMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, actionMouseUp);
GlobalMouse.removeEventListener(GlobalMouseEvent.MOUSE_WHEEL, actionMouseWheel);
actionMouseUp();
} else {
keyFlags["up"] = false;
keyFlags["down"] = false;
keyFlags["left"] = false;
keyFlags["right"] = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpAction);
stage.addEventListener(MouseEvent.MOUSE_DOWN, actionMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, actionMouseUp);
GlobalMouse.addEventListener(GlobalMouseEvent.MOUSE_WHEEL, actionMouseWheel);
};
}
private function updateSkinGun():void{
var _local1:Vector;
var _local2:Number;
_local1 = new Vector((stage.mouseX - _object_pos.x), (stage.mouseY - _object_pos.y));
_local2 = (((_local1.getAngle(new Vector(0, 0)) * 180) / Math.PI) + 90);
_local2 = (Global.angleTransform(_local2) - ((this._goal as Game).dxAngle / 2));
if (_player_skin_direction == "left"){
if (_local2 > PLAYER_GUN_ANGLE_MAX){
_local2 = PLAYER_GUN_ANGLE_MAX;
};
if (_local2 < PLAYER_GUN_ANGLE_MIN){
_local2 = PLAYER_GUN_ANGLE_MIN;
};
_local2 = (_local2 - 90);
this["gun1"].rotation = _local2;
this["gun2"].rotation = _local2;
} else {
if (_local2 < -(PLAYER_GUN_ANGLE_MAX)){
_local2 = -(PLAYER_GUN_ANGLE_MAX);
};
if (_local2 > -(PLAYER_GUN_ANGLE_MIN)){
_local2 = -(PLAYER_GUN_ANGLE_MIN);
};
_local2 = (_local2 - 90);
this["gun1"].rotation = _local2;
this["gun2"].rotation = _local2;
};
}
public function updateGun(_arg1:GameEvents):void{
_gun_pause_cur--;
if (_gun_pause_cur <= 0){
_gun_pause_cur = 0;
stage.removeEventListener(GameEvents.GAME_UPDATE, updateGun);
};
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpAction);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, actionMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, actionMouseUp);
GlobalMouse.removeEventListener(GlobalMouseEvent.MOUSE_UP, actionMouseGlobalUp);
GlobalMouse.removeEventListener(GlobalMouseEvent.MOUSE_DOWN, actionMouseGlobalDown);
GlobalMouse.removeEventListener(GlobalMouseEvent.MOUSE_WHEEL, actionMouseWheel);
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_UPDATE, updateGun);
stage.removeEventListener(GameEvents.GAME_PAUSE, actionPause);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_ACTION, changeAction);
stage.removeEventListener(GameEvents.GAME_UPDATE, powerAttackUpdate);
stage.removeEventListener(PlayerEvents.PLAYER_ACTION_JUMP, playerJump);
stage.removeEventListener(PlayerEvents.PLAYER_ACTION_SIT, playerSit);
stage.removeEventListener(PlayerEvents.PLAYER_ACTION_STAND, playerStand);
stage.removeEventListener(PlayerEvents.PLAYER_ACTION_MOVE, playerMove);
stage.removeEventListener(PlayerEvents.PLAYER_ACTION_FLY, playerFly);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON, changeWeapon);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON_POWER, changeWeaponPower);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
this.removeEventListener(Event.ENTER_FRAME, legsUpdate);
}
private function updateLeftKey():Boolean{
var _local1:*;
_local1 = false;
if (keyFlags["left"]){
_local1 = true;
};
return (_local1);
}
private function playerFly(_arg1:PlayerEvents):void{
updateParams();
updateMove(0.5);
_pause_counter--;
if ((((_pause_counter <= 0)) && (checkJump()))){
changeActionEvent(PlayerEvents.PLAYER_ACTION_STAND);
};
updateSkinDirection();
updateSkin();
updateSkinGun();
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
var _local3:KeyboardEvent;
super.ini(_arg1, true);
keyFlags["up"] = false;
keyFlags["down"] = false;
keyFlags["left"] = false;
keyFlags["right"] = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownAction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpAction);
stage.addEventListener(MouseEvent.MOUSE_DOWN, actionMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, actionMouseUp);
GlobalMouse.addEventListener(GlobalMouseEvent.MOUSE_UP, actionMouseGlobalUp);
GlobalMouse.addEventListener(GlobalMouseEvent.MOUSE_DOWN, actionMouseGlobalDown);
GlobalMouse.addEventListener(GlobalMouseEvent.MOUSE_WHEEL, actionMouseWheel);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.addEventListener(GameEvents.GAME_PAUSE, actionPause);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_ACTION, changeAction);
stage.addEventListener(PlayerEvents.PLAYER_ACTION_JUMP, playerJump);
stage.addEventListener(PlayerEvents.PLAYER_ACTION_SIT, playerSit);
stage.addEventListener(PlayerEvents.PLAYER_ACTION_STAND, playerStand);
stage.addEventListener(PlayerEvents.PLAYER_ACTION_MOVE, playerMove);
stage.addEventListener(PlayerEvents.PLAYER_ACTION_FLY, playerFly);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON, changeWeapon);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON_POWER, changeWeaponPower);
stage.addEventListener(GameEvents.GAME_UPDATE, powerAttackUpdate);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
iniSkin();
this["gun1"].visible = false;
if (!Global._game_stored_data.data["gun_power"]){
Global._game_stored_data.data["gun_power"] = this._gun_power_max;
};
_gun_power = Global._game_stored_data.data["gun_power"];
if (!Global._game_stored_data.data["gun_type"]){
Global._game_stored_data.data["gun_type"] = Global._keys["1"];
};
changeActionEvent(PlayerEvents.PLAYER_ACTION_STAND);
actionMouseWheel();
_local3 = new KeyboardEvent(KeyboardEvent.KEY_UP);
_local3.keyCode = Global._game_stored_data.data["gun_type"];
keyUpAction(_local3);
}
}
}//package classes
Section 46
//PlayerSuperAttack (classes.PlayerSuperAttack)
package classes {
import classes.events.*;
import flash.display.*;
import flash.events.*;
public class PlayerSuperAttack extends MovieClip {
var goal:MovieClip;
var kof:Number;
public function PlayerSuperAttack(_arg1:MovieClip, _arg2:Number=100){
goal = _arg1;
kof = (_arg2 / 100);
goal.addChild(this);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
ini();
}
public function ini(_arg1:Event=null):void{
this.scaleX = kof;
this.scaleY = kof;
}
public function actionGameOver(_arg1:GameEvents=null):void{
remove();
}
public function remove(_arg1:GameEvents=null):void{
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
goal.removeChild(this);
}
public function update(_arg1:GameEvents=null):void{
var i:uint;
var event = _arg1;
try {
i = ((this as MovieClip).currentFrame + 1);
(this as MovieClip).gotoAndStop(i);
if ((this as MovieClip).currentFrame == (this as MovieClip).totalFrames){
remove();
};
} catch(e:Error) {
};
}
}
}//package classes
Section 47
//RadarInfo (classes.RadarInfo)
package classes {
import classes.events.*;
import flash.display.*;
import flash.utils.*;
public class RadarInfo extends MovieClip {
public var enemys:Dictionary;
public var man:MovieClip;
public var kof:Number;
public var planet:MovieClip;
public var player:Player;
public function RadarInfo(){
enemys = new Dictionary();
kof = 1;
this["planet"].width = ((kof * Global._levels[Global._current_level]["planet"]["radius"]) * 2);
this["planet"].height = this["planet"].width;
this["man"]["man"].y = (-(kof) * Global._levels[Global._current_level]["planet"]["radius"]);
this["man"]["man"].height = (kof * 140);
this["man"]["man"].width = ((kof * 140) / 1.5);
ini();
}
public function ini():void{
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.addEventListener(GameEvents.GAME_ADD_ENEMY, addEnemy);
stage.addEventListener(GameEvents.GAME_REMOVE_ENEMY, removeEnemy);
stage.addEventListener(GameEvents.GAME_RADAR, changeRadar);
if (Global._game_stored_data.data["radar"] == false){
Global._game_stored_data.data["radar"] = false;
this.parent.visible = Global._game_stored_data.data["radar"];
} else {
Global._game_stored_data.data["radar"] = true;
this.parent.visible = Global._game_stored_data.data["radar"];
stage.addEventListener(GameEvents.GAME_UPDATE, update);
};
}
public function changeRadar(_arg1:GameEvents=null):void{
Global._game_stored_data.data["radar"] = !(Global._game_stored_data.data["radar"]);
this.parent.visible = Global._game_stored_data.data["radar"];
if (this.parent.visible){
stage.addEventListener(GameEvents.GAME_UPDATE, update);
} else {
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
};
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
}
public function removeEnemy(_arg1:GameEvents=null):void{
var _local2:MovieClip;
_local2 = _arg1.gameValue;
if (_local2._type != 5){
this.removeChild(enemys[_local2]);
delete enemys[_local2];
};
}
public function addEnemy(_arg1:GameEvents=null):void{
var _local2:MovieClip;
var _local3:Number;
_local2 = _arg1.gameValue;
if (_local2._type != 5){
_local3 = (_local2 as Enemy)._type;
enemys[_local2] = new RadarEnemy();
this.addChild(enemys[_local2]);
(enemys[_local2] as MovieClip).gotoAndStop((_local3 + 1));
(enemys[_local2] as MovieClip).width = (((_local2 as Enemy)._enemy_radius * kof) * 2);
(enemys[_local2] as MovieClip).height = (enemys[_local2] as MovieClip).width;
};
}
public function update(_arg1:GameEvents=null):void{
var _local2:Number;
var _local3:*;
var _local4:MovieClip;
_local2 = (Global._game as Game).player._object_pos_radius;
for (_local3 in enemys) {
_local4 = enemys[_local3];
_local4.x = (_local3.x * kof);
_local4.y = (_local3.y * kof);
_local2 = Math.max(_local2, _local3._object_pos_radius);
};
this.rotation = (Global._game["gameContainer"].rotation - (Global._game as Game).dxAngle);
this["man"].rotation = -(this.rotation);
this["man"]["man"].y = (-(kof) * ((Global._game as Game).player._object_pos_radius - 70));
this.scaleX = ((0.8 * 1) / ((_local2 * 2) / 115));
this.scaleY = this.scaleX;
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_ADD_ENEMY, addEnemy);
stage.removeEventListener(GameEvents.GAME_REMOVE_ENEMY, removeEnemy);
stage.removeEventListener(GameEvents.GAME_RADAR, changeRadar);
}
}
}//package classes
Section 48
//ScoreInfo (classes.ScoreInfo)
package classes {
import classes.events.*;
import flash.display.*;
import flash.text.*;
public class ScoreInfo extends MovieClip {
public var live_info:MovieClip;
public var txt:TextField;
public var amount_bonus:Number;// = 0
public var score:Number;// = 0
public var g_score:Number;// = 0
public var txt2:TextField;
public var h1:MovieClip;
public var h2:MovieClip;
public var h4:MovieClip;
public var h5:MovieClip;
public var h3:MovieClip;
public var step:Number;// = 2
public var scoreGlobal:Number;// = 0
public var amount_bonus_cur:Number;// = 0
public function ScoreInfo(){
score = 0;
scoreGlobal = 0;
g_score = 0;
step = 2;
amount_bonus = 0;
amount_bonus_cur = 0;
super();
scoreGlobal = (score = Global.getGlobalScore(Global._current_level));
amount_bonus = (Global._levels[Global._current_level]["bonus"] as Array).length;
g_score = score;
ini();
setScore();
(this["live_info"] as MovieClip).gotoAndStop((this["live_info"] as MovieClip).totalFrames);
}
public function ini():void{
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.addEventListener(GameEvents.GAME_CHANGE_SCORE, changeScore);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_LIVE, changeLive);
stage.addEventListener(PlayerEvents.PLAYER_MINUS_LIVE, minusLive);
stage.addEventListener(GameEvents.GAME_REMOVE_BONUS, removeBonus);
iniH();
iniB();
}
public function iniH(){
var _local1:uint;
_local1 = 0;
while (_local1 < 5) {
(this[("h" + (_local1 + 1))] as MovieClip).gotoAndStop(((_local1 < Global._live)) ? 2 : 1);
_local1++;
};
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
}
public function setScore():void{
(this["txt"] as TextField).text = String(score);
}
public function minusLive(_arg1:PlayerEvents=null):void{
iniH();
}
public function removeBonus(_arg1:GameEvents=null):void{
amount_bonus_cur++;
iniB();
}
public function changeLive(_arg1:PlayerEvents=null):void{
var _local2:Number;
_local2 = (_arg1.action["live"] as Number);
(this["live_info"] as MovieClip).gotoAndStop(_local2);
}
public function update(_arg1:GameEvents=null){
score = (score + step);
if (score >= g_score){
score = g_score;
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
};
setScore();
}
public function changeScore(_arg1:GameEvents=null){
var _local2:Number;
_local2 = _arg1.gameValue;
g_score = (scoreGlobal + Global.addScore(_local2));
stage.addEventListener(GameEvents.GAME_UPDATE, update);
}
public function iniB(){
(this["txt2"] as TextField).text = ((amount_bonus_cur + "/") + amount_bonus);
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.removeEventListener(GameEvents.GAME_CHANGE_SCORE, changeScore);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_LIVE, changeLive);
stage.removeEventListener(PlayerEvents.PLAYER_MINUS_LIVE, minusLive);
stage.removeEventListener(GameEvents.GAME_REMOVE_BONUS, removeBonus);
}
}
}//package classes
Section 49
//Shadow (classes.Shadow)
package classes {
import flash.display.*;
import flash.geom.*;
public class Shadow extends MovieClip {
public var _goal:MovieClip;
public function Shadow(_arg1:MovieClip, _arg2:MovieClip, _arg3:Number){
var _local4:Number;
super();
_goal = _arg1;
this.graphics.beginFill(0, 0.2);
_local4 = (_arg3 / 5);
this.graphics.drawEllipse((-(_arg3) / 2), (-(_local4) / 2), _arg3, _local4);
this.graphics.endFill();
MovieClip(_goal["gameContainer"]).addChildAt(this, 3);
this.x = -5000;
this.y = -5000;
}
public function remove():void{
if ((_goal["gameContainer"] as MovieClip).contains(this)){
MovieClip(_goal["gameContainer"]).removeChild(this);
};
}
public function getPosition(_arg1:Number, _arg2:Number):Point{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = ((Math.PI * _arg1) / 180);
_local4 = (Math.cos(_local3) * _arg2);
_local5 = (Math.sin(_local3) * _arg2);
return (new Point(_local4, _local5));
}
public function update(_arg1, _arg2, _arg3):void{
var _local4:Point;
this.alpha = (1 - ((_arg2 - _arg3) / 200));
_local4 = getPosition((_arg1 + 180), _arg3);
this.x = _local4.x;
this.y = _local4.y;
this.scaleX = this.alpha;
this.scaleY = this.alpha;
this.rotation = (_arg1 - 90);
}
}
}//package classes
Section 50
//Stars (classes.Stars)
package classes {
import classes.events.*;
import flash.display.*;
import flash.geom.*;
public class Stars extends MovieClip {
var _stars_bmp:BitmapData;
public var skin:MovieClip;
var _stars_skin:String;
var _goal:MovieClip;
public function Stars(_arg1:MovieClip, _arg2:Object){
addFrameScript(0, frame1);
_goal = _arg1;
_stars_skin = _arg2.strasSkinName;
_goal.addChildAt(this, 0);
this.x = Global._game_width_2;
this.y = Global._game_height_2;
ini(_arg2);
}
public function ini(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Matrix;
var _local5:MovieClip;
var _local6:Bitmap;
this.gotoAndStop(_stars_skin);
_local2 = this.width;
_local3 = this.height;
_stars_bmp = new BitmapData(_local2, _local3, true, 0xFFFFFF);
_local4 = new Matrix(1, 0, 0, 1, (_local2 / 2), (_local3 / 2));
_stars_bmp.draw(this, _local4, null, null, null);
this.gotoAndStop("free");
_local5 = new MovieClip();
_local6 = new Bitmap(_stars_bmp, "auto", true);
_local5.addChild((_local6 as DisplayObject));
this.addChild(_local5);
_local5.x = (-(_local2) / 2);
_local5.y = (-(_local3) / 2);
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
}
public function actionGameOver(_arg1:GameEvents=null):void{
clearEvents();
remove();
}
function frame1(){
stop();
}
public function remove():void{
_stars_bmp.dispose();
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
}
}
}//package classes
Section 51
//Stone (classes.Stone)
package classes {
import classes.events.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.geom.*;
import classes.force.*;
import flash.utils.*;
public class Stone extends ObjectOfPlanet implements IGameObject {
public var _stone_skin_class:String;
public var _pause_counter:Number;
public var _stone_skin:MovieClip;
public var _stone_skin_vertices:Array;
public function Stone(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
var _local5:Point;
var _local6:Number;
var _local7:Number;
super(_arg1, _arg2, _arg3, _arg4, true, _arg2.shadow);
_stone_skin_class = _arg2["skinClass"];
_stone_skin_vertices = _arg2["vertices"];
_local5 = this.getPosition();
_local6 = _local5.x;
_local7 = _local5.y;
_body = new RigidBody(_local6, _local7, _object_mass, _stone_skin_vertices, 0, 0, _object_friction, _object_elasticity, 0, 0);
_body._name = "stone";
_body._type = "stone";
_body._goal = this;
_engine.addElement(_body, true, Boolean(Global._rander));
_body.addForceGenerator(_gravity);
ini(_arg2);
}
public function changeAction(_arg1:StoneEvents):void{
switch (String(_arg1.action)){
case StoneEvents.STONE_ACTION_FLY:
break;
case StoneEvents.STONE_ACTION_CRACH:
_pause_counter = 5;
break;
};
_object_action = _arg1.action;
}
public function changeActionEvent(_arg1:String){
var _local2:StoneEvents;
if (_arg1 != _object_action){
_local2 = new StoneEvents(StoneEvents.STONE_CHANGE_ACTION);
_local2.action = _arg1;
this.dispatchEvent(_local2);
};
}
public function stoneCrach(_arg1:StoneEvents=null):void{
updateParams();
updateSkin(true);
_stone_skin.gotoAndStop((_stone_skin.currentFrame + 1));
_pause_counter--;
if (_pause_counter <= 0){
crach();
};
}
override public function remove(_arg1:Boolean=true):void{
super.remove(_arg1);
_engine.removeElement(_body);
_goal["gameContainer"].removeChild(this);
}
public function update(_arg1:GameEvents=null):void{
this.dispatchEvent(new StoneEvents(String(_object_action)));
}
public function minisArmor(_arg1:Number):void{
if ((_arg1 / _goal.player._gun_power_max) > this._object_armor){
changeActionEvent(StoneEvents.STONE_ACTION_CRACH);
};
}
public function crach():void{
var _local1:*;
for (_local1 in _object_child) {
_object_child[_local1].pos.angle = (_object_pos_angle + 180);
_object_child[_local1].pos.radius = _object_pos_radius;
_object_child[_local1].vx = _body.vx;
_object_child[_local1].vy = _body.vy;
_goal.createStone(_object_child[_local1]);
};
remove();
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
this.removeEventListener(StoneEvents.STONE_ACTION_FLY, stoneFly);
this.removeEventListener(StoneEvents.STONE_ACTION_CRACH, stoneCrach);
this.removeEventListener(StoneEvents.STONE_CHANGE_ACTION, changeAction);
}
public function stoneFly(_arg1:StoneEvents=null):void{
updateParams();
updateSkin(true);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
var ClassSkin:Class;
var obj = _arg1;
var how = _arg2;
super.ini(obj);
try {
ClassSkin = (getDefinitionByName(_stone_skin_class) as Class);
if (ClassSkin != null){
_stone_skin = MovieClip(new (ClassSkin));
this.addChild(_stone_skin);
};
} catch(e:Error) {
return;
};
stage.addEventListener(GameEvents.GAME_UPDATE, update);
this.addEventListener(StoneEvents.STONE_ACTION_FLY, stoneFly);
this.addEventListener(StoneEvents.STONE_ACTION_CRACH, stoneCrach);
this.addEventListener(StoneEvents.STONE_CHANGE_ACTION, changeAction);
changeActionEvent(StoneEvents.STONE_ACTION_FLY);
}
}
}//package classes
Section 52
//Teleport (classes.Teleport)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import classes.force.*;
public class Teleport extends Exit {
public var tele:Teleport;
public function Teleport(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
var _local5:uint;
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "teleport";
_body._type = "teleport";
_local5 = 0;
while (_local5 < _stone_skin.numChildren) {
if ((_stone_skin.getChildAt(_local5) is MovieClip)){
(_stone_skin.getChildAt(_local5) as MovieClip).stop();
(_stone_skin.getChildAt(_local5) as MovieClip).alpha = 0;
};
_local5++;
};
}
override public function update(_arg1:GameEvents=null):void{
var _local2:Boolean;
var _local3:int;
this.dispatchEvent(new StoneEvents(String(_object_action)));
_local2 = _collideDetector.hasCollision();
if (!_local2){
if ((_colideFlag == true)){
_colideFlag = false;
_local3 = 0;
while (_local3 < _stone_skin.numChildren) {
if ((_stone_skin.getChildAt(_local3) is MovieClip)){
(_stone_skin.getChildAt(_local3) as MovieClip).stop();
(_stone_skin.getChildAt(_local3) as MovieClip).alpha = 0;
};
_local3++;
};
};
if (((!((helpID == 0))) && ((_helpFlag == true)))){
_helpFlag = false;
changeGameEvent(GameEvents.GAME_HELP_CLOSE);
};
} else {
if ((_colideFlag == false)){
_colideFlag = true;
_local3 = 0;
while (_local3 < _stone_skin.numChildren) {
if ((_stone_skin.getChildAt(_local3) is MovieClip)){
(_stone_skin.getChildAt(_local3) as MovieClip).play();
(_stone_skin.getChildAt(_local3) as MovieClip).alpha = 1;
};
_local3++;
};
};
if (((!((helpID == 0))) && ((_helpFlag == false)))){
_helpFlag = true;
changeGameEvent(GameEvents.GAME_HELP_OPEN, helpID);
};
};
}
override public function teleport(_arg1:GameEvents=null):void{
var v:Vector;
var foo:Number;
var event = _arg1;
if (_colideFlag){
if (tele){
try {
v = tele._object_direction;
foo = 0;
(Global._game as Game).player._body.vx = (v.x * foo);
(Global._game as Game).player._body.vy = (v.y * foo);
(Global._game as Game).player._body.x = (tele._body.x + (v.x * 65));
(Global._game as Game).player._body.y = (tele._body.y + (v.y * 65));
Global.sound_game.playSound(null, "s_teleport");
} catch(e:Error) {
};
};
};
}
public function nextTeleport(_arg1:Teleport):void{
tele = _arg1;
}
}
}//package classes
Section 53
//WeaponInfo (classes.WeaponInfo)
package classes {
import classes.events.*;
import flash.display.*;
public class WeaponInfo extends MovieClip {
public var _player:Player;
public var _begun:MovieClip;
public var begun:MovieClip;
public var _w4:MovieClip;
public var _w5:MovieClip;
public var attack_info:MovieClip;
public var _w1:MovieClip;
public var _w3:MovieClip;
public var w1:MovieClip;
public var w4:MovieClip;
public var w2:MovieClip;
public var _attack:MovieClip;
public var w3:MovieClip;
public var _w2:MovieClip;
public var w5:MovieClip;
public var _w:Array;
public function WeaponInfo(){
_w = new Array();
super();
_w.push((this["w1"] as MovieClip));
_w.push((this["w2"] as MovieClip));
_w.push((this["w3"] as MovieClip));
_w.push((this["w4"] as MovieClip));
_w.push((this["w5"] as MovieClip));
_begun = this["begun"];
_attack = this["attack_info"];
_begun.stop();
ini();
}
public function changeWeapon(_arg1:PlayerEvents):void{
var _local2:Number;
Global.sound_game.playSound(null, "s_change_wepaon");
_local2 = Number(_arg1.action);
setWeapon(_local2);
}
public function ini():void{
stage.addEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON, changeWeapon);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON_POWER, changeWeaponPower);
stage.addEventListener(PlayerEvents.PLAYER_CHANGE_SUPER_ATTACK, changeSuperAttackPower);
}
public function setWeapon(_arg1:Number):void{
var _local2:uint;
while (_local2 < _w.length) {
if (_local2 == _arg1){
_w[_local2].gotoAndStop(2);
} else {
_w[_local2].gotoAndStop(1);
};
_local2++;
};
}
public function actionGameOver(_arg1:GameEvents):void{
clearEvents();
}
public function changeWeaponPower(_arg1:PlayerEvents):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = Number((_arg1.action as Object).power);
_local3 = Number((_arg1.action as Object).max);
_local4 = Number((_arg1.action as Object).min);
_local5 = Math.round((((_local2 - _local4) / (_local3 - _local4)) * 100));
_begun.gotoAndStop(_local5);
}
public function clearEvents():void{
stage.removeEventListener(GameEvents.GAME_OVER, actionGameOver);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON, changeWeapon);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_WEAPON_POWER, changeWeaponPower);
stage.removeEventListener(PlayerEvents.PLAYER_CHANGE_SUPER_ATTACK, changeSuperAttackPower);
}
public function changeSuperAttackPower(_arg1:PlayerEvents=null):void{
_attack.gotoAndStop(Math.round((_arg1.action + 1)));
}
}
}//package classes
Section 54
//Volcan (classes.Volcan)
package classes {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import flash.display.*;
import classes.force.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class Volcan extends Ground {
public var _volcan_power:Number;// = 0
public var _volcan_pause:uint;// = 0
public var _volcan_pause_cur:Number;// = 0
public function Volcan(_arg1:MovieClip, _arg2:Object, _arg3:GravityGenerator, _arg4:Planet){
_volcan_pause = 0;
_volcan_pause_cur = 0;
_volcan_power = 0;
_volcan_power = _arg2.power;
super(_arg1, _arg2, _arg3, _arg4);
_body._name = "volcan";
_body._type = "volcan";
this.ini(_arg2);
}
override public function drawInPlanet():void{
}
override public function update(_arg1:GameEvents=null):void{
_volcan_pause_cur--;
}
public function updateCollide(_arg1:ObjectOfPlanetEvents){
var _local2:*;
var _local3:*;
var _local4:Vector;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_volcan_pause_cur < 0){
_local2 = _arg1.action;
super.updateParams();
_local3 = SimpleParticle(_local2._body);
_local4 = getVectorFromObject2(_local2, this);
_local4.normalize();
_local5 = _local4.getAngle(new Vector(0, 0));
_local6 = _local2._object_direction.getAngle(new Vector(0, 0));
_local7 = Math.cos((_local6 - _local5));
if (_local7 > 0.9){
_local3.vx = ((_local4.x * _volcan_power) * _local7);
_local3.vy = ((_local4.y * _volcan_power) * _local7);
Global.sound_game.playSound(null, "s_volcano", 0.9);
};
_volcan_pause_cur = _volcan_pause;
};
}
override public function clearEvents():void{
super.clearEvents();
stage.removeEventListener(GameEvents.GAME_UPDATE, update);
this.removeEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
}
override public function ini(_arg1:Object, _arg2:Boolean=false):void{
super.ini(_arg1);
this.addEventListener(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE, updateCollide);
stage.addEventListener(GameEvents.GAME_UPDATE, update);
}
}
}//package classes
Section 55
//blick_185 (doctor_bmp_2_fla.blick_185)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class blick_185 extends MovieClip {
public function blick_185(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 56
//blick_540 (doctor_bmp_2_fla.blick_540)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class blick_540 extends MovieClip {
public function blick_540(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 57
//blick2_194 (doctor_bmp_2_fla.blick2_194)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class blick2_194 extends MovieClip {
public function blick2_194(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package doctor_bmp_2_fla
Section 58
//blick4_192 (doctor_bmp_2_fla.blick4_192)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class blick4_192 extends MovieClip {
public function blick4_192(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package doctor_bmp_2_fla
Section 59
//DoctorZed0021_65 (doctor_bmp_2_fla.DoctorZed0021_65)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoctorZed0021_65 extends MovieClip {
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 60
//DoctorZed0021_blue_71 (doctor_bmp_2_fla.DoctorZed0021_blue_71)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoctorZed0021_blue_71 extends MovieClip {
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 61
//DoctorZed0021_fio_67 (doctor_bmp_2_fla.DoctorZed0021_fio_67)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoctorZed0021_fio_67 extends MovieClip {
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 62
//DoctorZed0021_green_69 (doctor_bmp_2_fla.DoctorZed0021_green_69)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoctorZed0021_green_69 extends MovieClip {
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 63
//DoctorZed0021_orange_62 (doctor_bmp_2_fla.DoctorZed0021_orange_62)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoctorZed0021_orange_62 extends MovieClip {
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 64
//DoktorZed00054_418 (doctor_bmp_2_fla.DoktorZed00054_418)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00054_418 extends MovieClip {
public var tel:MovieClip;
public var wall:MovieClip;
}
}//package doctor_bmp_2_fla
Section 65
//DoktorZed00059_684 (doctor_bmp_2_fla.DoktorZed00059_684)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00059_684 extends MovieClip {
public var _first:Boolean;
public function DoktorZed00059_684(){
addFrameScript(0, frame1);
}
function frame1(){
if (!_first){
_first = true;
gotoAndPlay(Math.floor((Math.random() * totalFrames)));
};
}
}
}//package doctor_bmp_2_fla
Section 66
//DoktorZed00060_683 (doctor_bmp_2_fla.DoktorZed00060_683)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00060_683 extends MovieClip {
public var _first:Boolean;
public function DoktorZed00060_683(){
addFrameScript(0, frame1);
}
function frame1(){
if (!_first){
_first = true;
gotoAndPlay(Math.floor((Math.random() * totalFrames)));
};
}
}
}//package doctor_bmp_2_fla
Section 67
//DoktorZed00061_682 (doctor_bmp_2_fla.DoktorZed00061_682)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00061_682 extends MovieClip {
public var _first:Boolean;
public function DoktorZed00061_682(){
addFrameScript(0, frame1);
}
function frame1(){
if (!_first){
_first = true;
gotoAndPlay(Math.floor((Math.random() * totalFrames)));
};
}
}
}//package doctor_bmp_2_fla
Section 68
//DoktorZed00062_681 (doctor_bmp_2_fla.DoktorZed00062_681)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00062_681 extends MovieClip {
public var _first:Boolean;
public function DoktorZed00062_681(){
addFrameScript(0, frame1);
}
function frame1(){
if (!_first){
_first = true;
gotoAndPlay(Math.floor((Math.random() * totalFrames)));
};
}
}
}//package doctor_bmp_2_fla
Section 69
//DoktorZed00063_680 (doctor_bmp_2_fla.DoktorZed00063_680)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00063_680 extends MovieClip {
public var _first:Boolean;
public function DoktorZed00063_680(){
addFrameScript(0, frame1);
}
function frame1(){
if (!_first){
_first = true;
gotoAndPlay(Math.floor((Math.random() * totalFrames)));
};
}
}
}//package doctor_bmp_2_fla
Section 70
//DoktorZed00066_481 (doctor_bmp_2_fla.DoktorZed00066_481)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00066_481 extends MovieClip {
public function DoktorZed00066_481(){
addFrameScript(117, frame118);
}
function frame118(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 71
//DoktorZed00283_678 (doctor_bmp_2_fla.DoktorZed00283_678)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00283_678 extends MovieClip {
public function DoktorZed00283_678(){
addFrameScript(0, frame1, 28, frame29);
}
function frame1(){
(this as MovieClip).gotoAndPlay((Math.round(((Math.random() * (this as MovieClip).totalFrames) - 1)) + 1));
}
function frame29(){
gotoAndPlay(2);
}
}
}//package doctor_bmp_2_fla
Section 72
//DoktorZed00319_82 (doctor_bmp_2_fla.DoktorZed00319_82)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00319_82 extends MovieClip {
public function DoktorZed00319_82(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 73
//DoktorZed00331_595 (doctor_bmp_2_fla.DoktorZed00331_595)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class DoktorZed00331_595 extends MovieClip {
public function DoktorZed00331_595(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 74
//DoktorZed00347_423 (doctor_bmp_2_fla.DoktorZed00347_423)
package doctor_bmp_2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class DoktorZed00347_423 extends MovieClip {
public var level:TextField;
public function DoktorZed00347_423(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 75
//DoktorZed00347copy_426 (doctor_bmp_2_fla.DoktorZed00347copy_426)
package doctor_bmp_2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class DoktorZed00347copy_426 extends MovieClip {
public var level:TextField;
public function DoktorZed00347copy_426(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 76
//flag_bg_4 (doctor_bmp_2_fla.flag_bg_4)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class flag_bg_4 extends MovieClip {
public function flag_bg_4(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 77
//gamezhero1_536 (doctor_bmp_2_fla.gamezhero1_536)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class gamezhero1_536 extends MovieClip {
public var blick2:MovieClip;
public var blick:MovieClip;
}
}//package doctor_bmp_2_fla
Section 78
//gameZheroPreloader_692 (doctor_bmp_2_fla.gameZheroPreloader_692)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class gameZheroPreloader_692 extends MovieClip {
public var pr:MovieClip;
public function gameZheroPreloader_692(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 79
//heart_136 (doctor_bmp_2_fla.heart_136)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class heart_136 extends MovieClip {
public function heart_136(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 80
//help_show_133 (doctor_bmp_2_fla.help_show_133)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class help_show_133 extends MovieClip {
public function help_show_133(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 81
//help1_show1_45 (doctor_bmp_2_fla.help1_show1_45)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class help1_show1_45 extends MovieClip {
public var cursor:MovieClip;
public function help1_show1_45(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package doctor_bmp_2_fla
Section 82
//help11show1_132 (doctor_bmp_2_fla.help11show1_132)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class help11show1_132 extends MovieClip {
public var Tilo:MovieClip;
public var legs:MovieClip;
public var Golova:MovieClip;
public var skin:MovieClip;
public var gun2:MovieClip;
}
}//package doctor_bmp_2_fla
Section 83
//help2_show2_60 (doctor_bmp_2_fla.help2_show2_60)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class help2_show2_60 extends MovieClip {
public var live:MovieClip;
public var skin:MovieClip;
}
}//package doctor_bmp_2_fla
Section 84
//help9show1_121 (doctor_bmp_2_fla.help9show1_121)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class help9show1_121 extends MovieClip {
public var Tilo:MovieClip;
public var legs:MovieClip;
public var Golova:MovieClip;
public var gun2:MovieClip;
}
}//package doctor_bmp_2_fla
Section 85
//intro00040_310 (doctor_bmp_2_fla.intro00040_310)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00040_310 extends MovieClip {
public function intro00040_310(){
addFrameScript(0, frame1, 49, frame50, 84, frame85, 99, frame100);
}
function frame85(){
MovieClip(parent["wall"]).play();
}
function frame1(){
stop();
}
function frame100(){
stop();
MovieClip(parent).play();
}
function frame50(){
MovieClip(parent["wall"]).play();
}
}
}//package doctor_bmp_2_fla
Section 86
//intro00040copy_419 (doctor_bmp_2_fla.intro00040copy_419)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00040copy_419 extends MovieClip {
public function intro00040copy_419(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 87
//intro00050_414 (doctor_bmp_2_fla.intro00050_414)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00050_414 extends MovieClip {
public function intro00050_414(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 88
//intro00051_416 (doctor_bmp_2_fla.intro00051_416)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00051_416 extends MovieClip {
public var shlem:MovieClip;
public function intro00051_416(){
addFrameScript(0, frame1, 29, frame30, 64, frame65, 99, frame100, 114, frame115);
}
function frame65(){
MovieClip(parent["wall"]).play();
}
function frame1(){
stop();
}
function frame100(){
MovieClip(parent["wall"]).play();
}
function frame30(){
MovieClip(parent).play();
stop();
}
function frame115(){
stop();
MovieClip(parent).play();
}
}
}//package doctor_bmp_2_fla
Section 89
//intro00111_289 (doctor_bmp_2_fla.intro00111_289)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00111_289 extends MovieClip {
public function intro00111_289(){
addFrameScript(189, frame190);
}
function frame190(){
stop();
MovieClip(parent.parent).play();
}
}
}//package doctor_bmp_2_fla
Section 90
//intro00117_305 (doctor_bmp_2_fla.intro00117_305)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00117_305 extends MovieClip {
public function intro00117_305(){
addFrameScript(0, frame1, 14, frame15, 19, frame20);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 91
//intro00144_407 (doctor_bmp_2_fla.intro00144_407)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00144_407 extends MovieClip {
public var shlem:MovieClip;
public function intro00144_407(){
addFrameScript(45, frame46, 69, frame70);
}
function frame70(){
MovieClip(parent).play();
stop();
}
function frame46(){
MovieClip(this["shlem"]).play();
}
}
}//package doctor_bmp_2_fla
Section 92
//intro00182_228 (doctor_bmp_2_fla.intro00182_228)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00182_228 extends MovieClip {
public function intro00182_228(){
addFrameScript(114, frame115, 115, frame116);
}
function frame116(){
stop();
}
function frame115(){
stop();
MovieClip(parent).play();
}
}
}//package doctor_bmp_2_fla
Section 93
//intro00191_334 (doctor_bmp_2_fla.intro00191_334)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00191_334 extends MovieClip {
public function intro00191_334(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 94
//intro00192_337 (doctor_bmp_2_fla.intro00192_337)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00192_337 extends MovieClip {
public function intro00192_337(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 95
//intro00193_338 (doctor_bmp_2_fla.intro00193_338)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00193_338 extends MovieClip {
public function intro00193_338(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 96
//intro00194_339 (doctor_bmp_2_fla.intro00194_339)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00194_339 extends MovieClip {
public function intro00194_339(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 97
//intro00202_345 (doctor_bmp_2_fla.intro00202_345)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00202_345 extends MovieClip {
public function intro00202_345(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 98
//intro00203_328 (doctor_bmp_2_fla.intro00203_328)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class intro00203_328 extends MovieClip {
public var plan2:MovieClip;
public var plan4:MovieClip;
public var plan3:MovieClip;
public var plan1:MovieClip;
public function intro00203_328(){
addFrameScript(78, frame79, 139, frame140, 214, frame215, 289, frame290, 436, frame437);
}
function frame437(){
stop();
MovieClip(parent).play();
}
function frame79(){
MovieClip(this["plan1"]).play();
}
function frame290(){
MovieClip(this["plan4"]).play();
}
function frame215(){
MovieClip(this["plan3"]).play();
}
function frame140(){
MovieClip(this["plan2"]).play();
}
}
}//package doctor_bmp_2_fla
Section 99
//live_indicator_135 (doctor_bmp_2_fla.live_indicator_135)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class live_indicator_135 extends MovieClip {
public function live_indicator_135(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 100
//man_39 (doctor_bmp_2_fla.man_39)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class man_39 extends MovieClip {
public var man:MovieClip;
}
}//package doctor_bmp_2_fla
Section 101
//map_doctor_zed_428 (doctor_bmp_2_fla.map_doctor_zed_428)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class map_doctor_zed_428 extends MovieClip {
public var Tilo:MovieClip;
public var Uho:MovieClip;
public var legs:MovieClip;
public var gun:MovieClip;
public var Lik:MovieClip;
public var Golova:MovieClip;
}
}//package doctor_bmp_2_fla
Section 102
//musicMenu_546 (doctor_bmp_2_fla.musicMenu_546)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class musicMenu_546 extends MovieClip {
public var blick2:MovieClip;
public function musicMenu_546(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 103
//pauseMenu1_541 (doctor_bmp_2_fla.pauseMenu1_541)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class pauseMenu1_541 extends MovieClip {
public var blick2:MovieClip;
}
}//package doctor_bmp_2_fla
Section 104
//pauseMenu2_542 (doctor_bmp_2_fla.pauseMenu2_542)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class pauseMenu2_542 extends MovieClip {
public var blick2:MovieClip;
}
}//package doctor_bmp_2_fla
Section 105
//preloaderLine_693 (doctor_bmp_2_fla.preloaderLine_693)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class preloaderLine_693 extends MovieClip {
public var begun:MovieClip;
}
}//package doctor_bmp_2_fla
Section 106
//skin_1_medium_597 (doctor_bmp_2_fla.skin_1_medium_597)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_1_medium_597 extends MovieClip {
public function skin_1_medium_597(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 107
//skin_1_small_83 (doctor_bmp_2_fla.skin_1_small_83)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_1_small_83 extends MovieClip {
public function skin_1_small_83(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 108
//skin_2_medium_599 (doctor_bmp_2_fla.skin_2_medium_599)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_2_medium_599 extends MovieClip {
public function skin_2_medium_599(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 109
//skin_3_medium_601 (doctor_bmp_2_fla.skin_3_medium_601)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_3_medium_601 extends MovieClip {
public function skin_3_medium_601(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 110
//skin_3_small_84 (doctor_bmp_2_fla.skin_3_small_84)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_3_small_84 extends MovieClip {
public function skin_3_small_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 111
//skin_4_medium_603 (doctor_bmp_2_fla.skin_4_medium_603)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_4_medium_603 extends MovieClip {
public function skin_4_medium_603(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 112
//skin_4_small_temp_81 (doctor_bmp_2_fla.skin_4_small_temp_81)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_4_small_temp_81 extends MovieClip {
public function skin_4_small_temp_81(){
addFrameScript(0, frame1);
}
function frame1(){
(this as MovieClip).gotoAndStop(Math.round((1 + (Math.random() * ((this as MovieClip).totalFrames - 1)))));
}
}
}//package doctor_bmp_2_fla
Section 113
//skin_5_small_85 (doctor_bmp_2_fla.skin_5_small_85)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class skin_5_small_85 extends MovieClip {
public function skin_5_small_85(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 114
//soundMenu1_543 (doctor_bmp_2_fla.soundMenu1_543)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class soundMenu1_543 extends MovieClip {
public var blick2:MovieClip;
public function soundMenu1_543(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 115
//Spacemadic0021_126 (doctor_bmp_2_fla.Spacemadic0021_126)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0021_126 extends MovieClip {
public var dulo:MovieClip;
}
}//package doctor_bmp_2_fla
Section 116
//Spacemadic0021_2_576 (doctor_bmp_2_fla.Spacemadic0021_2_576)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0021_2_576 extends MovieClip {
public var dulo:MovieClip;
}
}//package doctor_bmp_2_fla
Section 117
//Spacemadic0027_575 (doctor_bmp_2_fla.Spacemadic0027_575)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0027_575 extends MovieClip {
public function Spacemadic0027_575(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 118
//Spacemadic0027copy_430 (doctor_bmp_2_fla.Spacemadic0027copy_430)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0027copy_430 extends MovieClip {
public function Spacemadic0027copy_430(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 119
//Spacemadic0027copy2_574 (doctor_bmp_2_fla.Spacemadic0027copy2_574)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0027copy2_574 extends MovieClip {
public function Spacemadic0027copy2_574(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 120
//Spacemadic0030_431 (doctor_bmp_2_fla.Spacemadic0030_431)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Spacemadic0030_431 extends MovieClip {
public function Spacemadic0030_431(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 121
//superattack_indicator_22 (doctor_bmp_2_fla.superattack_indicator_22)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class superattack_indicator_22 extends MovieClip {
public function superattack_indicator_22(){
addFrameScript(0, frame1, 99, frame100);
}
function frame1(){
stop();
}
function frame100(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 122
//Symbol18_116 (doctor_bmp_2_fla.Symbol18_116)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class Symbol18_116 extends MovieClip {
public function Symbol18_116(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 123
//teleport_laps_117 (doctor_bmp_2_fla.teleport_laps_117)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class teleport_laps_117 extends MovieClip {
public function teleport_laps_117(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 124
//wpn_indicator_20 (doctor_bmp_2_fla.wpn_indicator_20)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_indicator_20 extends MovieClip {
public function wpn_indicator_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 125
//wpn_type1_23 (doctor_bmp_2_fla.wpn_type1_23)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_type1_23 extends MovieClip {
public var skin:MovieClip;
public function wpn_type1_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 126
//wpn_type2_27 (doctor_bmp_2_fla.wpn_type2_27)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_type2_27 extends MovieClip {
public var skin:MovieClip;
public function wpn_type2_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 127
//wpn_type3_29 (doctor_bmp_2_fla.wpn_type3_29)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_type3_29 extends MovieClip {
public var skin:MovieClip;
public function wpn_type3_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 128
//wpn_type4_31 (doctor_bmp_2_fla.wpn_type4_31)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_type4_31 extends MovieClip {
public var skin:MovieClip;
public function wpn_type4_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 129
//wpn_type5_33 (doctor_bmp_2_fla.wpn_type5_33)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class wpn_type5_33 extends MovieClip {
public var skin:MovieClip;
public function wpn_type5_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 130
//z_2_183 (doctor_bmp_2_fla.z_2_183)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class z_2_183 extends MovieClip {
public function z_2_183(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 131
//z_2_538 (doctor_bmp_2_fla.z_2_538)
package doctor_bmp_2_fla {
import flash.display.*;
public dynamic class z_2_538 extends MovieClip {
public function z_2_538(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package doctor_bmp_2_fla
Section 132
//AABRDetector (org.generalrelativity.foam.dynamics.collision.coarse.AABRDetector)
package org.generalrelativity.foam.dynamics.collision.coarse {
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import org.generalrelativity.foam.dynamics.collision.geom.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.enum.*;
public class AABRDetector implements ICoarseCollisionDetector {
private var _staticAABRCache:Dictionary;
private var _dynamicLength:int;
private var _factory:ICollisionFactory;
private var _dynamicCollidables:Array;
private var _staticCollidables:Array;
private var _dynamicAABRCache:Dictionary;
private var _collidablesLength:int;
public function AABRDetector(){
_staticAABRCache = new Dictionary(true);
_dynamicAABRCache = new Dictionary(true);
_staticCollidables = new Array();
_dynamicCollidables = new Array();
_factory = new SATCollisionFactory();
}
public function getCandidates():Array{
var _local1:Array;
var _local2:AABR;
var _local3:AABR;
var _local4:int;
var _local5:int;
var _local6:Array;
_dynamicAABRCache = new Dictionary(true);
_local1 = new Array();
_local4 = -1;
_local6 = _dynamicCollidables.concat(_staticCollidables);
while (++_local4 < _dynamicLength) {
_local2 = getBoundedAABR(_dynamicCollidables[_local4]);
_local5 = _local4;
while (++_local5 < _collidablesLength) {
_local3 = getBoundedAABR(_local6[_local5]);
if (_local2.hasCollision(_local3)){
if (_local6[_local4].checkIgnoreCollision(_local6[_local5]) == false){
_local1.push(_factory.getCollisionDetector(_local6[_local4], _local6[_local5]));
};
};
};
};
return (_local1);
}
private function getBoundedAABR(_arg1:IBody):AABR{
var _local2:AABR;
if (_dynamicAABRCache[_arg1]){
return (AABR(_dynamicAABRCache[_arg1]));
};
if (_staticAABRCache[_arg1]){
return (AABR(_staticAABRCache[_arg1]));
};
_local2 = new AABR();
_local2.bound(_arg1);
return (_local2);
}
public function set factory(_arg1:ICollisionFactory):void{
_factory = _arg1;
}
public function removeCollidable(_arg1:ISimulatable):void{
var _local2:int;
_local2 = _dynamicCollidables.indexOf(_arg1);
if (_local2 > -1){
_dynamicCollidables.splice(_dynamicCollidables.indexOf(_arg1), 1);
} else {
_local2 = _staticCollidables.indexOf(_arg1);
if (_local2 > -1){
_staticCollidables.splice(_staticCollidables.indexOf(_arg1), 1);
};
};
_dynamicLength = _dynamicCollidables.length;
_collidablesLength = (_dynamicLength + _staticCollidables.length);
}
public function addCollidable(_arg1:ISimulatable):void{
if (_arg1.mass == Simplification.INFINITE_MASS){
_staticCollidables.push(_arg1);
} else {
_dynamicCollidables.push(_arg1);
_dynamicLength++;
};
_collidablesLength++;
}
public function getDynamicCollidables():Array{
return (_dynamicCollidables);
}
}
}//package org.generalrelativity.foam.dynamics.collision.coarse
Section 133
//CollisionType (org.generalrelativity.foam.dynamics.collision.enum.CollisionType)
package org.generalrelativity.foam.dynamics.collision.enum {
public class CollisionType {
public static const CIRCLE:String = "circle";
public static const ABSTRACT_PARTICLE:String = "abstract_particle";
public static const CUBIC_BEZIER_CURVE:String = "cubic_bezier_curve";
public static const RIGID_BODY:String = "rigid_body";
}
}//package org.generalrelativity.foam.dynamics.collision.enum
Section 134
//AxisProjection (org.generalrelativity.foam.dynamics.collision.fine.sat.AxisProjection)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class AxisProjection {
public var min:Number;
public var max:Number;
public function AxisProjection(_arg1:IBody, _arg2:Vector){
project(_arg1, _arg2);
}
protected function project(_arg1:IBody, _arg2:Vector):void{
var _local3:RotationMatrix;
var _local4:Number;
var _local5:Number;
_local3 = _arg1.rotation;
_local4 = _arg2.dot(_local3.getVectorProduct(Vector(_arg1.vertices[0])).plus(_arg1.position));
min = _local4;
max = _local4;
_local5 = 0;
while (++_local5 < _arg1.vertices.length) {
_local4 = _arg2.dot(_local3.getVectorProduct(Vector(_arg1.vertices[_local5])).plus(_arg1.position));
if (_local4 < min){
min = _local4;
} else {
if (_local4 > max){
max = _local4;
};
};
};
}
public function getDistance(_arg1:AxisProjection):Number{
if (min < _arg1.min){
return ((_arg1.min - max));
};
return ((min - _arg1.max));
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 135
//BezierDetector (org.generalrelativity.foam.dynamics.collision.fine.sat.BezierDetector)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.element.body.*;
public class BezierDetector implements IFineCollisionDetector {
protected var detectors:Array;
protected var body2:IBody;
protected var curve:CubicBezierCurve;
public function BezierDetector(_arg1:CubicBezierCurve, _arg2:IBody){
this.curve = _arg1;
this.body2 = _arg2;
}
public function getContacts():Array{
var _local1:Array;
_local1 = new Array();
while (detectors.length) {
_local1 = _local1.concat(IFineCollisionDetector(detectors.pop()).getContacts());
};
return (_local1);
}
public function hasCollision():Boolean{
var _local1:IFineCollisionDetector;
var _local2:IBody;
detectors = new Array();
for each (_local2 in curve.lines) {
if ((body2 is Circle)){
_local1 = new CirclePolygonDetector(Circle(body2), _local2);
} else {
_local1 = new PolygonPolygonDetector(_local2, body2);
};
if (_local1.hasCollision()){
detectors.push(_local1);
};
};
return ((detectors.length > 0));
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 136
//CircleAxisProjection (org.generalrelativity.foam.dynamics.collision.fine.sat.CircleAxisProjection)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.element.body.*;
public class CircleAxisProjection extends AxisProjection {
public function CircleAxisProjection(_arg1:Circle, _arg2:Vector){
super(_arg1, _arg2);
}
override protected function project(_arg1:IBody, _arg2:Vector):void{
var _local3:Circle;
var _local4:Number;
_local3 = Circle(_arg1);
_local4 = _arg2.dot(_local3.position);
min = (_local4 - _local3.radius);
max = (_local4 + _local3.radius);
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 137
//CircleCircleDetector (org.generalrelativity.foam.dynamics.collision.fine.sat.CircleCircleDetector)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class CircleCircleDetector implements IFineCollisionDetector {
public var circle1:Circle;
public var dist:Number;
public var circle2:Circle;
public function CircleCircleDetector(_arg1:Circle, _arg2:Circle){
this.circle1 = _arg1;
this.circle2 = _arg2;
}
public function getContacts():Array{
var _local1:Vector;
var _local2:Number;
var _local3:Vector;
var _local4:String;
var _local5:String;
var _local6:Vector;
dist = Math.sqrt(dist);
_local1 = circle1.position.minus(circle2.position);
_local2 = ((circle1.radius + circle2.radius) - dist);
_local1.normalize();
_local3 = _local1.times(_local2);
_local3.dividedByEquals((circle1.inverseMass + circle2.inverseMass));
_local4 = (circle1 as SimpleParticle)._type;
_local5 = (circle2 as SimpleParticle)._type;
if (!(((circle1 as SimpleParticle).checkIgnoreTypeCollision(_local5)) || ((circle2 as SimpleParticle).checkIgnoreTypeCollision(_local4)))){
circle1.x = (circle1.x + (_local3.x * circle1.inverseMass));
circle1.y = (circle1.y + (_local3.y * circle1.inverseMass));
circle2.x = (circle2.x - (_local3.x * circle2.inverseMass));
circle2.y = (circle2.y - (_local3.y * circle2.inverseMass));
};
_local6 = circle1.position.minus(_local1.times(circle1.radius));
return ([new Contact(_local6, circle1, circle2, _local1)]);
}
public function hasCollision():Boolean{
var _local1:Vector;
_local1 = circle1.position.minus(circle2.position);
dist = _local1.dot(_local1);
return ((dist <= ((circle1.radius + circle2.radius) * (circle1.radius + circle2.radius))));
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 138
//CirclePolygonDetector (org.generalrelativity.foam.dynamics.collision.fine.sat.CirclePolygonDetector)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class CirclePolygonDetector implements IFineCollisionDetector {
public var body:IBody;
public var minDistance:Number;
public var penetrationAxis:Vector;
public var circle:Circle;
public function CirclePolygonDetector(_arg1:Circle, _arg2:IBody){
this.circle = _arg1;
this.body = _arg2;
}
public function getContacts():Array{
var _local1:Vector;
var _local2:Vector;
var _local3:String;
var _local4:String;
var _local5:Vector;
_local1 = circle.position.minus(body.position);
if (_local1.dot(penetrationAxis) < 0){
penetrationAxis.negate();
};
_local2 = penetrationAxis.times(minDistance);
_local2.dividedByEquals((circle.inverseMass + body.inverseMass));
_local3 = (circle as SimpleParticle)._type;
_local4 = (body as SimpleParticle)._type;
if (!(((circle as SimpleParticle).checkIgnoreTypeCollision(_local4)) || ((body as SimpleParticle).checkIgnoreTypeCollision(_local3)))){
circle.x = (circle.x + (_local2.x * circle.inverseMass));
circle.y = (circle.y + (_local2.y * circle.inverseMass));
body.x = (body.x - (_local2.x * body.inverseMass));
body.y = (body.y - (_local2.y * body.inverseMass));
};
_local5 = circle.position.minus(penetrationAxis.times(circle.radius));
return ([new Contact(_local5, circle, body, penetrationAxis)]);
}
public function hasCollision():Boolean{
var _local1:Vector;
var _local2:CircleAxisProjection;
var _local3:AxisProjection;
var _local4:RotationMatrix;
var _local5:Array;
var _local6:int;
var _local7:Number;
var _local8:Vector;
var _local9:Number;
var _local10:Vector;
var _local11:Vector;
var _local12:Number;
var _local13:Vector;
var _local14:Number;
if ((((circle.inverseMass == 0)) && ((body.inverseMass == 0)))){
return (false);
};
_local4 = body.rotation;
minDistance = Number.MAX_VALUE;
_local5 = body.edges;
_local6 = _local5.length;
_local7 = -1;
while (++_local7 < _local6) {
_local1 = _local4.getVectorProduct((_local5[_local7] as Vector));
_local11 = new Vector(-(_local1.y), _local1.x);
_local11.normalize();
_local2 = new CircleAxisProjection(circle, _local11);
_local3 = new AxisProjection(body, _local11);
_local12 = _local2.getDistance(_local3);
if (_local12 > 0){
return (false);
};
_local12 = Math.abs(_local12);
if (_local12 < minDistance){
minDistance = _local12;
penetrationAxis = _local11;
};
};
_local9 = Number.MAX_VALUE;
for each (_local10 in body.vertices) {
_local8 = body.rotation.getVectorProduct(_local10).plus(body.position);
_local13 = circle.position.minus(_local8);
_local14 = ((_local13.x * _local13.x) + (_local13.y * _local13.y));
if (_local14 < _local9){
_local9 = _local14;
_local11 = _local13;
};
};
_local11.normalize();
_local2 = new CircleAxisProjection(circle, _local11);
_local3 = new AxisProjection(body, _local11);
_local12 = _local3.getDistance(_local2);
if (_local12 > 0){
return (false);
};
_local12 = Math.abs(_local12);
if (_local12 < minDistance){
minDistance = _local12;
penetrationAxis = _local11;
};
return (true);
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 139
//PointPolygonDetector (org.generalrelativity.foam.dynamics.collision.fine.sat.PointPolygonDetector)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.element.body.*;
public class PointPolygonDetector {
protected var point:Vector;
protected var body:IBody;
protected static const EPSILON:Number = 15;
public function PointPolygonDetector(_arg1:IBody, _arg2:Vector){
this.body = _arg1;
this.point = _arg2;
}
public function hasCollision():Boolean{
var _local1:Vector;
var _local2:RotationMatrix;
var _local3:int;
var _local4:Vector;
var _local5:AxisProjection;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if ((body is Circle)){
_local8 = point.minus(body.position).magnitude;
if (_local8 <= Circle(body).radius){
return (true);
};
return (false);
};
_local2 = body.rotation;
_local3 = body.edges.length;
_local7 = -1;
while (++_local7 < _local3) {
_local1 = _local2.getVectorProduct((body.edges[_local7] as Vector));
_local4 = new Vector(-(_local1.y), _local1.x);
_local4.normalize();
_local5 = new AxisProjection(body, _local4);
_local6 = _local4.dot(point);
if (((((_local6 + PointPolygonDetector.EPSILON) < _local5.min)) || (((_local6 - PointPolygonDetector.EPSILON) > _local5.max)))){
return (false);
};
};
_local4 = point.minus(body.position);
_local4.normalize();
_local5 = new AxisProjection(body, _local4);
_local6 = _local4.dot(point);
if (((((_local6 + PointPolygonDetector.EPSILON) < _local5.min)) || (((_local6 - PointPolygonDetector.EPSILON) > _local5.max)))){
return (false);
};
return (true);
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 140
//PolygonPolygonDetector (org.generalrelativity.foam.dynamics.collision.fine.sat.PolygonPolygonDetector)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class PolygonPolygonDetector implements IFineCollisionDetector {
public var penetrationAxis:Vector;
public var body2:IBody;
public var body1:IBody;
private var swapBodies:Boolean;
public var minDistance:Number;
public static const EPSILON:Number = 0.1;
public function PolygonPolygonDetector(_arg1:IBody, _arg2:IBody){
this.body1 = _arg1;
this.body2 = _arg2;
swapBodies = true;
}
public function getContacts():Array{
var _local1:Vector;
var _local2:Vector;
var _local3:String;
var _local4:String;
var _local5:Number;
var _local6:Array;
var _local7:Vector;
var _local8:RotationMatrix;
var _local9:Vector;
var _local10:Array;
var _local11:Array;
var _local12:IBody;
var _local13:Vector;
var _local14:Number;
var _local15:Vector;
var _local16:Dictionary;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Array;
if (swapBodies){
_local12 = body1;
body1 = body2;
body2 = _local12;
};
_local1 = body1.position.minus(body2.position);
if (_local1.dot(penetrationAxis) < 0){
penetrationAxis.negate();
};
_local2 = penetrationAxis.times(minDistance);
_local2.dividedByEquals((body1.inverseMass + body2.inverseMass));
_local3 = (body1 as SimpleParticle)._type;
_local4 = (body2 as SimpleParticle)._type;
if (!(((body1 as SimpleParticle).checkIgnoreTypeCollision(_local4)) || ((body2 as SimpleParticle).checkIgnoreTypeCollision(_local3)))){
body1.x = (body1.x + (_local2.x * body1.inverseMass));
body1.y = (body1.y + (_local2.y * body1.inverseMass));
body2.x = (body2.x - (_local2.x * body2.inverseMass));
body2.y = (body2.y - (_local2.y * body2.inverseMass));
};
_local5 = Number.MAX_VALUE;
_local7 = penetrationAxis.clone();
_local8 = body1.rotation;
for each (_local9 in body1.vertices) {
_local13 = _local8.getVectorProduct(_local9).plus(body1.position);
_local14 = _local7.dot(_local13);
if (_local14 < (_local5 + PolygonPolygonDetector.EPSILON)){
if (Math.abs((_local5 - _local14)) < PolygonPolygonDetector.EPSILON){
_local6 = [_local6[0], _local13];
} else {
_local6 = [_local13];
_local5 = _local14;
};
};
};
if (_local6.length == 1){
return ([new Contact(_local6[0], body1, body2, penetrationAxis)]);
};
_local5 = Number.MAX_VALUE;
_local7.negate();
_local8 = body2.rotation;
for each (_local9 in body2.vertices) {
_local13 = _local8.getVectorProduct(_local9).plus(body2.position);
_local14 = _local7.dot(_local13);
if (_local14 < (_local5 + PolygonPolygonDetector.EPSILON)){
if (Math.abs((_local5 - _local14)) < PolygonPolygonDetector.EPSILON){
_local10 = [_local10[0], _local13];
} else {
_local10 = [_local13];
_local5 = _local14;
};
};
};
_local11 = new Array();
if (_local10.length == 2){
_local15 = penetrationAxis.getPerp().getUnit();
_local16 = new Dictionary(true);
_local17 = _local15.dot((_local6[0] as Vector));
_local18 = _local15.dot((_local6[1] as Vector));
_local19 = _local15.dot((_local10[0] as Vector));
_local20 = _local15.dot((_local10[1] as Vector));
_local16[_local17] = _local6[0];
_local16[_local18] = _local6[1];
_local16[_local19] = _local10[0];
_local16[_local20] = _local10[1];
_local21 = [_local17, _local18, _local19, _local20];
_local21.sort(Array.DESCENDING);
_local11.push(new Contact(_local16[_local21[1]], body1, body2, penetrationAxis), new Contact(_local16[_local21[2]], body1, body2, penetrationAxis));
} else {
_local11.push(new Contact(_local10[0], body1, body2, penetrationAxis));
};
return (_local11);
}
public function hasCollision():Boolean{
var _local1:Vector;
var _local2:AxisProjection;
var _local3:AxisProjection;
var _local4:RotationMatrix;
var _local5:Array;
var _local6:int;
var _local7:Number;
var _local8:Vector;
var _local9:Number;
if ((((body1.inverseMass == 0)) && ((body2.inverseMass == 0)))){
return (false);
};
_local4 = body1.rotation;
minDistance = Number.MAX_VALUE;
_local5 = body1.edges.concat(body2.edges);
_local6 = _local5.length;
_local7 = -1;
while (++_local7 < _local6) {
if (_local7 == body1.edges.length){
_local4 = body2.rotation;
};
_local1 = _local4.getVectorProduct((_local5[_local7] as Vector));
_local8 = new Vector(-(_local1.y), _local1.x);
_local8.normalize();
_local2 = new AxisProjection(body1, _local8);
_local3 = new AxisProjection(body2, _local8);
_local9 = _local2.getDistance(_local3);
if (_local9 > 0){
return (false);
};
_local9 = ((_local9 < 0)) ? -(_local9) : _local9;
if (_local9 < minDistance){
minDistance = _local9;
penetrationAxis = _local8;
if (((swapBodies) && ((_local7 > body1.edges.length)))){
swapBodies = false;
};
};
};
return (true);
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 141
//SATCollisionFactory (org.generalrelativity.foam.dynamics.collision.fine.sat.SATCollisionFactory)
package org.generalrelativity.foam.dynamics.collision.fine.sat {
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import flash.utils.*;
import org.generalrelativity.foam.dynamics.collision.enum.*;
public class SATCollisionFactory implements ICollisionFactory {
private var detectorMap:Dictionary;
public function SATCollisionFactory(){
buildDetectorMap();
}
public function getCollisionDetector(_arg1:ISimulatable, _arg2:ISimulatable):IFineCollisionDetector{
var _local3:Class;
_local3 = detectorMap[_arg1.collisionTypeID][_arg2.collisionTypeID];
if ((((_arg2 is Circle)) || ((_arg2 is CubicBezierCurve)))){
return (IFineCollisionDetector(new _local3(_arg2, _arg1)));
};
return (IFineCollisionDetector(new _local3(_arg1, _arg2)));
}
private function buildDetectorMap():void{
var _local1:Dictionary;
var _local2:Dictionary;
var _local3:Dictionary;
detectorMap = new Dictionary(true);
_local1 = new Dictionary(true);
_local1[CollisionType.CIRCLE] = CirclePolygonDetector;
_local1[CollisionType.CUBIC_BEZIER_CURVE] = BezierDetector;
_local1[CollisionType.RIGID_BODY] = PolygonPolygonDetector;
_local2 = new Dictionary(true);
_local2[CollisionType.RIGID_BODY] = CirclePolygonDetector;
_local2[CollisionType.CIRCLE] = CircleCircleDetector;
_local2[CollisionType.CUBIC_BEZIER_CURVE] = BezierDetector;
_local3 = new Dictionary(true);
_local3[CollisionType.RIGID_BODY] = BezierDetector;
_local3[CollisionType.CIRCLE] = BezierDetector;
detectorMap[CollisionType.RIGID_BODY] = _local1;
detectorMap[CollisionType.CIRCLE] = _local2;
detectorMap[CollisionType.CUBIC_BEZIER_CURVE] = _local3;
}
}
}//package org.generalrelativity.foam.dynamics.collision.fine.sat
Section 142
//AABR (org.generalrelativity.foam.dynamics.collision.geom.AABR)
package org.generalrelativity.foam.dynamics.collision.geom {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.element.body.*;
public class AABR {
public var minX:Number;
public var minY:Number;
public var maxX:Number;
public var maxY:Number;
private function updateBounds(_arg1:Vector):void{
if (_arg1.x < minX){
minX = _arg1.x;
} else {
if (_arg1.x > maxX){
maxX = _arg1.x;
};
};
if (_arg1.y < minY){
minY = _arg1.y;
} else {
if (_arg1.y > maxY){
maxY = _arg1.y;
};
};
}
public function hasCollision(_arg1:AABR):Boolean{
if (maxX < _arg1.minX){
return (false);
};
if (maxY < _arg1.minY){
return (false);
};
if (_arg1.maxX < minX){
return (false);
};
if (_arg1.maxY < minY){
return (false);
};
return (true);
}
public function bound(_arg1:IBody):void{
var _local2:Number;
var _local3:RotationMatrix;
var _local4:int;
var _local5:Vector;
if ((_arg1 is Circle)){
_local2 = Circle(_arg1).radius;
minX = (_arg1.x - _local2);
maxX = (_arg1.x + _local2);
minY = (_arg1.y - _local2);
maxY = (_arg1.y + _local2);
} else {
minX = (maxX = _arg1.x);
minY = (maxY = _arg1.y);
_local3 = _arg1.rotation;
_local4 = -1;
for each (_local5 in _arg1.vertices) {
updateBounds(_arg1.position.plus(_local3.getVectorProduct(_local5)));
};
};
}
}
}//package org.generalrelativity.foam.dynamics.collision.geom
Section 143
//CollisionResolver (org.generalrelativity.foam.dynamics.collision.CollisionResolver)
package org.generalrelativity.foam.dynamics.collision {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class CollisionResolver {
public static function resolve(_arg1:Array):void{
var _local2:IBody;
var _local3:IBody;
var _local4:Contact;
var _local5:String;
var _local6:String;
var _local7:Vector;
var _local8:Vector;
var _local9:Vector;
var _local10:Vector;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Vector;
var _local15:Vector;
var _local16:Vector;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Vector;
var _local21:Number;
var _local22:Vector;
var _local23:Number;
var _local24:Vector;
var _local25:Number;
var _local26:Number;
var _local27:Number;
for each (_local4 in _arg1) {
_local2 = _local4.body1;
_local3 = _local4.body2;
_local5 = (_local2 as SimpleParticle)._type;
_local6 = (_local3 as SimpleParticle)._type;
if (!(((_local2 as SimpleParticle).checkIgnoreTypeCollision(_local6)) || ((_local3 as SimpleParticle).checkIgnoreTypeCollision(_local5)))){
_local7 = _local4.position.minus(_local4.body1.position);
_local8 = _local4.position.minus(_local4.body2.position);
_local9 = _local7.getPerp();
_local10 = _local8.getPerp();
_local11 = _local9.dot(_local4.normal);
_local12 = _local10.dot(_local4.normal);
_local13 = _local4.normal.dot(_local4.normal.times((_local2.inverseMass + _local3.inverseMass)));
_local13 = (_local13 + ((_local11 * _local11) * _local2.inverseI));
_local13 = (_local13 + ((_local12 * _local12) * _local3.inverseI));
_local14 = _local9.times(_local2.av).plus(_local2.velocity);
_local15 = _local10.times(_local3.av).plus(_local3.velocity);
_local16 = _local14.minus(_local15);
_local17 = _local16.dot(_local4.normal);
_local18 = ((_local2.elasticity + _local3.elasticity) * 0.5);
_local19 = ((-((1 + _local18)) * _local17) / _local13);
_local20 = _local4.normal.times((_local19 * _local2.inverseMass));
_local21 = (_local9.dot(_local4.normal.times(_local19)) * _local2.inverseI);
_local22 = _local4.normal.times((-(_local19) * _local3.inverseMass));
_local23 = (_local10.dot(_local4.normal.times(-(_local19))) * _local3.inverseI);
_local24 = _local4.normal.getPerp();
_local25 = _local9.dot(_local24);
_local26 = _local10.dot(_local24);
_local13 = _local24.dot(_local24.times((_local2.inverseMass + _local3.inverseMass)));
_local13 = (_local13 + ((_local25 * _local25) * _local2.inverseI));
_local13 = (_local13 + ((_local26 * _local26) * _local3.inverseI));
_local27 = _local16.dot(_local24);
_local19 = (((-(_local27) / _local13) * (_local2.friction + _local3.friction)) * 0.5);
_local20.plusEquals(_local24.times((_local19 * _local2.inverseMass)));
_local21 = (_local21 + (_local9.dot(_local24.times(_local19)) * _local2.inverseI));
_local22.plusEquals(_local24.times((-(_local19) * _local3.inverseMass)));
_local23 = (_local23 + (_local10.dot(_local24.times(-(_local19))) * _local3.inverseI));
_local2.vx = (_local2.vx + _local20.x);
_local2.vy = (_local2.vy + _local20.y);
_local2.av = (_local2.av + _local21);
_local3.vx = (_local3.vx + _local22.x);
_local3.vy = (_local3.vy + _local22.y);
_local3.av = (_local3.av + _local23);
};
};
}
}
}//package org.generalrelativity.foam.dynamics.collision
Section 144
//Contact (org.generalrelativity.foam.dynamics.collision.Contact)
package org.generalrelativity.foam.dynamics.collision {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class Contact {
public var normal:Vector;
public var position:Vector;
public var body2:IBody;
public var body1:IBody;
public function Contact(_arg1:Vector, _arg2:IBody, _arg3:IBody, _arg4:Vector){
this.position = _arg1;
this.body1 = _arg2;
this.body2 = _arg3;
this.normal = _arg4;
}
}
}//package org.generalrelativity.foam.dynamics.collision
Section 145
//ICoarseCollisionDetector (org.generalrelativity.foam.dynamics.collision.ICoarseCollisionDetector)
package org.generalrelativity.foam.dynamics.collision {
import org.generalrelativity.foam.dynamics.element.*;
public interface ICoarseCollisionDetector {
function addCollidable(_arg1:ISimulatable):void;
function set factory(_arg1:ICollisionFactory):void;
function removeCollidable(_arg1:ISimulatable):void;
function getCandidates():Array;
function getDynamicCollidables():Array;
}
}//package org.generalrelativity.foam.dynamics.collision
Section 146
//ICollisionFactory (org.generalrelativity.foam.dynamics.collision.ICollisionFactory)
package org.generalrelativity.foam.dynamics.collision {
import org.generalrelativity.foam.dynamics.element.*;
public interface ICollisionFactory {
function getCollisionDetector(_arg1:ISimulatable, _arg2:ISimulatable):IFineCollisionDetector;
}
}//package org.generalrelativity.foam.dynamics.collision
Section 147
//IFineCollisionDetector (org.generalrelativity.foam.dynamics.collision.IFineCollisionDetector)
package org.generalrelativity.foam.dynamics.collision {
public interface IFineCollisionDetector {
function hasCollision():Boolean;
function getContacts():Array;
}
}//package org.generalrelativity.foam.dynamics.collision
Section 148
//Circle (org.generalrelativity.foam.dynamics.element.body.Circle)
package org.generalrelativity.foam.dynamics.element.body {
import org.generalrelativity.foam.dynamics.enum.*;
import org.generalrelativity.foam.dynamics.collision.enum.*;
public class Circle extends RigidBody {
public var radius:Number;
public function Circle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=100, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0.5, _arg8:Number=0.15, _arg9:Number=0, _arg10:Number=0){
this.radius = _arg3;
super(_arg1, _arg2, _arg4, null, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
override public function get collisionTypeID():String{
return (CollisionType.CIRCLE);
}
override protected function calculateInertiaTensor():void{
if (mass == Simplification.INFINITE_MASS){
_I = Simplification.INFINITE_MASS;
_inverseI = 0;
return;
};
_I = ((radius * radius) * mass);
_inverseI = (1 / _I);
}
}
}//package org.generalrelativity.foam.dynamics.element.body
Section 149
//CubicBezierCurve (org.generalrelativity.foam.dynamics.element.body.CubicBezierCurve)
package org.generalrelativity.foam.dynamics.element.body {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.enum.*;
import org.generalrelativity.foam.dynamics.collision.enum.*;
public class CubicBezierCurve extends RigidBody {
public var lines:Array;
protected var anchor2:Vector;
protected var anchor1:Vector;
protected var height:Number;
protected var control1:Vector;
protected var control2:Vector;
protected var resolution:int;
public function CubicBezierCurve(_arg1:Number, _arg2:Number, _arg3:Vector, _arg4:Vector, _arg5:Vector, _arg6:Vector, _arg7:int=7, _arg8:Number=INF, _arg9:Number=0, _arg10:Number=0, _arg11:Number=0, _arg12:Number=0, _arg13:Number=0.2, _arg14:Number=0.15, _arg15:Number=150){
super(_arg1, _arg2, _arg8, null, _arg9, _arg10, _arg13, _arg14, _arg11, _arg12);
this.height = _arg15;
this.resolution = _arg7;
this.control1 = _arg3;
this.control2 = _arg5;
this.anchor1 = _arg4;
this.anchor2 = _arg6;
createLines();
}
protected function createLines():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:RigidBody;
_local8 = (1 / resolution);
_local11 = control1.x;
_local12 = control1.y;
lines = new Array();
while (++_local1 <= resolution) {
_local2 = (_local8 * _local1);
_local3 = (_local2 * _local2);
_local4 = (_local3 * _local2);
_local5 = (1 - _local2);
_local6 = ((1 - _local2) * _local5);
_local7 = (_local6 * _local5);
_local9 = ((((_local7 * control1.x) + (((3 * _local2) * _local6) * anchor1.x)) + (((3 * anchor2.x) * _local3) * _local5)) + (control2.x * _local4));
_local10 = ((((_local7 * control1.y) + (((3 * _local2) * _local6) * anchor1.y)) + (((3 * anchor2.y) * _local3) * _local5)) + (control2.y * _local4));
_local13 = (_local9 - _local11);
_local14 = (_local10 - _local12);
_local15 = new RigidBody(((x + _local11) + (_local13 / 2)), ((y + _local12) + (_local14 / 2)), Simplification.INFINITE_MASS, [new Vector((_local13 / 2), (_local14 / 2)), new Vector((-(_local13) / 2), (-(_local14) / 2))], 0, 0, 0, 0, friction);
_local11 = _local9;
_local12 = _local10;
lines.push(_local15);
};
}
override public function get collisionTypeID():String{
return (CollisionType.CUBIC_BEZIER_CURVE);
}
override protected function calculateInertiaTensor():void{
if (mass == Simplification.INFINITE_MASS){
_I = Simplification.INFINITE_MASS;
_inverseI = 0;
return;
};
_I = ((control1.magnitude * mass) / 3);
_I = (_I + ((control2.magnitude * mass) / 3));
_I = (_I + (((anchor1.magnitude * mass) / 3) * 0.5));
_I = (_I + (((anchor2.magnitude * mass) / 3) * 0.5));
_inverseI = (1 / _I);
}
}
}//package org.generalrelativity.foam.dynamics.element.body
Section 150
//RigidBody (org.generalrelativity.foam.dynamics.element.body.RigidBody)
package org.generalrelativity.foam.dynamics.element.body {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.ode.*;
import org.generalrelativity.foam.util.*;
import org.generalrelativity.foam.dynamics.enum.*;
import org.generalrelativity.foam.dynamics.collision.enum.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
public class RigidBody extends SimpleParticle implements IODE, ISimulatable, IBody {
protected var _torque:Number;
protected var _edges:Array;
protected var _vertices:Array;
protected var _inverseI:Number;
public var _name_particle:String;
protected var _I:Number;
protected var _rotation:RotationMatrix;
public function RigidBody(_arg1:Number, _arg2:Number, _arg3:Number=100, _arg4:Array=null, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0.2, _arg8:Number=0.25, _arg9:Number=0, _arg10:Number=0){
if (_arg4){
_vertices = _arg4;
_edges = ShapeUtil.getEdges(_arg4);
};
super(_arg1, _arg2, _arg5, _arg6, _arg3, _arg7, _arg8, 6);
this.q = _arg9;
this.av = _arg10;
_rotation = new RotationMatrix(_arg9);
clearTorque();
calculateInertiaTensor();
}
public function get vertices():Array{
return (_vertices);
}
public function addForceAtPoint(_arg1:Vector, _arg2:Vector):void{
addForce(_arg2);
addTorque(_arg1.getPerp().dot(_arg2));
}
public function addTorque(_arg1:Number):void{
_torque = (_torque + _arg1);
}
public function get torque():Number{
return (_torque);
}
public function set vertices(_arg1:Array):void{
_vertices = _arg1;
}
public function get inverseI():Number{
return (_inverseI);
}
public function get av():Number{
return (_state[5]);
}
public function get I():Number{
return (_I);
}
public function getVelocityAtPoint(_arg1:Vector):Vector{
var _local2:Vector;
_local2 = _arg1.minus(position).getPerp();
_local2.normalize();
return (velocity.plus(_local2.times(av)));
}
public function get edges():Array{
return (_edges);
}
public function get q():Number{
return (_state[4]);
}
public function get rotation():RotationMatrix{
if (_rotation.theta != q){
_rotation = new RotationMatrix(q);
};
return (_rotation);
}
public function set av(_arg1:Number):void{
_state[5] = _arg1;
}
override public function getDerivative(_arg1:Array, _arg2:Array):void{
this._state = _arg1;
accumulateForces();
_arg2[0] = _arg1[2];
_arg2[1] = _arg1[3];
_arg2[2] = (_force.x * _inverseMass);
_arg2[3] = (_force.y * _inverseMass);
_arg2[4] = _arg1[5];
_arg2[5] = (_torque * _inverseI);
clearForces();
clearTorque();
}
override public function get collisionTypeID():String{
return (CollisionType.RIGID_BODY);
}
public function clearTorque():void{
_torque = 0;
}
public function set q(_arg1:Number):void{
_state[4] = _arg1;
}
protected function calculateInertiaTensor():void{
var _local1:Number;
var _local2:Vector;
if (mass == Simplification.INFINITE_MASS){
_I = Simplification.INFINITE_MASS;
_inverseI = 0;
return;
};
_I = 0;
_local1 = (mass / _vertices.length);
for each (_local2 in _vertices) {
_I = (_I + (_local2.dot(_local2) * _local1));
};
_inverseI = (1 / _I);
}
}
}//package org.generalrelativity.foam.dynamics.element.body
Section 151
//SimpleParticle (org.generalrelativity.foam.dynamics.element.particle.SimpleParticle)
package org.generalrelativity.foam.dynamics.element.particle {
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.force.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.ode.*;
import org.generalrelativity.foam.util.*;
import org.generalrelativity.foam.dynamics.enum.*;
import org.generalrelativity.foam.dynamics.collision.enum.*;
public class SimpleParticle implements IODE, ISimulatable {
protected var _inverseMass:Number;
protected var _state:Array;
public var _type:String;// = ""
protected var _generators:Array;
public var _ignored_types:Array;
protected var _mass:Number;
protected var _elasticity:Number;
protected var _friction:Number;
protected var _force:Vector;
public var _name:String;// = ""
public var _goal:MovieClip;
public var _ignored_bodyes:Array;
public function SimpleParticle(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:Number=0, _arg5:Number=100, _arg6:Number=0.2, _arg7:Number=0.25, _arg8:uint=4){
_name = "";
_type = "";
_ignored_bodyes = new Array();
_ignored_types = new Array();
super();
_state = new Array(_arg8);
_generators = new Array();
this.x = _arg1;
this.y = _arg2;
this.vx = _arg3;
this.vy = _arg4;
this.mass = _arg5;
this.friction = _arg6;
this.elasticity = _arg7;
clearForces();
}
public function get y():Number{
return (_state[1]);
}
public function set friction(_arg1:Number):void{
_friction = MathUtil.clamp(0, 1, _arg1);
}
public function getDerivative(_arg1:Array, _arg2:Array):void{
this._state = _arg1;
accumulateForces();
_arg2[0] = _arg1[2];
_arg2[1] = _arg1[3];
_arg2[2] = (_force.x * inverseMass);
_arg2[3] = (_force.y * inverseMass);
clearForces();
}
public function set vy(_arg1:Number):void{
_state[3] = _arg1;
}
public function get friction():Number{
return (_friction);
}
public function set vx(_arg1:Number):void{
_state[2] = _arg1;
}
public function get state():Array{
return (_state);
}
public function set y(_arg1:Number):void{
_state[1] = _arg1;
}
public function clearForces():void{
_force = new Vector();
}
public function get collisionTypeID():String{
return (CollisionType.ABSTRACT_PARTICLE);
}
public function addForceGenerator(_arg1:IForceGenerator):void{
if (_generators.indexOf(_arg1) == -1){
_generators.push(_arg1);
};
}
public function addIgnoreType(_arg1:String):void{
if (_ignored_types.indexOf(_arg1) == -1){
_ignored_types.push(_arg1);
};
}
public function addIgnoreCollision(_arg1:IBody):void{
if (_ignored_bodyes.indexOf(_arg1) == -1){
_ignored_bodyes.push(_arg1);
};
}
public function get position():Vector{
return (new Vector(x, y));
}
public function checkIgnoreTypeCollision(_arg1:String):Boolean{
if (_ignored_types.indexOf(_arg1) != -1){
return (true);
};
return (false);
}
public function get vx():Number{
return (_state[2]);
}
public function get vy():Number{
return (_state[3]);
}
public function get inverseMass():Number{
return (_inverseMass);
}
public function set elasticity(_arg1:Number):void{
_elasticity = MathUtil.clamp(0, 1, _arg1);
}
public function get elasticity():Number{
return (_elasticity);
}
public function removeForceGenerator(_arg1:IForceGenerator):void{
var _local2:int;
_local2 = _generators.indexOf(_arg1);
if (_local2 > -1){
_generators.splice(_generators.indexOf(_arg1), 1);
};
}
public function removeIgnoreType(_arg1:String):void{
var _local2:Number;
_local2 = _ignored_types.indexOf(_arg1);
if (_local2 != -1){
_ignored_types.splice(_local2, 1);
};
}
public function addForce(_arg1:Vector):void{
_force.plusEquals(_arg1);
}
public function removeIgnoreCollision(_arg1:IBody):void{
var _local2:Number;
_local2 = _ignored_bodyes.indexOf(_arg1);
if (_local2 != -1){
_ignored_bodyes.splice(_local2, 1);
};
}
public function get velocity():Vector{
return (new Vector(vx, vy));
}
public function checkIgnoreCollision(_arg1:IBody):Boolean{
if (_ignored_bodyes.indexOf(_arg1) != -1){
return (true);
};
return (false);
}
public function set mass(_arg1:Number):void{
_mass = _arg1;
if (_mass == Simplification.INFINITE_MASS){
_inverseMass = 0;
} else {
_inverseMass = (1 / _arg1);
};
}
public function set x(_arg1:Number):void{
_state[0] = _arg1;
}
public function get mass():Number{
return (_mass);
}
public function accumulateForces():void{
var _local1:IForceGenerator;
for each (_local1 in _generators) {
_local1.generate(this);
};
}
public function get force():Vector{
return (_force);
}
public function get x():Number{
return (_state[0]);
}
}
}//package org.generalrelativity.foam.dynamics.element.particle
Section 152
//IBody (org.generalrelativity.foam.dynamics.element.IBody)
package org.generalrelativity.foam.dynamics.element {
import org.generalrelativity.foam.math.*;
public interface IBody extends ISimulatable {
function get vertices():Array;
function get I():Number;
function getVelocityAtPoint(_arg1:Vector):Vector;
function addTorque(_arg1:Number):void;
function get edges():Array;
function set av(_arg1:Number):void;
function get inverseI():Number;
function set vertices(_arg1:Array):void;
function set q(_arg1:Number):void;
function get q():Number;
function addForceAtPoint(_arg1:Vector, _arg2:Vector):void;
function get av():Number;
function clearTorque():void;
function get rotation():RotationMatrix;
}
}//package org.generalrelativity.foam.dynamics.element
Section 153
//ISimulatable (org.generalrelativity.foam.dynamics.element.ISimulatable)
package org.generalrelativity.foam.dynamics.element {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.force.*;
public interface ISimulatable {
function get y():Number;
function get vx():Number;
function get vy():Number;
function set vx(_arg1:Number):void;
function set vy(_arg1:Number):void;
function addForce(_arg1:Vector):void;
function get inverseMass():Number;
function removeForceGenerator(_arg1:IForceGenerator):void;
function set y(_arg1:Number):void;
function clearForces():void;
function get velocity():Vector;
function get collisionTypeID():String;
function set mass(_arg1:Number):void;
function addForceGenerator(_arg1:IForceGenerator):void;
function accumulateForces():void;
function get force():Vector;
function set x(_arg1:Number):void;
function set elasticity(_arg1:Number):void;
function get mass():Number;
function get position():Vector;
function get elasticity():Number;
function get friction():Number;
function set friction(_arg1:Number):void;
function get x():Number;
}
}//package org.generalrelativity.foam.dynamics.element
Section 154
//Simplification (org.generalrelativity.foam.dynamics.enum.Simplification)
package org.generalrelativity.foam.dynamics.enum {
public class Simplification {
public static const INFINITE_MASS:Number = INF;
}
}//package org.generalrelativity.foam.dynamics.enum
Section 155
//Bungee (org.generalrelativity.foam.dynamics.force.spring.Bungee)
package org.generalrelativity.foam.dynamics.force.spring {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class Bungee extends Spring {
public function Bungee(_arg1:ISimulatable, _arg2:ISimulatable, _arg3:Number=0.01, _arg4:Number=0.4){
super(_arg1, _arg2, _arg3, _arg4);
}
override public function generate(_arg1:ISimulatable):void{
var _local2:Vector;
var _local3:Number;
_local2 = new Vector((element1.x - element2.x), (element1.y - element2.y));
_local3 = _local2.magnitude;
if (_local3 <= _restLength){
return;
};
_force = _local2.times((-(k) * (_local3 - _restLength)));
_force.minusEquals(new Vector(element1.vx, element1.vy).times(damp));
element1.addForce(_force);
}
}
}//package org.generalrelativity.foam.dynamics.force.spring
Section 156
//MouseSpring (org.generalrelativity.foam.dynamics.force.spring.MouseSpring)
package org.generalrelativity.foam.dynamics.force.spring {
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.force.*;
import org.generalrelativity.foam.dynamics.element.*;
public class MouseSpring extends SimpleForceGenerator implements IForceGenerator {
protected var body:IBody;
protected var displayObject:DisplayObject;
protected var k:Number;
protected var damp:Number;
protected var point:Vector;
protected var restLength:Number;
public function MouseSpring(_arg1:IBody, _arg2:Vector, _arg3:DisplayObject){
this.body = _arg1;
this.point = _arg1.rotation.getTransposeVectorProduct(_arg2);
this.displayObject = _arg3;
restLength = 40;
k = 0.001;
damp = 0.3;
_arg1.addForceGenerator(this);
}
public function getPointInWorldSpace():Vector{
var _local1:RotationMatrix;
var _local2:Vector;
_local1 = body.rotation;
_local2 = _local1.getVectorProduct(point);
return (_local2.plus(body.position));
}
public function destroy():void{
body.removeForceGenerator(this);
}
override public function generate(_arg1:ISimulatable):void{
var _local2:RotationMatrix;
var _local3:Vector;
var _local4:Vector;
var _local5:Vector;
_local2 = body.rotation;
_local3 = _local2.getVectorProduct(point);
_local4 = getPointInWorldSpace();
_local5 = new Vector((_local4.x - displayObject.mouseX), (_local4.y - displayObject.mouseY));
if (_local5.magnitude < restLength){
return;
};
_force = _local5.times((-(k) * (_local5.magnitude - restLength)));
_force.minusEquals(body.velocity.times(damp));
body.addForceAtPoint(_local3, _force);
}
}
}//package org.generalrelativity.foam.dynamics.force.spring
Section 157
//RigidBodyBungee (org.generalrelativity.foam.dynamics.force.spring.RigidBodyBungee)
package org.generalrelativity.foam.dynamics.force.spring {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class RigidBodyBungee extends RigidBodySpring {
public function RigidBodyBungee(_arg1:IBody, _arg2:Vector, _arg3:IBody, _arg4:Vector, _arg5:Number=0.01, _arg6:Number=0.01){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
override public function clone(_arg1:Boolean=true):Spring{
if (_arg1){
return (new RigidBodyBungee(IBody(element2), point2, IBody(element1), point1, k, damp));
};
return (new RigidBodyBungee(IBody(element1), point1, IBody(element2), point2, k, damp));
}
override public function generate(_arg1:ISimulatable):void{
var _local2:RotationMatrix;
var _local3:Vector;
var _local4:Vector;
var _local5:RotationMatrix;
var _local6:Vector;
var _local7:Vector;
var _local8:Vector;
var _local9:Number;
_local2 = IBody(element1).rotation;
_local3 = _local2.getVectorProduct(point1);
_local4 = _local3.plus(element1.position);
_local5 = IBody(element2).rotation;
_local6 = _local5.getVectorProduct(point2);
_local7 = _local6.plus(element2.position);
_local8 = new Vector((_local4.x - _local7.x), (_local4.y - _local7.y));
_local9 = _local8.magnitude;
if (_local9 <= _restLength){
return;
};
_force = _local8.times((-(k) * (_local8.magnitude - _restLength)));
_force.minusEquals(IBody(element1).getVelocityAtPoint(_local3).times(damp));
IBody(element1).addForceAtPoint(_local3, _force);
}
}
}//package org.generalrelativity.foam.dynamics.force.spring
Section 158
//RigidBodySpring (org.generalrelativity.foam.dynamics.force.spring.RigidBodySpring)
package org.generalrelativity.foam.dynamics.force.spring {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.util.*;
public class RigidBodySpring extends Spring {
protected var point1:Vector;
protected var point2:Vector;
public function RigidBodySpring(_arg1:IBody, _arg2:Vector, _arg3:IBody, _arg4:Vector, _arg5:Number=0.01, _arg6:Number=0.01){
var _local7:Vector;
var _local8:Vector;
super(_arg1, _arg3, _arg5, _arg6);
this.point1 = _arg2;
this.point2 = _arg4;
_local7 = _arg1.rotation.getVectorProduct(_arg2);
_local8 = _arg3.rotation.getVectorProduct(_arg4);
restLength = MathUtil.distance((_arg1.x + _local7.x), (_arg3.x + _local8.x), (_arg1.y + _local7.y), (_arg3.y + _local8.y));
}
override public function getPoint1InWorldSpace():Vector{
var _local1:RotationMatrix;
var _local2:Vector;
_local1 = IBody(element1).rotation;
_local2 = _local1.getVectorProduct(point1);
return (_local2.plus(element1.position));
}
override public function getPoint2InWorldSpace():Vector{
var _local1:RotationMatrix;
var _local2:Vector;
_local1 = IBody(element2).rotation;
_local2 = _local1.getVectorProduct(point2);
return (_local2.plus(element2.position));
}
override public function clone(_arg1:Boolean=true):Spring{
if (_arg1){
return (new RigidBodySpring(IBody(element2), point2, IBody(element1), point1, k, damp));
};
return (new RigidBodySpring(IBody(element1), point1, IBody(element2), point2, k, damp));
}
override public function generate(_arg1:ISimulatable):void{
var _local2:RotationMatrix;
var _local3:Vector;
var _local4:Vector;
var _local5:RotationMatrix;
var _local6:Vector;
var _local7:Vector;
var _local8:Vector;
_local2 = IBody(element1).rotation;
_local3 = _local2.getVectorProduct(point1);
_local4 = _local3.plus(new Vector(element1.x, element1.y));
_local5 = IBody(element2).rotation;
_local6 = _local5.getVectorProduct(point2);
_local7 = _local6.plus(new Vector(element2.x, element2.y));
_local8 = new Vector((_local4.x - _local7.x), (_local4.y - _local7.y));
_force = _local8.times((-(k) * (_local8.magnitude - _restLength)));
_force.minusEquals(IBody(element1).getVelocityAtPoint(_local3).times(damp));
IBody(element1).addForceAtPoint(_local3, _force);
}
}
}//package org.generalrelativity.foam.dynamics.force.spring
Section 159
//Spring (org.generalrelativity.foam.dynamics.force.spring.Spring)
package org.generalrelativity.foam.dynamics.force.spring {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.force.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.util.*;
public class Spring extends SimpleForceGenerator implements IForceGenerator {
protected var damp:Number;
protected var element1:ISimulatable;
protected var k:Number;
protected var element2:ISimulatable;
protected var _restLength:Number;
public function Spring(_arg1:ISimulatable, _arg2:ISimulatable, _arg3:Number=0.01, _arg4:Number=0.4){
this.element1 = _arg1;
this.element2 = _arg2;
this.k = _arg3;
this.damp = _arg4;
_arg1.addForceGenerator(this);
restLength = MathUtil.distance(_arg1.x, _arg2.x, _arg1.y, _arg2.y);
}
public function invert():void{
var _local1:ISimulatable;
element1.removeForceGenerator(this);
_local1 = ISimulatable(element2);
element2 = element1;
element1 = _local1;
element1.addForceGenerator(this);
}
public function getPoint1InWorldSpace():Vector{
return (element1.position);
}
public function getPoint2InWorldSpace():Vector{
return (element2.position);
}
public function set restLength(_arg1:Number):void{
_restLength = _arg1;
}
override public function generate(_arg1:ISimulatable):void{
var _local2:Vector;
_local2 = new Vector((element1.x - element2.x), (element1.y - element2.y));
_force = _local2.times((-(k) * (_local2.magnitude - _restLength)));
_force.minusEquals(new Vector(element1.vx, element1.vy).times(damp));
element1.addForce(_force);
}
public function clone(_arg1:Boolean=true):Spring{
if (_arg1){
return (new Spring(element2, element1, k, damp));
};
return (new Spring(element1, element2, k, damp));
}
public static function createDoubleSidedSpring(_arg1:ISimulatable, _arg2:ISimulatable, _arg3:Number=0.01, _arg4:Number=0.1):void{
var _local5:Spring;
_local5 = new Spring(_arg1, _arg2, _arg3, _arg4);
_local5 = new Spring(_arg2, _arg1, _arg3, _arg4);
}
}
}//package org.generalrelativity.foam.dynamics.force.spring
Section 160
//Friction (org.generalrelativity.foam.dynamics.force.Friction)
package org.generalrelativity.foam.dynamics.force {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class Friction extends SimpleForceGenerator implements IForceGenerator {
protected var coefficient:Number;
public function Friction(_arg1:Number=0.1){
this.coefficient = _arg1;
}
override public function generate(_arg1:ISimulatable):void{
var _local2:IBody;
_arg1.addForce(new Vector(((-(_arg1.vx) * coefficient) * _arg1.mass), ((-(_arg1.vy) * coefficient) * _arg1.mass)));
if ((_arg1 is IBody)){
_local2 = IBody(_arg1);
_local2.addTorque(((-(_local2.av) * coefficient) * _local2.I));
};
}
}
}//package org.generalrelativity.foam.dynamics.force
Section 161
//Gravity (org.generalrelativity.foam.dynamics.force.Gravity)
package org.generalrelativity.foam.dynamics.force {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class Gravity extends SimpleForceGenerator implements IForceGenerator {
public function Gravity(_arg1:Vector){
super(_arg1);
}
override public function generate(_arg1:ISimulatable):void{
_arg1.addForce(_force.times(_arg1.mass));
}
}
}//package org.generalrelativity.foam.dynamics.force
Section 162
//IForceGenerator (org.generalrelativity.foam.dynamics.force.IForceGenerator)
package org.generalrelativity.foam.dynamics.force {
import org.generalrelativity.foam.dynamics.element.*;
public interface IForceGenerator {
function generate(_arg1:ISimulatable):void;
}
}//package org.generalrelativity.foam.dynamics.force
Section 163
//SimpleForceGenerator (org.generalrelativity.foam.dynamics.force.SimpleForceGenerator)
package org.generalrelativity.foam.dynamics.force {
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
public class SimpleForceGenerator implements IForceGenerator {
protected var _force:Vector;
public function SimpleForceGenerator(_arg1:Vector=null):void{
_force = _arg1;
}
public function generate(_arg1:ISimulatable):void{
_arg1.addForce(_force);
}
}
}//package org.generalrelativity.foam.dynamics.force
Section 164
//AbstractSolver (org.generalrelativity.foam.dynamics.ode.solver.AbstractSolver)
package org.generalrelativity.foam.dynamics.ode.solver {
import org.generalrelativity.foam.dynamics.ode.*;
public class AbstractSolver implements IODESolver {
protected var _ode:IODE;
public function AbstractSolver(_arg1:IODE):void{
_ode = _arg1;
}
public function get ode():IODE{
return (_ode);
}
public function step(_arg1:Number):void{
throw (new Error("AbstractSolver.step must be overridden"));
}
}
}//package org.generalrelativity.foam.dynamics.ode.solver
Section 165
//RK4 (org.generalrelativity.foam.dynamics.ode.solver.RK4)
package org.generalrelativity.foam.dynamics.ode.solver {
import org.generalrelativity.foam.dynamics.ode.*;
public class RK4 extends AbstractSolver implements IODESolver {
private var k1:Array;
private var k3:Array;
private var k4:Array;
private var k2:Array;
public function RK4(_arg1:IODE){
var ode = _arg1;
super(ode);
try {
k1 = new Array(ode.state.length);
k2 = new Array(ode.state.length);
k3 = new Array(ode.state.length);
k4 = new Array(ode.state.length);
} catch(error:Error) {
k1 = new Array();
k2 = new Array();
k3 = new Array();
k4 = new Array();
};
}
override public function step(_arg1:Number):void{
var _local2:Array;
var _local3:Array;
var _local4:int;
_local2 = new Array(_ode.state.length);
_local3 = _ode.state;
_local4 = -1;
_ode.getDerivative(_local3, k1);
while (++_local4 < _local3.length) {
_local2[_local4] = (_local3[_local4] + ((k1[_local4] * _arg1) * 0.5));
};
_local4 = -1;
_ode.getDerivative(_local2, k2);
while (++_local4 < _local3.length) {
_local2[_local4] = (_local3[_local4] + ((k2[_local4] * _arg1) * 0.5));
};
_local4 = -1;
_ode.getDerivative(_local2, k3);
while (++_local4 < _local3.length) {
_local2[_local4] = (_local3[_local4] + (k3[_local4] * _arg1));
};
_local4 = -1;
_ode.getDerivative(_local2, k4);
while (++_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4] + ((_arg1 * (((k1[_local4] + (2 * k2[_local4])) + (2 * k3[_local4])) + k4[_local4])) / 6));
};
}
}
}//package org.generalrelativity.foam.dynamics.ode.solver
Section 166
//IODE (org.generalrelativity.foam.dynamics.ode.IODE)
package org.generalrelativity.foam.dynamics.ode {
public interface IODE {
function get state():Array;
function getDerivative(_arg1:Array, _arg2:Array):void;
}
}//package org.generalrelativity.foam.dynamics.ode
Section 167
//IODESolver (org.generalrelativity.foam.dynamics.ode.IODESolver)
package org.generalrelativity.foam.dynamics.ode {
public interface IODESolver {
function get ode():IODE;
function step(_arg1:Number):void;
}
}//package org.generalrelativity.foam.dynamics.ode
Section 168
//PhysicsEngine (org.generalrelativity.foam.dynamics.PhysicsEngine)
package org.generalrelativity.foam.dynamics {
import classes.events.*;
import org.generalrelativity.foam.math.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.dynamics.ode.*;
import org.generalrelativity.foam.dynamics.collision.fine.sat.*;
import org.generalrelativity.foam.dynamics.element.particle.*;
import org.generalrelativity.foam.dynamics.collision.coarse.*;
public class PhysicsEngine {
private var _solverIterations:int;
private var _odeSolvers:Array;
private var _coarseDetector:ICoarseCollisionDetector;
private var _numODESolvers:int;
public static const SOLVER_ITERATIONS:int = 3;
public static const DEFAULT_COARSE_COLLISION_DETECTOR:Class = AABRDetector;
public function PhysicsEngine(){
_odeSolvers = new Array();
_solverIterations = PhysicsEngine.SOLVER_ITERATIONS;
}
public function setCoarseCollisionDetector(_arg1:ICoarseCollisionDetector):void{
_coarseDetector = _arg1;
}
public function addODESolver(_arg1:IODESolver):void{
_odeSolvers.push(_arg1);
_numODESolvers = _odeSolvers.length;
}
public function removeCollidable(_arg1:ISimulatable):void{
_coarseDetector.removeCollidable(_arg1);
}
public function addCollidable(_arg1:ISimulatable):void{
if (!_coarseDetector){
_coarseDetector = new PhysicsEngine.DEFAULT_COARSE_COLLISION_DETECTOR();
};
_coarseDetector.addCollidable(_arg1);
}
public function step(_arg1:Number=1):void{
var _local2:int;
var _local3:int;
var _local4:Number;
_local3 = 0;
_local4 = (_arg1 / _solverIterations);
while (++_local3 <= _solverIterations) {
_local2 = _numODESolvers;
while (--_local2 > -1) {
IODESolver(_odeSolvers[_local2]).step(_local4);
};
if (_coarseDetector){
resolveCollisions();
};
};
}
private function resolveCollisions():void{
var _local1:Array;
var _local2:IFineCollisionDetector;
var _local3:Array;
var _local4:Contact;
var _local5:IBody;
var _local6:IBody;
var _local7:ObjectOfPlanetEvents;
_local1 = _coarseDetector.getCandidates();
for each (_local2 in _local1) {
if (_local2.hasCollision()){
_local3 = _local2.getContacts();
CollisionResolver.resolve(_local3);
for each (_local4 in _local3) {
_local5 = _local4.body1;
_local6 = _local4.body2;
_local7 = new ObjectOfPlanetEvents(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE);
_local7.action = SimpleParticle(_local6)._goal;
SimpleParticle(_local5)._goal.dispatchEvent(_local7);
_local7 = new ObjectOfPlanetEvents(ObjectOfPlanetEvents.OBJECT_PLANET_COLLIDE);
_local7.action = SimpleParticle(_local5)._goal;
SimpleParticle(_local6)._goal.dispatchEvent(_local7);
};
};
};
}
public function set solverIterations(_arg1:int):void{
_solverIterations = Math.max(Math.abs(_arg1), 1);
}
public function setCollisionFactory(_arg1:ICollisionFactory):void{
_coarseDetector.factory = _arg1;
}
public function getBodyUnderPoint(_arg1:Vector):IBody{
var _local2:PointPolygonDetector;
var _local3:IODESolver;
for each (_local3 in _odeSolvers) {
if ((_local3.ode is IBody)){
_local2 = new PointPolygonDetector(IBody(_local3.ode), _arg1);
if (_local2.hasCollision()){
return (IBody(_local3.ode));
};
};
};
return (null);
}
public function removeODESolver(_arg1:IODESolver):void{
var _local2:int;
_local2 = _odeSolvers.indexOf(_arg1);
if (_local2 > -1){
_odeSolvers.splice(_odeSolvers.indexOf(_arg1), 1);
};
_numODESolvers = _odeSolvers.length;
}
}
}//package org.generalrelativity.foam.dynamics
Section 169
//RotationMatrix (org.generalrelativity.foam.math.RotationMatrix)
package org.generalrelativity.foam.math {
public class RotationMatrix {
protected var r21:Number;
protected var r11:Number;
protected var r12:Number;
protected var r22:Number;
protected var _theta:Number;
public function RotationMatrix(_arg1:Number=0){
this.theta = _arg1;
}
public function get theta():Number{
return (_theta);
}
public function getTransposeVectorProduct(_arg1:Vector):Vector{
return (new Vector(((r11 * _arg1.x) + (r21 * _arg1.y)), ((r12 * _arg1.x) + (r22 * _arg1.y))));
}
public function getVectorProduct(_arg1:Vector):Vector{
return (new Vector(((r11 * _arg1.x) + (r12 * _arg1.y)), ((r21 * _arg1.x) + (r22 * _arg1.y))));
}
public function set theta(_arg1:Number):void{
_theta = _arg1;
r11 = Math.cos(theta);
r21 = Math.sin(theta);
r12 = -(r21);
r22 = r11;
}
}
}//package org.generalrelativity.foam.math
Section 170
//Vector (org.generalrelativity.foam.math.Vector)
package org.generalrelativity.foam.math {
public class Vector {
public var y:Number;
public var x:Number;
public function Vector(_arg1:Number=0, _arg2:Number=0){
this.x = _arg1;
this.y = _arg2;
}
public function cross(_arg1:Vector):Number{
return (((x * _arg1.y) - (y * _arg1.x)));
}
public function dividedBy(_arg1:Number):Vector{
return (new Vector((x / _arg1), (y / _arg1)));
}
public function times(_arg1:Number):Vector{
return (new Vector((x * _arg1), (y * _arg1)));
}
public function dot(_arg1:Vector):Number{
return (((x * _arg1.x) + (y * _arg1.y)));
}
public function crossScalar(_arg1:Number):Vector{
return (new Vector((-(_arg1) * y), (_arg1 * x)));
}
public function normalize():void{
dividedByEquals(magnitude);
}
public function minusEquals(_arg1:Vector):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function get magnitude():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function negate():void{
x = (x * -1);
y = (y * -1);
}
public function plus(_arg1:Vector):Vector{
return (new Vector((x + _arg1.x), (y + _arg1.y)));
}
public function clone():Vector{
return (new Vector(x, y));
}
public function dividedByEquals(_arg1:Number):void{
x = (x / _arg1);
y = (y / _arg1);
}
public function getAngle(_arg1:Vector):Number{
return (Math.atan2((_arg1.y - y), (_arg1.x - x)));
}
public function timesEquals(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function getPerp():Vector{
return (new Vector(-(y), x));
}
public function toString():String{
return ((((("[" + this.x) + ",") + this.y) + "]"));
}
public function minus(_arg1:Vector):Vector{
return (new Vector((x - _arg1.x), (y - _arg1.y)));
}
public function plusEquals(_arg1:Vector):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function getUnit():Vector{
return (dividedBy(magnitude));
}
public static function project(_arg1:Number, _arg2:Number):Vector{
return (new Vector((Math.cos(_arg1) * _arg2), (Math.sin(_arg1) * _arg2)));
}
}
}//package org.generalrelativity.foam.math
Section 171
//MathUtil (org.generalrelativity.foam.util.MathUtil)
package org.generalrelativity.foam.util {
public class MathUtil {
public static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg3 < _arg1){
return (_arg1);
};
if (_arg3 > _arg2){
return (_arg2);
};
return (_arg3);
}
public static function distance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
_local5 = (_arg1 - _arg2);
_local6 = (_arg3 - _arg4);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
}
}//package org.generalrelativity.foam.util
Section 172
//RenderingUtil (org.generalrelativity.foam.util.RenderingUtil)
package org.generalrelativity.foam.util {
import org.generalrelativity.foam.math.*;
import flash.display.*;
public class RenderingUtil {
public static function drawHash(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:RotationMatrix, _arg5:int=3, _arg6:int=8):void{
var _local7:Vector;
_arg1.lineStyle(1);
_local7 = _arg4.getVectorProduct(new Vector(-(_arg5), -(_arg5)));
_arg1.moveTo((_arg2 + _local7.x), (_arg3 + _local7.y));
_local7 = _arg4.getVectorProduct(new Vector(_arg5, _arg5));
_arg1.lineTo((_arg2 + _local7.x), (_arg3 + _local7.y));
_local7 = _arg4.getVectorProduct(new Vector(-(_arg5), _arg5));
_arg1.moveTo((_arg2 + _local7.x), (_arg3 + _local7.y));
_local7 = _arg4.getVectorProduct(new Vector(_arg5, -(_arg5)));
_arg1.lineTo((_arg2 + _local7.x), (_arg3 + _local7.y));
_arg1.drawCircle(_arg2, _arg3, _arg6);
}
public static function drawVector(_arg1:Graphics, _arg2:Vector, _arg3:Number=0, _arg4:Number=0, _arg5:Number=3):void{
var _local6:Vector;
var _local7:Vector;
_arg1.moveTo(_arg3, _arg4);
_local6 = _arg2.getUnit().times(_arg5);
_local7 = Vector.project((Math.atan2(_arg2.y, _arg2.x) - (Math.PI / 2)), _arg5);
_arg1.lineTo((_arg3 + _arg2.x), (_arg4 + _arg2.y));
_arg1.lineTo(((_arg3 + _arg2.x) + _local7.x), ((_arg4 + _arg2.y) + _local7.y));
_arg1.lineTo(((_arg3 + _arg2.x) + _local6.x), ((_arg4 + _arg2.y) + _local6.y));
_local7.negate();
_arg1.lineTo(((_arg3 + _arg2.x) + _local7.x), ((_arg4 + _arg2.y) + _local7.y));
_arg1.lineTo((_arg3 + _arg2.x), (_arg4 + _arg2.y));
_arg1.endFill();
}
}
}//package org.generalrelativity.foam.util
Section 173
//ShapeUtil (org.generalrelativity.foam.util.ShapeUtil)
package org.generalrelativity.foam.util {
import org.generalrelativity.foam.math.*;
public class ShapeUtil {
public static function getEdges(_arg1:Array):Array{
var _local2:Array;
var _local3:Vector;
var _local4:Vector;
var _local5:int;
_local2 = new Array();
_local5 = -1;
while (++_local5 < _arg1.length) {
_local3 = (_arg1[_local5] as Vector);
if ((_local5 + 1) == _arg1.length){
_local4 = (_arg1[0] as Vector);
} else {
_local4 = (_arg1[(_local5 + 1)] as Vector);
};
_local2.push(_local3.minus(_local4));
};
return (_local2);
}
public static function createRectangle(_arg1:Number, _arg2:Number):Array{
return ([new Vector((-(_arg1) / 2), (-(_arg2) / 2)), new Vector((_arg1 / 2), (-(_arg2) / 2)), new Vector((_arg1 / 2), (_arg2 / 2)), new Vector((-(_arg1) / 2), (_arg2 / 2))]);
}
public static function createSymmetricPolygon(_arg1:int=3, _arg2:Number=50, _arg3:Number=0):Array{
var _local4:Array;
var _local5:Number;
var _local6:int;
_local4 = new Array();
_local5 = (((360 / _arg1) * Math.PI) / 180);
_local6 = _arg1;
while (_local6--) {
_local4.push(new Vector((Math.cos(_arg3) * _arg2), (Math.sin(_arg3) * _arg2)));
_arg3 = (_arg3 + _local5);
};
return (_local4);
}
}
}//package org.generalrelativity.foam.util
Section 174
//SimpleMap (org.generalrelativity.foam.util.SimpleMap)
package org.generalrelativity.foam.util {
public class SimpleMap {
protected var _values:Array;
protected var _keys:Array;
public function SimpleMap(){
_keys = new Array();
_values = new Array();
}
public function remove(_arg1):void{
var _local2:int;
_local2 = getKeyIndex(_arg1);
if (_local2 > -1){
_keys.splice(_local2, 1);
_values.splice(_local2, 1);
};
}
public function getKey(_arg1){
var _local2:int;
_local2 = getValueIndex(_arg1);
if (_local2 > -1){
return (_keys[_local2]);
};
}
public function get length():int{
return (_keys.length);
}
public function put(_arg1, _arg2):void{
var _local3:int;
_local3 = getKeyIndex(_arg1);
if (_local3 > -1){
_values[_local3] = _arg2;
} else {
_keys.push(_arg1);
_values.push(_arg2);
};
}
public function getKeyIndex(_arg1):int{
return (_keys.indexOf(_arg1));
}
public function get values():Array{
return (_values.slice());
}
public function has(_arg1):Boolean{
return ((getKeyIndex(_arg1) > -1));
}
public function get keys():Array{
return (_keys.slice());
}
public function getValueIndex(_arg1):int{
return (_values.indexOf(_arg1));
}
public function getValue(_arg1){
var _local2:int;
_local2 = getKeyIndex(_arg1);
if (_local2 > -1){
return (_values[_local2]);
};
}
}
}//package org.generalrelativity.foam.util
Section 175
//IFoamRenderer (org.generalrelativity.foam.view.IFoamRenderer)
package org.generalrelativity.foam.view {
import flash.display.*;
public interface IFoamRenderer {
function addRenderable(_arg1:Renderable):void;
function draw():void;
function removeRenderable(_arg1:Renderable):void;
function copy(_arg1:IFoamRenderer):void;
function get renderables():Array;
function getDisplayObject(_arg1:Renderable):DisplayObject;
function redraw():void;
}
}//package org.generalrelativity.foam.view
Section 176
//Renderable (org.generalrelativity.foam.view.Renderable)
package org.generalrelativity.foam.view {
import flash.utils.*;
public class Renderable {
public var renderMethodKey:Class;
public var data;
public var isDynamic:Boolean;
public var element;
public function Renderable(_arg1, _arg2:Boolean=true, _arg3=null){
this.element = _arg1;
this.isDynamic = _arg2;
if (_arg3){
this.data = _arg3;
} else {
this.data = new Object();
};
this.renderMethodKey = (getDefinitionByName(getQualifiedClassName(_arg1)) as Class);
}
}
}//package org.generalrelativity.foam.view
Section 177
//SimpleFoamRenderer (org.generalrelativity.foam.view.SimpleFoamRenderer)
package org.generalrelativity.foam.view {
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.element.body.*;
import org.generalrelativity.foam.dynamics.force.spring.*;
import org.generalrelativity.foam.util.*;
public class SimpleFoamRenderer extends Sprite implements IFoamRenderer {
protected var auxillaryCanvas:Sprite;
protected var currentCanvas:Sprite;
protected var _dynamicRenderables:Array;
protected var staticCanvas:Sprite;
protected var dynamicCanvas:Sprite;
protected var _staticRenderables:Array;
public static const DEFAULT_COLOR:uint = 0xFFFFFF;
public function SimpleFoamRenderer(){
staticCanvas = (addChild(new Sprite()) as Sprite);
dynamicCanvas = (addChild(new Sprite()) as Sprite);
auxillaryCanvas = (addChild(new Sprite()) as Sprite);
_staticRenderables = new Array();
_dynamicRenderables = new Array();
}
protected function drawMouseSpring(_arg1:MouseSpring):void{
var _local2:Vector;
currentCanvas.graphics.lineStyle(1, 0xFF0000);
_local2 = _arg1.getPointInWorldSpace();
currentCanvas.graphics.moveTo(_local2.x, _local2.y);
currentCanvas.graphics.lineTo(mouseX, mouseY);
}
protected function drawCircle(_arg1:Circle, _arg2:uint, _arg3:Number, _arg4:int):void{
currentCanvas.graphics.lineStyle(1, 0x333333);
currentCanvas.graphics.beginFill(_arg2, _arg3);
currentCanvas.graphics.drawCircle(_arg1.x, _arg1.y, _arg1.radius);
currentCanvas.graphics.endFill();
currentCanvas.graphics.beginFill(0xFFFFFF);
RenderingUtil.drawHash(currentCanvas.graphics, _arg1.x, _arg1.y, _arg1.rotation, _arg4);
currentCanvas.graphics.endFill();
}
protected function setupRenderDataDefaults(_arg1:Renderable):void{
if (_arg1.data.color == null){
_arg1.data.color = SimpleFoamRenderer.DEFAULT_COLOR;
};
if (!_arg1.data.alpha){
_arg1.data.alpha = 0.5;
};
if (!_arg1.data.hashSize){
_arg1.data.hashSize = 10;
};
}
public function draw():void{
currentCanvas = staticCanvas;
currentCanvas.graphics.clear();
_staticRenderables.forEach(proxy);
redraw();
}
protected function drawPolygon(_arg1:RigidBody, _arg2:uint, _arg3:Number):void{
var _local4:RotationMatrix;
var _local5:Vector;
var _local6:Vector;
var _local7:int;
currentCanvas.graphics.lineStyle(3, 0x333333, 0.4);
currentCanvas.graphics.beginFill(_arg2, _arg3);
_local4 = _arg1.rotation;
_local5 = _local4.getVectorProduct((_arg1.vertices[0] as Vector));
_local6 = _local5;
currentCanvas.graphics.moveTo((_arg1.x + _local6.x), (_arg1.y + _local6.y));
_local7 = 0;
while (++_local7 < _arg1.vertices.length) {
_local5 = _local4.getVectorProduct((_arg1.vertices[_local7] as Vector));
currentCanvas.graphics.lineTo((_arg1.x + _local5.x), (_arg1.y + _local5.y));
};
currentCanvas.graphics.lineTo((_arg1.x + _local6.x), (_arg1.y + _local6.y));
currentCanvas.graphics.beginFill(0xFFFFFF);
if (_arg1.vertices.length > 2){
RenderingUtil.drawHash(currentCanvas.graphics, _arg1.x, _arg1.y, _arg1.rotation);
};
currentCanvas.graphics.endFill();
}
protected function proxy(_arg1:Renderable, _arg2:int, _arg3:Array):void{
switch (_arg1.renderMethodKey){
case Circle:
drawCircle(Circle(_arg1.element), _arg1.data.color, _arg1.data.alpha, _arg1.data.hashSize);
break;
case RigidBody:
drawPolygon(RigidBody(_arg1.element), _arg1.data.color, _arg1.data.alpha);
break;
case Spring:
currentCanvas = auxillaryCanvas;
drawSpring(Spring(_arg1.element));
currentCanvas = dynamicCanvas;
break;
case Bungee:
currentCanvas = auxillaryCanvas;
drawSpring(Spring(_arg1.element));
currentCanvas = dynamicCanvas;
break;
case RigidBodySpring:
currentCanvas = auxillaryCanvas;
drawSpring(Spring(_arg1.element));
currentCanvas = dynamicCanvas;
break;
case RigidBodyBungee:
currentCanvas = auxillaryCanvas;
drawSpring(Spring(_arg1.element));
currentCanvas = dynamicCanvas;
break;
case MouseSpring:
currentCanvas = auxillaryCanvas;
drawMouseSpring(MouseSpring(_arg1.element));
currentCanvas = dynamicCanvas;
break;
};
}
public function addRenderable(_arg1:Renderable):void{
setupRenderDataDefaults(_arg1);
if (_arg1.isDynamic){
_dynamicRenderables.push(_arg1);
} else {
_staticRenderables.push(_arg1);
};
}
public function copy(_arg1:IFoamRenderer):void{
var _local2:Array;
var _local3:Renderable;
_local2 = renderables;
for each (_local3 in _local2) {
_arg1.addRenderable(_local3);
};
}
public function get renderables():Array{
return (_staticRenderables.concat(_dynamicRenderables));
}
public function removeRenderable(_arg1:Renderable):void{
var _local2:Array;
var _local3:int;
if (_arg1.isDynamic){
_local2 = _dynamicRenderables;
} else {
_local2 = _staticRenderables;
};
_local3 = _local2.indexOf(_arg1);
if (_local3 > -1){
_local2.splice(_local3, 1);
};
}
protected function drawSpring(_arg1:Spring):void{
var _local2:Vector;
var _local3:Vector;
currentCanvas.graphics.lineStyle(1, 0xFF0000);
_local2 = _arg1.getPoint1InWorldSpace();
_local3 = _arg1.getPoint2InWorldSpace();
currentCanvas.graphics.moveTo(_local2.x, _local2.y);
currentCanvas.graphics.lineTo(_local3.x, _local3.y);
}
public function getDisplayObject(_arg1:Renderable):DisplayObject{
if (_staticRenderables.indexOf(_arg1) != -1){
return (staticCanvas);
};
if (_dynamicRenderables.indexOf(_arg1) != -1){
return (dynamicCanvas);
};
return (null);
}
public function redraw():void{
auxillaryCanvas.graphics.clear();
dynamicCanvas.graphics.clear();
currentCanvas = dynamicCanvas;
_dynamicRenderables.forEach(proxy);
}
}
}//package org.generalrelativity.foam.view
Section 178
//Foam (org.generalrelativity.foam.Foam)
package org.generalrelativity.foam {
import org.generalrelativity.foam.math.*;
import flash.display.*;
import org.generalrelativity.foam.dynamics.force.*;
import flash.events.*;
import org.generalrelativity.foam.dynamics.element.*;
import org.generalrelativity.foam.dynamics.collision.*;
import org.generalrelativity.foam.view.*;
import org.generalrelativity.foam.dynamics.ode.*;
import org.generalrelativity.foam.dynamics.force.spring.*;
import org.generalrelativity.foam.dynamics.*;
import flash.utils.*;
import org.generalrelativity.foam.util.*;
import org.generalrelativity.foam.dynamics.enum.*;
import org.generalrelativity.foam.dynamics.ode.solver.*;
public class Foam extends Sprite {
private var _renderer:IFoamRenderer;
private var _useMouseDragger:Boolean;
private var _globalForceGenerators:Array;
private var foamTimerIteration:Number;// = 10
private var _callOnAddedToStage:Array;
private var _mouseSpring:MouseSpring;
private var _renderMap:SimpleMap;
private var _engine:PhysicsEngine;
private var _timestep:Number;
private var _isSimulating:Boolean;
private var foamTimer:Timer;
private var _defaultSolver:Class;
private var _solverMap:SimpleMap;
public static const DEFAULT_ODE_SOLVER:Class = RK4;
public static const STEP:String = "step";
public function Foam(){
foamTimerIteration = 10;
super();
_solverMap = new SimpleMap();
_renderMap = new SimpleMap();
_engine = new PhysicsEngine();
_globalForceGenerators = new Array();
_callOnAddedToStage = new Array();
_defaultSolver = Foam.DEFAULT_ODE_SOLVER;
_timestep = 1;
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
}
public function setCollisionFactory(_arg1:ICollisionFactory):void{
_engine.setCollisionFactory(_arg1);
}
public function addGlobalForceGenerator(_arg1:IForceGenerator, _arg2:Boolean=true):void{
var _local3:ISimulatable;
if (_arg2){
for each (_local3 in _solverMap.keys) {
_local3.addForceGenerator(_arg1);
};
};
_globalForceGenerators.push(_arg1);
}
public function stop():void{
if (_isSimulating){
_isSimulating = false;
};
}
public function get timestep():Number{
return (_timestep);
}
public function simulate():void{
if (((!(_isSimulating)) && (_solverMap.length))){
_isSimulating = true;
if (_renderer){
_renderer.draw();
};
};
}
public function set timestep(_arg1:Number):void{
_timestep = _arg1;
}
public function setRenderer(_arg1:IFoamRenderer):void{
if (_renderer){
_renderer.copy(_arg1);
removeChild(DisplayObject(_renderer));
};
_renderer = _arg1;
addChild(DisplayObject(_renderer));
}
public function addElement(_arg1:ISimulatable, _arg2:Boolean=true, _arg3:Boolean=true, _arg4=null, _arg5:IODESolver=null):void{
var _local6:IForceGenerator;
if (((!((_arg1.mass == Simplification.INFINITE_MASS))) && ((_arg1 is IODE)))){
if (!_arg5){
_arg5 = new _defaultSolver(_arg1);
};
_solverMap.put(_arg1, _arg5);
_engine.addODESolver(_arg5);
for each (_local6 in _globalForceGenerators) {
_arg1.addForceGenerator(_local6);
};
};
if (_arg2){
_engine.addCollidable(_arg1);
};
if (_arg3){
if (!_renderer){
_renderer = new SimpleFoamRenderer();
addChild(DisplayObject(_renderer));
};
addRenderable(new Renderable(_arg1, !((_arg1.mass == Simplification.INFINITE_MASS)), _arg4));
};
}
public function get engine():PhysicsEngine{
return (_engine);
}
public function setCoarseCollisionDetector(_arg1:ICoarseCollisionDetector):void{
_engine.setCoarseCollisionDetector(_arg1);
}
public function set defaultSolver(_arg1:Class):void{
_defaultSolver = _arg1;
}
public function removeGlobalForceGenerator(_arg1:IForceGenerator, _arg2:Boolean=false):void{
var _local3:int;
var _local4:ISimulatable;
_local3 = _globalForceGenerators.indexOf(_arg1);
if (_local3 > -1){
if (!_arg2){
for each (_local4 in _solverMap.keys) {
_local4.removeForceGenerator(_arg1);
};
};
_globalForceGenerators.splice(_globalForceGenerators.indexOf(_arg1), 1);
};
}
public function set solverIterations(_arg1:int):void{
_engine.solverIterations = _arg1;
}
public function stepForward(_arg1:TimerEvent=null):void{
_engine.step(_timestep);
if (_renderer){
_renderer.redraw();
};
dispatchEvent(new Event(Foam.STEP));
}
public function stopSimulating(_arg1:ISimulatable):void{
var element = _arg1;
try {
_engine.removeODESolver(IODESolver(_solverMap.getValue(element)));
_solverMap.remove(element);
stopColliding(element);
} catch(e:Error) {
};
if (!_solverMap.keys.length){
stop();
};
}
public function useMouseDragger(_arg1:Boolean):void{
if (!stage){
if (_callOnAddedToStage.indexOf(useMouseDragger) == -1){
_callOnAddedToStage.push(useMouseDragger, [_arg1]);
};
return;
};
if (_useMouseDragger != _arg1){
_useMouseDragger = _arg1;
};
}
public function get simulatables():Array{
return (_solverMap.keys);
}
public function stopColliding(_arg1:ISimulatable):void{
_engine.removeCollidable(_arg1);
}
private function onMouseDownT(_arg1:MouseEvent):void{
var _local2:Vector;
var _local3:IBody;
_local2 = new Vector(mouseX, mouseY);
_local3 = _engine.getBodyUnderPoint(_local2);
if (_local3){
_mouseSpring = new MouseSpring(_local3, _local2.minus(_local3.position), this);
addRenderable(new Renderable(_mouseSpring));
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUpT, false, 0, true);
};
}
private function onAddedToStage(_arg1:Event):void{
var _local2:Array;
var _local3:Function;
while (_callOnAddedToStage.length) {
_local2 = _callOnAddedToStage.pop();
_local3 = _callOnAddedToStage.pop();
_local3.apply(this, _local2);
};
}
public function addRenderable(_arg1:Renderable):void{
_renderMap.put(_arg1.element, _arg1);
_renderer.addRenderable(_arg1);
}
public function stopDrawing(_arg1):void{
if (_renderMap.has(_arg1)){
_renderer.removeRenderable(Renderable(_renderMap.getValue(_arg1)));
_renderMap.remove(_arg1);
if (_isSimulating){
_renderer.draw();
};
};
}
private function onMouseUpT(_arg1:MouseEvent):void{
_mouseSpring.destroy();
stopDrawing(_mouseSpring);
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUpT);
}
public function stepBackward(_arg1:Event=null):void{
_engine.step(-(_timestep));
if (_renderer){
_renderer.redraw();
};
dispatchEvent(new Event(Foam.STEP));
}
public function removeElement(_arg1:ISimulatable):void{
stopDrawing(_arg1);
stopSimulating(_arg1);
}
}
}//package org.generalrelativity.foam
Section 179
//GlobalMouseEvent (ru.etcs.events.GlobalMouseEvent)
package ru.etcs.events {
import flash.display.*;
import flash.events.*;
public class GlobalMouseEvent extends MouseEvent {
private var __stageY:Number;// = 0
private var __stageX:Number;// = 0
public static const MOUSE_WHEEL:String = "mouseWheel";
public static const MOUSE_UP:String = "mouseUp";
public static const MOUSE_MOVE:String = "mouseMove";
public static const MOUSE_DOWN:String = "mouseDown";
public function GlobalMouseEvent(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:InteractiveObject=null, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:Boolean=false, _arg12:Boolean=false, _arg13:int=0){
__stageX = 0;
__stageY = 0;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13);
__stageX = _arg6;
__stageY = _arg7;
}
override public function get stageX():Number{
return (__stageX);
}
override public function get stageY():Number{
return (__stageY);
}
override public function toString():String{
return ((((((((((((((((((((((((((("[GlobalMouseEvent type=\"" + type) + "\" bubbles=") + bubbles) + " cancelable=") + cancelable) + " eventPhase=") + eventPhase) + " localX=") + localX) + " localY=") + localY) + " stageX=") + stageX) + " stageY=") + stageY) + " relatedObject=") + relatedObject) + " ctrlKey=") + ctrlKey) + " altKey=") + altKey) + " shiftKey=") + shiftKey) + " delta=") + delta) + "]"));
}
}
}//package ru.etcs.events
Section 180
//GlobalMouse (ru.etcs.ui.GlobalMouse)
package ru.etcs.ui {
import flash.display.*;
import flash.events.*;
import ru.etcs.events.*;
import flash.utils.*;
import flash.net.*;
public class GlobalMouse {
private static var connectionName:String;
private static var loader:Loader;
private static var initialized:Boolean = false;
private static var connection:LocalConnection;
private static var dispatcher:EventDispatcher;
private static var bytes:ByteArray;
public static function dispatchEvent(_arg1:Event):Boolean{
GlobalMouse.init();
return (GlobalMouse.dispatcher.dispatchEvent(_arg1));
}
public static function willTrigger(_arg1:String):Boolean{
GlobalMouse.init();
return (GlobalMouse.dispatcher.willTrigger(_arg1));
}
public static function mouseUpHandler(_arg1:String=null):void{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:GlobalMouseEvent;
_local2 = _arg1.split(",");
_local3 = Number(_local2[0]);
_local4 = Number(_local2[1]);
_local5 = new GlobalMouseEvent(GlobalMouseEvent.MOUSE_UP, true, false, _local3, _local4, _local3, _local4, null, false, false, false, false, 0);
GlobalMouse.dispatcher.dispatchEvent(_local5);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
GlobalMouse.init();
GlobalMouse.dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4);
}
private static function init():void{
var _local1:String;
var _local2:uint;
var _local3:uint;
if (GlobalMouse.initialized){
return;
};
_local1 = "43575309DC020000789C9590C14EC24014456FA7C50E22220A764363E20EE3CEA50B480071019A901097A669274252A68456E5135CB1ECC68DDFE007F92B38AF039198886116CDBC7BDF3D6FFAE6C83D02A50FE0CC40BB0C755A6CB95C36CC4F06BC7DE114A18F5EE47B612B9252F8C9389290DE4460123DC7A2D7422C923BAA23D9918998DDCCA8F0C32826A94F4DEDE85502973A41C5AD278350CC545406EBA6E154FBC3E9DA5D19FDE865358C6EBFCC879110A176B3EBDACE4C7841D01BC789904AA13777E6FEC8934FEA79FA5F9016C1B187D5E146D34D2D70C64D3765CAA9D1D75A140103EC02469CCC70051273EF394AB8480B1B791DD81B3859CBB5A36996E1DEFFE0EC05A75E5627920DCEED8A2ACFC9CA77B55025A14BD97DCE6A691EB6A914CBE08581B3413AD88554DC463ADC8554DA463A5A946859661D2C1061E2A1F10F502B0C16CBE0E53FE1366C83767C9CCD39513BCE8357B4A66757070E9AAAFC068E7B8A4A";
_local2 = _local1.length;
GlobalMouse.bytes = new ByteArray();
GlobalMouse.dispatcher = new EventDispatcher();
_local3 = 0;
while (_local3 < _local2) {
GlobalMouse.bytes.writeByte(Number(("0x" + _local1.substr(_local3, 2))));
_local3 = (_local3 + 2);
};
GlobalMouse.loader = new Loader();
GlobalMouse.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, GlobalMouse.completeHandler);
GlobalMouse.loader.loadBytes(GlobalMouse.bytes);
GlobalMouse.connectionName = ("mouseLC_" + new Date().getTime());
GlobalMouse.initialized = true;
}
private static function completeHandler(_arg1:Event):void{
GlobalMouse.connection = new LocalConnection();
GlobalMouse.connection.addEventListener(StatusEvent.STATUS, GlobalMouse.statusHandler);
GlobalMouse.connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, GlobalMouse.anyncErrorHandler);
GlobalMouse.connection.send("nameExchange", "setName", GlobalMouse.connectionName);
}
public static function mouseMoveHandler(_arg1:String=null):void{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:GlobalMouseEvent;
_local2 = _arg1.split(",");
_local3 = Number(_local2[0]);
_local4 = Number(_local2[1]);
_local5 = new GlobalMouseEvent(GlobalMouseEvent.MOUSE_MOVE, true, false, _local3, _local4, _local3, _local4, null, false, false, false, false, 0);
GlobalMouse.dispatcher.dispatchEvent(_local5);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
GlobalMouse.init();
GlobalMouse.dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private static function anyncErrorHandler(_arg1:AsyncErrorEvent):void{
}
public static function mouseDownHandler(_arg1:String=null):void{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:GlobalMouseEvent;
_local2 = _arg1.split(",");
_local3 = Number(_local2[0]);
_local4 = Number(_local2[1]);
_local5 = new GlobalMouseEvent(GlobalMouseEvent.MOUSE_DOWN, true, false, _local3, _local4, _local3, _local4, null, false, false, false, false, 0);
GlobalMouse.dispatcher.dispatchEvent(_local5);
}
public static function mouseWheelHandler(_arg1:String=null):void{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:GlobalMouseEvent;
_local2 = _arg1.split(",");
_local3 = Number(_local2[0]);
_local4 = Number(_local2[1]);
_local5 = Number(_local2[2]);
_local6 = new GlobalMouseEvent(GlobalMouseEvent.MOUSE_WHEEL, true, false, _local3, _local4, _local3, _local4, null, false, false, false, false, _local5);
GlobalMouse.dispatcher.dispatchEvent(_local6);
}
private static function statusHandler(_arg1:StatusEvent):void{
if (_arg1.level == "status"){
GlobalMouse.connection.client = GlobalMouse;
GlobalMouse.connection.connect(GlobalMouse.connectionName);
} else {
GlobalMouse.connection.send("nameExchange", "setName", GlobalMouse.connectionName);
};
}
public static function hasEventListener(_arg1:String):Boolean{
GlobalMouse.init();
return (GlobalMouse.dispatcher.hasEventListener(_arg1));
}
}
}//package ru.etcs.ui
Section 181
//b_skin_1 (b_skin_1)
package {
import flash.display.*;
public dynamic class b_skin_1 extends MovieClip {
public var skin:MovieClip;
public function b_skin_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 182
//b_skin_2 (b_skin_2)
package {
import flash.display.*;
public dynamic class b_skin_2 extends MovieClip {
public var skin:MovieClip;
public function b_skin_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 183
//b_skin_3 (b_skin_3)
package {
import flash.display.*;
public dynamic class b_skin_3 extends MovieClip {
public var skin:MovieClip;
public function b_skin_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 184
//b_skin_4 (b_skin_4)
package {
import flash.display.*;
public dynamic class b_skin_4 extends MovieClip {
public var skin:MovieClip;
public function b_skin_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 185
//b_skin_5 (b_skin_5)
package {
import flash.display.*;
public dynamic class b_skin_5 extends MovieClip {
public var skin:MovieClip;
public function b_skin_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 186
//bonus_skin1 (bonus_skin1)
package {
import flash.display.*;
public dynamic class bonus_skin1 extends MovieClip {
}
}//package
Section 187
//doctor (doctor)
package {
import flash.display.*;
import flash.events.*;
import classes.*;
import classes.media.*;
import classes.utils.*;
import classes.gamezhero.*;
import flash.system.*;
public class doctor extends MovieClip {
private var proLibrary:ClassLoader;
public var all:GameArea;
private var pro;
private var proFlag:Boolean;// = false
public function doctor():void{
proFlag = false;
super();
addFrameScript(0, frame1);
Security.allowDomain("gamezhero.com", "files.gamezhero.com", "eufiles.gamezhero.com", "*.gamezhero.com", "*", "*.*", "*.*.*");
stage.stageFocusRect = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
iniMainStage();
}
public function iniMainStage():void{
loadPro();
iniSound();
iniPreloader();
this.gotoAndStop(1);
}
public function nextStep(_arg1:Event=null):void{
if (pro){
pro.stopPopUp();
};
stage.align = "";
this.gotoAndStop(2);
}
function frame1(){
stop();
}
private function loadErrorHandler(_arg1:Event):void{
}
private function iniSound():void{
Global.music_interface = new Music();
Global.music_game = new Music();
Global.sound_interface = new SoundFX();
Global.sound_game = new SoundFX();
Global.music_interface.setMusicVolume(Global._music_volume_interface);
Global.music_game.setMusicVolume(Global._music_volume_interface);
Global.sound_interface.setSoundVolume(Global._sound_volume_interface);
Global.sound_game.setSoundVolume(Global._sound_volume_interface);
if (isNaN(Global._game_stored_data.data.soundVolumeFlag)){
Global._game_stored_data.data.soundVolumeFlag = 1;
};
if (isNaN(Global._game_stored_data.data.musicVolumeFlag)){
Global._game_stored_data.data.musicVolumeFlag = 1;
};
}
private function classLoadedHandler(_arg1:Event):void{
var foo:Number;
var proClass:Class;
var e = _arg1;
foo = Number(root.loaderInfo.parameters["gamezhero_code"]);
Global.gamezhero_code = foo;
try {
proClass = proLibrary.getClass("superPro3");
pro = new proClass(this, 1197710244855, foo, "doctor_zed");
} catch(e:Error) {
};
}
private function loadPro():void{
if (proFlag == false){
proFlag = true;
proLibrary = new ClassLoader();
proLibrary.addEventListener(ClassLoader.LOAD_ERROR, loadErrorHandler);
proLibrary.addEventListener(ClassLoader.CLASS_LOADED, classLoadedHandler);
proLibrary.load(("http://files.gamezhero.com/flash/superPro3.swf?time" + new Date().getTime()));
};
}
public function iniPreloader():void{
var _local1:Object;
var _local2:GamePreloader;
Global._language = root.loaderInfo.parameters["language"];
_local1 = new Object();
_local1.game_name = "doctor_zed";
_local1.debug = false;
_local1.gamezhero_url = Global._urls["preloader"];
_local1.gamezhero_menu = {Free Online Games @ Gamezhero.com:Global._urls["play_more_games_context"], Send To Friends:Global._urls["send_to_friends_context"], Put This Game To Your Blog or Site:Global._urls["put_this_game_context"]};
_local2 = new GamePreloader(this, _local1);
_local2.addEventListener(GamePreloader.finish, nextStep);
}
}
}//package
Section 188
//e_skin_1_big (e_skin_1_big)
package {
import flash.display.*;
public dynamic class e_skin_1_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 189
//e_skin_1_medium (e_skin_1_medium)
package {
import flash.display.*;
public dynamic class e_skin_1_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 190
//e_skin_1_small (e_skin_1_small)
package {
import flash.display.*;
public dynamic class e_skin_1_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 191
//e_skin_2_big (e_skin_2_big)
package {
import flash.display.*;
public dynamic class e_skin_2_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 192
//e_skin_2_medium (e_skin_2_medium)
package {
import flash.display.*;
public dynamic class e_skin_2_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 193
//e_skin_2_small (e_skin_2_small)
package {
import flash.display.*;
public dynamic class e_skin_2_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 194
//e_skin_3_big (e_skin_3_big)
package {
import flash.display.*;
public dynamic class e_skin_3_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 195
//e_skin_3_medium (e_skin_3_medium)
package {
import flash.display.*;
public dynamic class e_skin_3_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 196
//e_skin_3_small (e_skin_3_small)
package {
import flash.display.*;
public dynamic class e_skin_3_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 197
//e_skin_4_big (e_skin_4_big)
package {
import flash.display.*;
public dynamic class e_skin_4_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 198
//e_skin_4_medium (e_skin_4_medium)
package {
import flash.display.*;
public dynamic class e_skin_4_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 199
//e_skin_4_small (e_skin_4_small)
package {
import flash.display.*;
public dynamic class e_skin_4_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 200
//e_skin_5_big (e_skin_5_big)
package {
import flash.display.*;
public dynamic class e_skin_5_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 201
//e_skin_5_medium (e_skin_5_medium)
package {
import flash.display.*;
public dynamic class e_skin_5_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 202
//e_skin_5_small (e_skin_5_small)
package {
import flash.display.*;
public dynamic class e_skin_5_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 203
//e_skin_boss_big (e_skin_boss_big)
package {
import flash.display.*;
public dynamic class e_skin_boss_big extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 204
//e_skin_boss_medium (e_skin_boss_medium)
package {
import flash.display.*;
public dynamic class e_skin_boss_medium extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 205
//e_skin_boss_small (e_skin_boss_small)
package {
import flash.display.*;
public dynamic class e_skin_boss_small extends MovieClip {
public var skin:MovieClip;
}
}//package
Section 206
//exit_skin1 (exit_skin1)
package {
import flash.display.*;
public dynamic class exit_skin1 extends MovieClip {
}
}//package
Section 207
//GameOverCongratulation0015 (GameOverCongratulation0015)
package {
import classes.gamearea.*;
public dynamic class GameOverCongratulation0015 extends MultiText {
}
}//package
Section 208
//GameOverCongratulation0020 (GameOverCongratulation0020)
package {
import classes.gamearea.*;
public dynamic class GameOverCongratulation0020 extends MultiText {
}
}//package
Section 209
//help_skin1 (help_skin1)
package {
import flash.display.*;
public dynamic class help_skin1 extends MovieClip {
}
}//package
Section 210
//introText (introText)
package {
import classes.gamearea.*;
public dynamic class introText extends MultiText {
public function introText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 211
//jumper_skin1 (jumper_skin1)
package {
import flash.display.*;
public dynamic class jumper_skin1 extends MovieClip {
public var indicator:MovieClip;
public var jump:MovieClip;
}
}//package
Section 212
//LiveEnemy (LiveEnemy)
package {
import flash.display.*;
public dynamic class LiveEnemy extends MovieClip {
}
}//package
Section 213
//m_game (m_game)
package {
import flash.media.*;
public dynamic class m_game extends Sound {
}
}//package
Section 214
//m_interface (m_interface)
package {
import flash.media.*;
public dynamic class m_interface extends Sound {
}
}//package
Section 215
//mainmenu (mainmenu)
package {
import classes.gamearea.*;
public dynamic class mainmenu extends MultiText {
public function mainmenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 216
//pauseText (pauseText)
package {
import classes.gamearea.*;
public dynamic class pauseText extends MultiText {
public function pauseText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 217
//playGameText (playGameText)
package {
import classes.gamearea.*;
public dynamic class playGameText extends MultiText {
public function playGameText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 218
//playMoreGamesText (playMoreGamesText)
package {
import classes.gamearea.*;
public dynamic class playMoreGamesText extends MultiText {
public function playMoreGamesText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 219
//putThisGametext (putThisGametext)
package {
import classes.gamearea.*;
public dynamic class putThisGametext extends MultiText {
}
}//package
Section 220
//RadarEnemy (RadarEnemy)
package {
import flash.display.*;
public dynamic class RadarEnemy extends MovieClip {
public function RadarEnemy(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 221
//rock_1_big (rock_1_big)
package {
import flash.display.*;
public dynamic class rock_1_big extends MovieClip {
}
}//package
Section 222
//rock_1_medium (rock_1_medium)
package {
import flash.display.*;
public dynamic class rock_1_medium extends MovieClip {
}
}//package
Section 223
//rock_1_small (rock_1_small)
package {
import flash.display.*;
public dynamic class rock_1_small extends MovieClip {
}
}//package
Section 224
//rock_2_big (rock_2_big)
package {
import flash.display.*;
public dynamic class rock_2_big extends MovieClip {
}
}//package
Section 225
//rock_2_medium (rock_2_medium)
package {
import flash.display.*;
public dynamic class rock_2_medium extends MovieClip {
}
}//package
Section 226
//rock_2_small (rock_2_small)
package {
import flash.display.*;
public dynamic class rock_2_small extends MovieClip {
}
}//package
Section 227
//rock_3_big (rock_3_big)
package {
import flash.display.*;
public dynamic class rock_3_big extends MovieClip {
}
}//package
Section 228
//rock_3_medium (rock_3_medium)
package {
import flash.display.*;
public dynamic class rock_3_medium extends MovieClip {
}
}//package
Section 229
//rock_3_small (rock_3_small)
package {
import flash.display.*;
public dynamic class rock_3_small extends MovieClip {
}
}//package
Section 230
//rock_4_big (rock_4_big)
package {
import flash.display.*;
public dynamic class rock_4_big extends MovieClip {
}
}//package
Section 231
//rock_4_medium (rock_4_medium)
package {
import flash.display.*;
public dynamic class rock_4_medium extends MovieClip {
}
}//package
Section 232
//rock_4_small (rock_4_small)
package {
import flash.display.*;
public dynamic class rock_4_small extends MovieClip {
}
}//package
Section 233
//rock_5_big (rock_5_big)
package {
import flash.display.*;
public dynamic class rock_5_big extends MovieClip {
}
}//package
Section 234
//rock_5_medium (rock_5_medium)
package {
import flash.display.*;
public dynamic class rock_5_medium extends MovieClip {
}
}//package
Section 235
//rock_5_small (rock_5_small)
package {
import flash.display.*;
public dynamic class rock_5_small extends MovieClip {
}
}//package
Section 236
//s_alert (s_alert)
package {
import flash.media.*;
public dynamic class s_alert extends Sound {
}
}//package
Section 237
//s_bonus (s_bonus)
package {
import flash.media.*;
public dynamic class s_bonus extends Sound {
}
}//package
Section 238
//s_change_wepaon (s_change_wepaon)
package {
import flash.media.*;
public dynamic class s_change_wepaon extends Sound {
}
}//package
Section 239
//s_click (s_click)
package {
import flash.media.*;
public dynamic class s_click extends Sound {
}
}//package
Section 240
//s_enemy_atack1 (s_enemy_atack1)
package {
import flash.media.*;
public dynamic class s_enemy_atack1 extends Sound {
}
}//package
Section 241
//s_enemy_atack2 (s_enemy_atack2)
package {
import flash.media.*;
public dynamic class s_enemy_atack2 extends Sound {
}
}//package
Section 242
//s_enemy_die (s_enemy_die)
package {
import flash.media.*;
public dynamic class s_enemy_die extends Sound {
}
}//package
Section 243
//s_enemy_popal (s_enemy_popal)
package {
import flash.media.*;
public dynamic class s_enemy_popal extends Sound {
}
}//package
Section 244
//s_enemy_show (s_enemy_show)
package {
import flash.media.*;
public dynamic class s_enemy_show extends Sound {
}
}//package
Section 245
//s_fire (s_fire)
package {
import flash.media.*;
public dynamic class s_fire extends Sound {
}
}//package
Section 246
//s_jump (s_jump)
package {
import flash.media.*;
public dynamic class s_jump extends Sound {
}
}//package
Section 247
//s_jumper (s_jumper)
package {
import flash.media.*;
public dynamic class s_jumper extends Sound {
}
}//package
Section 248
//s_lift (s_lift)
package {
import flash.media.*;
public dynamic class s_lift extends Sound {
}
}//package
Section 249
//s_mimo (s_mimo)
package {
import flash.media.*;
public dynamic class s_mimo extends Sound {
}
}//package
Section 250
//s_minus_live (s_minus_live)
package {
import flash.media.*;
public dynamic class s_minus_live extends Sound {
}
}//package
Section 251
//s_over (s_over)
package {
import flash.media.*;
public dynamic class s_over extends Sound {
}
}//package
Section 252
//s_popal (s_popal)
package {
import flash.media.*;
public dynamic class s_popal extends Sound {
}
}//package
Section 253
//s_skin1_big (s_skin1_big)
package {
import flash.display.*;
public dynamic class s_skin1_big extends MovieClip {
}
}//package
Section 254
//s_skin1_medium (s_skin1_medium)
package {
import flash.display.*;
public dynamic class s_skin1_medium extends MovieClip {
}
}//package
Section 255
//s_skin1_small (s_skin1_small)
package {
import flash.display.*;
public dynamic class s_skin1_small extends MovieClip {
public function s_skin1_small(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 256
//s_skin2_big (s_skin2_big)
package {
import flash.display.*;
public dynamic class s_skin2_big extends MovieClip {
}
}//package
Section 257
//s_skin2_medium (s_skin2_medium)
package {
import flash.display.*;
public dynamic class s_skin2_medium extends MovieClip {
}
}//package
Section 258
//s_skin2_small (s_skin2_small)
package {
import flash.display.*;
public dynamic class s_skin2_small extends MovieClip {
public function s_skin2_small(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 259
//s_skin3_big (s_skin3_big)
package {
import flash.display.*;
public dynamic class s_skin3_big extends MovieClip {
}
}//package
Section 260
//s_skin3_medium (s_skin3_medium)
package {
import flash.display.*;
public dynamic class s_skin3_medium extends MovieClip {
}
}//package
Section 261
//s_skin3_small (s_skin3_small)
package {
import flash.display.*;
public dynamic class s_skin3_small extends MovieClip {
public function s_skin3_small(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 262
//s_skin4_big (s_skin4_big)
package {
import flash.display.*;
public dynamic class s_skin4_big extends MovieClip {
}
}//package
Section 263
//s_skin4_medium (s_skin4_medium)
package {
import flash.display.*;
public dynamic class s_skin4_medium extends MovieClip {
}
}//package
Section 264
//s_skin4_small (s_skin4_small)
package {
import flash.display.*;
public dynamic class s_skin4_small extends MovieClip {
public function s_skin4_small(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 265
//s_skin5_big (s_skin5_big)
package {
import flash.display.*;
public dynamic class s_skin5_big extends MovieClip {
}
}//package
Section 266
//s_skin5_medium (s_skin5_medium)
package {
import flash.display.*;
public dynamic class s_skin5_medium extends MovieClip {
}
}//package
Section 267
//s_skin5_small (s_skin5_small)
package {
import flash.display.*;
public dynamic class s_skin5_small extends MovieClip {
public function s_skin5_small(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 268
//s_step (s_step)
package {
import flash.media.*;
public dynamic class s_step extends Sound {
}
}//package
Section 269
//s_super_attack (s_super_attack)
package {
import flash.media.*;
public dynamic class s_super_attack extends Sound {
}
}//package
Section 270
//s_teleport (s_teleport)
package {
import flash.media.*;
public dynamic class s_teleport extends Sound {
}
}//package
Section 271
//s_wave (s_wave)
package {
import flash.media.*;
public dynamic class s_wave extends Sound {
}
}//package
Section 272
//s_volcano (s_volcano)
package {
import flash.media.*;
public dynamic class s_volcano extends Sound {
}
}//package
Section 273
//s_vorota (s_vorota)
package {
import flash.media.*;
public dynamic class s_vorota extends Sound {
}
}//package
Section 274
//sendToFriendsText (sendToFriendsText)
package {
import classes.gamearea.*;
public dynamic class sendToFriendsText extends MultiText {
public function sendToFriendsText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 275
//skipBtnText (skipBtnText)
package {
import classes.gamearea.*;
public dynamic class skipBtnText extends MultiText {
}
}//package
Section 276
//step_skin_1 (step_skin_1)
package {
import flash.display.*;
public dynamic class step_skin_1 extends MovieClip {
}
}//package
Section 277
//step_skin_2 (step_skin_2)
package {
import flash.display.*;
public dynamic class step_skin_2 extends MovieClip {
}
}//package
Section 278
//step_skin_3 (step_skin_3)
package {
import flash.display.*;
public dynamic class step_skin_3 extends MovieClip {
}
}//package
Section 279
//step_skin_4 (step_skin_4)
package {
import flash.display.*;
public dynamic class step_skin_4 extends MovieClip {
}
}//package
Section 280
//step_skin_5 (step_skin_5)
package {
import flash.display.*;
public dynamic class step_skin_5 extends MovieClip {
}
}//package
Section 281
//submitTopScoreHeaderText (submitTopScoreHeaderText)
package {
import classes.gamearea.*;
public dynamic class submitTopScoreHeaderText extends MultiText {
}
}//package
Section 282
//teleport_1 (teleport_1)
package {
import flash.display.*;
public dynamic class teleport_1 extends MovieClip {
}
}//package
Section 283
//text_doctorZed (text_doctorZed)
package {
import classes.gamearea.*;
public dynamic class text_doctorZed extends MultiText {
public function text_doctorZed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 284
//viewTopScoreText (viewTopScoreText)
package {
import classes.gamearea.*;
public dynamic class viewTopScoreText extends MultiText {
public function viewTopScoreText(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 285
//volcano_skin1_big (volcano_skin1_big)
package {
import flash.display.*;
public dynamic class volcano_skin1_big extends MovieClip {
}
}//package
Section 286
//volcano_skin1_medium (volcano_skin1_medium)
package {
import flash.display.*;
public dynamic class volcano_skin1_medium extends MovieClip {
}
}//package
Section 287
//volcano_skin1_small (volcano_skin1_small)
package {
import flash.display.*;
public dynamic class volcano_skin1_small extends MovieClip {
}
}//package
Section 288
//volcano_skin2_big (volcano_skin2_big)
package {
import flash.display.*;
public dynamic class volcano_skin2_big extends MovieClip {
}
}//package
Section 289
//volcano_skin2_medium (volcano_skin2_medium)
package {
import flash.display.*;
public dynamic class volcano_skin2_medium extends MovieClip {
}
}//package
Section 290
//volcano_skin2_small (volcano_skin2_small)
package {
import flash.display.*;
public dynamic class volcano_skin2_small extends MovieClip {
}
}//package
Section 291
//volcano_skin3_big (volcano_skin3_big)
package {
import flash.display.*;
public dynamic class volcano_skin3_big extends MovieClip {
}
}//package
Section 292
//volcano_skin3_medium (volcano_skin3_medium)
package {
import flash.display.*;
public dynamic class volcano_skin3_medium extends MovieClip {
}
}//package
Section 293
//volcano_skin3_small (volcano_skin3_small)
package {
import flash.display.*;
public dynamic class volcano_skin3_small extends MovieClip {
}
}//package
Section 294
//volcano_skin4_big (volcano_skin4_big)
package {
import flash.display.*;
public dynamic class volcano_skin4_big extends MovieClip {
}
}//package
Section 295
//volcano_skin4_medium (volcano_skin4_medium)
package {
import flash.display.*;
public dynamic class volcano_skin4_medium extends MovieClip {
}
}//package
Section 296
//volcano_skin4_small (volcano_skin4_small)
package {
import flash.display.*;
public dynamic class volcano_skin4_small extends MovieClip {
}
}//package
Section 297
//volcano_skin5_big (volcano_skin5_big)
package {
import flash.display.*;
public dynamic class volcano_skin5_big extends MovieClip {
}
}//package
Section 298
//volcano_skin5_medium (volcano_skin5_medium)
package {
import flash.display.*;
public dynamic class volcano_skin5_medium extends MovieClip {
}
}//package
Section 299
//volcano_skin5_small (volcano_skin5_small)
package {
import flash.display.*;
public dynamic class volcano_skin5_small extends MovieClip {
}
}//package