Section 1
//cNoHandButton (base.cNoHandButton)
package base {
import flash.display.*;
public class cNoHandButton extends SimpleButton {
public function cNoHandButton(){
super();
this.useHandCursor = false;
}
}
}//package base
Section 2
//IData (base.IData)
package base {
public interface IData {
function init():void;
function cleanup():void;
}
}//package base
Section 3
//IObject (base.IObject)
package base {
public interface IObject extends IData {
function update(:Number):void;
function enablePause(:Boolean=true):void;
}
}//package base
Section 4
//IView (base.IView)
package base {
import flash.display.*;
public interface IView {
function set view(D:\kobyz\work\swc\PEngine\src;base;IView.as:DisplayObjectContainer):void;
function get view():DisplayObjectContainer;
}
}//package base
Section 5
//KeyManager (base.KeyManager)
package base {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class KeyManager implements IObject {
protected var _keyStorage:Dictionary;
protected var _pKeyReceiver:DisplayObject;
public function KeyManager(){
super();
}
public function enablePause(enable_:Boolean=true):void{
}
public function cleanup():void{
_keyStorage = null;
if (_pKeyReceiver != null){
if (_pKeyReceiver.hasEventListener(KeyboardEvent.KEY_DOWN)){
_pKeyReceiver.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
};
if (_pKeyReceiver.hasEventListener(KeyboardEvent.KEY_UP)){
_pKeyReceiver.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
};
_pKeyReceiver = null;
};
}
public function keyIsReleased(keyCode:int):Boolean{
return ((_keyStorage[keyCode] == -2));
}
public function getKeyState(keyCode:int):int{
return (_keyStorage[keyCode]);
}
public function keyIsFirstPressed(keyCode:int):Boolean{
return ((_keyStorage[keyCode] == 1));
}
public function keysContaintFirstPressed(keysCode:Array):Boolean{
var val:int;
for each (val in keysCode) {
if (keyIsFirstPressed(val)){
return (true);
};
};
return (false);
}
public function keysContaintPressed(keysCode:Array):Boolean{
var val:int;
for each (val in keysCode) {
if (keyIsPressed(val)){
return (true);
};
};
return (false);
}
protected function onKeyDown(evnt:KeyboardEvent):void{
if ((((_keyStorage[evnt.keyCode] == null)) || ((_keyStorage[evnt.keyCode] < 0)))){
_keyStorage[evnt.keyCode] = 0;
};
}
public function init():void{
_keyStorage = new Dictionary();
}
public function keysContaintReleased(keysCode:Array):Boolean{
var val:int;
for each (val in keysCode) {
if (keyIsReleased(val)){
return (true);
};
};
return (false);
}
protected function onKeyUp(evnt:KeyboardEvent):void{
_keyStorage[evnt.keyCode] = -1;
}
public function update(deltaTime_:Number):void{
var charCode:*;
for (charCode in _keyStorage) {
if (_keyStorage[charCode] >= 0){
var _local5 = _keyStorage;
var _local6 = charCode;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
} else {
if (_keyStorage[charCode] < 0){
_local5 = _keyStorage;
_local6 = charCode;
_local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
};
};
};
}
public function keyIsPressed(keyCode:int):Boolean{
return ((_keyStorage[keyCode] > 0));
}
public function initKeyManager(keyReceiver_:DisplayObject):KeyManager{
_pKeyReceiver = keyReceiver_;
_pKeyReceiver.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
_pKeyReceiver.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
return (this);
}
public static function create():KeyManager{
var mbr:KeyManager = new (KeyManager);
mbr.init();
return (mbr);
}
}
}//package base
Section 6
//wav (bonus.wav)
package bonus {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package bonus
Section 7
//wav (btn_click.wav)
package btn_click {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package btn_click
Section 8
//wav (btn_over.wav)
package btn_over {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package btn_over
Section 9
//wav (cat_hit.wav)
package cat_hit {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package cat_hit
Section 10
//wav (hit_eny.wav)
package hit_eny {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package hit_eny
Section 11
//wav (inGame.wav)
package inGame {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package inGame
Section 12
//wav (intro.wav)
package intro {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package intro
Section 13
//wav (jump_End.wav)
package jump_End {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package jump_End
Section 14
//wav (lev_lose.wav)
package lev_lose {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package lev_lose
Section 15
//wav (lev_start.wav)
package lev_start {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package lev_start
Section 16
//wav (life.wav)
package life {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package life
Section 17
//wav (los_attak.wav)
package los_attak {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package los_attak
Section 18
//AllLevel (myEng.AllLevel)
package myEng {
import flash.display.*;
import flash.geom.*;
import flash.system.*;
public class AllLevel {
public var VehZone:MovieClip;
public var BonusZone:MovieClip;
public var startPoint:MovieClip;
public var VivZone:MovieClip;
public var SmokeZone:MovieClip;
public var numLev:int;
public var PicZone:MovieClip;
public var HitZone:MovieClip;
public static var AllLevelNum:Array = [[1, 6, 2, 4, 3, 14, 2, 5, 5, 5], [1, 12, 10, 11, 6, 16, 13, 3, 6, 5, 5, 5], [1, 15, 12, 6, 18, 14, 6, 4, 2, 5, 5, 5], [1, 16, 17, 9, 19, 5, 5, 5], [20, 22, 25, 24, 22, 29, 23, 26, 21, 21, 21], [20, 34, 32, 30, 27, 27, 28, 35, 21, 21], [20, 23, 26, 29, 27, 22, 34, 25, 21, 21, 21], [20, 30, 31, 32, 33, 21, 21, 21], [36, 41, 49, 45, 40, 38, 47, 38, 37, 37, 37], [36, 48, 44, 38, 38, 49, 38, 42, 37, 37, 37], [36, 45, 38, 46, 41, 40, 48, 38, 37, 37, 37], [36, 39, 43, 37, 37, 37]];
public static var AllLevelBG:Array = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3];
public function AllLevel(){
super();
init();
}
public function update():void{
}
public function redrawLevel():void{
myBonus.clear();
clearMC(HitZone);
clearMC(PicZone);
clearMC(BonusZone);
VivZone.removeChild(HitZone);
VivZone.removeChild(PicZone);
VivZone.removeChild(BonusZone);
VivZone.removeChild(startPoint);
HitZone = new MovieClip();
VivZone.addChild(HitZone);
HitZone.visible = false;
PicZone = new MovieClip();
VivZone.addChild(PicZone);
VivZone.setChildIndex(VehZone, (VivZone.numChildren - 1));
BonusZone = new MovieClip();
VivZone.addChild(BonusZone);
SmokeZone = new MovieClip();
VivZone.addChild(SmokeZone);
cSmoke.init(SmokeZone);
buildLevel();
PicZone.cacheAsBitmap = true;
}
public function init():void{
}
public function addSegment(px:int, py:int, num:int, iii:int):Point{
var spr:MovieClip = new (getLibraryClass(("pic_" + String(num))));
if (spr.totalFrames > 1){
spr.gotoAndStop(((iii % spr.totalFrames) + 1));
};
var clipContentsBound:Rectangle = spr.getBounds(spr);
var bitmapData:BitmapData = new BitmapData(clipContentsBound.width, clipContentsBound.height, true, 0);
var mat:Matrix = new Matrix();
mat.translate(-(clipContentsBound.x), -(clipContentsBound.y));
bitmapData.draw(spr, mat);
spr.graphics.clear();
var bitmap:Bitmap = new Bitmap(bitmapData);
bitmap.x = clipContentsBound.x;
bitmap.y = clipContentsBound.y;
spr = new MovieClip();
spr.addChild(bitmap);
PicZone.addChild(spr);
spr.x = px;
spr.y = py;
spr.cacheAsBitmap = true;
spr.stop();
spr = new (getLibraryClass(("hit_" + String(num))));
HitZone.addChild(spr);
spr.x = px;
spr.y = py;
spr.stop();
spr.cacheAsBitmap = true;
var t:MovieClip = (spr.getChildByName("endPoint") as MovieClip);
var p:Point = new Point(t.x, t.y);
p = spr.localToGlobal(p);
p = HitZone.globalToLocal(p);
spr = new (getLibraryClass(("bonus_" + String(num))));
BonusZone.addChild(spr);
spr.x = px;
spr.y = py;
spr.stop();
initBonus(spr);
return (p);
}
public function initLevel(viv:MovieClip, num:int):void{
VivZone = new MovieClip();
viv.addChild(VivZone);
VivZone.tabEnabled = false;
VivZone.tabChildren = false;
VivZone.visible = false;
numLev = num;
PicZone = new MovieClip();
VivZone.addChild(PicZone);
HitZone = new MovieClip();
VivZone.addChild(HitZone);
HitZone.visible = false;
VehZone = new MovieClip();
VivZone.addChild(VehZone);
BonusZone = new MovieClip();
VivZone.addChild(BonusZone);
SmokeZone = new MovieClip();
VivZone.addChild(SmokeZone);
myBonus.clear();
cSmoke.init(SmokeZone);
}
public function buildLevel():void{
mySecretBonus.CountFindSecret = 0;
mySecretBonus.CountSecret = 0;
var p:Point = new Point(0, 0);
var i:int;
while (i < (AllLevelNum[numLev] as Array).length) {
p = addSegment(p.x, p.y, AllLevelNum[numLev][i], i);
i++;
};
startPoint = new MovieClip();
VivZone.addChild(startPoint);
startPoint.x = 300;
startPoint.y = 400;
}
public function clearMC(mcE:MovieClip):void{
if (mcE != null){
while (mcE.numChildren > 0) {
mcE.removeChildAt(0);
};
mcE.graphics.clear();
};
}
public function cleanup():void{
VivZone.removeChild(PicZone);
PicZone = null;
myBonus.clear();
VivZone.removeChild(BonusZone);
BonusZone = null;
cSmoke.destroy();
VivZone.removeChild(SmokeZone);
SmokeZone = null;
VivZone.removeChild(HitZone);
HitZone = null;
VivZone.parent.removeChild(VivZone);
VivZone = null;
}
public function initBonus(BZona:MovieClip):void{
var d:Object;
var ar:Array = [];
var i:int;
while (i < BZona.numChildren) {
d = BZona.getChildAt(i);
if ((d as myBonus) != null){
ar.push(d);
};
i++;
};
i = 0;
while (i < ar.length) {
ar[i].init();
i++;
};
ar = [];
}
public static function getLibraryClass(linkageName_:String):Class{
return ((ApplicationDomain.currentDomain.getDefinition(linkageName_) as Class));
}
public static function mc2pic(spr:MovieClip):void{
var clipContentsBound:Rectangle = spr.getBounds(spr);
var bitmapData:BitmapData = new BitmapData(clipContentsBound.width, clipContentsBound.height, true, 0);
var mat:Matrix = new Matrix();
mat.translate(-(clipContentsBound.x), -(clipContentsBound.y));
bitmapData.draw(spr, mat);
while (spr.numChildren > 0) {
spr.removeChildAt(0);
};
spr.graphics.clear();
var bitmap:Bitmap = new Bitmap(bitmapData);
bitmap.x = clipContentsBound.x;
bitmap.y = clipContentsBound.y;
spr.addChild(bitmap);
}
}
}//package myEng
Section 19
//cBar (myEng.cBar)
package myEng {
import flash.display.*;
import base.*;
public class cBar extends MovieClip implements IData {
public var max:int;
public function cBar(){
super();
}
public function get value():int{
return (int(((currentFrame * max) / 100)));
}
public function set value(val:int):void{
val = Math.min(max, Math.max(0, val));
gotoAndStop((int(((100 / max) * val)) + 1));
}
public function init():void{
max = 100;
value = 0;
}
public function update():void{
}
public function cleanup():void{
}
}
}//package myEng
Section 20
//CCamera (myEng.CCamera)
package myEng {
import flash.display.*;
import base.*;
import flash.geom.*;
public class CCamera implements IData {
protected var m_window:Rectangle;
public var updateView:Function;
public var checkPosition:Function;
private var max_Top:int;
protected var t_curPos:Point;
private var _data:Object;
protected var t_deltaMin:Point;
protected var t_deltaPos:Point;
public var getTargetX:Function;
public var getTargetY:Function;
protected var t_deltaMax:Point;
protected var m_rangeBorder:Rectangle;
public function CCamera(){
super();
init();
}
public function createDefaultUpdateView(movieForScroll:Sprite):void{
var movieForScroll = movieForScroll;
_data["m_movieForScroll"] = movieForScroll;
updateView = function ():void{
_data.m_movieForScroll.x = (_data.m_movieForScroll.x - ((_data.m_movieForScroll.x + window.x) / 2));
_data.m_movieForScroll.y = (_data.m_movieForScroll.y - ((_data.m_movieForScroll.y + window.y) / 2));
};
}
public function update():void{
t_curPos.x = getTargetX();
t_curPos.y = getTargetY();
t_deltaMin.x = (m_rangeBorder.x - m_window.x);
t_deltaMin.y = (m_rangeBorder.y - m_window.y);
t_deltaMax.x = (m_rangeBorder.bottomRight.x - m_window.x);
t_deltaMax.y = (m_rangeBorder.bottomRight.y - m_window.y);
convertToWindowPos(t_curPos);
t_deltaPos = checkPosition(t_curPos);
t_deltaPos.x = Math.min(t_deltaPos.x, t_deltaMax.x);
t_deltaPos.y = Math.min(t_deltaPos.y, t_deltaMax.y);
t_deltaPos.x = Math.max(t_deltaPos.x, t_deltaMin.x);
t_deltaPos.y = Math.max(t_deltaPos.y, t_deltaMin.y);
m_window.offsetPoint(t_deltaPos);
updateView();
}
public function init():void{
t_curPos = new Point();
t_deltaPos = new Point();
t_deltaMin = new Point();
t_deltaMax = new Point();
max_Top = 0;
}
public function set rangeBorder(newBorder:Rectangle):void{
m_rangeBorder = newBorder;
}
public function setTarget(target:Sprite):void{
_data["m_target"] = target;
}
public function convertToWindowPos(pos:Point):void{
pos.x = (pos.x - m_window.x);
pos.y = (pos.y - m_window.y);
}
public function get rangeBorder():Rectangle{
return (m_rangeBorder);
}
public function setNewTargetBorder(targetBorderOnScreen:Rectangle):void{
_data["m_targetBorderOnScreen"] = targetBorderOnScreen;
}
public function set window(newWindow:Rectangle):void{
m_window = newWindow;
}
public function createDefaultScroll(target:Sprite, targetBorderOnScreen:Rectangle):void{
var target = target;
var targetBorderOnScreen = targetBorderOnScreen;
_data = new Object();
max_Top = targetBorderOnScreen.height;
_data["t_moveCamera"] = new Point();
_data["m_target"] = target;
_data["m_targetBorderOnScreen"] = targetBorderOnScreen;
getTargetX = function ():Number{
return (_data.m_target.x);
};
getTargetY = function ():Number{
return (_data.m_target.y);
};
checkPosition = function (posAtWindow:Point):Point{
_data.t_moveCamera.x = 0;
_data.t_moveCamera.y = 0;
if (posAtWindow.x < _data.m_targetBorderOnScreen.left){
_data.t_moveCamera.x = (posAtWindow.x - _data.m_targetBorderOnScreen.left);
} else {
if (posAtWindow.x > _data.m_targetBorderOnScreen.right){
_data.t_moveCamera.x = (posAtWindow.x - _data.m_targetBorderOnScreen.right);
};
};
if (posAtWindow.y < _data.m_targetBorderOnScreen.top){
_data.t_moveCamera.y = (posAtWindow.y - _data.m_targetBorderOnScreen.top);
} else {
if (posAtWindow.y > _data.m_targetBorderOnScreen.bottom){
_data.t_moveCamera.y = (posAtWindow.y - _data.m_targetBorderOnScreen.bottom);
};
};
return (_data.t_moveCamera);
};
}
public function get window():Rectangle{
return (m_window);
}
public function cleanup():void{
t_curPos = null;
t_deltaPos = null;
t_deltaMin = null;
t_deltaMax = null;
updateView = function ():void{
};
updateView = null;
getTargetX = null;
getTargetY = null;
checkPosition = null;
_data = null;
}
}
}//package myEng
Section 21
//cFinishBonus (myEng.cFinishBonus)
package myEng {
public class cFinishBonus extends myBonus {
public function cFinishBonus(){
super();
}
override public function init():void{
super.init();
visible = false;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (mc.view.x > myX){
Main.myCurState.setFinish();
};
}
}
}//package myEng
Section 22
//cLiveBonus (myEng.cLiveBonus)
package myEng {
public class cLiveBonus extends myBonus {
public function cLiveBonus(){
super();
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
if (mc.view.hitTestObject(this)){
SoundConst._playSound(SoundConst.BONUS_LIFE);
active = false;
cPanel.inst.life = (cPanel.inst.life + 20);
cPanel.Score = (cPanel.Score + 100);
cSmoke.addTextPart("+100", this);
play();
};
};
}
}
}//package myEng
Section 23
//cPanel (myEng.cPanel)
package myEng {
import flash.events.*;
import flash.display.*;
import base.*;
public class cPanel extends MovieClip implements IData {
public var btnPause:SimpleButton;
public var mcBoss:cBar;
protected var BoxDat:MovieClip;
protected var GraviDat:MovieClip;
protected var lifeMC:cBar;
public var btnExit:SimpleButton;
public static var inst:cPanel;
public static var bonus:int;
public static var maxCountMonster:int;
protected static var _score:int;
public static var maxCountBonus:int;
public static var CountFreeMonster:int;
public function cPanel(){
super();
}
public function update():void{
}
public function btMap(e:Event):void{
Main.setState(Main.STATE_MAP);
}
public function get life():int{
return (lifeMC.value);
}
public function init():void{
inst = this;
lifeMC = (this["barLiveMC"] as cBar);
lifeMC.init();
life = 100;
GraviDat = this["mcGraviDat"];
BoxDat = this["mcBoxDat"];
GraviDat.visible = false;
BoxDat.visible = false;
BoxDat.stop();
GraviDat.stop();
(this["mcBossLive1"] as cBar).visible = false;
(this["mcBossLive2"] as cBar).visible = false;
(this["mcBossLive3"] as cBar).visible = false;
mcBoss = (this[("mcBossLive" + String(Math.min(3, int(((Main.curLevel / 4) + 1)))))] as cBar);
mcBoss.visible = false;
btnExit = (this["btExit"] as SimpleButton);
btnPause = (this["btPausa"] as SimpleButton);
this["levelMC"].text = ("Level " + String((Main.curLevel + 1)));
Score = 0;
bonus = -1;
maxCountBonus = 0;
maxCountMonster = 0;
CountFreeMonster = 0;
}
public function cleanup():void{
inst = null;
lifeMC.cleanup();
lifeMC = null;
btnExit = null;
btnPause = null;
}
public function btRestart(e:Event):void{
Main.myCurState.restart();
}
public function addBonus():void{
bonus++;
life = (life + 1);
Score = (Score + 50);
this["bonusMC"].text = ((("Food " + String(bonus)) + "/") + String(maxCountBonus));
}
public function set life(value:int):void{
lifeMC.value = value;
if (value <= 0){
Main.myCurState.setFail();
};
}
public static function set Score(v:int):void{
_score = v;
if (inst != null){
inst["scoreMC"].text = ("Score " + String(v));
};
}
public static function Gravi(n:int):void{
if (n > 2){
inst.GraviDat.visible = true;
} else {
inst.GraviDat.visible = false;
};
inst.GraviDat.gotoAndStop((100 - n));
}
public static function Box(n:int):void{
if (n > 2){
inst.BoxDat.visible = true;
} else {
inst.BoxDat.visible = false;
};
inst.BoxDat.gotoAndStop((100 - n));
}
public static function get Score():int{
return (_score);
}
}
}//package myEng
Section 24
//cPersParam (myEng.cPersParam)
package myEng {
import flash.display.*;
public class cPersParam {
public var Vid:MovieClip;
public var maxSpeed:Number;
public var MovArray:Array;
public var MaxSpeedRun:Number;
public var mass:Number;
public var Rad:Number;
public var acsSpeed:Number;
public var speedAnim:Number;
public var jmpSpeed:Number;
public function cPersParam(){
super();
}
public static function myPers(mc_VehZone:MovieClip):cPersParam{
var t:cPersParam = new (cPersParam);
t.mass = 4;
t.Rad = 40;
t.Vid = new myPersMC();
mc_VehZone.addChild(t.Vid);
t.jmpSpeed = -21;
t.acsSpeed = 4;
t.maxSpeed = 2;
t.MaxSpeedRun = 17;
t.MovArray = [50, 85, 50, 1, 12, 1, 13, 22, 16, 30, 37, 33, 46, 49, 48, 38, 45, 41, 23, 29, 25, 86, 87, 86];
t.speedAnim = 1;
return (t);
}
}
}//package myEng
Section 25
//cRace (myEng.cRace)
package myEng {
import flash.events.*;
import flash.display.*;
import pengine.*;
import base.*;
import flash.geom.*;
public class cRace extends MovieClip implements IData {
public var m_pEngine:ParticleEngine;
public var PanelMC:cPanel;
public var myPers:myOneWhellPers;
protected var _curLevel:int;
public var _level:AllLevel;
public var TarCam:MovieClip;
protected var pausScr:MovieClip;
protected var curUpdate:Function;
protected var _backUpUpdate:Function;
protected var kParlax:Number;
protected var _timerUpdate:int;
public var m_camera:CCamera;
public var midlMC:MovieClip;
public function cRace(){
super();
Main.myCurState = this;
init();
}
public function update():void{
this.stage.focus = this;
KeyConst.keyManager.update(0);
myPers.myUpdate(KeyConst.keyManager, m_camera);
myBonus.checkBonus(myPers);
m_pEngine.update(0.4);
m_camera.update();
updateParlax();
cSmoke.update();
}
public function startUpdate():void{
this["mcLoading"].visible = false;
TarCam.x = (TarCam.x + (60 - (_timerUpdate / 3)));
m_camera.update();
_timerUpdate--;
_level.VivZone.visible = true;
midlMC.visible = true;
if (_timerUpdate <= 0){
SoundConst._playSound(SoundConst.LEVEL_START);
cSmoke.addLevelText(this["emCentr"]);
myPers.setAccelerate(30);
PanelMC.visible = true;
myPers.view.visible = true;
m_camera.setTarget((myPers.view as Sprite));
curUpdate = update;
Main.mcSC_.visible = true;
};
}
public function eEF(e:Event):void{
curUpdate();
}
public function restart():void{
_level.redrawLevel();
cPanel.inst.init();
cPanel.inst.life = 100;
}
public function init():void{
_curLevel = Main.curLevel;
curUpdate = startUpdate;
_timerUpdate = 3;
this.addEventListener(Event.ENTER_FRAME, eEF);
var bg:MovieClip = (getChildByName("mcBackground") as MovieClip);
bg.gotoAndStop(AllLevel.AllLevelBG[_curLevel]);
this.focusRect = new MovieClip();
this.tabEnabled = false;
this.tabChildren = false;
KeyConst.keyManager = KeyManager.create();
KeyConst.keyManager.initKeyManager(this);
midlMC = new MovieClip();
this.addChild(midlMC);
midlMC.visible = false;
_level = new AllLevel();
_level.initLevel(this, _curLevel);
PanelMC = new LevelPanel();
this.addChild(PanelMC);
PanelMC.init();
PanelMC.visible = false;
PanelMC.btnExit.addEventListener(MouseEvent.CLICK, goBack);
PanelMC.btnPause.addEventListener(MouseEvent.CLICK, setPausa);
_level.buildLevel();
createParlax();
PanelMC.addBonus();
m_pEngine = ParticleEngine.create().initParticleEngine(_level.HitZone, 1, 0.995, 4);
var _pP:cPersParam = cPersParam.myPers(_level.VehZone);
myPers = myOneWhellPers.create().initPers(_level.startPoint.x, (_level.startPoint.y - 50), _pP);
m_pEngine.addParticle(myPers);
myPers.view.visible = false;
TarCam = new MovieClip();
TarCam.y = (myPers.view.y + 250);
TarCam.x = (myPers.view.x + 100);
_level.VehZone.addChild(TarCam);
m_camera = new CCamera();
m_camera.window = new Rectangle(0, 0, Main.SCREEN_WIDTH, Main.SCREEN_HEIGHT);
m_camera.rangeBorder = new Rectangle(100, -10000, 1000000, 20000);
m_camera.createDefaultScroll((TarCam as Sprite), new Rectangle(390, 200, 20, 350));
m_camera.createDefaultUpdateView((_level.VivZone as Sprite));
m_pEngine.update(0.04);
SoundConst._playInGameMusic();
}
public function setFinish():void{
curUpdate = finishUpdate;
SoundConst._playSound(SoundConst.LEVEL_WIN);
_timerUpdate = 30;
}
public function unPausa(e:Event):void{
myPers.view.visible = true;
SoundConst._buttonClick();
var sb:SimpleButton = (pausScr["btHit"] as SimpleButton);
sb.removeEventListener(MouseEvent.CLICK, unPausa);
curUpdate = _backUpUpdate;
this.removeChild(pausScr);
pausScr = null;
}
public function setFail():void{
curUpdate = FailUpdate;
SoundConst._playSound(SoundConst.LEVEL_LOSE);
myPers.accelerate.plusXY(0, -20);
myPers.accelerate.x = (myPers.accelerate.x / 2);
_timerUpdate = 25;
}
public function updateParlax():void{
midlMC.x = (_level.VivZone.x / 6);
midlMC.y = ((Main.SCREEN_HEIGHT / 6) + (_level.VivZone.y * kParlax));
}
public function cleanup():void{
KeyConst.keyManager.cleanup();
KeyConst.keyManager = null;
this.removeEventListener(Event.ENTER_FRAME, eEF);
this.removeChild(midlMC);
midlMC = null;
_level.VehZone.removeChild(TarCam);
TarCam = null;
m_camera.cleanup();
myPers.cleanup();
myPers = null;
m_pEngine.cleanup();
_level.cleanup();
_level = null;
PanelMC.btnExit.removeEventListener(MouseEvent.CLICK, goBack);
PanelMC.btnPause.removeEventListener(MouseEvent.CLICK, setPausa);
PanelMC.cleanup();
this.removeChild(PanelMC);
PanelMC = null;
}
public function FailUpdate():void{
myPers.updateAnim();
myPers.accelerate.plusXY(0, 12);
myPers.update(0.04);
cSmoke.update();
updateParlax();
_timerUpdate--;
if (_timerUpdate <= 0){
Main.setState(Main.STATE_Fail);
};
}
public function setPausa(e:Event):void{
var e = e;
SoundConst._buttonClick();
pausScr = new PausaScr();
this.addChild(pausScr);
myPers.view.visible = false((pausScr["btHit"] as SimpleButton)).addEventListener(MouseEvent.CLICK, unPausa);
_backUpUpdate = curUpdate;
curUpdate = function ():void{
};
}
public function goBack(e:Event):void{
Main.setState(Main.STATE_MAP);
SoundConst._buttonClick();
}
public function finishUpdate():void{
cSmoke.update();
m_pEngine.update(0.04);
updateParlax();
myPers.updateAnim();
myPers.setAccelerate(25);
_timerUpdate--;
if (_timerUpdate <= 0){
Main.setState(Main.STATE_RESULT);
};
}
protected function createParlax():void{
var xm:Number = 0;
var c:Class = midl1;
if (_curLevel > 7){
c = midl3;
} else {
if (_curLevel > 3){
c = midl2;
};
};
var m:MovieClip = new (c);
var i:int;
while (i < int((((_level.VivZone.width / 5) / m.width) + 1))) {
m = new (c);
midlMC.addChild(m);
m.cacheAsBitmap = true;
m.stop();
m.x = xm;
xm = ((m.x + m.width) - 4);
i++;
};
midlMC.y = 300;
kParlax = ((Main.SCREEN_HEIGHT / _level.HitZone.height) / 3);
}
}
}//package myEng
Section 26
//cSmoke (myEng.cSmoke)
package myEng {
import flash.display.*;
import flash.geom.*;
public class cSmoke {
protected var myMC:MovieClip;
protected var speedScale:Number;
protected var lifeTime:int;
protected var MaxLifeTime:int;
protected var speedRot:Number;
protected var speedX:Number;
protected var speedVert:Number;
protected var speedY:Number;
protected var dWave:int;
public static var cont:MovieClip;
protected static var arraySmoke:Array = [];
public function cSmoke(){
super();
lifeTime = 0;
dWave = 0;
}
public static function add(SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
arraySmoke.push(newPart(p0, 1, smokeMC));
p0.x = (p0.x + 5);
arraySmoke.push(newPart(p0, 1, smokeMC));
p0.x = (p0.x - 10);
arraySmoke.push(newPart(p0, 1, smokeMC));
}
public static function addPuff(SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
arraySmoke.push(newPart(p0, 0.4, smokeMC));
p0.x = (p0.x + 5);
arraySmoke.push(newPart(p0, 0.4, smokeMC));
p0.x = (p0.x - 8);
arraySmoke.push(newPart(p0, 0.4, smokeMC));
}
public static function addTextPart(t:String, SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
var f:cSmoke = new (cSmoke);
f.myMC = new partNum();
f.myMC["txt"].text = t;
cont.addChildAt(f.myMC, 0);
f.MaxLifeTime = 18;
f.myMC.x = p0.x;
f.myMC.y = p0.y;
f.speedRot = 0;
f.speedVert = -1;
f.speedScale = 0;
f.speedX = 0;
f.speedY = -2;
f.myMC.scaleX = 1;
f.myMC.scaleY = 1;
f.dWave = (15 + int((Math.random() * 15)));
arraySmoke.push(f);
}
public static function update():void{
var f:cSmoke;
var i:int;
while (i < arraySmoke.length) {
f = (arraySmoke[i] as cSmoke);
if (f.dWave > 0){
f.dWave++;
f.speedX = (((f.dWave % 15) - 7) * 3);
};
f.lifeTime++;
f.speedY = (f.speedY + f.speedVert);
f.myMC.x = (f.myMC.x + f.speedX);
f.myMC.y = (f.myMC.y + f.speedY);
f.myMC.scaleX = (f.myMC.scaleX + f.speedScale);
f.myMC.scaleY = (f.myMC.scaleY + f.speedScale);
f.myMC.rotation = (f.myMC.rotation + f.speedRot);
if (f.lifeTime > f.MaxLifeTime){
cont.removeChild(f.myMC);
f.myMC = null;
f = null;
arraySmoke.splice(i, 1);
};
i++;
};
}
public static function init(cont_:Object):void{
cont = (cont_ as MovieClip);
var i:int;
while (i < arraySmoke.length) {
(arraySmoke[i] as cSmoke).myMC = null;
arraySmoke[i] = null;
i++;
};
arraySmoke = [];
}
public static function newPart(p0:Point, s:Number, cl:Class):cSmoke{
var f:cSmoke = new (cSmoke);
f.myMC = new (cl);
cont.addChildAt(f.myMC, 0);
f.MaxLifeTime = 10;
f.myMC.alpha = 0.7;
f.myMC.x = (p0.x - (Math.random() * 15));
f.myMC.y = (p0.y + (Math.random() * 5));
f.myMC.scaleX = (((Math.random() * 0.29) + 0.2) * s);
f.myMC.scaleY = (((Math.random() * 0.29) + 0.2) * s);
f.myMC.rotation = (Math.random() * 180);
f.speedRot = ((Math.random() * 6) - 3);
f.speedVert = 0;
f.speedScale = (((Math.random() * 0.1) + 0.02) * s);
f.speedX = ((Math.random() * 4) - 2);
f.speedY = ((Math.random() * 5) + 2);
return (f);
}
public static function addLevelFinish(SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
var f:cSmoke = new (cSmoke);
f.myMC = new partNum();
f.myMC["txt"].text = "You Win! ";
cont.addChildAt(f.myMC, 0);
f.MaxLifeTime = 22;
f.myMC.x = p0.x;
f.myMC.y = p0.y;
f.speedRot = 0;
f.speedVert = -0.6;
f.speedScale = 0.1;
f.speedX = 0;
f.speedY = -2;
f.myMC.scaleX = 1;
f.myMC.scaleY = 1;
arraySmoke.push(f);
}
public static function horPuff(SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
var f:cSmoke = new (cSmoke);
f.myMC = new Cloud_effect01();
cont.addChildAt(f.myMC, 0);
f.MaxLifeTime = 6;
f.myMC.x = p0.x;
f.myMC.y = p0.y;
f.speedRot = 0;
f.speedVert = -0.4;
f.speedScale = 0;
f.myMC.scaleX = 0.3;
f.myMC.scaleY = 0.3;
f.speedX = 0;
f.speedY = -1;
arraySmoke.push(f);
}
public static function destroy():void{
var i:int;
while (i < arraySmoke.length) {
cont.removeChild((arraySmoke[i] as cSmoke).myMC);
arraySmoke[i] = null;
i++;
};
arraySmoke = [];
}
public static function addLevelText(SObj_:MovieClip):void{
var p0:Point = SObj_.localToGlobal(new Point());
p0 = cont.globalToLocal(p0);
var f:cSmoke = new (cSmoke);
f.myMC = new partNum();
f.myMC["txt"].text = ("Level " + String((Main.curLevel + 1)));
cont.addChildAt(f.myMC, 0);
f.MaxLifeTime = 22;
f.myMC.x = p0.x;
f.myMC.y = p0.y;
f.speedRot = 0;
f.speedVert = -0.6;
f.speedScale = 0.1;
f.speedX = 0;
f.speedY = -2;
f.myMC.scaleX = 1;
f.myMC.scaleY = 1;
arraySmoke.push(f);
}
}
}//package myEng
Section 27
//myBonus (myEng.myBonus)
package myEng {
import flash.display.*;
public class myBonus extends MovieClip {
protected var active:Boolean;
protected var myNum:int;
protected var myX:Number;
public static var bonusList:Array = [];
public function myBonus(){
super();
}
public function init():void{
bonusList.push(this);
active = true;
myX = (this.x + this.parent.x);
myNum = (bonusList.length - 1);
}
public function destroy():void{
active = false;
bonusList[myNum] = null;
parent.removeChild(this);
}
public function myHitTest(mc:myOneWhellPers, n:int):void{
if (!active){
};
}
public function setNormalState():void{
}
public static function AllNormalState():void{
var i:int;
while (i < bonusList.length) {
if (bonusList[i] != null){
(bonusList[i] as myBonus).setNormalState();
};
i++;
};
}
public static function clear():void{
var i:int;
while (i < bonusList.length) {
if (bonusList[i] != null){
(bonusList[i] as myBonus).destroy();
};
bonusList[i] = null;
i++;
};
bonusList = [];
}
public static function checkBonus(mc:myOneWhellPers):void{
var i:int;
while (i < bonusList.length) {
if (Math.abs((bonusList[i].myX - mc.view.x)) < 2500){
(bonusList[i] as myBonus).myHitTest(mc, i);
};
i++;
};
}
}
}//package myEng
Section 28
//myBonusDoor (myEng.myBonusDoor)
package myEng {
import flash.display.*;
import flash.geom.*;
public class myBonusDoor extends myBonus {
public var myHit:MovieClip;
public static var instDoor:myBonusDoor;
public function myBonusDoor(){
super();
}
override public function init():void{
super.init();
active = true;
instDoor = this;
myHit = new hitZonaDoor();
var m:MovieClip = (Main.myCurState as cRace)._level.HitZone;
m.addChild(myHit);
myHit.cacheAsBitmap = true;
var p:Point = new Point(this.x, this.y);
p = parent.localToGlobal(p);
p = (Main.myCurState as cRace)._level.HitZone.globalToLocal(p);
myHit.x = p.x;
myHit.y = p.y;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
}
public static function open():void{
if (instDoor.active){
instDoor.play();
SoundConst._playSound(SoundConst.OPEN_DOOR);
instDoor.myHit.parent.removeChild(instDoor.myHit);
instDoor.myHit = null;
instDoor.active = false;
};
}
}
}//package myEng
Section 29
//myBonusEat (myEng.myBonusEat)
package myEng {
public class myBonusEat extends myBonus {
protected var dx:int;
public function myBonusEat(){
super();
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
dx++;
dx = (dx % 15);
this.y = (this.y + ((dx - 7) / 3));
if (mc.HitZona.hitTestObject(this)){
SoundConst._playSound(SoundConst.EAT_SOUND);
active = false;
cPanel.inst.addBonus();
cSmoke.addTextPart("+50", this);
play();
};
};
}
override public function init():void{
super.init();
cPanel.maxCountBonus++;
this["mc"].gotoAndStop(int(((Math.random() * this["mc"].totalFrames) + 1)));
this["mc"].cacheAsBitmap = true;
dx = int((Math.random() * 15));
}
}
}//package myEng
Section 30
//myBonusGravi (myEng.myBonusGravi)
package myEng {
public class myBonusGravi extends myBonus {
public function myBonusGravi(){
super();
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
if (mc.HitZona.hitTestObject(this)){
SoundConst._playSound(SoundConst.BONUS_HIT);
active = false;
mc.unGravi = true;
cPanel.Score = (cPanel.Score + 100);
cSmoke.addTextPart("+100", this);
play();
};
};
}
}
}//package myEng
Section 31
//myBonusLava (myEng.myBonusLava)
package myEng {
public class myBonusLava extends myBonus {
public function myBonusLava(){
super();
}
override public function init():void{
super.init();
this.visible = false;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (mc.HitZona.hitTestObject(this)){
mc.hitMyPers();
};
}
}
}//package myEng
Section 32
//myBonusLoop (myEng.myBonusLoop)
package myEng {
import flash.display.*;
import flash.geom.*;
public class myBonusLoop extends myBonus {
protected var myHitZona2:MovieClip;
protected var myHit:MovieClip;
protected var myHitZona:MovieClip;
public function myBonusLoop(){
super();
}
override public function init():void{
myHitZona = (this.getChildByName("Triger") as MovieClip);
myHitZona.visible = false;
myHitZona2 = (this.getChildByName("Triger2") as MovieClip);
myHitZona2.visible = false;
super.init();
this.cacheAsBitmap = true;
if (this.getChildByName("Tip2") != null){
myHit = new HitLoop2();
} else {
myHit = new HitLoop1();
};
myHit.stop();
myHit.cacheAsBitmap = true;
var m:MovieClip = (Main.myCurState as cRace)._level.HitZone;
m.addChild(myHit);
var p:Point = new Point(this.x, this.y);
p = parent.localToGlobal(p);
p = (Main.myCurState as cRace)._level.HitZone.globalToLocal(p);
myHit.x = p.x;
myHit.y = p.y;
myHit.scaleX = this.scaleX;
myHit.scaleY = this.scaleY;
myHit.rotation = this.rotation;
}
override public function setNormalState():void{
active = true;
myHit.gotoAndStop(1);
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (mc.HitZona.hitTestObject(myHitZona2)){
setNormalState();
};
if (active){
if (mc.HitZona.hitTestObject(this)){
mc.inLoop();
if (myHitZona.hitTestObject(mc.view)){
cPanel.Score = (cPanel.Score + 300);
cSmoke.addTextPart("+300", mc.HitZona);
myHit.gotoAndStop(2);
active = false;
};
};
};
}
}
}//package myEng
Section 33
//myBonusLos (myEng.myBonusLos)
package myEng {
import flash.display.*;
public class myBonusLos extends myBonus {
protected var _losState:int;
protected var p_score:int;
protected var _demagTimer:int;
protected var p_leftBord:Number;
protected var p_targetX:Number;
protected var p_rightBorder:Number;
protected var p_myMC:MovieClip;
protected var _losTimer:int;
protected var p_Rog1:MovieClip;
protected var p_speed:Number;
protected var p_Live:int;
protected var p_Rog2:MovieClip;
public function myBonusLos(){
super();
}
protected function standartMov(mc:myOneWhellPers):void{
p_myMC.x = (p_myMC.x + p_speed);
if (Math.abs((p_myMC.x - p_targetX)) < Math.abs(p_speed)){
p_speed = -(p_speed);
if (p_targetX < (p_leftBord + 1)){
p_myMC.scaleX = 1;
p_targetX = p_rightBorder;
} else {
p_myMC.scaleX = -1;
p_targetX = p_leftBord;
};
};
}
override public function init():void{
super.init();
cPanel.maxCountMonster++;
p_myMC = new lineEnemyAnim_8();
p_speed = 6;
p_Live = 10;
cPanel.inst.mcBoss.max = p_Live;
cPanel.inst.mcBoss.value = p_Live;
cPanel.inst.mcBoss.visible = true;
p_score = 12000;
p_myMC["monstr"]["telo"].visible = false;
p_myMC["monstr"]["rog"].visible = false;
p_myMC["monstr"]["noga"].visible = false;
p_Rog1 = p_myMC["monstr"]["rog1"]["mc"];
p_Rog2 = p_myMC["monstr"]["rog2"]["mc"];
this.parent.addChild(p_myMC);
this.parent.setChildIndex(p_myMC, 1);
p_myMC.x = (this.x + ((this.width * Math.random()) * 0.9));
p_myMC.y = this.y;
p_leftBord = this.x;
p_rightBorder = (this.width + this.x);
p_targetX = p_rightBorder;
this.visible = false;
}
protected function losEnemyMov(mc:myOneWhellPers):void{
if (_losState == 0){
standartMov(mc);
if ((p_myMC["monstr"] as MovieClip).currentFrame > 15){
(p_myMC["monstr"] as MovieClip).gotoAndPlay(1);
};
if (Math.random() > 0.98){
if (mc.view.x > ((this.myX + p_myMC.x) - p_leftBord)){
if (p_speed > 0){
_losState = 1;
} else {
_losState = 2;
};
} else {
if (p_speed > 0){
_losState = 2;
} else {
_losState = 1;
};
};
if (_losState == 1){
(p_myMC["monstr"] as MovieClip).gotoAndPlay("lbAtack");
_losTimer = 30;
};
if (_losState == 2){
(p_myMC["monstr"] as MovieClip).gotoAndPlay("lbBackAtack");
_losTimer = 16;
};
SoundConst._playSound(SoundConst.LOS_ATTACK);
};
};
if (_losState == 1){
_losTimer--;
if (_losTimer <= 0){
_losState = 0;
};
if (_losTimer <= 16){
standartMov(mc);
standartMov(mc);
standartMov(mc);
standartMov(mc);
standartMov(mc);
};
};
if (_losState == 2){
_losTimer--;
if (mc.HitZona.hitTestObject(p_myMC["monstr"]["noga"])){
mc.hitMyPers();
};
if (_losTimer <= 0){
_losState = 0;
};
};
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
losEnemyMov(mc);
p_Rog2.visible = false;
p_Rog1.visible = false;
if (_demagTimer > 0){
_demagTimer--;
if ((_demagTimer % 3) == 0){
p_myMC.alpha = 1;
} else {
p_myMC.alpha = 0.5;
};
return;
};
if (mc.HitZona.hitTestObject(p_myMC["monstr"])){
if (mc.HitZona.hitTestObject(p_myMC["monstr"]["rog"])){
trace("Roga");
p_Rog2.visible = true;
p_Rog1.visible = true;
_demagTimer = 10;
mc.hitMyPers();
return;
};
if (mc.toHitJump(p_myMC["monstr"]["telo"])){
_demagTimer = 15;
p_Live--;
SoundConst._playSound(SoundConst.HIT_2ENEMY);
cPanel.Score = (cPanel.Score + (cPanel.inst.life * 10));
cSmoke.addTextPart(("+" + String((cPanel.inst.life * 10))), mc.HitZona);
cSmoke.horPuff(mc.view["toHitMC"]);
cPanel.inst.mcBoss.value = p_Live;
mc.jump();
if (p_Live <= 0){
active = false;
myBonusDoor.open();
cPanel.Score = (cPanel.Score + (p_score + (cPanel.inst.life * 5)));
cSmoke.addTextPart(("+" + String((p_score + (cPanel.inst.life * 5)))), mc.HitZona);
p_myMC.gotoAndStop(2);
cPanel.CountFreeMonster++;
cPanel.inst.mcBoss.visible = false;
_demagTimer = 0;
};
} else {
if (mc.HitZona.hitTestObject(p_myMC["monstr"]["telo"])){
mc.hitMyPers();
};
};
};
} else {
standartMov(mc);
};
}
override public function destroy():void{
p_myMC.parent.removeChild(p_myMC);
p_myMC = null;
super.destroy();
}
}
}//package myEng
Section 34
//myBonusPutana (myEng.myBonusPutana)
package myEng {
public class myBonusPutana extends myBonus {
protected var arrMonstr:Array;
public static var tarX:Number;
public static var tarY:Number;
public static var timer:int;
public function myBonusPutana(){
super();
}
override public function init():void{
var p:myPutana;
super.init();
this.visible = false;
arrMonstr = [];
cPanel.maxCountMonster++;
cPanel.inst.mcBoss.init();
cPanel.inst.mcBoss.max = 7;
cPanel.inst.mcBoss.value = cPanel.inst.mcBoss.max;
cPanel.inst.mcBoss.visible = true;
var i:int;
while (i < cPanel.inst.mcBoss.max) {
p = new myPutana();
p.init(this, i);
arrMonstr.push(p);
i++;
};
timer = 250;
tarX = this.x;
tarY = this.y;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
var i:int;
while (i < arrMonstr.length) {
(arrMonstr[i] as myPutana).myHit(mc);
i++;
};
if (timer > 0){
timer--;
} else {
setTar(mc);
};
}
public function setTar(mc:myOneWhellPers):void{
if (tarX < (this.x + (this.width / 2))){
tarX = ((((this.width / 3) * 2) + this.x) + ((this.width / 3) * Math.random()));
} else {
tarX = (this.x + ((this.width / 3) * Math.random()));
};
tarY = ((this.y + ((this.height - 50) * Math.random())) + 50);
if (mc.HitZona.hitTestObject(this)){
if (Math.random() > 0.6){
tarX = (((mc.view.x - this.parent.x) + ((this.width / 5) * Math.random())) - (this.width / 10));
};
};
timer = int((200 + (150 * Math.random())));
SoundConst._playSound(SoundConst.OS_MOVE);
}
}
}//package myEng
Section 35
//myBonusRef (myEng.myBonusRef)
package myEng {
import flash.display.*;
public class myBonusRef extends myBonus {
protected var p_MonsterMC:MovieClip;
protected var fireLive:int;
protected var _demagTimer:int;
protected var dy:Number;
protected var unhit:Boolean;
protected var p_live:int;
protected var p_tar:int;
protected var p_hitMC:MovieClip;
protected var fireDx:Number;
protected var fireDy:Number;
protected var STATE:int;
protected var fireMc:MovieClip;
protected var p_myMC:MovieClip;
public function myBonusRef(){
super();
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
stateMen(mc);
if (_demagTimer > 0){
_demagTimer--;
if ((_demagTimer % 3) == 0){
p_myMC.alpha = 1;
} else {
p_myMC.alpha = 0.5;
};
return;
};
if (mc.HitZona.hitTestObject(p_hitMC)){
if (unhit){
mc.hitMyPers();
return;
};
if (mc.toHitJump(p_hitMC)){
p_live--;
setState(2);
SoundConst._playSound(SoundConst.REF_HIT);
cPanel.Score = (cPanel.Score + (700 + (cPanel.inst.life * 5)));
cSmoke.addTextPart(("+" + String((700 + (cPanel.inst.life * 5)))), mc.HitZona);
_demagTimer = 20;
cPanel.inst.mcBoss.value = p_live;
mc.jump();
cSmoke.horPuff(mc.view["toHitMC"]);
if (p_live <= 0){
_demagTimer = 0;
myBonusDoor.open();
cPanel.Score = (cPanel.Score + (10000 + (cPanel.inst.life * 10)));
cSmoke.addTextPart(("+" + String((10000 + (cPanel.inst.life * 10)))), mc.HitZona);
p_myMC.gotoAndStop(2);
STATE = 3;
cPanel.CountFreeMonster++;
cPanel.inst.mcBoss.visible = false;
};
} else {
mc.hitMyPers();
};
};
};
if (fireLive > 0){
fireLive--;
fireMc.x = (fireMc.x + fireDx);
fireMc.y = (fireMc.y + fireDy);
if (mc.HitZona.hitTestObject(fireMc)){
mc.hitMyPers();
};
if (fireLive <= 0){
this.parent.removeChild(fireMc);
fireMc = null;
};
};
}
public function stateMen(mc:myOneWhellPers):void{
switch (STATE){
case 0:
if (this.currentFrame == p_tar){
this.stop();
if (Math.random() < 0.93){
return;
};
if (Math.random() > 0.55){
setState(0);
} else {
if (Math.random() > (0.05 + (p_live / 20))){
setState(1);
} else {
setState(2);
};
};
} else {
this.play();
p_myMC.x = (this.x + this["napMC"].x);
p_myMC.y = (this.y + this["napMC"].y);
};
break;
case 1:
if (p_MonsterMC.currentFrame == 8){
fire(mc);
};
if (p_MonsterMC.currentFrame >= 18){
p_MonsterMC.gotoAndStop(1);
STATE = 0;
};
break;
case 2:
if (p_MonsterMC.currentFrame > 39){
unhit = true;
};
if (p_MonsterMC.currentFrame > 92){
p_MonsterMC.gotoAndStop(1);
STATE = 0;
unhit = false;
};
break;
case 3:
dy++;
p_myMC.alpha = 1;
_demagTimer = 0;
p_myMC.y = (p_myMC.y + dy);
if (p_myMC.y > this.getBounds(parent).bottom){
p_myMC.y = this.getBounds(parent).bottom;
active = false;
cSmoke.addLevelFinish(mc.HitZona);
};
break;
};
}
public function setState(n:int):void{
switch (n){
case 0:
STATE = 0;
p_tar = int(((Math.random() * this.totalFrames) + 1));
this.play();
break;
case 1:
STATE = 1;
p_MonsterMC.gotoAndPlay("attak");
SoundConst._playSound(SoundConst.REF_FIRE);
if (fireLive > 0){
fireLive = 3;
};
this.stop();
p_tar = int(((Math.random() * this.totalFrames) + 1));
break;
case 2:
STATE = 2;
p_MonsterMC.gotoAndPlay("shild");
this.stop();
SoundConst._playSound(SoundConst.REF_STASIS);
p_tar = int(((Math.random() * this.totalFrames) + 1));
trace("Shild", p_tar);
break;
};
}
override public function init():void{
super.init();
this.visible = false;
cPanel.maxCountMonster++;
p_myMC = new lineEnemyAnim_12();
this.parent.addChild(p_myMC);
this.parent.setChildIndex(p_myMC, 1);
p_myMC.stop();
this.stop();
p_hitMC = (p_myMC["mcHit"] as MovieClip);
p_hitMC.visible = false;
p_MonsterMC = ((p_myMC["myPersMC"] as MovieClip)["monstr"] as MovieClip);
p_MonsterMC.stop();
p_myMC.x = (this.x + this["napMC"].x);
p_myMC.y = (this.y + this["napMC"].y);
p_tar = 5;
dy = 0;
_demagTimer = 0;
p_live = 8;
cPanel.inst.mcBoss.max = p_live;
cPanel.inst.mcBoss.value = p_live;
cPanel.inst.mcBoss.visible = true;
STATE = 0;
unhit = false;
fireMc = null;
}
override public function destroy():void{
p_MonsterMC = null;
p_hitMC = null;
this.parent.removeChild(p_myMC);
p_myMC = null;
super.destroy();
}
public function fire(mc:myOneWhellPers):void{
trace("fire");
fireMc = new IceBolt();
fireMc.stop();
this.parent.addChild(fireMc);
fireMc["mc"].gotoAndStop(int(((Math.random() * fireMc["mc"].totalFrames) + 1)));
fireMc.x = p_myMC.x;
fireMc.y = (p_myMC.y - 70);
var ddd:int = int((Math.abs(((mc.view.x - p_myMC.parent.x) - p_myMC.x)) / 15));
fireDx = (((mc.view.x - p_myMC.parent.x) - p_myMC.x) / ddd);
fireDy = (((mc.view.y - p_myMC.parent.y) - p_myMC.y) / ddd);
fireLive = (ddd + 10);
}
}
}//package myEng
Section 36
//myLineEnemy (myEng.myLineEnemy)
package myEng {
import flash.display.*;
public class myLineEnemy extends myBonus {
protected var persState:Boolean;
protected var p_score:int;
protected var timer:int;
protected var moving:Function;
protected var toHiting:Function;
protected var p_leftBord:Number;
protected var p_targetX:Number;
protected var p_rightBorder:Number;
protected var p_Scale:Number;
protected var _demagTimer:int;
protected var hitPers:Function;
protected var p_myMC:MovieClip;
protected var p_speed:Number;
protected var p_Live:int;
protected var p_myHit:MovieClip;
public function myLineEnemy(){
super();
}
protected function movKrot(mc:myOneWhellPers):void{
if (persState){
standartMov(mc);
timer--;
if (timer <= 0){
timer = int(((Math.random() * 100) + 100));
if (p_myMC.currentFrame == 3){
persState = false;
p_myMC.gotoAndPlay(4);
} else {
p_myMC.gotoAndStop(3);
};
};
} else {
if (p_myMC.currentFrame < 2){
persState = true;
};
};
}
override public function destroy():void{
p_myHit = null;
p_myMC.parent.removeChild(p_myMC);
p_myMC = null;
super.destroy();
}
protected function standartMov(mc:myOneWhellPers):void{
p_myMC.x = (p_myMC.x + p_speed);
if (Math.abs((p_myMC.x - p_targetX)) < Math.abs(p_speed)){
p_speed = -(p_speed);
if (p_targetX == p_leftBord){
p_myMC.scaleX = p_Scale;
p_targetX = p_rightBorder;
} else {
p_myMC.scaleX = -(p_Scale);
p_targetX = p_leftBord;
};
};
}
override public function init():void{
super.init();
_demagTimer = 0;
var t:Array = this.name.split("_");
cPanel.maxCountMonster++;
moving = standartMov;
toHiting = stanToHit;
hitPers = standHitPers;
p_myMC = new lineEnemyAnim_1();
p_speed = (0.4 + ((Math.random() * 3) / 8));
p_Live = 2;
p_score = 400;
switch (Number(t[1])){
case 1:
p_myMC = new lineEnemyAnim_1();
p_speed = (8 + ((Math.random() * 3) / 8));
p_Live = 1;
p_score = 200;
break;
case 2:
p_myMC = new lineEnemyAnim_2();
p_speed = 5;
p_Live = 1;
p_score = 900;
break;
case 3:
p_myMC = new lineEnemyAnim_3();
p_speed = (8 + ((Math.random() * 3) / 8));
p_Live = 400;
p_score = 1900;
toHiting = YogToHit;
break;
case 4:
p_myMC = new lineEnemyAnim_4();
p_speed = 0;
p_Live = 400;
p_score = 1000;
moving = function ():void{
};
toHiting = YogToHit;
break;
case 5:
p_myMC = new lineEnemyAnim_5();
p_speed = (5 + ((Math.random() * 3) / 8));
p_Live = 1;
p_score = 800;
break;
case 6:
p_myMC = new lineEnemyAnim_6();
p_speed = (10 + ((Math.random() * 3) / 8));
p_Live = 1;
p_score = 1500;
moving = movBat;
break;
case 7:
p_myMC = new lineEnemyAnim_7();
p_speed = (7 + ((Math.random() * 3) / 8));
p_Live = 2;
p_score = 2000;
moving = movBird;
break;
case 9:
p_myMC = new lineEnemyAnim_9();
p_speed = (2 + ((Math.random() * 3) / 8));
p_Live = 2;
p_score = 2000;
persState = false;
moving = movKrot;
break;
case 10:
p_myMC = new lineEnemyAnim_10();
p_speed = (0.4 + ((Math.random() * 3) / 8));
p_Live = 2;
p_score = 400;
break;
case 11:
p_myMC = new lineEnemyAnim_11();
p_speed = (0.4 + ((Math.random() * 3) / 8));
p_Live = 2;
p_score = 400;
break;
};
timer = int(((Math.random() * 100) + 100));
var vvv:int = this.parent.getChildIndex(this);
this.parent.addChildAt(p_myMC, vvv);
p_Scale = p_myMC.scaleX;
p_myMC.x = (this.x + ((this.width * Math.random()) * 0.9));
p_myMC.y = this.y;
p_leftBord = this.x;
p_rightBorder = (this.width + this.x);
p_targetX = p_rightBorder;
p_myHit = p_myMC["mcHit"];
p_myHit.visible = false;
this.visible = false;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
moving(mc);
if (active){
if (_demagTimer > 0){
_demagTimer--;
if ((_demagTimer % 3) == 0){
p_myMC.alpha = 1;
} else {
p_myMC.alpha = 0.5;
};
return;
};
if (p_myHit.hitTestObject(mc.HitZona)){
if (mc.toHitJump(p_myHit)){
toHiting(mc);
} else {
hitPers(mc);
};
};
};
}
public function YogToHit(mc:myOneWhellPers):void{
_demagTimer = 5;
if (mc.unHit){
SoundConst._playSound(SoundConst.HIT_2ENEMY);
active = false;
cPanel.Score = (cPanel.Score + p_score);
cPanel.Score = (cPanel.Score + (cPanel.inst.life * 5));
p_myMC.gotoAndStop(2);
cPanel.CountFreeMonster++;
} else {
mc.jump();
hitPers(mc);
};
cSmoke.horPuff(mc.view["toHitMC"]);
}
protected function movBat(mc:myOneWhellPers):void{
standartMov(mc);
if (active){
if (persState){
if (p_myMC.y < (this.y + this.height)){
p_myMC.y = (p_myMC.y + 8);
} else {
persState = false;
};
} else {
if (p_myMC.y > this.y){
p_myMC.y = (p_myMC.y - 8);
} else {
persState = true;
};
};
};
}
protected function movBird(mc:myOneWhellPers):void{
if ((Math.random() * 100) < 1.5){
persState = !(persState);
};
standartMov(mc);
if (persState){
if (p_myMC.y < (this.y + this.height)){
p_myMC.y = (p_myMC.y + 8);
};
} else {
if (p_myMC.y > this.y){
p_myMC.y = (p_myMC.y - 8);
};
};
}
public function stanToHit(mc:myOneWhellPers):void{
if (mc.unHit){
p_Live = 0;
} else {
mc.jump();
};
_demagTimer = 15;
p_Live--;
cSmoke.horPuff(mc.view["toHitMC"]);
SoundConst._playSound(SoundConst.HIT_2ENEMY);
if (p_Live <= 0){
active = false;
cPanel.Score = (cPanel.Score + (p_score + (cPanel.inst.life * 2)));
cSmoke.addTextPart(("+" + String((p_score + (cPanel.inst.life * 2)))), mc.HitZona);
p_myMC.gotoAndStop(2);
cPanel.CountFreeMonster++;
moving = standartMov;
_demagTimer = 0;
} else {
cPanel.Score = (cPanel.Score + int(((p_score / 4) + (cPanel.inst.life * 2))));
cSmoke.addTextPart(("+" + String(int(((p_score / 4) + (cPanel.inst.life * 2))))), mc.HitZona);
};
}
protected function standHitPers(mc:myOneWhellPers):void{
if (p_myHit.hitTestObject(mc.HitZona)){
if (mc.unHit){
p_Live = 0;
toHiting(mc);
} else {
mc.hitMyPers();
};
};
}
}
}//package myEng
Section 37
//myOneWhellPers (myEng.myOneWhellPers)
package myEng {
import flash.display.*;
import pengine.*;
import base.*;
import flash.geom.*;
public class myOneWhellPers extends Wheel implements IData {
protected var _jumpRelaxTimer:int;
protected var _movCurrFrame:Number;
protected var _movEndLoop:int;
protected var _movStart:int;
protected var _anglLimit:int;
protected var _unGraviTimer:int;
protected var _pParam:cPersParam;
protected var _MovArray:Array;
protected var _UNhitTimer:int;
protected var acsTimer:int;
public var HitZona:MovieClip;
protected var _jumpTimer:int;
protected var _acsToJump:Number;
protected var _jumpAcs:Vector2D;
protected var rotAngl:Number;
protected var _movStartLoop:int;
protected var arrGravMc:Array;
protected var _hitTimer:int;
protected var _acsToSpeed:Number;
protected var arrBoxMc:Array;
protected var p_oldHasInter:Boolean;
public var inAir:int;
public var STATE:int;
protected var _movSpeed:Number;
public static var camPoint:Number = 380;
public static var S_JumpDown:int = 5;
public static var S_slowMove:int = 1;
public static var S_hit:int = 4;
public static var S_Break:int = 6;
public static var S_fastMove:int = 2;
public static var S_Jump:int = 3;
public static var S_noMove:int = 0;
public static var S_Attak:int = 7;
public function myOneWhellPers(){
super();
}
public function showBox(b:Boolean):void{
var i:int;
while (i < arrBoxMc.length) {
(arrBoxMc[i] as MovieClip).visible = b;
i++;
};
}
override public function init():void{
super.init();
arrBoxMc = [];
arrGravMc = [];
p_oldHasInter = false;
_acsToSpeed = 9;
_acsToJump = -30;
_koeffFriction = 0.05;
_jumpTimer = 0;
_jumpRelaxTimer = 0;
_UNhitTimer = 0;
_jumpAcs = new Vector2D(0, 0);
_hitTimer = 0;
inAir = 0;
cPanel.inst.life = 100;
_movCurrFrame = 1;
_movSpeed = 0.5;
rotAngl = 0;
_anglLimit = 60;
_unGraviTimer = 0;
_movStart = 1;
_movEndLoop = 1;
_movStartLoop = 1;
cPanel.inst.life = 100;
}
public function showGrav(b:Boolean):void{
var i:int;
while (i < arrGravMc.length) {
(arrGravMc[i] as MovieClip).visible = b;
i++;
};
}
public function initPers(_x:Number, _y:Number, _pP:cPersParam):myOneWhellPers{
var i:String;
var d2:DisplayObject;
_pParam = _pP;
this.initWheel(_x, _y, _pP.mass, _pP.Rad, _pP.maxSpeed, _pP.Vid, _pP.Vid["rim"]);
_acsToSpeed = _pP.acsSpeed;
_acsToJump = _pP.jmpSpeed;
_MovArray = _pP.MovArray;
_movSpeed = _pP.speedAnim;
_koeffFriction = 0.07;
disableRotation();
STATE = S_JumpDown;
setMoveLimits();
lastN = new Vector2D(0, -1);
view["toHitMC"].visible = false;
HitZona = (view["mcHit"] as MovieClip);
HitZona.visible = false;
for (i in (_rim as MovieClip)) {
d2 = (_rim as MovieClip).getChildByName(i);
d2.cacheAsBitmap = true;
if (d2["boxMc"] != null){
d2["boxMc"].visible = false;
arrBoxMc.push(d2["boxMc"]);
};
if (d2["gravMc"] != null){
d2["gravMc"].visible = false;
arrGravMc.push(d2["gravMc"]);
};
};
return (this);
}
override public function cleanup():void{
HitZona = null;
_jumpAcs = null;
_MovArray = null;
_pParam = null;
arrBoxMc = null;
arrGravMc = null;
super.cleanup();
}
public function myUpdate(_keyManager:KeyManager, _cam:CCamera):void{
if (pos.x < 250){
pos.x = 250;
};
p_oldHasInter = intersectionFlag;
camPoint = (camPoint - (absXSpeed() * 5));
camPoint = (camPoint - ((camPoint - 380) / 6));
_cam.setNewTargetBorder(new Rectangle(camPoint, Math.min(150, Math.max(70, (200 - (absYSpeed() * 40)))), 40, 350));
if (absXSpeed() < 0){
_rim.scaleX = 0.6;
} else {
_rim.scaleX = -0.6;
};
if (STATE != S_hit){
if (((_keyManager.keyIsPressed(KeyConst.KEY_RIGHT)) || (_keyManager.keyIsPressed(KeyConst.KEY_D)))){
setAccelerate((_acsToSpeed + (_maxAccSpeed / 10)));
_rim.scaleX = -0.6;
} else {
if (((_keyManager.keyIsPressed(KeyConst.KEY_LEFT)) || (_keyManager.keyIsPressed(KeyConst.KEY_A)))){
setAccelerate((-(_acsToSpeed) - (_maxAccSpeed / 10)));
_rim.scaleX = 0.6;
} else {
_maxAccSpeed = _pParam.maxSpeed;
setAccelerate(0);
acsTimer = 0;
};
};
if ((((STATE == S_Jump)) || ((STATE == S_JumpDown)))){
if (Math.abs(absXSpeed()) < 5){
accelerate.x = (accelerate.x + getAccelerate());
};
if (getAccelerate() == 0){
prevPos.x = (prevPos.x + ((_curPosition.x - prevPos.x) / 2));
};
};
if (((_keyManager.keyIsPressed(KeyConst.KEY_UP)) || (_keyManager.keyIsPressed(KeyConst.KEY_W)))){
if (((hasIntersection()) && ((_jumpRelaxTimer <= 0)))){
jump();
if (unGravi){
SoundConst._playSound(SoundConst.JUMP);
};
};
};
if (_keyManager.keyIsPressed(KeyConst.KEY_JUMP)){
acsTimer = 100;
};
};
updateAnim();
}
public function hitMyPers():void{
var v:Number;
if (unHit){
return;
};
if (_hitTimer <= 1){
SoundConst._playSound(SoundConst.HIT_2CAT);
trace("hit_1!!!!!");
_jumpTimer = 3;
v = (-(absXSpeed()) * 3);
if (Math.abs(v) < 1){
v = -20;
};
_jumpAcs = new Vector2D(v, ((_acsToJump / 3) * 2));
_curPosition = prevPos.duplicate();
cPanel.inst.life = (cPanel.inst.life - 20);
STATE = S_hit;
setMoveLimits();
_hitTimer = 30;
};
acsTimer = 0;
}
public function get unHit():Boolean{
return (((_UNhitTimer > 0) as Boolean));
}
public function jump():void{
_jumpAcs = new Vector2D(0, _acsToJump);
if (_jumpTimer < 2){
_jumpTimer = 4;
};
_jumpRelaxTimer = 15;
startState(S_Jump);
}
public function absXSpeed():Number{
return ((_curPosition.x - _prevPosition.x));
}
protected function setMoveLimits():void{
_movStart = _MovArray[(STATE * 3)];
_movEndLoop = _MovArray[((STATE * 3) + 1)];
_movStartLoop = _MovArray[((STATE * 3) + 2)];
}
public function startState(_state:int):void{
STATE = _state;
setMoveLimits();
if (_movCurrFrame < _movStart){
_movCurrFrame = _movStart;
};
if (_movCurrFrame > _movEndLoop){
_movCurrFrame = _movStart;
};
(_rim as MovieClip).gotoAndStop(int(_movCurrFrame));
}
override public function hasIntersection():Boolean{
return (((super.hasIntersection()) || (p_oldHasInter)));
}
public function toHitJump(_mc:MovieClip):Boolean{
var b:Boolean = _mc.hitTestObject(view["toHitMC"]);
if (((b) && (unHit))){
};
if (!unHit){
b = ((((b) && ((inAir > 5)))) && ((absYSpeed() > -1)));
};
if (b){
_curPosition = prevPos.duplicate();
};
return (b);
}
public function set unGravi(value:Boolean):void{
if (value){
showGrav(true);
_unGraviTimer = 300;
};
}
public function inLoop():void{
_anglLimit = 180;
_maxAccSpeed = (_pParam.MaxSpeedRun * 3);
setAccelerate(14);
}
public function absYSpeed():Number{
return ((_curPosition.y - _prevPosition.y));
}
public function set unHit(value:Boolean):void{
if (value){
showBox(true);
_UNhitTimer = 300;
};
}
public function get unGravi():Boolean{
return (((_unGraviTimer > 0) as Boolean));
}
public function updateAnim():void{
if (_jumpRelaxTimer > 0){
_jumpRelaxTimer--;
};
if (_UNhitTimer > 0){
_UNhitTimer--;
cPanel.Box(int((_UNhitTimer / 3)));
if (_UNhitTimer <= 0){
showBox(false);
};
};
if (_unGraviTimer > 0){
_unGraviTimer--;
cPanel.Gravi(int((_unGraviTimer / 3)));
_accelerate.plusXY(0, -2);
if (_unGraviTimer <= 0){
showGrav(false);
};
};
if (_jumpTimer > 0){
accelerate.plus(_jumpAcs);
_jumpTimer--;
acsTimer = 0;
};
if (_hitTimer > 0){
_hitTimer--;
if ((_hitTimer % 3) == 0){
_rim.alpha = 1;
} else {
_rim.alpha = 0.5;
};
};
rotAngl = (rotAngl + (((Math.atan2(lastN.x, -(lastN.y)) * 57) - rotAngl) / 4));
rotAngl = Math.min(_anglLimit, Math.max(-(_anglLimit), rotAngl));
_rim.rotation = rotAngl;
_anglLimit = 60;
if (STATE != S_hit){
if (hasIntersection()){
if (Math.abs(absXSpeed()) < 0.2){
STATE = S_noMove;
} else {
if (STATE == S_noMove){
startState(S_slowMove);
};
STATE = S_slowMove;
if (getAccelerate() == 0){
startState(S_Break);
} else {
acsTimer++;
};
if (acsTimer > 40){
STATE = S_fastMove;
_maxAccSpeed = _pParam.MaxSpeedRun;
};
};
if (inAir > 30){
cSmoke.horPuff(view["toHitMC"]);
SoundConst._playSound(SoundConst.END_JUMP);
};
inAir = 0;
if (Math.abs(lastN.x) > 0.8){
accelerate.y = (accelerate.y + 32);
};
} else {
inAir++;
if (inAir > 4){
lastN.plusXY(0, -1);
STATE = S_Jump;
if (absYSpeed() > 0){
STATE = S_JumpDown;
};
};
};
} else {
inAir++;
lastN.plusXY(0, -1);
if (_hitTimer <= 20){
STATE = S_Jump;
};
};
_movCurrFrame = (_movCurrFrame + _movSpeed);
if ((((_movCurrFrame < _movStart)) || ((_movCurrFrame >= (_movEndLoop + 1))))){
if (int(_movCurrFrame) == (_movEndLoop + 1)){
setMoveLimits();
_movCurrFrame = _movStartLoop;
} else {
setMoveLimits();
_movCurrFrame = _movStart;
};
};
(_rim as MovieClip).gotoAndPlay(int(_movCurrFrame));
}
public static function create():myOneWhellPers{
var mbr:myOneWhellPers = new (myOneWhellPers);
mbr.init();
return (mbr);
}
}
}//package myEng
Section 38
//myPutana (myEng.myPutana)
package myEng {
import flash.display.*;
import flash.geom.*;
public class myPutana {
public var myMC:MovieClip;
public var speed:Number;
public var state:Boolean;
public var myActive:Boolean;
public var tarX:Number;
public var tarY:Number;
protected var hitZona:MovieClip;
public var bord:Rectangle;
public function myPutana(){
super();
}
public function mirMove(mc:myOneWhellPers):void{
if ((myBonusPutana.tarX + tarX) > myMC.x){
myMC.scaleX = 1;
} else {
myMC.scaleX = -1;
};
myMC.x = (myMC.x + Math.max(-(speed), Math.min(speed, (((myBonusPutana.tarX + tarX) - myMC.x) / 8))));
myMC.y = (myMC.y + Math.max(-(speed), Math.min(speed, (((myBonusPutana.tarY + tarY) - myMC.y) / 8))));
}
public function myHit(mc:myOneWhellPers):void{
if (myActive){
warMove(mc);
if (mc.HitZona.hitTestObject(hitZona)){
if (mc.toHitJump(hitZona)){
myMC.gotoAndStop(2);
cSmoke.horPuff(mc.view["toHitMC"]);
mc.jump();
cPanel.inst.mcBoss.value--;
cPanel.Score = (cPanel.Score + (500 + (cPanel.inst.life * 5)));
cSmoke.addTextPart(("+" + String((500 + (cPanel.inst.life * 5)))), mc.HitZona);
if (cPanel.inst.mcBoss.value < 1){
cPanel.inst.mcBoss.visible = false;
myBonusDoor.open();
cPanel.Score = (cPanel.Score + (5000 + (cPanel.inst.life * 10)));
cSmoke.addTextPart(("+" + String((5000 + (cPanel.inst.life * 10)))), hitZona);
};
myActive = false;
myBonusPutana.timer = 0;
} else {
mc.hitMyPers();
};
};
} else {
mirMove(mc);
};
}
public function init(rootMC:MovieClip, n:int):void{
myActive = true;
myMC = new lineEnemyAnim_11();
rootMC.parent.addChild(myMC);
rootMC.parent.setChildIndex(myMC, 1);
hitZona = myMC["mcHit"];
hitZona.visible = false;
myMC.x = (rootMC.x + ((rootMC.width * Math.random()) * 0.9));
myMC.y = (rootMC.y + ((rootMC.height * Math.random()) * 0.9));
tarX = (((myMC.width * int((n % 3))) - (2 * myMC.width)) - ((myMC.width * Math.random()) * 0.5));
tarY = (((myMC.height * int((n / 3))) - myMC.height) - ((myMC.height * Math.random()) * 0.5));
bord = rootMC.getBounds(rootMC);
state = true;
speed = (5 + (Math.random() * 22));
}
public function warMove(mc:myOneWhellPers):void{
var n:int;
if (state){
if ((myBonusPutana.tarX + tarX) > myMC.x){
myMC.scaleX = 1;
} else {
myMC.scaleX = -1;
};
myMC.x = (myMC.x + Math.max(-(speed), Math.min(speed, (((myBonusPutana.tarX + tarX) - myMC.x) / 8))));
myMC.y = (myMC.y + Math.max(-(speed), Math.min(speed, (((myBonusPutana.tarY + tarY) - myMC.y) / 8))));
if ((((Math.abs(((myMC.x + myMC.parent.x) - mc.view.x)) < 250)) && ((Math.random() < 0.005)))){
state = false;
myMC.gotoAndPlay(3);
SoundConst._playSound(SoundConst.OS_ATTACK);
n = int((Math.random() * 9));
tarX = (((myMC.width * int((n % 3))) - (2 * myMC.width)) - ((myMC.width * Math.random()) * 0.5));
tarY = (((myMC.height * int((n / 3))) - myMC.height) - ((myMC.height * Math.random()) * 0.5));
};
} else {
if (myMC.currentFrame < 3){
state = true;
};
};
}
}
}//package myEng
Section 39
//mySecretBonus (myEng.mySecretBonus)
package myEng {
import flash.display.*;
public class mySecretBonus extends myBonus {
protected var myHit:MovieClip;
public static var CountFindSecret:int;
public static var CountSecret:int;
public function mySecretBonus(){
super();
}
override public function init():void{
super.init();
myHit = (this["mcHit"] as MovieClip);
myHit.visible = false;
this.cacheAsBitmap = true;
CountSecret++;
CountFindSecret = 0;
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
if (mc.HitZona.hitTestObject(myHit)){
SoundConst._playSound(SoundConst.BONUS_SECRET);
cSmoke.addTextPart("+1500", mc.HitZona);
CountFindSecret++;
cPanel.Score = (cPanel.Score + 1500);
active = false;
this.visible = false;
};
};
}
}
}//package myEng
Section 40
//myUnHitBonus (myEng.myUnHitBonus)
package myEng {
public class myUnHitBonus extends myBonus {
public function myUnHitBonus(){
super();
}
override public function myHitTest(mc:myOneWhellPers, n:int):void{
if (active){
if (mc.HitZona.hitTestObject(this)){
SoundConst._playSound(SoundConst.BONUS_HIT);
active = false;
cPanel.Score = (cPanel.Score + 500);
cSmoke.addTextPart("+500", mc.HitZona);
mc.unHit = true;
play();
};
};
}
}
}//package myEng
Section 41
//WAV (OPEN_DOOR.WAV)
package OPEN_DOOR {
import flash.media.*;
public dynamic class WAV extends Sound {
}
}//package OPEN_DOOR
Section 42
//wav (os_Attak.wav)
package os_Attak {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package os_Attak
Section 43
//wav (os_move.wav)
package os_move {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package os_move
Section 44
//IConstraint (pengine.IConstraint)
package pengine {
public interface IConstraint {
function resolve():void;
}
}//package pengine
Section 45
//Particle (pengine.Particle)
package pengine {
import flash.display.*;
import base.*;
public class Particle implements IObject, IView {
protected var _view:DisplayObjectContainer;
protected var _mass:Number;
protected var _curPosition:Vector2D;
protected var _prevPosition:Vector2D;
protected var _synchronizeMovie:Function;
protected var _buckup:Vector2D;
protected var _accelerate:Vector2D;
static var KOEFF_DUMP:Number = 0.995;
public function Particle():void{
super();
}
public function set accelerate(acc:Vector2D):void{
_accelerate = acc;
}
public function set view(view_:DisplayObjectContainer):void{
var view_ = view_;
if (view_ == null){
_synchronizeMovie = function ():void{
};
} else {
_view = view_;
_synchronizeMovie = moveMovieToCurentPosition;
};
}
protected function moveMovieToCurentPosition():void{
_view.x = _curPosition.x;
_view.y = _curPosition.y;
}
public function init():void{
_curPosition = new Vector2D();
_prevPosition = new Vector2D();
_accelerate = new Vector2D();
_buckup = new Vector2D();
}
public function update(deltaTime_:Number):void{
_buckup.copyFrom(_curPosition);
_curPosition.x = (_curPosition.x + (((_curPosition.x - _prevPosition.x) * KOEFF_DUMP) + (_accelerate.x * deltaTime_)));
_curPosition.y = (_curPosition.y + (((_curPosition.y - _prevPosition.y) * KOEFF_DUMP) + (_accelerate.y * deltaTime_)));
_buckup.copyTo(_prevPosition);
_synchronizeMovie();
}
public function set prevPos(pos:Vector2D):void{
_prevPosition = pos;
}
public function get accelerate():Vector2D{
return (_accelerate);
}
public function get prevPos():Vector2D{
return (_prevPosition);
}
public function checkCollision(hitMovie:DisplayObject):void{
}
public function get pos():Vector2D{
return (_curPosition);
}
public function get view():DisplayObjectContainer{
return (_view);
}
public function set mass(nMass:Number):void{
_mass = nMass;
}
public function cleanup():void{
_curPosition = null;
_prevPosition = null;
_accelerate = null;
_buckup = null;
_view = null;
_synchronizeMovie = null;
}
public function set pos(pos:Vector2D):void{
_curPosition = pos;
}
public function enablePause(enable_:Boolean=true):void{
}
public function get mass():Number{
return (_mass);
}
public function initParticle(x:Number=0, y:Number=0, mass:Number=1, mc:DisplayObjectContainer=null):Particle{
_mass = mass;
_accelerate.x = 0;
_accelerate.y = 0;
view = mc;
moveTo(x, y);
return (this);
}
public function moveTo(nx:Number, ny:Number):void{
_curPosition.x = (_prevPosition.x = nx);
_curPosition.y = (_prevPosition.y = ny);
_synchronizeMovie();
}
public static function create():Particle{
var mbr:Particle = new (Particle);
mbr.init();
return (mbr);
}
}
}//package pengine
Section 46
//ParticleEngine (pengine.ParticleEngine)
package pengine {
import flash.display.*;
import base.*;
public class ParticleEngine implements IObject {
protected var _gravity:Number;
protected var _particles:Array;
protected var _constraints:Array;
protected var _hitMovie:DisplayObject;
protected static var _repeatCount:int;
public function ParticleEngine(){
super();
}
public function enablePause(enable_:Boolean=true):void{
}
public function addParticle(p:Particle):void{
_particles.push(p);
}
public function get gravity():Number{
return (_gravity);
}
public function update(deltaTime_:Number):void{
var i:int;
i = 0;
while (i < _particles.length) {
_particles[i].accelerate.plusXY(0, (_gravity * _particles[i].mass));
_particles[i].accelerate.mult((1 / _repeatCount));
i++;
};
var k:int;
while (k < _repeatCount) {
i = 0;
while (i < _particles.length) {
_particles[i].update((deltaTime_ / _repeatCount));
i++;
};
i = 0;
while (i < _constraints.length) {
_constraints[i].resolve();
i++;
};
i = 0;
while (i < _particles.length) {
_particles[i].checkCollision(_hitMovie);
i++;
};
k++;
};
i = 0;
while (i < _particles.length) {
_particles[i].accelerate.init(0, 0);
i++;
};
}
public function getHitMovie():DisplayObject{
return (_hitMovie);
}
public function clearAll():void{
if (_particles != null){
do {
} while (_particles.pop() != null);
};
clearConstraints();
}
public function init():void{
_gravity = 7;
_repeatCount = 3;
_hitMovie = null;
_particles = new Array();
_constraints = new Array();
}
public function initParticleEngine(hitMovie:DisplayObject=null, nGravity:Number=7, koeffDamp:Number=0.995, repeatCount_:int=3):ParticleEngine{
setHitMovie(hitMovie);
gravity = nGravity;
_repeatCount = repeatCount_;
Particle.KOEFF_DUMP = koeffDamp;
return (this);
}
public function addConstraint(c:IConstraint):void{
_constraints.push(c);
}
public function setHitMovie(hitMovie:DisplayObject=null):void{
_hitMovie = hitMovie;
}
public function set gravity(nGravity:Number):void{
_gravity = nGravity;
}
public function cleanup():void{
clearAll();
_hitMovie = null;
_particles = null;
_constraints = null;
}
public function clearConstraints():void{
if (_constraints != null){
do {
} while (_constraints.pop() != null);
};
}
public static function create():ParticleEngine{
var pe:ParticleEngine = new (ParticleEngine);
pe.init();
return (pe);
}
}
}//package pengine
Section 47
//Vector2D (pengine.Vector2D)
package pengine {
public class Vector2D {
public var x:Number;
public var y:Number;
public function Vector2D(nx:Number=0, ny:Number=0):void{
super();
init(nx, ny);
}
public function modul():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function rotate(u:Number):void{
var oX:Number = x;
var oY:Number = y;
x = ((oX * Math.cos(u)) - (oY * Math.sin(u)));
y = ((oX * Math.sin(u)) + (oY * Math.cos(u)));
}
public function rotateNew(u:Number):Vector2D{
return (new Vector2D(((x * Math.cos(u)) - (y * Math.sin(u))), ((x * Math.sin(u)) + (y * Math.cos(u)))));
}
public function copyFrom(v:Vector2D):void{
x = v.x;
y = v.y;
}
public function mult(k:Number):void{
x = (x * k);
y = (y * k);
}
public function getDistanceTo(p1:Vector2D, p2:Vector2D):Number{
var A:Number = (p1.y - p2.y);
var B:Number = (p2.x - p1.x);
var C:Number = ((p1.x * (p2.y - p1.y)) - (p1.y * (p2.x - p1.x)));
var d:Number = Math.sqrt(((A * A) + (B * B)));
A = (A / d);
B = (B / d);
C = (C / d);
return ((((A * x) + (B * y)) + C));
}
public function duplicate():Vector2D{
return (new Vector2D(x, y));
}
public function scalar(v:Vector2D):Number{
return (((x * v.x) + (y * v.y)));
}
public function normalize():void{
var r:Number = Math.sqrt(((x * x) + (y * y)));
x = (x / r);
y = (y / r);
}
public function init(nx:Number, ny:Number):void{
x = nx;
y = ny;
}
public function plusNew(v:Vector2D):Vector2D{
return (new Vector2D((x + v.x), (y + v.y)));
}
public function multNew(k:Number):Vector2D{
return (new Vector2D((x * k), (y * k)));
}
public function minusNew(v:Vector2D):Vector2D{
return (new Vector2D((x - v.x), (y - v.y)));
}
public function plus(v:Vector2D):void{
x = (x + v.x);
y = (y + v.y);
}
public function plusXY(nx:Number, ny:Number):void{
x = (x + nx);
y = (y + ny);
}
public function copyTo(v:Vector2D):void{
v.x = x;
v.y = y;
}
public function reverseNew():Vector2D{
return (new Vector2D(-(x), -(y)));
}
public function minus(v:Vector2D):void{
x = (x - v.x);
y = (y - v.y);
}
public static function getDistanceBetween(p1:Vector2D, p2:Vector2D):Number{
var dx:Number = (p1.x - p2.x);
var dy:Number = (p1.y - p2.y);
return (Math.sqrt(((dx * dx) + (dy * dy))));
}
}
}//package pengine
Section 48
//Wheel (pengine.Wheel)
package pengine {
import flash.display.*;
import flash.geom.*;
public class Wheel extends Particle {
protected var intersArray:Array;
protected var hitArray:Array;
public var _maxAccSpeed:Number;
protected var intersectionFlag:Boolean;
protected var hitPointArray:Array;
protected var n_part:Vector2D;
protected var _accSpeed:Number;
protected var oldPos:Vector2D;
protected var _koeffSpring:Number;
protected var rotateMovie:Function;
protected var _radius:Number;
protected var normalArray:Array;
protected var lastIntersPoint:Vector2D;
protected var _speed:Number;
protected var p3:Vector2D;
protected var _rim:DisplayObject;
protected var _acceleration:Number;
protected var rot:Vector2D;
protected var _koeffSlip:Number;
protected var _n:Vector2D;
protected var _p:Point;
protected var obj:Object;
protected var lastN:Vector2D;
protected static var ANGLE_180_DIV_PI:Number = 57.2957795130823;
public static var _maxSpeed:Number = 180;
protected static var _koeffFriction:Number = 0.03;
protected static var _hitCount:Number = 16;
public function Wheel():void{
super();
}
protected function _innerInit():void{
n_part = new Vector2D(0, 0);
oldPos = new Vector2D(0, 0);
_p = new Point();
_n = new Vector2D(0, 0);
p3 = new Vector2D(0, 0);
}
override public function checkCollision(hit_view:DisplayObject):void{
var i:Number;
var j:Number;
var k1:Number;
var k2:Number;
var k:Number;
var counter:Number;
var u:Number;
_p.x = (_p.y = 0);
var hitFlag:Boolean;
oldPos.init(_prevPosition.x, _prevPosition.y);
_n.init(0, 0);
n_part.init(0, 0);
_synchronizeMovie();
counter = 0;
i = 0;
while (i < _hitCount) {
_p.x = hitPointArray[i].x;
_p.y = hitPointArray[i].y;
_p = _view.localToGlobal(_p);
if ((hitArray[i] = hit_view.hitTestPoint(_p.x, _p.y, true))){
hitFlag = true;
k1 = i;
counter++;
};
i++;
};
if (counter == _hitCount){
_curPosition.x = (_prevPosition.x + ((_curPosition.x - _prevPosition.x) * 0.3));
_curPosition.y = (_prevPosition.y + ((_curPosition.y - _prevPosition.y) * 0.3));
_synchronizeMovie();
return;
};
i = 0;
if (hitFlag){
while (true) {
i++;
if (i == _hitCount){
i = 0;
};
if (!hitArray[i]){
k1 = -1;
j = 0;
while (j < _hitCount) {
i++;
if (i == _hitCount){
i = 0;
};
if (k1 == -1){
if (hitArray[i]){
k1 = i;
_n.plus(normalArray[i]);
normalArray[i].copyTo(n_part);
};
} else {
if (!hitArray[i]){
k2 = (i - 1);
if (k2 < 0){
k2 = (_hitCount - 1);
};
intersArray.push({k1:k1, k2:k2, n:new Vector2D(n_part.x, n_part.y)});
k1 = -1;
} else {
_n.plus(normalArray[i]);
n_part.plus(normalArray[i]);
};
};
j++;
};
break;
};
};
p3.init(0, 0);
if (intersArray.length > 0){
_n.normalize();
if (intersectionFlag){
_n.x = (_n.x + lastN.x);
_n.y = (_n.y + lastN.y);
_n.x = (_n.x / 2);
_n.y = (_n.y / 2);
};
k = intersArray.length;
i = 0;
while (i < k) {
obj = intersArray.pop();
k1 = obj.k1;
k2 = obj.k2;
obj.n.copyTo(n_part);
_curPosition.minusNew(_prevPosition).copyTo(p3);
if (_n.scalar(p3) < 0){
u = Math.atan2(_n.y, _n.x);
p3.rotate(-(u));
p3.x = (-(p3.x) * _koeffSpring);
p3.rotate(u);
pushOut(k1, k2, n_part, hit_view);
_prevPosition.x = (_curPosition.x - p3.x);
_prevPosition.y = (_curPosition.y - p3.y);
} else {
pushOut(k1, k2, n_part, hit_view);
};
i++;
};
validateRotation(_n, oldPos);
intersectionFlag = true;
_curPosition.copyTo(lastIntersPoint);
_n.copyTo(lastN);
};
} else {
if (intersectionFlag){
validateRotation(lastN, oldPos);
intersectionFlag = false;
};
};
_synchronizeMovie();
}
override public function init():void{
super.init();
}
public function getRotationMovie():DisplayObject{
return (_rim);
}
public function setRotationMovie(rotationMovie:DisplayObject):void{
var rotationMovie = rotationMovie;
if ((((rotationMovie == null)) || ((rotationMovie == null)))){
rotateMovie = function ():void{
};
_rim = null;
} else {
rotateMovie = function ():void{
rot.rotate((_speed / _radius));
_rim.rotation = (Math.atan2(rot.y, rot.x) * ANGLE_180_DIV_PI);
};
_rim = rotationMovie;
};
}
override public function cleanup():void{
_rim = null;
rot = null;
hitPointArray = null;
normalArray = null;
hitArray = null;
intersArray = null;
lastIntersPoint = null;
lastN = null;
rotateMovie = null;
super.cleanup();
}
public function initWheel(x:Number, y:Number, mass:Number, rad:Number, maxAccSpeed:Number, mc:DisplayObjectContainer, rotationMovie:DisplayObject=null, koeffSpring:Number=0.1, koeffSlip:Number=0.1):Wheel{
var i:Number;
_innerInit();
initParticle(x, y, mass, mc);
_koeffSpring = koeffSpring;
_koeffSlip = koeffSlip;
setRotationMovie(rotationMovie);
_radius = rad;
_maxAccSpeed = maxAccSpeed;
_speed = 0;
_accSpeed = 0;
rot = new Vector2D(1, 0);
intersectionFlag = false;
lastIntersPoint = new Vector2D(0, 0);
lastN = new Vector2D(0, 0);
var du:Number = ((Math.PI * 2) / _hitCount);
hitPointArray = new Array(_hitCount);
normalArray = new Array(_hitCount);
hitArray = new Array(_hitCount);
intersArray = new Array();
i = 0;
while (i < _hitCount) {
hitPointArray[i] = new Vector2D((Math.sin((du * i)) * _radius), (-(Math.cos((du * i))) * _radius));
normalArray[i] = hitPointArray[i].multNew(-1);
normalArray[i].normalize();
i++;
};
_acceleration = 0;
return (this);
}
protected function validateRotation(n:Vector2D, oldPos:Vector2D):void{
if (((!(intersectionFlag)) && ((Math.abs(_accSpeed) > 0.01)))){
if (Math.abs(_accSpeed) < ((_maxAccSpeed * 0.02) / 2)){
_accSpeed = 0;
} else {
if (_accSpeed > 0){
_accSpeed = (_maxAccSpeed * 0.02);
} else {
_accSpeed = (-(_maxAccSpeed) * 0.02);
};
};
};
var accDir:Vector2D = new Vector2D(-(n.y), n.x);
var wheelSpeed:Vector2D = _curPosition.minusNew(oldPos);
var ugol:Number = Math.atan2(accDir.y, accDir.x);
var projectVector:Vector2D = wheelSpeed.rotateNew(-(ugol));
_speed = (projectVector.x + _accSpeed);
projectVector.y = 0;
projectVector.rotate(ugol);
var traction:Number = (1 - _koeffSlip);
_curPosition.x = ((_curPosition.x + ((accDir.x * _accSpeed) * traction)) - (_koeffFriction * projectVector.x));
_curPosition.y = ((_curPosition.y + ((accDir.y * _accSpeed) * traction)) - (_koeffFriction * projectVector.y));
_accSpeed = (_accSpeed * _koeffSlip);
}
public function disableRotation():void{
rotateMovie = function ():void{
};
}
override public function update(deltaTime_:Number):void{
super.update(deltaTime_);
_accSpeed = Math.max(-(_maxAccSpeed), Math.min(_maxAccSpeed, (_accSpeed + (_acceleration * deltaTime_))));
_speed = Math.max((-(_maxSpeed) * deltaTime_), Math.min(((_speed * KOEFF_DUMP) + _accSpeed), (_maxSpeed * deltaTime_)));
rotateMovie();
}
public function getAccelerate():Number{
return (_acceleration);
}
protected function pushOut(k1:Number, k2:Number, n:Vector2D, hit_view:DisplayObject):void{
var d:Number;
var p3:Vector2D;
var p_p:Point;
var m:Number;
var step:Number;
n.normalize();
if (k1 != k2){
d = new Vector2D(0, 0).getDistanceTo(hitPointArray[k1], hitPointArray[k2]);
d = (_radius - Math.abs(d));
_curPosition.plus(n.multNew(d));
_prevPosition.plus(n.multNew(d));
} else {
p3 = n.multNew(-(_radius));
p_p = new Point(0, 0);
m = 0;
step = 0.03;
while (true) {
p_p.x = p3.x;
p_p.y = p3.y;
p_p = _view.localToGlobal(p_p);
if (hit_view.hitTestPoint(p_p.x, p_p.y, true)){
m++;
_curPosition.x = (_curPosition.x + (n.x * step));
_curPosition.y = (_curPosition.y + (n.y * step));
_synchronizeMovie();
} else {
m--;
_curPosition.x = (_curPosition.x - (n.x * step));
_curPosition.y = (_curPosition.y - (n.y * step));
_prevPosition.plus(n.multNew((step * m)));
break;
};
};
};
}
public function hasIntersection():Boolean{
return (intersectionFlag);
}
public function setAccelerate(nAccelerate:Number):void{
_acceleration = nAccelerate;
}
public function stopRotate():void{
_accSpeed = 0;
}
public static function create():Wheel{
var mbr:Wheel = new (Wheel);
mbr.init();
return (mbr);
}
}
}//package pengine
Section 49
//wav (ref_fire.wav)
package ref_fire {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package ref_fire
Section 50
//wav (ref_hit.wav)
package ref_hit {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package ref_hit
Section 51
//wav (ref_shild.wav)
package ref_shild {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package ref_shild
Section 52
//wav (Secret.wav)
package Secret {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package Secret
Section 53
//Cat_effect_103 (sonik_lib_fla.Cat_effect_103)
package sonik_lib_fla {
import flash.display.*;
public dynamic class Cat_effect_103 extends MovieClip {
public function Cat_effect_103(){
addFrameScript(5, this.frame6);
}
function frame6(){
stop();
}
}
}//package sonik_lib_fla
Section 54
//eatBonusTip_97 (sonik_lib_fla.eatBonusTip_97)
package sonik_lib_fla {
import flash.display.*;
public dynamic class eatBonusTip_97 extends MovieClip {
public function eatBonusTip_97(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 55
//Explosion_Single_170 (sonik_lib_fla.Explosion_Single_170)
package sonik_lib_fla {
import flash.display.*;
public dynamic class Explosion_Single_170 extends MovieClip {
public function Explosion_Single_170(){
addFrameScript(8, this.frame9);
}
function frame9(){
stop();
}
}
}//package sonik_lib_fla
Section 56
//krotDown_356 (sonik_lib_fla.krotDown_356)
package sonik_lib_fla {
import flash.display.*;
public dynamic class krotDown_356 extends MovieClip {
public function krotDown_356(){
addFrameScript(4, this.frame5);
}
function frame5(){
stop();
}
}
}//package sonik_lib_fla
Section 57
//markMap_42 (sonik_lib_fla.markMap_42)
package sonik_lib_fla {
import flash.display.*;
public dynamic class markMap_42 extends MovieClip {
public var btHit:SimpleButton;
public function markMap_42(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 58
//markMapBos1_44 (sonik_lib_fla.markMapBos1_44)
package sonik_lib_fla {
import flash.display.*;
public dynamic class markMapBos1_44 extends MovieClip {
public var btHit:SimpleButton;
public function markMapBos1_44(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 59
//markMapBos2_46 (sonik_lib_fla.markMapBos2_46)
package sonik_lib_fla {
import flash.display.*;
public dynamic class markMapBos2_46 extends MovieClip {
public var btHit:SimpleButton;
public function markMapBos2_46(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 60
//markMapBos3_45 (sonik_lib_fla.markMapBos3_45)
package sonik_lib_fla {
import flash.display.*;
public dynamic class markMapBos3_45 extends MovieClip {
public var btHit:SimpleButton;
public function markMapBos3_45(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 61
//mcBackground_72 (sonik_lib_fla.mcBackground_72)
package sonik_lib_fla {
import flash.display.*;
public dynamic class mcBackground_72 extends MovieClip {
public function mcBackground_72(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 62
//McWindYesNo_34 (sonik_lib_fla.McWindYesNo_34)
package sonik_lib_fla {
import flash.display.*;
public dynamic class McWindYesNo_34 extends MovieClip {
public var wind:MovieClip;
public function McWindYesNo_34(){
addFrameScript(0, this.frame1, 19, this.frame20);
}
function frame20(){
stop();
}
function frame1(){
stop();
}
}
}//package sonik_lib_fla
Section 63
//SoundManager (sound.SoundManager)
package sound {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.system.*;
public class SoundManager {
protected var m_sBackSoundID:String;
protected var m_soundOn:Boolean;
protected var m_schBackSound:SoundChannel;
protected var m_dictSounds:Dictionary;
protected var m_dictChannels:Dictionary;
public function SoundManager(){
super();
this.m_dictSounds = new Dictionary();
this.m_dictChannels = new Dictionary();
this.soundOn = true;
this.m_sBackSoundID = null;
}
protected function onSoundComplete(event:Event):void{
delete this.m_dictChannels[(event.target as SoundChannel)];
}
public function stopBackSound():void{
if (this.m_schBackSound != null){
this.m_schBackSound.stop();
this.m_schBackSound = null;
};
}
public function setTransform(sID:String, soundTransform:SoundTransform):void{
(this.m_dictSounds[sID] as SoundObject).m_transform = soundTransform;
}
public function stopSound(sID:SoundChannel):void{
this.m_dictChannels[sID].stop();
}
public function get soundOn():Boolean{
return (this.m_soundOn);
}
public function removeSound(sID:String):void{
delete this.m_dictSounds[sID];
}
public function setVolume(sID:String, nVolume:Number):void{
(this.m_dictSounds[sID] as SoundObject).m_transform.volume = nVolume;
}
public function addSound(sClassName:String, sID:String=null):void{
if (sID == null){
sID = sClassName;
};
var classSound:Class = (ApplicationDomain.currentDomain.getDefinition(sClassName) as Class);
var sndObj:SoundObject = new SoundObject(new (classSound));
this.m_dictSounds[sID] = sndObj;
}
public function playBackSound(sID:String):SoundChannel{
if (((!((this.m_schBackSound == null))) && (!((this.m_sBackSoundID == sID))))){
this.m_schBackSound.stop();
this.m_schBackSound = null;
};
if (this.m_schBackSound == null){
this.m_schBackSound = this.playSound(sID, 0, (int.MAX_VALUE - 100));
};
this.m_sBackSoundID = sID;
return (this.m_schBackSound);
}
public function playSound(sID:String, nStartTime:Number=0, iLoops:int=0):SoundChannel{
var sou:SoundObject;
var sndChannel:SoundChannel;
var sID = sID;
var nStartTime = nStartTime;
var iLoops = iLoops;
if (this.soundOn){
sou = (this.m_dictSounds[sID] as SoundObject);
sndChannel = sou.play(nStartTime, iLoops);
this.m_dictChannels[sndChannel] = sndChannel;
sndChannel.addEventListener(Event.SOUND_COMPLETE, this.onSoundComplete, false, 0, true);
return (sndChannel);
//unresolved jump
var _slot1 = e;
trace("SoundManager::playSound exception", _slot1.getStackTrace());
return (null);
};
return (null);
}
public function set soundOn(bValue:Boolean):void{
var channel:SoundChannel;
this.m_soundOn = bValue;
if (!this.m_soundOn){
this.stopBackSound();
for each (channel in this.m_dictChannels) {
channel.stop();
};
} else {
this.m_dictChannels = new Dictionary();
if (this.m_sBackSoundID != null){
this.playBackSound(this.m_sBackSoundID);
};
};
}
}
}//package sound
Section 64
//SoundObject (sound.SoundObject)
package sound {
import flash.media.*;
class SoundObject {
public var m_transform:SoundTransform;
public var m_sound:Sound;
function SoundObject(sound:Sound){
super();
this.m_sound = sound;
this.m_transform = new SoundTransform();
}
public function play(nStartTime:Number=0, iLoops:int=0):SoundChannel{
return (this.m_sound.play(nStartTime, iLoops, this.m_transform));
}
}
}//package sound
Section 65
//WAV (SPRING2.WAV)
package SPRING2 {
import flash.media.*;
public dynamic class WAV extends Sound {
}
}//package SPRING2
Section 66
//wav (superBonus.wav)
package superBonus {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package superBonus
Section 67
//allSounds (allSounds)
package {
import flash.display.*;
public dynamic class allSounds extends MovieClip {
public function allSounds(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 68
//bonus_1 (bonus_1)
package {
import flash.display.*;
public dynamic class bonus_1 extends MovieClip {
}
}//package
Section 69
//bonus_10 (bonus_10)
package {
import flash.display.*;
public dynamic class bonus_10 extends MovieClip {
public var p_1:LineEnemyMC;
public var s_1:LineEnemyMC;
public var pp_1:LineEnemyMC;
public var m_1:LineEnemyMC;
}
}//package
Section 70
//bonus_11 (bonus_11)
package {
import flash.display.*;
public dynamic class bonus_11 extends MovieClip {
public var s_1:LineEnemyMC;
public var kk_5:LineEnemyMC;
}
}//package
Section 71
//bonus_12 (bonus_12)
package {
import flash.display.*;
public dynamic class bonus_12 extends MovieClip {
public var dd_1:LineEnemyMC;
public var kk_5:LineEnemyMC;
public var kk_1:LineEnemyMC;
public var ss_3:LineEnemyMC;
}
}//package
Section 72
//bonus_13 (bonus_13)
package {
import flash.display.*;
public dynamic class bonus_13 extends MovieClip {
public var ii_1:LineEnemyMC;
public var e_1:LineEnemyMC;
public var as_5:LineEnemyMC;
public var e_3:LineEnemyMC;
}
}//package
Section 73
//bonus_14 (bonus_14)
package {
import flash.display.*;
public dynamic class bonus_14 extends MovieClip {
public var ll_1:LineEnemyMC;
}
}//package
Section 74
//bonus_15 (bonus_15)
package {
import flash.display.*;
public dynamic class bonus_15 extends MovieClip {
public var D_5:LineEnemyMC;
public var SS_1:LineEnemyMC;
public var ffddfdf_1:LineEnemyMC;
public var DK_5:LineEnemyMC;
public var K_3:LineEnemyMC;
}
}//package
Section 75
//bonus_16 (bonus_16)
package {
import flash.display.*;
public dynamic class bonus_16 extends MovieClip {
public var m_5:LineEnemyMC;
public var m_1:LineEnemyMC;
}
}//package
Section 76
//bonus_17 (bonus_17)
package {
import flash.display.*;
public dynamic class bonus_17 extends MovieClip {
public var bos_8:BosLosEnemyMC;
}
}//package
Section 77
//bonus_18 (bonus_18)
package {
import flash.display.*;
public dynamic class bonus_18 extends MovieClip {
public var l4_1:LineEnemyMC;
public var l5_1:LineEnemyMC;
public var l3_1:LineEnemyMC;
public var l2n_1:LineEnemyMC;
public var ln_1:LineEnemyMC;
}
}//package
Section 78
//bonus_19 (bonus_19)
package {
import flash.display.*;
public dynamic class bonus_19 extends MovieClip {
}
}//package
Section 79
//bonus_2 (bonus_2)
package {
import flash.display.*;
public dynamic class bonus_2 extends MovieClip {
}
}//package
Section 80
//bonus_20 (bonus_20)
package {
import flash.display.*;
public dynamic class bonus_20 extends MovieClip {
}
}//package
Section 81
//bonus_21 (bonus_21)
package {
import flash.display.*;
public dynamic class bonus_21 extends MovieClip {
}
}//package
Section 82
//bonus_22 (bonus_22)
package {
import flash.display.*;
public dynamic class bonus_22 extends MovieClip {
}
}//package
Section 83
//bonus_23 (bonus_23)
package {
import flash.display.*;
public dynamic class bonus_23 extends MovieClip {
}
}//package
Section 84
//bonus_24 (bonus_24)
package {
import flash.display.*;
public dynamic class bonus_24 extends MovieClip {
public var lb_10:LineEnemyMC;
public var lb_3:LineEnemyMC;
public var lb_6:LineEnemyMC;
public var sb_10:LineEnemyMC;
}
}//package
Section 85
//bonus_25 (bonus_25)
package {
import flash.display.*;
public dynamic class bonus_25 extends MovieClip {
public var pwd_10:LineEnemyMC;
public var dee_6:LineEnemyMC;
public var ddd_6:LineEnemyMC;
}
}//package
Section 86
//bonus_26 (bonus_26)
package {
import flash.display.*;
public dynamic class bonus_26 extends MovieClip {
public var kk_9:LineEnemyMC;
public var kk_6:LineEnemyMC;
}
}//package
Section 87
//bonus_27 (bonus_27)
package {
import flash.display.*;
public dynamic class bonus_27 extends MovieClip {
public var hh_6:LineEnemyMC;
public var qq_6:LineEnemyMC;
public var ff_6:LineEnemyMC;
}
}//package
Section 88
//bonus_28 (bonus_28)
package {
import flash.display.*;
public dynamic class bonus_28 extends MovieClip {
}
}//package
Section 89
//bonus_29 (bonus_29)
package {
import flash.display.*;
public dynamic class bonus_29 extends MovieClip {
public var dd_6:LineEnemyMC;
}
}//package
Section 90
//bonus_3 (bonus_3)
package {
import flash.display.*;
public dynamic class bonus_3 extends MovieClip {
}
}//package
Section 91
//bonus_30 (bonus_30)
package {
import flash.display.*;
public dynamic class bonus_30 extends MovieClip {
public var kr_9:LineEnemyMC;
public var kkkk_6:LineEnemyMC;
public var kk_6:LineEnemyMC;
public var dd_10:LineEnemyMC;
}
}//package
Section 92
//bonus_31 (bonus_31)
package {
import flash.display.*;
public dynamic class bonus_31 extends MovieClip {
}
}//package
Section 93
//bonus_32 (bonus_32)
package {
import flash.display.*;
public dynamic class bonus_32 extends MovieClip {
}
}//package
Section 94
//bonus_33 (bonus_33)
package {
import flash.display.*;
public dynamic class bonus_33 extends MovieClip {
}
}//package
Section 95
//bonus_34 (bonus_34)
package {
import flash.display.*;
public dynamic class bonus_34 extends MovieClip {
public var kk_6:LineEnemyMC;
public var kk2_6:LineEnemyMC;
public var kk_9:LineEnemyMC;
public var kk2_9:LineEnemyMC;
}
}//package
Section 96
//bonus_35 (bonus_35)
package {
import flash.display.*;
public dynamic class bonus_35 extends MovieClip {
public var k2_9:LineEnemyMC;
public var y2_10:LineEnemyMC;
public var k5_6:LineEnemyMC;
public var f2_10:LineEnemyMC;
public var k5_10:LineEnemyMC;
public var k3_10:LineEnemyMC;
public var k2_10:LineEnemyMC;
public var k1_10:LineEnemyMC;
}
}//package
Section 97
//bonus_36 (bonus_36)
package {
import flash.display.*;
public dynamic class bonus_36 extends MovieClip {
}
}//package
Section 98
//bonus_37 (bonus_37)
package {
import flash.display.*;
public dynamic class bonus_37 extends MovieClip {
}
}//package
Section 99
//bonus_38 (bonus_38)
package {
import flash.display.*;
public dynamic class bonus_38 extends MovieClip {
}
}//package
Section 100
//bonus_39 (bonus_39)
package {
import flash.display.*;
public dynamic class bonus_39 extends MovieClip {
}
}//package
Section 101
//bonus_4 (bonus_4)
package {
import flash.display.*;
public dynamic class bonus_4 extends MovieClip {
public var dd_1:LineEnemyMC;
}
}//package
Section 102
//bonus_40 (bonus_40)
package {
import flash.display.*;
public dynamic class bonus_40 extends MovieClip {
public var ll_4:LineEnemyMC;
public var ddd_2:LineEnemyMC;
public var dll_4:LineEnemyMC;
public var ddd_7:LineEnemyMC;
public var tl_4:LineEnemyMC;
}
}//package
Section 103
//bonus_41 (bonus_41)
package {
import flash.display.*;
public dynamic class bonus_41 extends MovieClip {
public var dwd_2:LineEnemyMC;
public var dwd_4:LineEnemyMC;
public var fdf_7:LineEnemyMC;
public var dddd_4:LineEnemyMC;
public var asd_7:LineEnemyMC;
public var dd_4:LineEnemyMC;
}
}//package
Section 104
//bonus_42 (bonus_42)
package {
import flash.display.*;
public dynamic class bonus_42 extends MovieClip {
public var ghj_7:LineEnemyMC;
}
}//package
Section 105
//bonus_43 (bonus_43)
package {
import flash.display.*;
public dynamic class bonus_43 extends MovieClip {
}
}//package
Section 106
//bonus_44 (bonus_44)
package {
import flash.display.*;
public dynamic class bonus_44 extends MovieClip {
public var sdsfd_3:LineEnemyMC;
public var rrtt_6:LineEnemyMC;
public var sdsfd_6:LineEnemyMC;
public var sdsfd_9:LineEnemyMC;
public var lffff_7:LineEnemyMC;
}
}//package
Section 107
//bonus_45 (bonus_45)
package {
import flash.display.*;
public dynamic class bonus_45 extends MovieClip {
public var ee_4:LineEnemyMC;
public var ee_2:LineEnemyMC;
public var ee_3:LineEnemyMC;
public var ff_4:LineEnemyMC;
public var ee_7:LineEnemyMC;
public var dd_4:LineEnemyMC;
public var fffff_7:LineEnemyMC;
}
}//package
Section 108
//bonus_46 (bonus_46)
package {
import flash.display.*;
public dynamic class bonus_46 extends MovieClip {
}
}//package
Section 109
//bonus_47 (bonus_47)
package {
import flash.display.*;
public dynamic class bonus_47 extends MovieClip {
public var FF_7:LineEnemyMC;
public var FF_2:LineEnemyMC;
}
}//package
Section 110
//bonus_48 (bonus_48)
package {
import flash.display.*;
public dynamic class bonus_48 extends MovieClip {
public var dds_2:LineEnemyMC;
public var dd_7:LineEnemyMC;
public var dww_10:LineEnemyMC;
}
}//package
Section 111
//bonus_49 (bonus_49)
package {
import flash.display.*;
public dynamic class bonus_49 extends MovieClip {
public var as_7:LineEnemyMC;
}
}//package
Section 112
//bonus_5 (bonus_5)
package {
import flash.display.*;
public dynamic class bonus_5 extends MovieClip {
}
}//package
Section 113
//bonus_6 (bonus_6)
package {
import flash.display.*;
public dynamic class bonus_6 extends MovieClip {
}
}//package
Section 114
//bonus_9 (bonus_9)
package {
import flash.display.*;
public dynamic class bonus_9 extends MovieClip {
}
}//package
Section 115
//BonusFinishLine (BonusFinishLine)
package {
import myEng.*;
public dynamic class BonusFinishLine extends cFinishBonus {
}
}//package
Section 116
//bonusLoop1 (bonusLoop1)
package {
import myEng.*;
public dynamic class bonusLoop1 extends myBonusLoop {
}
}//package
Section 117
//bonusLoop2 (bonusLoop2)
package {
import myEng.*;
public dynamic class bonusLoop2 extends myBonusLoop {
}
}//package
Section 118
//BonusSecret (BonusSecret)
package {
import myEng.*;
public dynamic class BonusSecret extends mySecretBonus {
}
}//package
Section 119
//BonusSecret_10_1 (BonusSecret_10_1)
package {
import myEng.*;
public dynamic class BonusSecret_10_1 extends mySecretBonus {
}
}//package
Section 120
//BonusSecret_10_2 (BonusSecret_10_2)
package {
import myEng.*;
public dynamic class BonusSecret_10_2 extends mySecretBonus {
}
}//package
Section 121
//BonusSecret_11_1 (BonusSecret_11_1)
package {
import myEng.*;
public dynamic class BonusSecret_11_1 extends mySecretBonus {
}
}//package
Section 122
//BonusSecret_13_1 (BonusSecret_13_1)
package {
import myEng.*;
public dynamic class BonusSecret_13_1 extends mySecretBonus {
}
}//package
Section 123
//BonusSecret_16_1 (BonusSecret_16_1)
package {
import myEng.*;
public dynamic class BonusSecret_16_1 extends mySecretBonus {
}
}//package
Section 124
//BonusSecret_16_2 (BonusSecret_16_2)
package {
import myEng.*;
public dynamic class BonusSecret_16_2 extends mySecretBonus {
}
}//package
Section 125
//BonusSecret_24_1 (BonusSecret_24_1)
package {
import myEng.*;
public dynamic class BonusSecret_24_1 extends mySecretBonus {
}
}//package
Section 126
//BonusSecret_24_2 (BonusSecret_24_2)
package {
import myEng.*;
public dynamic class BonusSecret_24_2 extends mySecretBonus {
}
}//package
Section 127
//BonusSecret_26_1 (BonusSecret_26_1)
package {
import myEng.*;
public dynamic class BonusSecret_26_1 extends mySecretBonus {
}
}//package
Section 128
//BonusSecret_28_1 (BonusSecret_28_1)
package {
import myEng.*;
public dynamic class BonusSecret_28_1 extends mySecretBonus {
}
}//package
Section 129
//BonusSecret_30_1 (BonusSecret_30_1)
package {
import myEng.*;
public dynamic class BonusSecret_30_1 extends mySecretBonus {
}
}//package
Section 130
//BonusSecret_32_1 (BonusSecret_32_1)
package {
import myEng.*;
public dynamic class BonusSecret_32_1 extends mySecretBonus {
}
}//package
Section 131
//BonusSecret_40_1 (BonusSecret_40_1)
package {
import myEng.*;
public dynamic class BonusSecret_40_1 extends mySecretBonus {
}
}//package
Section 132
//BonusSecret_42_1 (BonusSecret_42_1)
package {
import myEng.*;
public dynamic class BonusSecret_42_1 extends mySecretBonus {
}
}//package
Section 133
//BonusSecret_43_1 (BonusSecret_43_1)
package {
import myEng.*;
public dynamic class BonusSecret_43_1 extends mySecretBonus {
}
}//package
Section 134
//BonusSecret_43_2 (BonusSecret_43_2)
package {
import myEng.*;
public dynamic class BonusSecret_43_2 extends mySecretBonus {
}
}//package
Section 135
//BonusSecret_44_1 (BonusSecret_44_1)
package {
import myEng.*;
public dynamic class BonusSecret_44_1 extends mySecretBonus {
}
}//package
Section 136
//BonusSecret_44_2 (BonusSecret_44_2)
package {
import myEng.*;
public dynamic class BonusSecret_44_2 extends mySecretBonus {
}
}//package
Section 137
//BonusSecret_45_1 (BonusSecret_45_1)
package {
import myEng.*;
public dynamic class BonusSecret_45_1 extends mySecretBonus {
}
}//package
Section 138
//BonusSecret_47_1 (BonusSecret_47_1)
package {
import myEng.*;
public dynamic class BonusSecret_47_1 extends mySecretBonus {
}
}//package
Section 139
//BonusSecret_48_1 (BonusSecret_48_1)
package {
import myEng.*;
public dynamic class BonusSecret_48_1 extends mySecretBonus {
}
}//package
Section 140
//BosLosEnemyMC (BosLosEnemyMC)
package {
import myEng.*;
public dynamic class BosLosEnemyMC extends myBonusLos {
}
}//package
Section 141
//BosPutanaEnemyMC (BosPutanaEnemyMC)
package {
import myEng.*;
public dynamic class BosPutanaEnemyMC extends myBonusPutana {
}
}//package
Section 142
//BosRefEnemyMC (BosRefEnemyMC)
package {
import myEng.*;
public dynamic class BosRefEnemyMC extends myBonusRef {
}
}//package
Section 143
//cEndLev (cEndLev)
package {
import flash.events.*;
import flash.display.*;
import myEng.*;
import base.*;
import flash.text.*;
public class cEndLev extends MovieClip implements IData {
public function cEndLev(){
super();
Main.myCurState = this;
init();
}
public function init():void{
if (Main.curLevel == Main.maxLevel){
Main.maxLevel++;
};
var b:SimpleButton = (getChildByName("btCont") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goBack);
b = (getChildByName("btPMG") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btClic);
var t:TextField = (getChildByName("mcScore") as TextField);
t.text = String(cPanel.Score);
t = (getChildByName("mcLev") as TextField);
t.text = String((Main.curLevel + 1));
t = (getChildByName("mcEat") as TextField);
t.text = ((String(cPanel.bonus) + "/") + String(cPanel.maxCountBonus));
if (cPanel.bonus == cPanel.maxCountBonus){
cPanel.Score = (cPanel.Score + 5000);
} else {
this["mcBonEat"].visible = false;
};
t = (getChildByName("mcZver") as TextField);
t.text = ((String(cPanel.CountFreeMonster) + "/") + String(cPanel.maxCountMonster));
if (cPanel.CountFreeMonster == cPanel.maxCountMonster){
cPanel.Score = (cPanel.Score + 5000);
} else {
this["mcBonZver"].visible = false;
};
trace(Main.scoreLevel[Main.curLevel], cPanel.Score);
if (mySecretBonus.CountFindSecret == mySecretBonus.CountSecret){
cPanel.Score = (cPanel.Score + 5000);
} else {
this["mcBonSecret"].visible = false;
};
t = (getChildByName("mcSecret") as TextField);
t.text = ((String(mySecretBonus.CountFindSecret) + "/") + String(mySecretBonus.CountSecret));
Main.SecretsLevel[Main.curLevel] = mySecretBonus.CountSecret;
if (mySecretBonus.CountFindSecret > Main.SecretsFindLevel[Main.curLevel]){
Main.SecretsFindLevel[Main.curLevel] = mySecretBonus.CountFindSecret;
};
if (Main.scoreLevel[Main.curLevel] < cPanel.Score){
Main.scoreLevel[Main.curLevel] = cPanel.Score;
};
Main.reCalc();
t = (getChildByName("mcTotalScore") as TextField);
t.text = String(Main.score);
Main.saveData();
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyD);
SoundConst._playIntroMusic();
}
public function cleanup():void{
var b:SimpleButton = (getChildByName("btCont") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goBack);
b = (getChildByName("btPMG") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, Main.btClic);
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyD);
}
public function keyD(e:KeyboardEvent):void{
trace(("key " + e.keyCode));
if (e.keyCode == 32){
goCont(e);
};
}
public function goCont(e:Event):void{
SoundConst._buttonClick();
if ((((Main.curLevel == 11)) && ((Main.maxLevel == 12)))){
Main.setState(Main.STATE_WIN);
} else {
Main.curLevel = Math.min((Main.curLevel + 1), 11);
Main.setState(Main.STATE_LEVEL);
};
}
public function goBack(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_MAP);
}
}
}//package
Section 144
//cFail (cFail)
package {
import flash.events.*;
import flash.display.*;
import base.*;
public class cFail extends MovieClip implements IData {
public function cFail(){
super();
Main.myCurState = this;
init();
}
public function init():void{
trace("init cf");
var b:SimpleButton = (getChildByName("btMap") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goMap);
b = (getChildByName("btPMG") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btClic);
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyD);
SoundConst._playIntroMusic();
}
public function goMap(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_MAP);
}
public function keyD(e:KeyboardEvent):void{
if (e.keyCode == 32){
goTrAr(e);
};
}
public function goTrAr(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_LEVEL);
}
public function update():void{
}
public function cleanup():void{
var b:SimpleButton = (getChildByName("btMap") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goMap);
b = (getChildByName("btPMG") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, Main.btClic);
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyD);
}
}
}//package
Section 145
//cHTP (cHTP)
package {
import flash.events.*;
import flash.display.*;
import base.*;
public class cHTP extends MovieClip implements IData {
public function cHTP(){
super();
Main.myCurState = this;
init();
}
public function init():void{
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goBack);
SoundConst._playIntroMusic();
}
public function cleanup():void{
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goBack);
}
public function update():void{
}
public function goBack(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_Start);
}
}
}//package
Section 146
//Cloud_effect01 (Cloud_effect01)
package {
import flash.display.*;
public dynamic class Cloud_effect01 extends MovieClip {
public function Cloud_effect01(){
addFrameScript(5, this.frame6);
}
function frame6(){
stop();
}
}
}//package
Section 147
//cMap (cMap)
package {
import flash.events.*;
import flash.display.*;
import base.*;
import flash.text.*;
public class cMap extends MovieClip implements IData {
public var Path:MovieClip;
public var target:int;
public function cMap(){
super();
Main.myCurState = this;
init();
}
public function cleanup():void{
var m:MovieClip;
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goBack);
b = (getChildByName("btStart") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goLevel);
b = (getChildByName("btPMG") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, Main.btClic);
var i:int;
while (i < 12) {
m = (this[("m_" + String(i))] as MovieClip);
b = (m.getChildByName("btHit") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goMarkClick);
b.useHandCursor = true;
i++;
};
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyD);
m = null;
b = null;
}
public function redrawMap():void{
var m:MovieClip;
var b:SimpleButton;
var mm:MovieClip;
var t:int;
var i:int;
while (i < 12) {
m = (this[("m_" + String(i))] as MovieClip);
b = (m.getChildByName("btHit") as SimpleButton);
t = 1;
mm = (this[("s" + String((i + 1)))] as MovieClip);
mm.visible = false;
if (i < Main.maxLevel){
t = 3;
mm.visible = true;
mm["letxt"].text = ("Level " + String((i + 1)));
mm["sctxt"].text = ("Score " + String(Main.scoreLevel[i]));
mm["setxt"].text = ((("Secrets " + String(Main.SecretsFindLevel[i])) + "/") + String(Main.SecretsLevel[i]));
};
if (Main.maxLevel == i){
t = 2;
};
if (Main.curLevel == i){
t = 4;
};
if (t == 1){
b.useHandCursor = false;
} else {
b.useHandCursor = true;
};
m.gotoAndStop(t);
i++;
};
target = Path.currentLabels[Main.curLevel].frame;
this.addEventListener(Event.ENTER_FRAME, oEF);
}
public function goBack(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_Start);
}
public function init():void{
var m:MovieClip;
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goBack);
b = (getChildByName("btStart") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goLevel);
b = (getChildByName("btPMG") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btClic);
Main.reCalc();
var t:TextField = (this["mcScore"] as TextField);
t.text = String(Main.score);
Path = (this["mcPath"] as MovieClip);
Path.gotoAndStop(Path.currentLabels[Main.curLevel].frame);
var i:int;
while (i < 12) {
m = (this[("m_" + String(i))] as MovieClip);
b = (m.getChildByName("btHit") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goMarkClick);
b.useHandCursor = true;
i++;
};
if (Main.maxLevel < 12){
Main.curLevel = Main.maxLevel;
};
redrawMap();
SoundConst._playIntroMusic();
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyD);
}
public function keyD(e:KeyboardEvent):void{
if (e.keyCode == 32){
goLevel(e);
};
}
public function goMarkClick(e:Event):void{
var s:String = e.target.parent.name;
var a:Array = s.split("_");
var t:int = Math.min(int(a[1]), Main.maxLevel);
Main.curLevel = t;
redrawMap();
SoundConst._buttonClick();
}
public function goLevel(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_LEVEL);
}
public function oEF(e:Event):void{
var mcKat:MovieClip;
var tx:Number;
if (Path.currentFrame != target){
mcKat = (Path["mcKat"] as MovieClip);
tx = mcKat.x;
if (Path.currentFrame < target){
Path.gotoAndStop((Path.currentFrame + 1));
} else {
Path.gotoAndStop((Path.currentFrame - 1));
};
if (mcKat["mc"].currentFrame < mcKat["mc"].totalFrames){
mcKat["mc"].gotoAndPlay((mcKat["mc"].currentFrame + 1));
} else {
mcKat["mc"].gotoAndPlay(1);
};
if (mcKat.x > tx){
mcKat["mc"].scaleX = 1;
} else {
mcKat["mc"].scaleX = -1;
};
} else {
this.removeEventListener(Event.ENTER_FRAME, oEF);
};
}
}
}//package
Section 148
//cStartMenu (cStartMenu)
package {
import flash.events.*;
import flash.display.*;
import base.*;
public class cStartMenu extends MovieClip implements IData {
public var mcWind:MovieClip;
public function cStartMenu(){
super();
Main.myCurState = this;
init();
}
public function init():void{
mcWind = (this["mcYN"] as MovieClip);
var b:SimpleButton = (getChildByName("btStart") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goStart);
b.visible = Main.chekOldSave();
b = (getChildByName("btNewGame") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goNewGame);
b = (getChildByName("btHTP") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goHTP);
b = (getChildByName("btPMG") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btClic);
b = (getChildByName("btIriy") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btIriySoftClic);
var m:MovieClip = (mcWind["wind"] as MovieClip);
b = (m.getChildByName("btYes") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goYes);
b = (m.getChildByName("btNo") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goNo);
SoundConst._playIntroMusic();
}
public function goNewGame(e:Event):void{
SoundConst._buttonClick();
if (Main.chekOldSave()){
mcWind.gotoAndPlay(2);
} else {
goYes(e);
};
}
public function cleanup():void{
var b:SimpleButton = (getChildByName("btStart") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goStart);
b = (getChildByName("btNewGame") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goNewGame);
b = (getChildByName("btHTP") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goHTP);
b = (getChildByName("btPMG") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, Main.btClic);
var m:MovieClip = (mcWind["wind"] as MovieClip);
b = (m.getChildByName("btYes") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goYes);
b = (m.getChildByName("btNo") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goNo);
b = null;
m = null;
mcWind = null;
}
public function goNo(e:Event):void{
SoundConst._buttonClick();
mcWind.gotoAndStop(1);
}
public function goStart(e:Event):void{
SoundConst._buttonClick();
Main.loadData();
Main.setState(Main.STATE_MAP);
}
public function goHTP(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_HTP);
}
public function goYes(e:Event):void{
SoundConst._buttonClick();
Main.reset();
Main.saveData();
Main.setState(Main.STATE_MAP);
}
}
}//package
Section 149
//cWin (cWin)
package {
import flash.events.*;
import flash.display.*;
import base.*;
import flash.text.*;
public class cWin extends MovieClip implements IData {
public function cWin(){
super();
Main.myCurState = this;
init();
}
public function init():void{
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, Main.btClic);
b = (getChildByName("btNew") as SimpleButton);
b.addEventListener(MouseEvent.CLICK, goMenu);
Main.reCalc();
var t:TextField = (getChildByName("mcScore") as TextField);
t.text = String(Main.score);
var fs:int;
var alls:int;
var i:int;
while (i < 12) {
fs = (fs + Main.SecretsFindLevel[i]);
alls = (alls + Main.SecretsLevel[i]);
i++;
};
t = (getChildByName("mcSecret") as TextField);
t.text = ((String(fs) + "/") + String(alls));
Main.curLevel = 0;
}
public function cleanup():void{
var b:SimpleButton = (getChildByName("btBack") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, Main.btClic);
b = (getChildByName("btNew") as SimpleButton);
b.removeEventListener(MouseEvent.CLICK, goMenu);
}
public function goMenu(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_Start);
}
public function update():void{
}
public function goBack(e:Event):void{
SoundConst._buttonClick();
Main.setState(Main.STATE_MAP);
}
}
}//package
Section 150
//DoorBonus (DoorBonus)
package {
import myEng.*;
public dynamic class DoorBonus extends myBonusDoor {
public function DoorBonus(){
addFrameScript(0, this.frame1, 3, this.frame4);
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 151
//eatBonus (eatBonus)
package {
import myEng.*;
public dynamic class eatBonus extends myBonusEat {
public function eatBonus(){
addFrameScript(0, this.frame1, 17, this.frame18);
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 152
//gameMc (gameMc)
package {
import flash.display.*;
public dynamic class gameMc extends MovieClip {
public var mcSC:MovieClip;
public var btH:shirmaBoxBut;
public var btPlayHub:SimpleButton;
public function gameMc(){
addFrameScript(250, this.frame251);
}
function frame251(){
stop();
}
}
}//package
Section 153
//hit_1 (hit_1)
package {
import flash.display.*;
public dynamic class hit_1 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 154
//hit_10 (hit_10)
package {
import flash.display.*;
public dynamic class hit_10 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 155
//hit_11 (hit_11)
package {
import flash.display.*;
public dynamic class hit_11 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 156
//hit_12 (hit_12)
package {
import flash.display.*;
public dynamic class hit_12 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 157
//hit_13 (hit_13)
package {
import flash.display.*;
public dynamic class hit_13 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 158
//hit_14 (hit_14)
package {
import flash.display.*;
public dynamic class hit_14 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 159
//hit_15 (hit_15)
package {
import flash.display.*;
public dynamic class hit_15 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 160
//hit_16 (hit_16)
package {
import flash.display.*;
public dynamic class hit_16 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 161
//hit_17 (hit_17)
package {
import flash.display.*;
public dynamic class hit_17 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 162
//hit_18 (hit_18)
package {
import flash.display.*;
public dynamic class hit_18 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 163
//hit_19 (hit_19)
package {
import flash.display.*;
public dynamic class hit_19 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 164
//hit_2 (hit_2)
package {
import flash.display.*;
public dynamic class hit_2 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 165
//hit_20 (hit_20)
package {
import flash.display.*;
public dynamic class hit_20 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 166
//hit_21 (hit_21)
package {
import flash.display.*;
public dynamic class hit_21 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 167
//hit_22 (hit_22)
package {
import flash.display.*;
public dynamic class hit_22 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 168
//hit_23 (hit_23)
package {
import flash.display.*;
public dynamic class hit_23 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 169
//hit_24 (hit_24)
package {
import flash.display.*;
public dynamic class hit_24 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 170
//hit_25 (hit_25)
package {
import flash.display.*;
public dynamic class hit_25 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 171
//hit_26 (hit_26)
package {
import flash.display.*;
public dynamic class hit_26 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 172
//hit_27 (hit_27)
package {
import flash.display.*;
public dynamic class hit_27 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 173
//hit_28 (hit_28)
package {
import flash.display.*;
public dynamic class hit_28 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 174
//hit_29 (hit_29)
package {
import flash.display.*;
public dynamic class hit_29 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 175
//hit_3 (hit_3)
package {
import flash.display.*;
public dynamic class hit_3 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 176
//hit_30 (hit_30)
package {
import flash.display.*;
public dynamic class hit_30 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 177
//hit_31 (hit_31)
package {
import flash.display.*;
public dynamic class hit_31 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 178
//hit_32 (hit_32)
package {
import flash.display.*;
public dynamic class hit_32 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 179
//hit_33 (hit_33)
package {
import flash.display.*;
public dynamic class hit_33 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 180
//hit_34 (hit_34)
package {
import flash.display.*;
public dynamic class hit_34 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 181
//hit_35 (hit_35)
package {
import flash.display.*;
public dynamic class hit_35 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 182
//hit_36 (hit_36)
package {
import flash.display.*;
public dynamic class hit_36 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 183
//hit_37 (hit_37)
package {
import flash.display.*;
public dynamic class hit_37 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 184
//hit_38 (hit_38)
package {
import flash.display.*;
public dynamic class hit_38 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 185
//hit_39 (hit_39)
package {
import flash.display.*;
public dynamic class hit_39 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 186
//hit_4 (hit_4)
package {
import flash.display.*;
public dynamic class hit_4 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 187
//hit_40 (hit_40)
package {
import flash.display.*;
public dynamic class hit_40 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 188
//hit_41 (hit_41)
package {
import flash.display.*;
public dynamic class hit_41 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 189
//hit_42 (hit_42)
package {
import flash.display.*;
public dynamic class hit_42 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 190
//hit_43 (hit_43)
package {
import flash.display.*;
public dynamic class hit_43 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 191
//hit_44 (hit_44)
package {
import flash.display.*;
public dynamic class hit_44 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 192
//hit_45 (hit_45)
package {
import flash.display.*;
public dynamic class hit_45 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 193
//hit_46 (hit_46)
package {
import flash.display.*;
public dynamic class hit_46 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 194
//hit_47 (hit_47)
package {
import flash.display.*;
public dynamic class hit_47 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 195
//hit_48 (hit_48)
package {
import flash.display.*;
public dynamic class hit_48 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 196
//hit_49 (hit_49)
package {
import flash.display.*;
public dynamic class hit_49 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 197
//hit_5 (hit_5)
package {
import flash.display.*;
public dynamic class hit_5 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 198
//hit_6 (hit_6)
package {
import flash.display.*;
public dynamic class hit_6 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 199
//hit_9 (hit_9)
package {
import flash.display.*;
public dynamic class hit_9 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 200
//HitLoop1 (HitLoop1)
package {
import flash.display.*;
public dynamic class HitLoop1 extends MovieClip {
public function HitLoop1(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 201
//HitLoop2 (HitLoop2)
package {
import flash.display.*;
public dynamic class HitLoop2 extends MovieClip {
public function HitLoop2(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 202
//hitZonaDoor (hitZonaDoor)
package {
import flash.display.*;
public dynamic class hitZonaDoor extends MovieClip {
}
}//package
Section 203
//IceBolt (IceBolt)
package {
import flash.display.*;
public dynamic class IceBolt extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 204
//KeyConst (KeyConst)
package {
import base.*;
public class KeyConst {
public static const KEY_A:int = 65;
public static const KEY_D:int = 68;
public static const KEY_S:int = 83;
public static const KEY_W:int = 87;
public static var KEY_LEFT:int = 37;
public static var keyManager:KeyManager;
public static var KEY_UP:int = 38;
public static var KEY_DOWN:int = 40;
public static var KEY_Trik1:int = 49;
public static var KEY_Trik2:int = 50;
public static var KEY_Trik3:int = 51;
public static var KEY_JUMP:int = 32;
public static var KEY_NITRO:int = 90;
public static var KEY_RIGHT:int = 39;
public function KeyConst(){
super();
}
}
}//package
Section 205
//LevelPanel (LevelPanel)
package {
import myEng.*;
public dynamic class LevelPanel extends cPanel {
public function LevelPanel(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 206
//LifeBonus (LifeBonus)
package {
import myEng.*;
public dynamic class LifeBonus extends cLiveBonus {
public function LifeBonus(){
addFrameScript(0, this.frame1, 17, this.frame18);
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 207
//lineEnemyAnim_1 (lineEnemyAnim_1)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_1 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_1(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 208
//lineEnemyAnim_10 (lineEnemyAnim_10)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_10 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_10(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 209
//lineEnemyAnim_11 (lineEnemyAnim_11)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_11 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_11(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 210
//lineEnemyAnim_12 (lineEnemyAnim_12)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_12 extends MovieClip {
public var myPersMC:MovieClip;
public var mcHit:MovieClip;
}
}//package
Section 211
//lineEnemyAnim_2 (lineEnemyAnim_2)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_2 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_2(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 212
//lineEnemyAnim_3 (lineEnemyAnim_3)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_3 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_3(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 213
//lineEnemyAnim_4 (lineEnemyAnim_4)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_4 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_4(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 214
//lineEnemyAnim_5 (lineEnemyAnim_5)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_5 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_5(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 215
//lineEnemyAnim_6 (lineEnemyAnim_6)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_6 extends MovieClip {
public var mcHit:MovieClip;
public function lineEnemyAnim_6(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 216
//lineEnemyAnim_7 (lineEnemyAnim_7)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_7 extends MovieClip {
public var hit1:MovieClip;
public var mcHit:MovieClip;
public var hit2:MovieClip;
public function lineEnemyAnim_7(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 217
//lineEnemyAnim_8 (lineEnemyAnim_8)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_8 extends MovieClip {
public var hit3:MovieClip;
public var monstr:MovieClip;
public var hit1:MovieClip;
public var hit2:MovieClip;
public function lineEnemyAnim_8(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 218
//lineEnemyAnim_9 (lineEnemyAnim_9)
package {
import flash.display.*;
public dynamic class lineEnemyAnim_9 extends MovieClip {
public var monstr:MovieClip;
public var mcHit:MovieClip;
public function lineEnemyAnim_9(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 219
//LineEnemyMC (LineEnemyMC)
package {
import myEng.*;
public dynamic class LineEnemyMC extends myLineEnemy {
}
}//package
Section 220
//liveBar (liveBar)
package {
import myEng.*;
public dynamic class liveBar extends cBar {
public function liveBar(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 221
//liveBoss (liveBoss)
package {
import myEng.*;
public dynamic class liveBoss extends cBar {
public function liveBoss(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 222
//liveBoss2 (liveBoss2)
package {
import myEng.*;
public dynamic class liveBoss2 extends cBar {
public function liveBoss2(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 223
//liveBoss3 (liveBoss3)
package {
import myEng.*;
public dynamic class liveBoss3 extends cBar {
public function liveBoss3(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 224
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Main extends Sprite {
public static var maxLevel:int = 0;
public static var myroot:MovieClip;
public static var score:int = 0;
public static var SCREEN_WIDTH:int = 800;
public static var AllSound:SoundConst;
public static var scoreLevel:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
public static var STATE_LEVEL:int = 3;
public static var SecretsLevel:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
protected static var nameGame:String = "ToffyCat";
public static var STATE_RESULT:int = 5;
public static var mcSC_:MovieClip;
public static var curLevel:int = 0;
public static var STATE_Fail:int = 6;
protected static var labelArr:Array;
public static var SCREEN_HEIGHT:int = 600;
public static var SecretsFindLevel:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
public static var STATE_MAP:int = 1;
public static var STATE_Start:int = 0;
public static var STATE_WIN:int = 4;
public static var STATE_HTP:int = 2;
public static var myCurState:Object;
public function Main():void{
super();
if (stage){
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
};
}
protected function init(e:Event=null):void{
Main.AllSound = new SoundConst();
this.focusRect = new MovieClip();
this.tabEnabled = false;
this.tabChildren = false;
removeEventListener(Event.ADDED_TO_STAGE, init);
labelArr = ["lbStartMenu", "lbMap", "lbHTP", "lbLevel", "lbWin", "lbEndLev", "lbFail"];
myroot = new gameMc();
stage.addChild(myroot);
myroot.focusRect = new MovieClip();
myroot.tabEnabled = false;
myroot.tabChildren = false;
var s:SimpleButton = (myroot["btPlayHub"] as SimpleButton);
s.addEventListener(MouseEvent.CLICK, btClic);
s = (myroot.getChildByName("btH") as SimpleButton);
s.addEventListener(MouseEvent.CLICK, btClic);
mcSC_ = (myroot.getChildByName("mcSC") as MovieClip);
mcSC_.tabEnabled = false;
mcSC_.tabChildren = false;
mcSC_.gotoAndStop(2);
s = (mcSC_.getChildByName("bt") as SimpleButton);
s.addEventListener(MouseEvent.MOUSE_UP, onSoundOnOff);
this.stage.focus = this;
MochiBot.track(this, "fb2f3832");
}
public function onSoundOnOff(e:Event):void{
trace(SoundConst._isSoundOn());
if (SoundConst._isSoundOn()){
mcSC_.gotoAndStop(1);
SoundConst._soundOff();
} else {
mcSC_.gotoAndStop(2);
SoundConst._soundOn();
};
}
public static function setFocus():void{
myroot.stage.focus = myroot;
}
public static function reCalc():void{
score = 0;
var i:int;
while (i < 12) {
score = (score + scoreLevel[i]);
i++;
};
}
public static function loadData():void{
var d:SharedObject = SharedObject.getLocal(nameGame);
maxLevel = d.data["maxLev"];
if (d.data["CURLev"] != null){
curLevel = d.data["CURLev"];
} else {
curLevel = maxLevel;
};
score = d.data["score"];
var i:int;
while (i < 12) {
if (d.data[("LS" + String(i))] != undefined){
scoreLevel[i] = d.data[("LS" + String(i))];
} else {
scoreLevel[i] = 0;
};
if (d.data[("LF" + String(i))] != undefined){
SecretsFindLevel[i] = d.data[("LF" + String(i))];
} else {
SecretsFindLevel[i] = 0;
};
if (d.data[("LC" + String(i))] != undefined){
SecretsLevel[i] = d.data[("LC" + String(i))];
} else {
SecretsLevel[i] = 0;
};
i++;
};
}
public static function btClic(e:Event):void{
var req:URLRequest = new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=toffy-cat&utm_source=ingame&utm_content=ingame");
navigateToURL(req, "_blank");
}
public static function btIriySoftClic(e:Event):void{
var req:URLRequest = new URLRequest("http://Iriysoft.ru/");
navigateToURL(req, "_blank");
}
public static function saveData():void{
var d:SharedObject = SharedObject.getLocal(nameGame);
d.data["maxLev"] = maxLevel;
d.data["CURLev"] = curLevel;
d.data["score"] = score;
var i:int;
while (i < 12) {
d.data[("LS" + String(i))] = scoreLevel[i];
d.data[("LF" + String(i))] = SecretsFindLevel[i];
d.data[("LC" + String(i))] = SecretsLevel[i];
i++;
};
d.flush();
}
public static function reset():void{
trace("reset");
score = 0;
maxLevel = 0;
curLevel = 0;
scoreLevel = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
public static function setState(_newState:int):void{
if (_newState == STATE_LEVEL){
mcSC_.visible = false;
} else {
mcSC_.visible = true;
};
if (myCurState != null){
myCurState.cleanup();
};
myroot.gotoAndStop(labelArr[_newState]);
}
public static function chekOldSave():Boolean{
var d:SharedObject = SharedObject.getLocal(nameGame);
if (d.data["maxLev"] != null){
return (true);
};
return (false);
}
}
}//package
Section 225
//mcWinScr (mcWinScr)
package {
public dynamic class mcWinScr extends cWin {
}
}//package
Section 226
//midl1 (midl1)
package {
import flash.display.*;
public dynamic class midl1 extends MovieClip {
}
}//package
Section 227
//midl2 (midl2)
package {
import flash.display.*;
public dynamic class midl2 extends MovieClip {
}
}//package
Section 228
//midl3 (midl3)
package {
import flash.display.*;
public dynamic class midl3 extends MovieClip {
}
}//package
Section 229
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public function MochiBot(){
super();
}
public static function track(parent:Sprite, tag:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var self:MochiBot = new (MochiBot);
parent.addChild(self);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var server:String = "http://core.mochibot.com/my/core.swf";
var lv:URLVariables = new URLVariables();
lv["sb"] = Security.sandboxType;
lv["v"] = Capabilities.version;
lv["swfid"] = tag;
lv["mv"] = "8";
lv["fv"] = "9";
var url:String = self.root.loaderInfo.loaderURL;
if (url.indexOf("http") == 0){
lv["url"] = url;
} else {
lv["url"] = "local";
};
var req:URLRequest = new URLRequest(server);
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
var loader:Loader = new Loader();
self.addChild(loader);
loader.load(req);
return (self);
}
}
}//package
Section 230
//myBonusLava (myBonusLava)
package {
import myEng.*;
public dynamic class myBonusLava extends myBonusLava {
}
}//package
Section 231
//myPersMC (myPersMC)
package {
import flash.display.*;
public dynamic class myPersMC extends MovieClip {
public var rim:MovieClip;
public var mcHit:MovieClip;
public var toHitMC:MovieClip;
}
}//package
Section 232
//partNum (partNum)
package {
import flash.display.*;
import flash.text.*;
public dynamic class partNum extends MovieClip {
public var txt:TextField;
}
}//package
Section 233
//PausaScr (PausaScr)
package {
import flash.display.*;
public dynamic class PausaScr extends MovieClip {
public var btHit:SimpleButton;
}
}//package
Section 234
//pic_1 (pic_1)
package {
import flash.display.*;
public dynamic class pic_1 extends MovieClip {
}
}//package
Section 235
//pic_10 (pic_10)
package {
import flash.display.*;
public dynamic class pic_10 extends MovieClip {
}
}//package
Section 236
//pic_11 (pic_11)
package {
import flash.display.*;
public dynamic class pic_11 extends MovieClip {
}
}//package
Section 237
//pic_12 (pic_12)
package {
import flash.display.*;
public dynamic class pic_12 extends MovieClip {
}
}//package
Section 238
//pic_13 (pic_13)
package {
import flash.display.*;
public dynamic class pic_13 extends MovieClip {
}
}//package
Section 239
//pic_14 (pic_14)
package {
import flash.display.*;
public dynamic class pic_14 extends MovieClip {
}
}//package
Section 240
//pic_15 (pic_15)
package {
import flash.display.*;
public dynamic class pic_15 extends MovieClip {
}
}//package
Section 241
//pic_16 (pic_16)
package {
import flash.display.*;
public dynamic class pic_16 extends MovieClip {
}
}//package
Section 242
//pic_17 (pic_17)
package {
import flash.display.*;
public dynamic class pic_17 extends MovieClip {
}
}//package
Section 243
//pic_18 (pic_18)
package {
import flash.display.*;
public dynamic class pic_18 extends MovieClip {
}
}//package
Section 244
//pic_19 (pic_19)
package {
import flash.display.*;
public dynamic class pic_19 extends MovieClip {
}
}//package
Section 245
//pic_2 (pic_2)
package {
import flash.display.*;
public dynamic class pic_2 extends MovieClip {
}
}//package
Section 246
//pic_20 (pic_20)
package {
import flash.display.*;
public dynamic class pic_20 extends MovieClip {
public var endPoint:MovieClip;
}
}//package
Section 247
//pic_21 (pic_21)
package {
import flash.display.*;
public dynamic class pic_21 extends MovieClip {
}
}//package
Section 248
//pic_22 (pic_22)
package {
import flash.display.*;
public dynamic class pic_22 extends MovieClip {
}
}//package
Section 249
//pic_23 (pic_23)
package {
import flash.display.*;
public dynamic class pic_23 extends MovieClip {
}
}//package
Section 250
//pic_24 (pic_24)
package {
import flash.display.*;
public dynamic class pic_24 extends MovieClip {
}
}//package
Section 251
//pic_25 (pic_25)
package {
import flash.display.*;
public dynamic class pic_25 extends MovieClip {
}
}//package
Section 252
//pic_26 (pic_26)
package {
import flash.display.*;
public dynamic class pic_26 extends MovieClip {
}
}//package
Section 253
//pic_27 (pic_27)
package {
import flash.display.*;
public dynamic class pic_27 extends MovieClip {
}
}//package
Section 254
//pic_28 (pic_28)
package {
import flash.display.*;
public dynamic class pic_28 extends MovieClip {
}
}//package
Section 255
//pic_29 (pic_29)
package {
import flash.display.*;
public dynamic class pic_29 extends MovieClip {
}
}//package
Section 256
//pic_3 (pic_3)
package {
import flash.display.*;
public dynamic class pic_3 extends MovieClip {
}
}//package
Section 257
//pic_30 (pic_30)
package {
import flash.display.*;
public dynamic class pic_30 extends MovieClip {
}
}//package
Section 258
//pic_31 (pic_31)
package {
import flash.display.*;
public dynamic class pic_31 extends MovieClip {
}
}//package
Section 259
//pic_32 (pic_32)
package {
import flash.display.*;
public dynamic class pic_32 extends MovieClip {
}
}//package
Section 260
//pic_33 (pic_33)
package {
import flash.display.*;
public dynamic class pic_33 extends MovieClip {
}
}//package
Section 261
//pic_34 (pic_34)
package {
import flash.display.*;
public dynamic class pic_34 extends MovieClip {
}
}//package
Section 262
//pic_35 (pic_35)
package {
import flash.display.*;
public dynamic class pic_35 extends MovieClip {
}
}//package
Section 263
//pic_36 (pic_36)
package {
import flash.display.*;
public dynamic class pic_36 extends MovieClip {
}
}//package
Section 264
//pic_37 (pic_37)
package {
import flash.display.*;
public dynamic class pic_37 extends MovieClip {
}
}//package
Section 265
//pic_38 (pic_38)
package {
import flash.display.*;
public dynamic class pic_38 extends MovieClip {
}
}//package
Section 266
//pic_39 (pic_39)
package {
import flash.display.*;
public dynamic class pic_39 extends MovieClip {
}
}//package
Section 267
//pic_4 (pic_4)
package {
import flash.display.*;
public dynamic class pic_4 extends MovieClip {
}
}//package
Section 268
//pic_40 (pic_40)
package {
import flash.display.*;
public dynamic class pic_40 extends MovieClip {
}
}//package
Section 269
//pic_41 (pic_41)
package {
import flash.display.*;
public dynamic class pic_41 extends MovieClip {
}
}//package
Section 270
//pic_42 (pic_42)
package {
import flash.display.*;
public dynamic class pic_42 extends MovieClip {
}
}//package
Section 271
//pic_43 (pic_43)
package {
import flash.display.*;
public dynamic class pic_43 extends MovieClip {
}
}//package
Section 272
//pic_44 (pic_44)
package {
import flash.display.*;
public dynamic class pic_44 extends MovieClip {
}
}//package
Section 273
//pic_45 (pic_45)
package {
import flash.display.*;
public dynamic class pic_45 extends MovieClip {
}
}//package
Section 274
//pic_46 (pic_46)
package {
import flash.display.*;
public dynamic class pic_46 extends MovieClip {
}
}//package
Section 275
//pic_47 (pic_47)
package {
import flash.display.*;
public dynamic class pic_47 extends MovieClip {
}
}//package
Section 276
//pic_48 (pic_48)
package {
import flash.display.*;
public dynamic class pic_48 extends MovieClip {
}
}//package
Section 277
//pic_49 (pic_49)
package {
import flash.display.*;
public dynamic class pic_49 extends MovieClip {
}
}//package
Section 278
//pic_5 (pic_5)
package {
import flash.display.*;
public dynamic class pic_5 extends MovieClip {
}
}//package
Section 279
//pic_6 (pic_6)
package {
import flash.display.*;
public dynamic class pic_6 extends MovieClip {
}
}//package
Section 280
//pic_9 (pic_9)
package {
import flash.display.*;
public dynamic class pic_9 extends MovieClip {
}
}//package
Section 281
//pr_mc (pr_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class pr_mc extends MovieClip {
public var t:TextField;
public var mc:MovieClip;
public var btPlayHub:SimpleButton;
}
}//package
Section 282
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
public class Preloader extends MovieClip {
public var mc:MovieClip;
public var tim:int;
public function Preloader(){
super();
addEventListener(Event.ENTER_FRAME, checkFrame);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress);
mc = new pr_mc();
addChild(mc);
tim = 0;
var s:SimpleButton = (mc["btPlayHub"] as SimpleButton);
s.addEventListener(MouseEvent.CLICK, btClic);
}
public function btClic(e:Event):void{
var req:URLRequest = new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=toffy-cat&utm_source=ingame&utm_content=ingame");
navigateToURL(req, "_blank");
}
private function checkFrame(e:Event):void{
tim++;
var t:int = int(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100));
t = Math.min(t, tim);
mc["t"].text = (String(t) + " %");
mc["mc"].gotoAndStop(t);
if ((((currentFrame == totalFrames)) && ((t >= 100)))){
removeEventListener(Event.ENTER_FRAME, checkFrame);
startup();
};
}
private function progress(e:ProgressEvent):void{
}
private function startup():void{
stop();
var s:SimpleButton = (mc["btPlayHub"] as SimpleButton);
s.removeEventListener(MouseEvent.CLICK, btClic);
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress);
var mainClass:Class = (getDefinitionByName("Main") as Class);
addChild((new (mainClass) as DisplayObject));
removeChild(mc);
mc = null;
}
}
}//package
Section 283
//scrEndLev (scrEndLev)
package {
public dynamic class scrEndLev extends cEndLev {
}
}//package
Section 284
//scrFail (scrFail)
package {
public dynamic class scrFail extends cFail {
public function scrFail(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package
Section 285
//scrHTP (scrHTP)
package {
public dynamic class scrHTP extends cHTP {
}
}//package
Section 286
//scrMap (scrMap)
package {
public dynamic class scrMap extends cMap {
}
}//package
Section 287
//scrRace (scrRace)
package {
import myEng.*;
public dynamic class scrRace extends cRace {
}
}//package
Section 288
//scrStartMenu (scrStartMenu)
package {
public dynamic class scrStartMenu extends cStartMenu {
public function scrStartMenu(){
addFrameScript(24, this.frame25);
}
function frame25(){
stop();
}
}
}//package
Section 289
//shirmaBoxBut (shirmaBoxBut)
package {
import base.*;
public dynamic class shirmaBoxBut extends cNoHandButton {
}
}//package
Section 290
//smokeMC (smokeMC)
package {
import flash.display.*;
public dynamic class smokeMC extends MovieClip {
}
}//package
Section 291
//SoundConst (SoundConst)
package {
import flash.display.*;
import flash.media.*;
import sound.*;
public class SoundConst {
public var m_engineLoop:SoundChannel;
public static const BUTTON_N:String = "btn_over.wav";
public static const OPEN_DOOR:String = "OPEN_DOOR.WAV";
public static const REF_FIRE:String = "ref_fire.wav";
public static const LEVEL_LOSE:String = "lev_lose.wav";
public static const HIT_2CAT:String = "cat_hit.wav";
public static const REF_STASIS:String = "ref_shild.wav";
public static const BUTTON_CLICK:String = "btn_click.wav";
public static const OS_ATTACK:String = "os_Attak.wav";
public static const LEVEL_START:String = "lev_start.wav";
public static const EAT_SOUND:String = "bonus.wav";
public static const JUMP:String = "SPRING2.WAV";
public static const END_JUMP:String = "jump_End.wav";
public static const BONUS_HIT:String = "superBonus.wav";
public static const LOS_ATTACK:String = "los_attak.wav";
public static const BONUS_LIFE:String = "life.wav";
public static const REF_HIT:String = "ref_hit.wav";
public static const HIT_2ENEMY:String = "hit_eny.wav";
public static const OS_MOVE:String = "os_move.wav";
public static const LEVEL_WIN:String = "bonus.wav";
public static const BONUS_SECRET:String = "Secret.wav";
public static const MUSIC_1:String = "intro.wav";
public static const MUSIC_2:String = "inGame.wav";
protected static var curBGSound:String = "intro.wav";
public static var soundManager:SoundManager;
public static var MUSIC_VOLUME:Number = 0.1;
public static var SOUND_VOLUME:Number = 1;
public static var _instance:SoundConst;
public function SoundConst(){
super();
_instance = this;
init();
}
public static function _playIntroMusic():void{
if (soundManager == null){
init();
};
soundManager.playBackSound(MUSIC_1);
curBGSound = MUSIC_1;
}
public static function _soundOn():void{
soundManager.soundOn = true;
}
public static function _playInGameMusic():void{
soundManager.playBackSound(MUSIC_2);
curBGSound = MUSIC_2;
}
public static function init():void{
var m:MovieClip = new allSounds();
soundManager = new SoundManager();
soundManager.addSound(MUSIC_1);
soundManager.addSound(MUSIC_2);
soundManager.addSound(BUTTON_CLICK);
soundManager.addSound(BUTTON_N);
soundManager.addSound(LEVEL_WIN);
soundManager.addSound(LEVEL_LOSE);
soundManager.addSound(LEVEL_START);
soundManager.addSound(OPEN_DOOR);
soundManager.addSound(REF_HIT);
soundManager.addSound(REF_FIRE);
soundManager.addSound(REF_STASIS);
soundManager.addSound(OS_ATTACK);
soundManager.addSound(OS_MOVE);
soundManager.addSound(LOS_ATTACK);
soundManager.addSound(EAT_SOUND);
soundManager.addSound(BONUS_HIT);
soundManager.addSound(BONUS_LIFE);
soundManager.addSound(BONUS_SECRET);
soundManager.addSound(JUMP);
soundManager.addSound(END_JUMP);
soundManager.addSound(HIT_2ENEMY);
soundManager.addSound(HIT_2CAT);
soundManager.setVolume(MUSIC_1, MUSIC_VOLUME);
soundManager.setVolume(MUSIC_2, MUSIC_VOLUME);
soundManager.setVolume(BUTTON_CLICK, SOUND_VOLUME);
soundManager.setVolume(BUTTON_N, SOUND_VOLUME);
soundManager.setVolume(LEVEL_WIN, SOUND_VOLUME);
soundManager.setVolume(LEVEL_LOSE, SOUND_VOLUME);
soundManager.setVolume(LEVEL_START, SOUND_VOLUME);
soundManager.setVolume(OPEN_DOOR, SOUND_VOLUME);
soundManager.setVolume(REF_HIT, SOUND_VOLUME);
soundManager.setVolume(REF_FIRE, SOUND_VOLUME);
soundManager.setVolume(REF_STASIS, SOUND_VOLUME);
soundManager.setVolume(OS_ATTACK, SOUND_VOLUME);
soundManager.setVolume(OS_MOVE, SOUND_VOLUME);
soundManager.setVolume(LOS_ATTACK, SOUND_VOLUME);
soundManager.setVolume(EAT_SOUND, SOUND_VOLUME);
soundManager.setVolume(BONUS_HIT, SOUND_VOLUME);
soundManager.setVolume(BONUS_LIFE, SOUND_VOLUME);
soundManager.setVolume(BONUS_SECRET, SOUND_VOLUME);
soundManager.setVolume(JUMP, SOUND_VOLUME);
soundManager.setVolume(END_JUMP, SOUND_VOLUME);
soundManager.setVolume(HIT_2ENEMY, SOUND_VOLUME);
soundManager.setVolume(HIT_2CAT, SOUND_VOLUME);
}
public static function _buttonClick():void{
soundManager.playSound(BUTTON_CLICK);
}
public static function _isSoundOn():Boolean{
return (soundManager.soundOn);
}
public static function _soundOff():void{
soundManager.soundOn = false;
}
public static function _playSound(s:String):void{
if (soundManager == null){
init();
};
soundManager.playSound(s);
}
}
}//package
Section 292
//unGraviBonus (unGraviBonus)
package {
import myEng.*;
public dynamic class unGraviBonus extends myBonusGravi {
public function unGraviBonus(){
addFrameScript(0, this.frame1, 7, this.frame8);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 293
//unHitBonus (unHitBonus)
package {
import myEng.*;
public dynamic class unHitBonus extends myUnHitBonus {
public function unHitBonus(){
addFrameScript(0, this.frame1, 7, this.frame8);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
}
}//package