Section 1
//HScrollBar (aq.pcge.common.HScrollBar)
package aq.pcge.common {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class HScrollBar extends Sprite {
private const SPEED:Number = 8;
public var track:Sprite;
public var thumb:Sprite;
public var leftButton:Sprite;
public var rightButton:Sprite;
private var _cont:Sprite;
private var _mask:Sprite;
private var _moveDir:int;// = 0
public function attach(_arg1:Sprite, _arg2:Sprite):void{
if (((!(_arg1)) || (!(_arg2)))){
throw (new Error("[HScrollBar] : <attach> : Wrong target (container or mask)."));
};
_cont = _arg1;
_mask = _arg2;
_cont.mask = _mask;
resizeThumb();
thumb.addEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
thumb.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
thumb.addEventListener(Event.ENTER_FRAME, moveCont);
stage.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
track.addEventListener(MouseEvent.CLICK, placeThumb);
track.addEventListener(Event.ENTER_FRAME, shiftThumb);
if (leftButton){
leftButton.addEventListener(MouseEvent.MOUSE_DOWN, startMoveLeft);
leftButton.addEventListener(MouseEvent.MOUSE_UP, stopMove);
leftButton.addEventListener(MouseEvent.CLICK, stepLeft);
};
if (rightButton){
rightButton.addEventListener(MouseEvent.MOUSE_DOWN, startMoveRight);
rightButton.addEventListener(MouseEvent.MOUSE_UP, stopMove);
rightButton.addEventListener(MouseEvent.CLICK, stepRight);
};
track.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
}
public function detach():void{
thumb.removeEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
thumb.removeEventListener(MouseEvent.MOUSE_UP, dropThumb);
thumb.removeEventListener(Event.ENTER_FRAME, moveCont);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropThumb);
track.removeEventListener(MouseEvent.CLICK, placeThumb);
track.removeEventListener(Event.ENTER_FRAME, shiftThumb);
if (leftButton){
leftButton.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveLeft);
leftButton.removeEventListener(MouseEvent.MOUSE_UP, stopMove);
leftButton.removeEventListener(MouseEvent.CLICK, stepLeft);
};
if (rightButton){
rightButton.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveRight);
rightButton.removeEventListener(MouseEvent.MOUSE_UP, stopMove);
rightButton.removeEventListener(MouseEvent.CLICK, stepRight);
};
track.parent.removeEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.removeEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_cont = undefined;
_mask = undefined;
}
public function isAttached():Boolean{
return (((_cont) && (_mask)));
}
private function resizeThumb():void{
var _local1:Number;
if (_cont.width > 0){
_local1 = (_cont.width / _mask.width);
thumb.width = ((_local1)>=1) ? (track.width / _local1) : track.width;
} else {
thumb.width = track.width;
};
}
private function moveThumb(_arg1:int, _arg2:Number):void{
if (_arg1 == -1){
if ((thumb.x - _arg2) >= track.x){
thumb.x = (thumb.x - _arg2);
} else {
thumb.x = track.x;
};
} else {
if (_arg1 == 1){
if ((thumb.x + _arg2) <= ((track.x + track.width) - thumb.width)){
thumb.x = (thumb.x + _arg2);
} else {
thumb.x = ((track.x + track.width) - thumb.width);
};
};
};
}
private function dragThumb(_arg1:MouseEvent):void{
thumb.startDrag(false, new Rectangle(track.x, track.y, (track.width - thumb.width), 0));
}
private function dropThumb(_arg1:MouseEvent):void{
thumb.stopDrag();
}
private function moveCont(_arg1:Event):void{
resizeThumb();
var _local2:Number = ((track.x - thumb.x) * (_cont.width / track.width));
_cont.x = _local2;
}
private function placeThumb(_arg1:MouseEvent):void{
var _local2:Number = track.parent.mouseX;
thumb.x = ((track.x + _local2) - (thumb.width / 2));
if (thumb.x < track.x){
thumb.x = track.x;
};
if ((thumb.x + thumb.width) > (track.x + track.width)){
thumb.x = ((track.x + track.width) - thumb.width);
};
}
private function shiftThumb(_arg1:Event):void{
moveThumb(_moveDir, SPEED);
}
private function scrollThumb(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
moveThumb(-1, SPEED);
} else {
if (_arg1.delta < 0){
moveThumb(1, SPEED);
};
};
}
private function startMoveLeft(_arg1:MouseEvent):void{
_moveDir = -1;
}
private function stepLeft(_arg1:MouseEvent):void{
moveThumb(-1, SPEED);
}
private function startMoveRight(_arg1:MouseEvent):void{
_moveDir = 1;
}
private function stepRight(_arg1:MouseEvent):void{
moveThumb(1, SPEED);
}
private function stopMove(_arg1:MouseEvent):void{
_moveDir = 0;
}
}
}//package aq.pcge.common
Section 2
//Screen (aq.pcge.common.Screen)
package aq.pcge.common {
import flash.display.*;
public class Screen extends Sprite {
public var onShow:Function;
public var onHide:Function;
public function show():void{
if (onShow != null){
onShow();
};
visible = true;
}
public function hide():void{
if (onHide != null){
onHide();
};
visible = false;
}
}
}//package aq.pcge.common
Section 3
//Window (aq.pcge.common.Window)
package aq.pcge.common {
import flash.display.*;
import aq.pcge.*;
import flash.geom.*;
public class Window extends MovieClip {
public function close():void{
if (!parent){
return;
};
var _local1:WindowsManager = (parent as WindowsManager);
if (_local1){
if (_local1.activeWindow == this){
_local1.closeActiveWindow();
} else {
throw (new Error("[Window] : <close> : Window isn't active."));
};
} else {
throw (new Error("[Window] : <close> : Windows manager not found."));
};
}
public function alignToCenter():void{
var _local1:Rectangle = getBounds(this);
if (stage){
x = (((stage.stageWidth - width) / 2) - _local1.x);
y = (((stage.stageHeight - height) / 2) - _local1.y);
} else {
x = (((GameApplication.SCREEN_WIDTH - width) / 2) - _local1.x);
y = (((GameApplication.SCREEN_HEIGHT - height) / 2) - _local1.y);
};
}
}
}//package aq.pcge.common
Section 4
//WindowsManager (aq.pcge.common.WindowsManager)
package aq.pcge.common {
import flash.display.*;
public class WindowsManager extends Sprite {
protected var _activeWindow:Window;
protected var _windowsLayer:Sprite;
protected var _curtainLayer:WMCurtain;
public function get activeWindow():Window{
return (_activeWindow);
}
public function closeActiveWindow():void{
if (_activeWindow){
removeChild(_activeWindow);
_activeWindow = undefined;
} else {
throw (new Error("[WindowsManager] : <closeActiveWindow> : There is no active window."));
};
}
public function openActiveWindow(_arg1:Window):void{
if (_arg1){
if (_activeWindow){
closeActiveWindow();
};
_activeWindow = _arg1;
addChild(_activeWindow);
} else {
throw (new Error("[WindowsManager] : <openActiveWindow> : Can't open non-existing window."));
};
}
}
}//package aq.pcge.common
Section 5
//VScrollBar (aq.pcge.common.VScrollBar)
package aq.pcge.common {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class VScrollBar extends Sprite {
private const SPEED:Number = 8;
public var track:Sprite;
public var thumb:Sprite;
public var upButton:Sprite;
public var downButton:Sprite;
private var _cont:Sprite;
private var _mask:Sprite;
private var _moveDir:int;// = 0
public function attach(_arg1:Sprite, _arg2:Sprite):void{
if (((!(_arg1)) || (!(_arg2)))){
throw (new Error("[VScrollBar] : <attach> : Wrong target (container or mask)."));
};
_cont = _arg1;
_mask = _arg2;
_cont.mask = _mask;
resizeThumb();
thumb.addEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
thumb.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
thumb.addEventListener(Event.ENTER_FRAME, moveCont);
stage.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
track.addEventListener(MouseEvent.CLICK, placeThumb);
track.addEventListener(Event.ENTER_FRAME, shiftThumb);
if (upButton){
upButton.addEventListener(MouseEvent.MOUSE_DOWN, startMoveUp);
upButton.addEventListener(MouseEvent.MOUSE_UP, stopMove);
upButton.addEventListener(MouseEvent.CLICK, stepUp);
};
if (downButton){
downButton.addEventListener(MouseEvent.MOUSE_DOWN, startMoveDown);
downButton.addEventListener(MouseEvent.MOUSE_UP, stopMove);
downButton.addEventListener(MouseEvent.CLICK, stepDown);
};
track.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
}
public function detach():void{
thumb.removeEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
thumb.removeEventListener(MouseEvent.MOUSE_UP, dropThumb);
thumb.removeEventListener(Event.ENTER_FRAME, moveCont);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropThumb);
track.removeEventListener(MouseEvent.CLICK, placeThumb);
track.removeEventListener(Event.ENTER_FRAME, shiftThumb);
if (upButton){
upButton.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveUp);
upButton.removeEventListener(MouseEvent.MOUSE_UP, stopMove);
upButton.removeEventListener(MouseEvent.CLICK, stepUp);
};
if (downButton){
downButton.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveDown);
downButton.removeEventListener(MouseEvent.MOUSE_UP, stopMove);
downButton.removeEventListener(MouseEvent.CLICK, stepDown);
};
track.parent.removeEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.removeEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_cont = undefined;
_mask = undefined;
}
public function isAttached():Boolean{
return (((_cont) && (_mask)));
}
private function resizeThumb():void{
var _local1:Number;
if (_cont.height > 0){
_local1 = (_cont.height / _mask.height);
thumb.height = ((_local1)>=1) ? (track.height / _local1) : track.height;
} else {
thumb.height = track.height;
};
}
private function moveThumb(_arg1:int, _arg2:Number):void{
if (_arg1 == -1){
if ((thumb.y - _arg2) >= track.y){
thumb.y = (thumb.y - _arg2);
} else {
thumb.y = track.y;
};
} else {
if (_arg1 == 1){
if ((thumb.y + _arg2) <= ((track.y + track.height) - thumb.height)){
thumb.y = (thumb.y + _arg2);
} else {
thumb.y = ((track.y + track.height) - thumb.height);
};
};
};
}
private function dragThumb(_arg1:MouseEvent):void{
thumb.startDrag(false, new Rectangle(track.x, track.y, 0, (track.height - thumb.height)));
}
private function dropThumb(_arg1:MouseEvent):void{
thumb.stopDrag();
}
private function moveCont(_arg1:Event):void{
resizeThumb();
var _local2:Number = ((track.y - thumb.y) * (_cont.height / track.height));
_cont.y = _local2;
}
private function placeThumb(_arg1:MouseEvent):void{
var _local2:Number = track.parent.mouseY;
thumb.y = ((track.y + _local2) - (thumb.height / 2));
if (thumb.y < track.y){
thumb.y = track.y;
};
if ((thumb.y + thumb.height) > (track.y + track.height)){
thumb.y = ((track.y + track.height) - thumb.height);
};
}
private function shiftThumb(_arg1:Event):void{
moveThumb(_moveDir, SPEED);
}
private function scrollThumb(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
moveThumb(-1, SPEED);
} else {
if (_arg1.delta < 0){
moveThumb(1, SPEED);
};
};
}
private function startMoveUp(_arg1:MouseEvent):void{
_moveDir = -1;
}
private function stepUp(_arg1:MouseEvent):void{
moveThumb(-1, SPEED);
}
private function startMoveDown(_arg1:MouseEvent):void{
_moveDir = 1;
}
private function stepDown(_arg1:MouseEvent):void{
moveThumb(1, SPEED);
}
private function stopMove(_arg1:MouseEvent):void{
_moveDir = 0;
}
}
}//package aq.pcge.common
Section 6
//LinkBox (aq.pcge.game.buttons.LinkBox)
package aq.pcge.game.buttons {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class LinkBox extends Sprite {
public var content:Sprite;
public var link:String;
public function LinkBox(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
public function get image():DisplayObject{
return (content.getChildAt(0));
}
public function set image(_arg1:DisplayObject):void{
while (content.numChildren) {
content.removeChildAt(0);
};
if (_arg1){
content.addChild(_arg1);
};
}
private function onClick(_arg1:MouseEvent):void{
var $event = _arg1;
if (((link) && ((link.length > 0)))){
try {
navigateToURL(new URLRequest(link), "_blank");
} catch(error:Error) {
};
};
}
}
}//package aq.pcge.game.buttons
Section 7
//AutoWindow (aq.pcge.game.windows.AutoWindow)
package aq.pcge.game.windows {
import flash.events.*;
import aq.pcge.common.*;
import flash.utils.*;
public class AutoWindow extends Window {
private var _lifeTimer:Timer;
public function AutoWindow(){
startLifeTimer();
}
public function startLifeTimer(_arg1:Number=3000):void{
if (!_lifeTimer){
_lifeTimer = new Timer(_arg1, 1);
_lifeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, closeSelf);
_lifeTimer.start();
} else {
throw (new Error("[AutoWindow] : <startLifeTimer> : Life timer already started."));
};
}
public function stopLifeTimer():void{
if (_lifeTimer){
if (_lifeTimer.running){
_lifeTimer.stop();
};
} else {
throw (new Error("[AutoWindow] : <stopLifeTimer> : Life timer not started."));
};
}
public function restartLifeTimer(_arg1:Number=3000):void{
if (_lifeTimer){
if (_lifeTimer.running){
_lifeTimer.stop();
};
_lifeTimer.reset();
_lifeTimer.delay = _arg1;
_lifeTimer.repeatCount = 1;
} else {
_lifeTimer = new Timer(_arg1, 1);
};
if (!_lifeTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
_lifeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, closeSelf);
};
_lifeTimer.start();
}
override public function close():void{
super.close();
if (_lifeTimer){
if (_lifeTimer.running){
_lifeTimer.stop();
};
if (_lifeTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
_lifeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, closeSelf);
};
_lifeTimer = undefined;
};
}
private function closeSelf(_arg1:TimerEvent):void{
_lifeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, closeSelf);
_lifeTimer = undefined;
close();
}
}
}//package aq.pcge.game.windows
Section 8
//FailWindow (aq.pcge.game.windows.FailWindow)
package aq.pcge.game.windows {
public class FailWindow extends FlapWindow {
public function FailWindow(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 34, frame35);
alignToCenter();
}
function frame1(){
}
function frame2(){
if (onClose != null){
onClose();
};
}
function frame16(){
if (onOpen != null){
onOpen();
};
}
function frame35(){
stop();
if (onStop != null){
onStop();
};
close();
}
}
}//package aq.pcge.game.windows
Section 9
//FinalWindow (aq.pcge.game.windows.FinalWindow)
package aq.pcge.game.windows {
import flash.display.*;
import aq.pcge.game.*;
import aq.pcge.common.*;
import aq.pcge.*;
import flash.text.*;
public class FinalWindow extends Window {
public var linkBox04:GameSlot;
public var time_tf:TextField;
public var linkBox02:GameSlot;
public var linkBox03:GameSlot;
public var linkBox01:GameSlot;
public var timeBonus_tf:TextField;
public var totalTime_tf:TextField;
public function FinalWindow(_arg1:uint=0, _arg2:uint=0){
addFrameScript(0, frame1);
alignToCenter();
update(_arg1, _arg2);
}
public function formatTime(_arg1:Number, _arg2:Boolean=true):String{
var _local3:Number = _arg1;
if (!_arg2){
_local3 = Math.floor((_arg1 / 1000));
};
var _local4:* = Math.floor((_local3 / (60 * 60)));
var _local5:* = (Math.floor((_local3 / 60)) - (_local4 * 60));
var _local6:* = ((_local3 - (_local5 * 60)) - ((_local4 * 60) * 60));
if (_local4 < 10){
_local4 = ("0" + _local4);
};
if (_local5 < 10){
_local5 = ("0" + _local5);
};
if (_local6 < 10){
_local6 = ("0" + _local6);
};
return (((_local5 + ":") + _local6));
}
public function update(_arg1:uint, _arg2:uint):void{
var _local3:Object = parseTime(_arg1);
var _local4:Object = parseTime(_arg2);
}
private function parseTime(_arg1:uint):Object{
var _local2:* = (Math.floor((_arg1 / 60)) / 60);
var _local3:* = (Math.floor((_arg1 / 60)) - (_local2 * 60));
var _local4:* = ((_arg1 - (_local3 * 60)) - ((_local2 * 60) * 60));
if (_local2 < 10){
_local2 = ("0" + _local2);
};
if (_local3 < 10){
_local3 = ("0" + _local3);
};
if (_local4 < 10){
_local4 = ("0" + _local4);
};
return ({hs:_local2, ms:_local3, ss:_local4});
}
function frame1(){
if (Game.instance){
time_tf.text = String(formatTime(Game.instance.getTotalTime(), true));
};
linkBox01.link = GameApplication.link01;
linkBox02.link = GameApplication.link02;
linkBox03.link = GameApplication.link03;
linkBox04.link = GameApplication.link04;
linkBox01.image = new Bitmap(new GameImage01(), "auto", true);
linkBox02.image = new Bitmap(new GameImage02(), "auto", true);
linkBox03.image = new Bitmap(new GameImage03(), "auto", true);
linkBox04.image = new Bitmap(new GameImage04(), "auto", true);
}
}
}//package aq.pcge.game.windows
Section 10
//FinalWindowMobile (aq.pcge.game.windows.FinalWindowMobile)
package aq.pcge.game.windows {
import aq.pcge.common.*;
import flash.text.*;
public class FinalWindowMobile extends Window {
public var time_tf:TextField;
public var timeBonus_tf:TextField;
public var totalTime_tf:TextField;
public function FinalWindowMobile(_arg1:uint=0, _arg2:uint=0){
alignToCenter();
update(_arg1, _arg2);
}
public function update(_arg1:uint, _arg2:uint):void{
var _local3:Object = parseTime(_arg1);
var _local4:Object = parseTime(_arg2);
}
private function parseTime(_arg1:uint):Object{
var _local2:* = (Math.floor((_arg1 / 60)) / 60);
var _local3:* = (Math.floor((_arg1 / 60)) - (_local2 * 60));
var _local4:* = ((_arg1 - (_local3 * 60)) - ((_local2 * 60) * 60));
if (_local2 < 10){
_local2 = ("0" + _local2);
};
if (_local3 < 10){
_local3 = ("0" + _local3);
};
if (_local4 < 10){
_local4 = ("0" + _local4);
};
return ({hs:_local2, ms:_local3, ss:_local4});
}
}
}//package aq.pcge.game.windows
Section 11
//FlapWindow (aq.pcge.game.windows.FlapWindow)
package aq.pcge.game.windows {
import aq.pcge.common.*;
public class FlapWindow extends Window {
public var onClose:Function;
public var onOpen:Function;
public var onStop:Function;
}
}//package aq.pcge.game.windows
Section 12
//HelloWindow (aq.pcge.game.windows.HelloWindow)
package aq.pcge.game.windows {
import aq.pcge.common.*;
public class HelloWindow extends Window {
public function HelloWindow(){
alignToCenter();
}
}
}//package aq.pcge.game.windows
Section 13
//ItemWindow (aq.pcge.game.windows.ItemWindow)
package aq.pcge.game.windows {
import flash.display.*;
import flash.events.*;
public class ItemWindow extends AutoWindow {
public var gfx:MovieClip;
public var holder:MovieClip;
public var _cb:Function;
public function ItemWindow(_arg1:DisplayObject=null){
var _local2:Number;
super();
addFrameScript(0, frame1);
alignToCenter();
if (_arg1){
if ((((_arg1.width > holder.width)) || ((_arg1.height > holder.height)))){
if (_arg1.width >= _arg1.height){
_local2 = (_arg1.width / holder.width);
} else {
_local2 = (_arg1.height / holder.height);
};
_arg1.width = (_arg1.width / _local2);
_arg1.height = (_arg1.height / _local2);
};
_arg1.x = (holder.width / 2);
_arg1.y = (holder.height / 2);
holder.addChild(_arg1);
};
}
public function playGFX(_arg1:Function=null):void{
_cb = _arg1;
gfx.gotoAndPlay(2);
}
public function stopGFX():void{
gfx.gotoAndStop(1);
}
public function onAnimComplete(_arg1:Event):void{
if (_cb != null){
_cb();
};
}
function frame1(){
gfx.gotoAndStop(1);
gfx.addEventListener("animComplete", onAnimComplete);
}
}
}//package aq.pcge.game.windows
Section 14
//NextWindow (aq.pcge.game.windows.NextWindow)
package aq.pcge.game.windows {
public class NextWindow extends FlapWindow {
public function NextWindow(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 34, frame35);
alignToCenter();
}
function frame1(){
}
function frame2(){
if (onClose != null){
onClose();
};
}
function frame16(){
if (onOpen != null){
onOpen();
};
}
function frame35(){
stop();
if (onStop != null){
onStop();
};
close();
}
}
}//package aq.pcge.game.windows
Section 15
//OptionsWindow (aq.pcge.game.windows.OptionsWindow)
package aq.pcge.game.windows {
import flash.display.*;
import aq.pcge.common.*;
public class OptionsWindow extends Window {
public var helpButton:MovieClip;
public var muteButton:MovieClip;
public var menuButton:MovieClip;
public function OptionsWindow(){
alignToCenter();
}
}
}//package aq.pcge.game.windows
Section 16
//Activator (aq.pcge.game.Activator)
package aq.pcge.game {
import flash.display.*;
import flash.events.*;
public class Activator extends EventDispatcher {
private var _name:String;
private var _area:Sprite;
private var _episode:IEpisode;
private var _active:Boolean;
private var _enabled:Boolean;
private var _mode:String;
private var _onClick:Function;
private var _onClickCondition:Function;
private var _onClickEvent:String;
private var _exists:Boolean;
public static const MODE_ONCE:String = "once";
public static const MODE_EVER:String = "ever";
public function Activator(_arg1:String, _arg2:Sprite, _arg3:Object=null){
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Activator] : <Activator> : Wrong name."));
};
_name = _arg1;
if (!_arg2){
throw (new Error("[Activator] : <Activator> : Wrong area."));
};
_area = _arg2;
_area.tabEnabled = false;
if ((_arg3 is Object)){
_mode = ((_arg3.mode)==MODE_ONCE) ? MODE_ONCE : MODE_EVER;
if ((_arg3.onClick is Function)){
_onClick = _arg3.onClick;
};
if ((_arg3.onClickCondition is Function)){
_onClickCondition = _arg3.onClickCondition;
};
if ((_arg3.onClickEvent is String)){
_onClickEvent = _arg3.onClickEvent;
};
} else {
_mode = MODE_ONCE;
};
_active = false;
enable();
_exists = true;
if (((!(_arg3)) || ((((_arg3 is Object)) && ((_arg3.activate == false)))))){
} else {
activate();
};
}
public function get episode():IEpisode{
return (_episode);
}
public function get name():String{
return (_name);
}
public function active():Boolean{
return (_active);
}
public function activate():void{
if (!_active){
_area.addEventListener(MouseEvent.CLICK, clickHandler);
_active = true;
};
}
public function deactivate():void{
if (_active){
_area.removeEventListener(MouseEvent.CLICK, clickHandler);
_active = false;
};
}
public function enabled():Boolean{
return (_enabled);
}
public function enable():void{
_enabled = true;
if (_area){
_area.buttonMode = true;
_area.useHandCursor = true;
};
}
public function disable():void{
_enabled = false;
if (_area){
_area.buttonMode = false;
_area.useHandCursor = false;
};
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
disable();
deactivate();
if (_episode){
remove();
};
_area = undefined;
_active = undefined;
_enabled = undefined;
_mode = undefined;
_onClick = undefined;
_onClickCondition = undefined;
_onClickEvent = undefined;
_exists = undefined;
}
public function dispose():void{
disable();
deactivate();
if (_episode){
remove();
};
if (_area.parent){
_area.parent.removeChild(_area);
};
_area = undefined;
_active = undefined;
_enabled = undefined;
_mode = undefined;
_onClick = undefined;
_onClickCondition = undefined;
_onClickEvent = undefined;
_exists = undefined;
}
public function show():void{
if (!_area.visible){
_area.visible = true;
};
}
public function hide():void{
if (_area.visible){
_area.visible = false;
};
}
public function click():void{
clickHandler();
}
public function add(_arg1:IEpisode):void{
if (_arg1){
if (!_episode){
_episode = _arg1;
if (!_episode.hasActivator(_name)){
_episode.addActivator(this);
} else {
if (_episode.getActivator(_name) != this){
throw (new Error("[Activator] : <add> : Activator with same name already added."));
};
};
} else {
throw (new Error("[Activator] : <add> : Activator is already added to some episode."));
};
} else {
throw (new Error("[Activator] : <add> : Can't add to non-existing episode."));
};
}
public function remove():void{
var _local1:IEpisode;
if (_episode){
disable();
deactivate();
_local1 = _episode;
_episode = undefined;
if (_local1.getActivator(_name) == this){
_local1.removeActivator(_name);
} else {
if (_local1.hasActivator(_name)){
throw (new Error("[Activator] : <remove> : Episode has other activator with same name."));
};
};
} else {
throw (new Error("[Activator] : <remove> : Activator isn't added to episode."));
};
}
private function clickHandler(_arg1:MouseEvent=null):void{
if (!_episode.action){
return;
};
if (_enabled){
if ((((_onClickCondition == null)) || (((!((_onClickCondition == null))) && (_onClickCondition()))))){
if (_onClick != null){
trace((("[$] : Activator @" + _name) + " clicked"));
_onClick();
if (_onClickEvent){
if (_episode){
_episode.causeEvent(_onClickEvent);
} else {
_area.dispatchEvent(new EpisodeEvent(_onClickEvent, true));
};
};
if (_mode == MODE_ONCE){
deactivate();
};
};
};
};
}
}
}//package aq.pcge.game
Section 17
//Animation (aq.pcge.game.Animation)
package aq.pcge.game {
import flash.display.*;
public class Animation extends MovieClip {
private var _episode:IEpisode;
private var _active:Boolean;
private var _exists:Boolean;
private var _labels:Array;
public var anim:MovieClip;
public var animCallback:Function;
public function Animation(){
gotoAndStop(1);
_labels = new Array();
var _local1:uint = currentLabels.length;
var _local2:uint;
while (_local2 < _local1) {
_labels[_local2] = currentLabels[_local2].name;
_local2++;
};
_active = false;
_exists = true;
}
public function get episode():IEpisode{
return (_episode);
}
public function active():Boolean{
return (_active);
}
public function activate():void{
if (!_active){
addEventListener(AnimationEvent.ANIM_KEYFRAME, animKeyframeHandler);
addEventListener(AnimationEvent.ANIM_COMPLETE, animCompleteHandler);
_active = true;
};
}
public function deactivate():void{
if (_active){
removeEventListener(AnimationEvent.ANIM_KEYFRAME, animKeyframeHandler);
removeEventListener(AnimationEvent.ANIM_COMPLETE, animCompleteHandler);
_active = false;
};
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
deactivate();
if (_episode){
remove();
};
_active = undefined;
_exists = undefined;
}
public function dispose():void{
deactivate();
if (_episode){
remove();
};
if (parent){
parent.removeChild(this);
};
_active = undefined;
_exists = undefined;
}
public function playAnim(_arg1:String, _arg2:Function=null):void{
if (_labels.indexOf(_arg1) != -1){
if (anim){
anim.stop();
};
animCallback = _arg2;
if (currentLabel != _arg1){
gotoAndStop(_arg1);
} else {
anim.gotoAndPlay(1);
};
dispatchEvent(new AnimationEvent(AnimationEvent.ANIM_ANIM, true, false, _arg1));
} else {
throw (new Error((("[Animation] : <playAnim> : Animation '" + _arg1) + "' not found.")));
};
}
public function get currAnim():String{
return (currentLabel);
}
public function add(_arg1:IEpisode):void{
if (_arg1){
if (!_episode){
_episode = _arg1;
if (!_episode.hasAnimation(name)){
_episode.addAnimation(name, this);
} else {
if (_episode.getAnimation(name) != this){
throw (new Error("[Animation] : <add> : Animation with same name already added."));
};
};
} else {
throw (new Error("[Animation] : <add> : Animation is already added to some episode."));
};
} else {
throw (new Error("[Animation] : <add> : Can't add to non-existing episode."));
};
}
public function remove():void{
var _local1:IEpisode;
if (_episode){
_local1 = _episode;
if (_local1.getAnimation(name) == this){
_episode = undefined;
_local1.removeAnimation(name);
} else {
if (_local1.hasAnimation(name)){
throw (new Error("[Animation] : <remove> : Episode has other animation with same name."));
};
};
} else {
throw (new Error("[Animation] : <remove> : Animation isn't added to episode."));
};
}
private function animKeyframeHandler(_arg1:AnimationEvent):void{
var _local2:Function;
if (animCallback != null){
_local2 = animCallback;
animCallback = undefined;
_local2();
};
}
private function animCompleteHandler(_arg1:AnimationEvent):void{
var _local2:Function;
if (animCallback != null){
_local2 = animCallback;
animCallback = undefined;
_local2();
};
}
}
}//package aq.pcge.game
Section 18
//AnimationEvent (aq.pcge.game.AnimationEvent)
package aq.pcge.game {
import flash.events.*;
public class AnimationEvent extends Event {
private var _data:Object;
public static const ANIM_COMPLETE:String = "animComplete";
public static const ANIM_KEYFRAME:String = "animKeyframe";
public static const ANIM_ANIM:String = "animAnim";
public function AnimationEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
_data = _arg4;
}
public function get data():Object{
return (_data);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
override public function clone():Event{
return (new AnimationEvent(type, bubbles, cancelable, _data));
}
}
}//package aq.pcge.game
Section 19
//Character (aq.pcge.game.Character)
package aq.pcge.game {
import flash.display.*;
import com.greensock.*;
import fl.transitions.easing.*;
public class Character extends MovieClip {
private var _episode:IEpisode;
private var _active:Boolean;
private var _exists:Boolean;
private var _labels:Array;
private var _mover:TweenLite;
public var anim:MovieClip;
public var animCallback:Function;
public var scale:Number;
public var speed:Number;
public function Character(){
gotoAndStop(1);
_labels = new Array();
var _local1:uint = currentLabels.length;
var _local2:uint;
while (_local2 < _local1) {
_labels[_local2] = currentLabels[_local2].name;
_local2++;
};
scale = ((scaleX + scaleY) / 2);
speed = 128;
_active = false;
_exists = true;
}
public function get episode():IEpisode{
return (_episode);
}
public function active():Boolean{
return (_active);
}
public function activate():void{
if (!_active){
addEventListener(CharacterEvent.ANIM_KEYFRAME, animKeyframeHandler);
addEventListener(CharacterEvent.ANIM_COMPLETE, animCompleteHandler);
_active = true;
};
}
public function deactivate():void{
if (_active){
removeEventListener(CharacterEvent.ANIM_KEYFRAME, animKeyframeHandler);
removeEventListener(CharacterEvent.ANIM_COMPLETE, animCompleteHandler);
_active = false;
};
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
halt();
deactivate();
if (_episode){
remove();
};
_active = undefined;
_exists = undefined;
}
public function dispose():void{
halt();
deactivate();
if (_episode){
remove();
};
if (parent){
parent.removeChild(this);
};
_active = undefined;
_exists = undefined;
}
public function playAnim(_arg1:String, _arg2:Function=null):void{
if (_labels.indexOf(_arg1) != -1){
if (anim){
anim.stop();
};
animCallback = _arg2;
if (currentLabel != _arg1){
gotoAndStop(_arg1);
} else {
anim.gotoAndPlay(1);
};
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_ANIM, true, false, _arg1));
} else {
throw (new Error((("[Character] : <playAnim> : Animation '" + _arg1) + "' not found.")));
};
}
public function get currAnim():String{
return (currentLabel);
}
public function moveTo(_arg1:Number, _arg2:Number, _arg3:Function=null, _arg4:Object=null):void{
var _local5:Number = this.scale;
var _local6:Number = this.speed;
if ((_arg4 is Object)){
if (!isNaN(_arg4.scale)){
_local5 = Number(_arg4.scale);
};
if (!isNaN(_arg4.speed)){
_local6 = Number(_arg4.speed);
};
};
var _local7:Number = (_arg1 - this.x);
var _local8:Number = (_arg2 - this.y);
var _local9:Number = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
var _local10:Number = (_local9 / _local6);
var _local11:Number = (scaleX / Math.abs(scaleX));
var _local12:Number = (scaleY / Math.abs(scaleY));
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_MOVE, true));
_mover = new TweenLite(this, _local10, {x:_arg1, y:_arg2, scaleX:(_local5 * _local11), scaleY:(_local5 * _local12), onComplete:_arg3, ease:None.easeNone});
}
public function halt():void{
if (_mover){
_mover.kill();
_mover = undefined;
};
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_HALT, true));
}
public function turnTo(_arg1:Number):void{
if (_arg1 <= x){
if (scaleX > 0){
scaleX = (scaleX * -1);
};
} else {
if (scaleX < 0){
scaleX = (scaleX * -1);
};
};
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_TURN, true));
}
public function turnOn(_arg1:String):void{
switch (_arg1){
case "left":
if (scaleX > 0){
scaleX = (scaleX * -1);
};
break;
case "right":
if (scaleX < 0){
scaleX = (scaleX * -1);
};
break;
default:
throw (new Error((("[Character] : <turnOn> : Unknown direction '" + _arg1) + "'.")));
};
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_TURN, true));
}
public function turnBack():void{
scaleX = (scaleX * -1);
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_TURN, true));
}
public function idle():void{
halt();
playAnim("idle");
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_IDLE, true));
}
public function wait():void{
halt();
playAnim("none");
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_WAIT, true));
}
public function walkTo(_arg1:Number):void{
halt();
turnTo(_arg1);
playAnim("walk");
dispatchEvent(new CharacterEvent(CharacterEvent.CHAR_WALK, true));
}
public function take(_arg1:Function=null):void{
halt();
playAnim("take", _arg1);
}
public function takeFromFloor(_arg1:Function=null):void{
halt();
playAnim("takeFromFloor", _arg1);
}
public function takeFromAbove(_arg1:Function=null):void{
halt();
playAnim("takeFromAbove", _arg1);
}
public function add(_arg1:IEpisode):void{
if (_arg1){
if (!_episode){
_episode = _arg1;
if (!_episode.hasCharacter(name)){
_episode.addCharacter(name, this);
} else {
if (_episode.getCharacter(name) != this){
throw (new Error("[Character] : <add> : Character with same name already added."));
};
};
} else {
throw (new Error("[Character] : <add> : Character is already added to some episode."));
};
} else {
throw (new Error("[Character] : <add> : Can't add to non-existing episode."));
};
}
public function remove():void{
var _local1:IEpisode;
if (_episode){
_local1 = _episode;
if (_local1.getCharacter(name) == this){
_episode = undefined;
_local1.removeCharacter(name);
} else {
if (_local1.hasCharacter(name)){
throw (new Error("[Character] : <remove> : Episode has other character with same name."));
};
};
} else {
throw (new Error("[Character] : <remove> : Character isn't added to episode."));
};
}
private function animKeyframeHandler(_arg1:CharacterEvent):void{
var _local2:Function;
if (animCallback != null){
_local2 = animCallback;
animCallback = undefined;
_local2();
};
}
private function animCompleteHandler(_arg1:CharacterEvent):void{
var _local2:Function;
if (animCallback != null){
_local2 = animCallback;
animCallback = undefined;
_local2();
};
}
}
}//package aq.pcge.game
Section 20
//CharacterEvent (aq.pcge.game.CharacterEvent)
package aq.pcge.game {
import flash.events.*;
public class CharacterEvent extends Event {
private var _data:Object;
public static const ANIM_COMPLETE:String = "animComplete";
public static const ANIM_KEYFRAME:String = "animKeyframe";
public static const CHAR_ANIM:String = "charAnim";
public static const CHAR_IDLE:String = "charIdle";
public static const CHAR_WAIT:String = "charWait";
public static const CHAR_WALK:String = "charWalk";
public static const CHAR_HALT:String = "charHalt";
public static const CHAR_MOVE:String = "charMove";
public static const CHAR_TURN:String = "charTurn";
public function CharacterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
_data = _arg4;
}
public function get data():Object{
return (_data);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
override public function clone():Event{
return (new CharacterEvent(type, bubbles, cancelable, _data));
}
}
}//package aq.pcge.game
Section 21
//Chronicle (aq.pcge.game.Chronicle)
package aq.pcge.game {
import flash.events.*;
public class Chronicle extends EventDispatcher {
private var _episode:Episode;
private var _exists:Boolean;
private var _registry:Object;
private var _events:Object;
public function Chronicle(_arg1:Episode){
if (!_arg1){
throw (new Error("[Chronicle] : <Chronicle> : Episode isn't exists."));
};
_episode = _arg1;
_registry = new Object();
_events = new Object();
_exists = true;
}
public function get episode():IEpisode{
return (_episode);
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
_registry = undefined;
_events = undefined;
_episode = undefined;
}
public function dispose():void{
var _local1:EpisodeEvent;
_events = undefined;
for each (_local1 in _registry) {
_local1.data = undefined;
};
_registry = undefined;
_episode = undefined;
}
public function registerEvent(_arg1:String, _arg2:Boolean=false):void{
if (!_registry[_arg1]){
_registry[_arg1] = new EpisodeEvent(_arg1);
_events[_arg1] = _arg2;
} else {
throw (new Error("[Chronicle] : <registerEvent> : Event with same name already registered."));
};
}
public function unregisterEvent(_arg1:String):void{
if (_registry[_arg1]){
_registry[_arg1].data = undefined;
delete _registry[_arg1];
delete _events[_arg1];
} else {
throw (new Error("[Chronicle] : <unregisterEvent> : Event with such name not found."));
};
}
public function retrieveEvent(_arg1:String):EpisodeEvent{
if (_registry[_arg1]){
return (_registry[_arg1]);
};
throw (new Error("[Chronicle] : <retrieveEvent> : Event with such name not found."));
}
public function isEvent(_arg1:String):Boolean{
return (Boolean(_registry[_arg1]));
}
public function causeEvent(_arg1:String):void{
if (_registry[_arg1]){
if (_episode){
_episode.dispatchEvent(_registry[_arg1]);
} else {
dispatchEvent(_registry[_arg1]);
};
_events[_arg1] = true;
} else {
throw (new Error("[Chronicle] : <causeEvent> : Event isn't registered."));
};
}
public function forceEvent(_arg1:String):void{
if (_registry[_arg1]){
if (_episode){
_episode.dispatchEvent(_registry[_arg1]);
} else {
dispatchEvent(_registry[_arg1]);
};
} else {
throw (new Error("[Chronicle] : <forceEvent> : Event isn't registered."));
};
}
public function setupEvent(_arg1:String, _arg2:Boolean):void{
if (_registry[_arg1]){
_events[_arg1] = _arg2;
} else {
throw (new Error("[Chronicle] : <setupEvent> : Event isn't registered."));
};
}
public function checkEvent(_arg1:String):Boolean{
if (_registry[_arg1]){
return (_events[_arg1]);
};
throw (new Error("[Chronicle] : <checkEvent> : Event isn't registered."));
}
public function ifThis(_arg1:String):Boolean{
if (_registry[_arg1]){
return ((_events[_arg1] == true));
};
throw (new Error("[Chronicle] : <ifThis> : Event isn't registered."));
}
public function ifNotThis(_arg1:String):Boolean{
if (_registry[_arg1]){
return ((_events[_arg1] == false));
};
throw (new Error("[Chronicle] : <ifNotThis> : Event isn't registered."));
}
public function ifThese(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (!_events[_local4]){
return (false);
};
} else {
throw (new Error("[Chronicle] : <ifThese> : Event isn't registered."));
};
_local3++;
};
return (true);
}
public function ifNotThese(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (_events[_local4]){
return (false);
};
} else {
throw (new Error("[Chronicle] : <ifNotThese> : Event isn't registered."));
};
_local3++;
};
return (true);
}
public function ifAny(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (_events[_local4]){
return (true);
};
} else {
throw (new Error("[Chronicle] : <ifAny> : Event isn't registered."));
};
_local3++;
};
return (false);
}
public function ifNotAny(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (!_events[_local4]){
return (true);
};
} else {
throw (new Error("[Chronicle] : <ifNotAny> : Event isn't registered."));
};
_local3++;
};
return (false);
}
public function ifAll():Boolean{
var _local1:Boolean;
for each (_local1 in _events) {
if (!_local1){
return (false);
};
};
return (true);
}
public function ifNone():Boolean{
var _local1:Boolean;
for each (_local1 in _events) {
if (_local1){
return (false);
};
};
return (true);
}
public function ifEach(_arg1:Array, _arg2:Boolean):Boolean{
var _local5:String;
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_registry[_local5]){
if (_events[_local5] != _arg2){
return (false);
};
} else {
throw (new Error("[Chronicle] : <ifEach> : Event isn't registered."));
};
_local4++;
};
return (true);
}
public function ifOneOf(_arg1:Array, _arg2:Boolean):Boolean{
var _local5:String;
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_registry[_local5]){
if (_events[_local5] == _arg2){
return (true);
};
} else {
throw (new Error("[Chronicle] : <ifOneOf> : Event isn't registered."));
};
_local4++;
};
return (false);
}
}
}//package aq.pcge.game
Section 22
//Episode (aq.pcge.game.Episode)
package aq.pcge.game {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class Episode extends MovieClip implements IEpisode {
public var tool:MovieClip;
public var ladder2:MovieClip;
public var d11:MovieClip;
public var d55:MovieClip;
public var in4:MovieClip;
public var acorn_anim:MovieClip;
public var d12:MovieClip;
public var d21:MovieClip;
public var stone:MovieClip;
public var rock:MovieClip;
public var in5:MovieClip;
public var l5_chandelier:MovieClip;
public var it1:MovieClip;
public var ship:MovieClip;
public var nails:MovieClip;
public var d13:MovieClip;
public var d22:MovieClip;
public var d31:MovieClip;
public var do1:MovieClip;
public var ladder:MovieClip;
public var squirrel:MovieClip;
public var it2:MovieClip;
public var d14:MovieClip;
public var d23:MovieClip;
public var d32:MovieClip;
public var do2:MovieClip;
public var sword:MovieClip;
public var it3:MovieClip;
public var d15:MovieClip;
public var d24:MovieClip;
public var d33:MovieClip;
public var woodPart1:MovieClip;
public var chest:MovieClip;
public var do3:MovieClip;
public var it4:MovieClip;
public var d25:MovieClip;
public var d34:MovieClip;
public var spoon:MovieClip;
public var do4:MovieClip;
public var branch1:MovieClip;
public var boiler:MovieClip;
public var sail:MovieClip;
public var d35:MovieClip;
public var do5:MovieClip;
public var branch2:MovieClip;
public var woodPart2:MovieClip;
public var door:MovieClip;
public var do6:MovieClip;
public var axe:MovieClip;
public var chain:MovieClip;
public var skull2:MovieClip;
public var skull:MovieClip;
public var enemy:MovieClip;
public var texture:MovieClip;
public var do7:MovieClip;
public var rog1:MovieClip;
public var barricade:MovieClip;
public var oven:MovieClip;
public var mushroom:MovieClip;
public var mushroom_anim:MovieClip;
public var do8:MovieClip;
public var rog2:MovieClip;
public var wood:MovieClip;
public var rope:MovieClip;
public var do9:MovieClip;
public var axe_blade:MovieClip;
public var d41:MovieClip;
public var d42:MovieClip;
public var d51:MovieClip;
public var puzzle:MovieClip;
public var acorn:MovieClip;
public var ded:MovieClip;
public var d43:MovieClip;
public var d52:MovieClip;
public var in1:MovieClip;
public var helm:MovieClip;
public var do11:MovieClip;
public var kora:MovieClip;
public var shield:MovieClip;
public var d44:MovieClip;
public var d53:MovieClip;
public var bones:MovieClip;
public var in2:MovieClip;
public var coal:MovieClip;
public var do12:MovieClip;
public var resin:MovieClip;
public var hammer:MovieClip;
public var d45:MovieClip;
public var d54:MovieClip;
public var epicScene:MovieClip;
public var in3:MovieClip;
public var totem:MovieClip;
private var _state:String;
private var _canvas:Sprite;
private var _screen:Sprite;
private var _index:int;// = 0
private var _scale:Number;
private var _timer:Timer;
private var _time:int;
private var _ms:int;
private var _action:Boolean;
private var _activators:Object;
private var _characters:Object;
private var _animations:Object;
private var _inventory:Inventory;
private var _chronicle:Chronicle;
public var hero:Character;
public var heroInitPos:Point;
public static const DEFAULT_WIDTH:Number = 640;
public static const DEFAULT_HEIGHT:Number = 480;
public function Episode(){
visible = false;
_state = EpisodeState.CREATED;
}
public function get index():int{
return (_index);
}
public function set index(_arg1:int):void{
_index = _arg1;
}
public function get state():String{
return (_state);
}
public function get action():Boolean{
return (_action);
}
public function set action(_arg1:Boolean):void{
_action = _arg1;
}
public function getScreen():Sprite{
return (_screen);
}
public function getCanvas():Sprite{
return (_canvas);
}
public function load():void{
var _local2:Number;
var _local3:Number;
trace((("[$] : Episode #" + _index) + " loading..."));
if (hero){
heroInitPos = new Point(hero.x, hero.y);
} else {
throw (new Error("[Episode] : <load> : Hero not found."));
};
_inventory = new Inventory(this);
_chronicle = new Chronicle(this);
loadAssets();
var _local1:Sprite = (getChildByName("episodeBounds") as Sprite);
if (_local1){
removeChild(_local1);
_local2 = (_local1.width / DEFAULT_WIDTH);
_local3 = (_local1.height / DEFAULT_HEIGHT);
if (_local2 != _local3){
_scale = Math.max(_local2, _local3);
} else {
_scale = _local2;
};
};
_screen = new Sprite();
_screen.scaleX = (_screen.scaleY = (1 / _scale));
addChild(_screen);
_canvas = new Sprite();
_canvas.mouseChildren = false;
_canvas.mouseEnabled = false;
_canvas.scaleX = (_canvas.scaleY = (1 / _scale));
addChild(_canvas);
initAssets();
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, onTimer);
_state = EpisodeState.INITIALIZED;
trace((("[$] : Episode #" + _index) + " loaded"));
visible = true;
}
public function unload():void{
trace((("[$] : Episode #" + _index) + " unloading..."));
if (_state == EpisodeState.PLAYING){
finish();
};
if (_timer.running){
_timer.stop();
};
_timer.removeEventListener(TimerEvent.TIMER, onTimer);
_timer = undefined;
_time = undefined;
_ms = undefined;
haltAssets();
removeChild(_screen);
_screen = undefined;
removeChild(_canvas);
_canvas = undefined;
unloadAssets();
_inventory.dispose();
_inventory = undefined;
trace((("[$] : Episode #" + _index) + " unloaded"));
_index = undefined;
_state = EpisodeState.FINALIZED;
}
public function start():void{
trace((("[$] : Episode #" + _index) + " starting..."));
if (_state == EpisodeState.INITIALIZED){
run();
_state = EpisodeState.PLAYING;
trace((("[$] : Episode #" + _index) + " started"));
} else {
throw (new Error("[Episode] : <start> : Can't start, level must be initialized first."));
};
}
public function finish():void{
trace((("[$] : Episode #" + _index) + " finishing..."));
if ((((((_state == EpisodeState.INITIALIZED)) || ((_state == EpisodeState.PLAYING)))) || ((_state == EpisodeState.PAUSED)))){
halt();
_state = EpisodeState.FINISHED;
trace((("[$] : Episode #" + _index) + " finished"));
} else {
throw (new Error("[Episode] : <finish> : Can't finish (finished yet or is in unallowable state)."));
};
}
public function restart():void{
}
public function pause():void{
trace((("[$] : Episode #" + _index) + " pausing..."));
if (_state == EpisodeState.PLAYING){
halt();
_state = EpisodeState.PAUSED;
trace((("[$] : Episode #" + _index) + " paused"));
} else {
throw (new Error("[Episode] : <pause> : Can't pause, level isn't playing."));
};
}
public function resume():void{
trace((("[$] : Episode #" + _index) + " resuming..."));
if (_state == EpisodeState.PAUSED){
run();
_state = EpisodeState.PLAYING;
trace((("[$] : Episode #" + _index) + " resumed"));
} else {
throw (new Error("[Episode] : <resume> : Can't resume, level isn't paused."));
};
}
public function win():void{
if (_state == EpisodeState.PLAYING){
finish();
};
_state = EpisodeState.WON;
EpisodesManager.instance.submitTime(_index, _timer.currentCount);
EpisodesManager.instance.completeEpisode(_index);
if (EpisodesManager.instance.isNextEpisode()){
EpisodesManager.instance.unlockEpisode((_index + 1));
};
if (GameConfig.SAVE_LOAD){
EpisodesManager.instance.addEventListener(GameEvent.SAVE_COMPLETE, onSaveResult);
EpisodesManager.instance.addEventListener(GameEvent.SAVE_ERROR, onSaveResult);
EpisodesManager.instance.save();
} else {
if (Game.instance.isNextEpisode()){
Game.instance.openNextWindow({onOpen:Game.instance.nextEpisode});
} else {
Game.instance.openFinalWindow(_timer.currentCount, EpisodesManager.instance.getTotalTime());
};
};
}
public function lose():void{
if (_state == EpisodeState.PLAYING){
finish();
};
_state = EpisodeState.LOST;
Game.instance.openFailWindow({onOpen:Game.instance.reloadEpisode});
}
public function registerItem(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null):void{
_inventory.registerItem(_arg1, _arg2, _arg3, _arg4);
}
public function unregisterItem(_arg1:String):void{
_inventory.unregisterItem(_arg1);
}
public function retrieveItem(_arg1:String):Item{
return (_inventory.retrieveItem(_arg1));
}
public function isItem(_arg1:String):Boolean{
return (_inventory.isItem(_arg1));
}
public function addItem(_arg1:String):void{
_inventory.addItem(_arg1);
}
public function removeItem(_arg1:String):void{
_inventory.removeItem(_arg1);
}
public function getItem(_arg1:String):Item{
return (_inventory.getItem(_arg1));
}
public function hasItem(_arg1:String):Boolean{
return (_inventory.hasItem(_arg1));
}
public function takeItem(_arg1:String, _arg2:Boolean=true):void{
_inventory.takeItem(_arg1, _arg2);
}
public function gainItem(_arg1:String):void{
_inventory.gainItem(_arg1);
}
public function dropItem(_arg1:String):void{
_inventory.dropItem(_arg1);
}
public function makeItem(_arg1:String, _arg2:Array, _arg3:Function=null):void{
_inventory.makeItem(_arg1, _arg2, _arg3);
}
public function registerEvent(_arg1:String, _arg2:Boolean=false):void{
_chronicle.registerEvent(_arg1, _arg2);
}
public function unregisterEvent(_arg1:String):void{
_chronicle.unregisterEvent(_arg1);
}
public function retrieveEvent(_arg1:String):EpisodeEvent{
return (_chronicle.retrieveEvent(_arg1));
}
public function isEvent(_arg1:String):Boolean{
return (_chronicle.isEvent(_arg1));
}
public function causeEvent(_arg1:String):void{
_chronicle.causeEvent(_arg1);
}
public function forceEvent(_arg1:String):void{
_chronicle.forceEvent(_arg1);
}
public function setupEvent(_arg1:String, _arg2:Boolean):void{
_chronicle.setupEvent(_arg1, _arg2);
}
public function checkEvent(_arg1:String):Boolean{
return (_chronicle.checkEvent(_arg1));
}
public function ifThis(_arg1:String):Boolean{
return (_chronicle.ifThis(_arg1));
}
public function ifNotThis(_arg1:String):Boolean{
return (_chronicle.ifNotThis(_arg1));
}
public function ifThese(_arg1:Array):Boolean{
return (_chronicle.ifThese(_arg1));
}
public function ifNotThese(_arg1:Array):Boolean{
return (_chronicle.ifNotThese(_arg1));
}
public function ifAny(_arg1:Array):Boolean{
return (_chronicle.ifAny(_arg1));
}
public function ifNotAny(_arg1:Array):Boolean{
return (_chronicle.ifNotAny(_arg1));
}
public function ifAll():Boolean{
return (_chronicle.ifAll());
}
public function ifNone():Boolean{
return (_chronicle.ifNone());
}
public function ifEach(_arg1:Array, _arg2:Boolean):Boolean{
return (_chronicle.ifEach(_arg1, _arg2));
}
public function ifOneOf(_arg1:Array, _arg2:Boolean):Boolean{
return (_chronicle.ifOneOf(_arg1, _arg2));
}
public function addNewActivator(_arg1:String, _arg2:Sprite, _arg3:Object=null):void{
var _local4:Activator = new Activator(_arg1, _arg2, _arg3);
addActivator(_local4);
}
public function addActivator(_arg1:Activator):void{
var _local2:String = _arg1.name;
if (((!(_local2)) || (!(_local2.length)))){
throw (new Error("[Episode] : <addActivator> : Wrong name."));
};
if (_arg1){
if (!_activators[_local2]){
_activators[_local2] = _arg1;
if (!_arg1.episode){
_arg1.add(this);
};
} else {
throw (new Error("[Episode] : <addActivator> : Activator with same name already added."));
};
} else {
throw (new Error("[Episode] : <addActivator> : Can't add non-existing activator."));
};
}
public function removeActivator(_arg1:String):void{
var _local2:Activator;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <removeActivator> : Wrong name."));
};
if (_activators[_arg1]){
_local2 = _activators[_arg1];
delete _activators[_arg1];
if (_local2.episode){
_local2.remove();
};
} else {
throw (new Error("[Episode] : <removeActivator> : Activator with such name not found."));
};
}
public function getActivator(_arg1:String):Activator{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <getActivator> : Wrong name."));
};
return (_activators[_arg1]);
}
public function hasActivator(_arg1:String):Boolean{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <hasActivator> : Wrong name."));
};
return (Boolean(_activators[_arg1]));
}
public function destroyActivator(_arg1:String):void{
var _local2:Activator;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <destroyActivator> : Wrong name."));
};
if (_activators[_arg1]){
_local2 = _activators[_arg1];
delete _activators[_arg1];
_local2.destroy();
} else {
throw (new Error("[Episode] : <destroyActivator> : Activator with such name not found."));
};
}
public function disposeActivator(_arg1:String):void{
var _local2:Activator;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <disposeActivator> : Wrong name."));
};
if (_activators[_arg1]){
_local2 = _activators[_arg1];
delete _activators[_arg1];
_local2.dispose();
} else {
throw (new Error("[Episode] : <disposeActivator> : Activator with such name not found."));
};
}
public function addCharacter(_arg1:String, _arg2:Character):void{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <addCharacter> : Wrong name."));
};
if (_arg2){
if (!_characters[_arg1]){
_characters[_arg1] = _arg2;
if (!_arg2.episode){
_arg2.add(this);
};
} else {
throw (new Error("[Episode] : <addCharacter> : Character with same name already added."));
};
} else {
throw (new Error("[Episode] : <addCharacter> : Can't add non-existing character."));
};
}
public function removeCharacter(_arg1:String):void{
var _local2:Character;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <removeCharacter> : Wrong name."));
};
if (_activators[_arg1]){
_local2 = _characters[_arg1];
delete _characters[_arg1];
if (_local2.episode){
_local2.remove();
};
} else {
throw (new Error("[Episode] : <removeCharacter> : Character with such name not found."));
};
}
public function getCharacter(_arg1:String):Character{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <getCharacter> : Wrong name."));
};
return (_characters[_arg1]);
}
public function hasCharacter(_arg1:String):Boolean{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <hasCharacter> : Wrong name."));
};
return (Boolean(_characters[_arg1]));
}
public function destroyCharacter(_arg1:String):void{
var _local2:Character;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <destroyCharacter> : Wrong name."));
};
if (_characters[_arg1]){
_local2 = _characters[_arg1];
delete _characters[_arg1];
_local2.destroy();
} else {
throw (new Error("[Episode] : <destroyCharacter> : Character with such name not found."));
};
}
public function disposeCharacter(_arg1:String):void{
var _local2:Character;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <disposeCharacter> : Wrong name."));
};
if (_characters[_arg1]){
_local2 = _characters[_arg1];
delete _characters[_arg1];
_local2.dispose();
} else {
throw (new Error("[Episode] : <disposeCharacter> : Character with such name not found."));
};
}
public function addAnimation(_arg1:String, _arg2:Animation):void{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <addAnimation> : Wrong name."));
};
if (_arg2){
if (!_animations[_arg1]){
_animations[_arg1] = _arg2;
if (!_arg2.episode){
_arg2.add(this);
};
} else {
throw (new Error("[Episode] : <addAnimation> : Animation with same name already added."));
};
} else {
throw (new Error("[Episode] : <addAnimation> : Can't add non-existing animation."));
};
}
public function removeAnimation(_arg1:String):void{
var _local2:Animation;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <removeAnimation> : Wrong name."));
};
if (_animations[_arg1]){
_local2 = _animations[_arg1];
delete _animations[_arg1];
if (_local2.episode){
_local2.remove();
};
} else {
throw (new Error("[Episode] : <removeAnimation> : Animation with such name not found."));
};
}
public function getAnimation(_arg1:String):Animation{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <getAnimation> : Wrong name."));
};
return (_animations[_arg1]);
}
public function hasAnimation(_arg1:String):Boolean{
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <hasAnimation> : Wrong name."));
};
return (Boolean(_animations[_arg1]));
}
public function destroyAnimation(_arg1:String):void{
var _local2:Animation;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <destroyAnimation> : Wrong name."));
};
if (_animations[_arg1]){
_local2 = _animations[_arg1];
delete _animations[_arg1];
_local2.destroy();
} else {
throw (new Error("[Episode] : <destroyAnimation> : Animation with such name not found."));
};
}
public function disposeAnimation(_arg1:String):void{
var _local2:Animation;
if (((!(_arg1)) || (!(_arg1.length)))){
throw (new Error("[Episode] : <disposeAnimation> : Wrong name."));
};
if (_animations[_arg1]){
_local2 = _animations[_arg1];
delete _animations[_arg1];
_local2.dispose();
} else {
throw (new Error("[Episode] : <disposeAnimation> : Character with such name not found."));
};
}
public function heroIdle():void{
hero.idle();
action = true;
}
public function heroRefuse():void{
action = false;
hero.playAnim("refuse", heroIdle);
}
public function heroGoToLocation(_arg1:Number, _arg2:Number, _arg3:Function=null, _arg4:String=null, _arg5:Number=40, _arg6:Number=40):void{
var cx:Number;
var $x = _arg1;
var $y = _arg2;
var $callback = _arg3;
var $actName = _arg4;
var $leftOffset = _arg5;
var $rightOffset = _arg6;
action = false;
if ($actName){
removeActivator($actName);
};
cx = $x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, $y, function ():void{
hero.turnTo(cx);
if ($callback != null){
$callback();
} else {
heroIdle();
};
});
}
public function heroGoTo(_arg1:DisplayObject, _arg2:String=null, _arg3:Number=40, _arg4:Number=40, _arg5:Number=0):void{
var cx:Number;
var $someView = _arg1;
var $actName = _arg2;
var $leftOffset = _arg3;
var $rightOffset = _arg4;
var $verticalOffset = _arg5;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($someView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
heroIdle();
});
}
public function heroGoToAndDo(_arg1:DisplayObject, _arg2:Function=null, _arg3:String=null, _arg4:Number=40, _arg5:Number=40, _arg6:Number=0):void{
var cx:Number;
var $someView = _arg1;
var $workToDo = _arg2;
var $actName = _arg3;
var $leftOffset = _arg4;
var $rightOffset = _arg5;
var $verticalOffset = _arg6;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($someView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
if ($workToDo != null){
$workToDo();
} else {
heroIdle();
};
});
}
public function heroTakeItem(_arg1:String, _arg2:DisplayObject, _arg3:String="take", _arg4:String=null, _arg5:Number=40, _arg6:Number=40, _arg7:Number=0):void{
var cx:Number;
var $itemName = _arg1;
var $itemView = _arg2;
var $animName = _arg3;
var $actName = _arg4;
var $leftOffset = _arg5;
var $rightOffset = _arg6;
var $verticalOffset = _arg7;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($itemView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
hero.playAnim($animName, function ():void{
takeItem($itemName);
$itemView.visible = false;
hero.animCallback = heroIdle;
});
});
}
public function heroFindItem(_arg1:String, _arg2:DisplayObject, _arg3:Function, _arg4:String="take", _arg5:String=null, _arg6:Number=40, _arg7:Number=40, _arg8:Number=0):void{
var cx:Number;
var $itemName = _arg1;
var $itemView = _arg2;
var $effect = _arg3;
var $animName = _arg4;
var $actName = _arg5;
var $leftOffset = _arg6;
var $rightOffset = _arg7;
var $verticalOffset = _arg8;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($itemView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
hero.playAnim($animName, function ():void{
takeItem($itemName);
$itemView.visible = false;
hero.animCallback = $effect;
});
});
}
public function heroUseItem(_arg1:String, _arg2:DisplayObject, _arg3:Function, _arg4:String="take", _arg5:String=null, _arg6:Number=40, _arg7:Number=40, _arg8:Number=0):void{
var cx:Number;
var $itemName = _arg1;
var $someView = _arg2;
var $effect = _arg3;
var $animName = _arg4;
var $actName = _arg5;
var $leftOffset = _arg6;
var $rightOffset = _arg7;
var $verticalOffset = _arg8;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($someView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
dropItem($itemName);
hero.playAnim($animName, function ():void{
hero.animCallback = heroIdle;
$effect();
});
});
}
public function heroApplyItem(_arg1:String, _arg2:DisplayObject, _arg3:Function, _arg4:String="take", _arg5:String=null, _arg6:Number=40, _arg7:Number=40, _arg8:Number=0):void{
var cx:Number;
var $itemName = _arg1;
var $someView = _arg2;
var $effect = _arg3;
var $animName = _arg4;
var $actName = _arg5;
var $leftOffset = _arg6;
var $rightOffset = _arg7;
var $verticalOffset = _arg8;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($someView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
dropItem($itemName);
hero.playAnim($animName, $effect);
});
}
public function heroPerformAction(_arg1:DisplayObject, _arg2:Function, _arg3:String="take", _arg4:String=null, _arg5:Array=null, _arg6:Number=40, _arg7:Number=40, _arg8:Number=0):void{
var cx:Number;
var $someView = _arg1;
var $effect = _arg2;
var $animName = _arg3;
var $actName = _arg4;
var $itemNames = _arg5;
var $leftOffset = _arg6;
var $rightOffset = _arg7;
var $verticalOffset = _arg8;
action = false;
if ($actName){
removeActivator($actName);
};
cx = getDisplObjCenter($someView).x;
var tx:Number = ((hero.x)<cx) ? (cx - $leftOffset) : (cx + $rightOffset);
hero.walkTo(tx);
hero.moveTo(tx, (hero.y + $verticalOffset), function ():void{
hero.turnTo(cx);
if ((($itemNames) && ($itemNames.length))){
while ($itemNames.length) {
dropItem($itemNames.pop());
};
};
hero.playAnim($animName, $effect);
});
}
public function getDisplObjCenter(_arg1:DisplayObject):Point{
var _local2:Rectangle = _arg1.getBounds(this);
return (new Point((_local2.x + (_local2.width / 2)), (_local2.y + (_local2.height / 2))));
}
public function appearAt(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null):void{
Movement.appearAt(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function motionTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=64):TweenLite{
return (Movement.motionTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public function onTimeTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=0):TweenLite{
return (Movement.onTimeTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public function vCurveTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
Movement.vCurveTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function hCurveTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
Movement.hCurveTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function motionVia(_arg1:DisplayObject, _arg2:Array, _arg3:Function=null, _arg4:Number=64):TimelineLite{
return (Movement.motionVia(_arg1, _arg2, _arg3, _arg4));
}
private function run():void{
if (_ms < 1000){
_timer.delay = (1000 - _ms);
_ms = -1;
};
_time = getTimer();
_timer.start();
}
private function halt():void{
_timer.stop();
_ms = (getTimer() - _time);
}
private function loadAssets():void{
var _local3:MovieClip;
_activators = new Object();
_characters = new Object();
_animations = new Object();
var _local1:uint = numChildren;
var _local2:uint;
while (_local2 < _local1) {
_local3 = (getChildAt(_local2) as MovieClip);
if (_local3){
if ((_local3 is Character)){
addCharacter(_local3.name, (_local3 as Character));
} else {
if ((_local3 is Animation)){
addAnimation(_local3.name, (_local3 as Animation));
} else {
_local3.gotoAndPlay(1);
};
};
};
_local2++;
};
}
private function unloadAssets():void{
var _local1:String;
var _local2:String;
var _local3:String;
for (_local1 in _characters) {
disposeCharacter(_local1);
};
_characters = undefined;
for (_local2 in _animations) {
disposeAnimation(_local2);
};
_animations = undefined;
for (_local3 in _activators) {
disposeActivator(_local3);
};
_activators = undefined;
}
private function initAssets():void{
var _local1:Character;
var _local2:Animation;
for each (_local1 in _characters) {
_local1.activate();
};
for each (_local2 in _animations) {
_local2.activate();
};
}
private function haltAssets():void{
var _local1:Activator;
var _local2:Character;
var _local3:Animation;
for each (_local1 in _activators) {
_local1.deactivate();
};
for each (_local2 in _characters) {
_local2.deactivate();
};
for each (_local3 in _animations) {
_local3.deactivate();
};
}
private function onTimer(_arg1:TimerEvent):void{
if (_timer.delay != 1000){
_timer.delay = 1000;
};
}
private function onSaveResult(_arg1:GameEvent):void{
EpisodesManager.instance.removeEventListener(GameEvent.SAVE_COMPLETE, onSaveResult);
EpisodesManager.instance.removeEventListener(GameEvent.SAVE_ERROR, onSaveResult);
if (Game.instance.isNextEpisode()){
Game.instance.openNextWindow();
} else {
Game.instance.openFinalWindow(_timer.currentCount, EpisodesManager.instance.getTotalTime());
};
}
}
}//package aq.pcge.game
Section 23
//EpisodeEvent (aq.pcge.game.EpisodeEvent)
package aq.pcge.game {
import flash.events.*;
public class EpisodeEvent extends Event {
private var _data:Object;
public function EpisodeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
_data = _arg4;
}
public function get data():Object{
return (_data);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
override public function clone():Event{
return (new EpisodeEvent(type, bubbles, cancelable, _data));
}
}
}//package aq.pcge.game
Section 24
//EpisodesManager (aq.pcge.game.EpisodesManager)
package aq.pcge.game {
import flash.display.*;
import flash.events.*;
import aq.pcge.*;
import flash.net.*;
public class EpisodesManager extends Sprite {
private var _episodes:Array;
private var _index:uint;
private var _episode:IEpisode;
private var _so:SharedObject;
private static var _instance:EpisodesManager;
public function EpisodesManager(){
if (!_instance){
_instance = this;
_episodes = new Array();
_so = SharedObject.getLocal(GameApplication.gameName);
} else {
throw (new Error("[EpisodesManager] : <EpisodesManager> : Only one instance of this class is allowed."));
};
}
public function submitTime(_arg1:uint, _arg2:uint):void{
if (_episodes[_arg1] != null){
if (_episodes[_arg1].bestTime > _arg2){
_episodes[_arg1].bestTime = _arg2;
};
} else {
throw (new Error("[EpisodesManager] : <submitTime> : Episode with such index isn't registered."));
};
}
public function getTotalTime():uint{
var _local1:uint;
var _local2:uint = _episodes.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (_local1 + _episodes[_local3].bestTime);
_local3++;
};
return (_local1);
}
public function getCurrentEpisode():IEpisode{
return (_episode);
}
public function getCurrentEpisodeIndex():uint{
return (_index);
}
public function getNumEpisodes():uint{
return (_episodes.length);
}
public function load():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:int;
var _local5:uint;
var _local6:uint;
if (_so.data.gamesave){
_local1 = _so.data.gamesave;
_local2 = _episodes.length;
_local3 = 0;
while (_local3 < _local2) {
if ((_local1[_local3] is Object)){
_episodes[_local3].locked = _local1[_local3].locked;
_episodes[_local3].completed = _local1[_local3].completed;
_episodes[_local3].bestTime = _local1[_local3].bestTime;
} else {
trace("[EpisodesManager] : <load> : Gamesave corrupted.");
trace("[EpisodesManager] : Episode will be reset to default.");
_episodes[_local3].locked = true;
_episodes[_local3].completed = false;
_episodes[_local3].bestTime = undefined;
};
_local3++;
};
dispatchEvent(new GameEvent(GameEvent.LOAD_COMPLETE));
_local4 = -1;
_local5 = _episodes.length;
_local6 = 0;
while (_local6 < _local5) {
if (!_episodes[_local6].completed){
_local4 = _local6;
break;
};
_local6++;
};
if (_local4 < 0){
_index = (_episodes.length - 1);
} else {
_index = _local4;
};
} else {
dispatchEvent(new GameEvent(GameEvent.LOAD_ERROR));
_index = 0;
};
}
public function save():void{
_so.data.gamesave = new Array();
var gamesave:Array = _so.data.gamesave;
var iLim:uint = _episodes.length;
var i:uint;
while (i < iLim) {
gamesave[i] = {locked:_episodes[i].locked, completed:_episodes[i].completed, bestTime:_episodes[i].bestTime};
i = (i + 1);
};
var flushStatus:String;
try {
flushStatus = _so.flush(10000);
} catch(error:Error) {
dispatchEvent(new GameEvent(GameEvent.SAVE_ERROR));
};
if (flushStatus != null){
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
_so.addEventListener(NetStatusEvent.NET_STATUS, onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
dispatchEvent(new GameEvent(GameEvent.SAVE_COMPLETE));
break;
};
};
}
public function wipe():void{
_so.data.gamesave = new Array();
_so.clear();
}
public function registerEpisode(_arg1:Class, _arg2:uint):void{
if (_episodes[_arg2] == null){
_episodes[_arg2] = {episode:_arg1, locked:true, completed:false, bestTime:Number.POSITIVE_INFINITY};
} else {
throw (new Error("[EpisodesManager] : <registerEpisode> : Episode with same index already registered."));
};
}
public function unregisterEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
_episodes[_arg1].episode = undefined;
_episodes[_arg1].locked = undefined;
_episodes[_arg1].completed = undefined;
_episodes[_arg1].bestTime = undefined;
_episodes[_arg1] = undefined;
} else {
throw (new Error("[EpisodesManager] : <unregisterEpisode> : Episode with such index isn't registered."));
};
}
public function hasEpisodeAt(_arg1:uint):Boolean{
if (_arg1 < _episodes.length){
return (Boolean(_episodes[_arg1]));
};
return (false);
}
public function lockEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
_episodes[_arg1].locked = true;
} else {
throw (new Error("[EpisodesManager] : <lockEpisode> : Episode with such index isn't registered."));
};
}
public function unlockEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
_episodes[_arg1].locked = false;
} else {
throw (new Error("[EpisodesManager] : <unlockEpisode> : Episode with such index isn't registered."));
};
}
public function completeEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
_episodes[_arg1].completed = true;
} else {
throw (new Error("[EpisodesManager] : <completeEpisode> : Episode with such index isn't registered."));
};
}
public function resetEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
_episodes[_arg1].completed = false;
} else {
throw (new Error("[EpisodesManager] : <resetEpisode> : Episode with such index isn't registered."));
};
}
public function loadEpisode(_arg1:uint):void{
if (_episodes[_arg1] != null){
if (_episode){
unloadEpisode();
};
_index = _arg1;
_episode = new _episodes[_index].episode();
_episode.index = _index;
_episode.load();
addChild((_episode as Sprite));
} else {
throw (new Error("[EpisodesManager] : <loadEpisode> : Episode with such index isn't registered."));
};
}
public function unloadEpisode():void{
if (_episode){
_episode.unload();
removeChild((_episode as Sprite));
_episode = undefined;
} else {
throw (new Error("[EpisodesManager] : <unloadEpisode> : There is no episode to unload."));
};
}
public function reloadEpisode():void{
if (_episode){
unloadEpisode();
_episode = new _episodes[_index].episode();
_episode.index = _index;
_episode.load();
addChild((_episode as Sprite));
} else {
throw (new Error("[EpisodesManager] : <reloadEpisode> : There is no episode to reload."));
};
}
public function startEpisode():void{
if (_episode){
_episode.start();
} else {
throw (new Error("[EpisodesManager] : <startEpisode> : There is no episode to start."));
};
}
public function finishEpisode():void{
if (_episode){
_episode.finish();
} else {
throw (new Error("[EpisodesManager] : <finishEpisode> : There is no episode to finish."));
};
}
public function pauseEpisode():void{
if (_episode){
_episode.pause();
} else {
throw (new Error("[EpisodesManager] : <pauseEpisode> : There is no episode to pause."));
};
}
public function resumeEpisode():void{
if (_episode){
_episode.resume();
} else {
throw (new Error("[EpisodesManager] : <resumeEpisode> : There is no episode to resume."));
};
}
public function prevEpisode():void{
if (_index > 0){
_index--;
loadEpisode(_index);
} else {
throw (new Error("[EpisodesManager] : <prevEpisode> : There isn't prev episode."));
};
}
public function nextEpisode():void{
if (_index < (_episodes.length - 1)){
_index++;
loadEpisode(_index);
} else {
throw (new Error("[EpisodesManager] : <nextEpisode> : There isn't next episode."));
};
}
public function isPrevEpisode():Boolean{
return ((_index > 0));
}
public function isNextEpisode():Boolean{
return ((_index < (_episodes.length - 1)));
}
public function isEpisodeCompleted(_arg1:uint):Boolean{
if (_episodes[_arg1] != null){
return (_episodes[_arg1].completed);
};
throw (new Error("[EpisodesManager] : <isEpisodeCompleted> : Episode with such index isn't registered."));
}
public function isEpisodeLocked(_arg1:uint):Boolean{
if (_episodes[_arg1] != null){
return (_episodes[_arg1].locked);
};
throw (new Error("[EpisodesManager] : <isEpisodeLocked> : Episode with such index isn't registered."));
}
private function onFlushStatus(_arg1:NetStatusEvent):void{
switch (_arg1.info.code){
case "SharedObject.Flush.Success":
dispatchEvent(new GameEvent(GameEvent.SAVE_COMPLETE));
break;
case "SharedObject.Flush.Failed":
dispatchEvent(new GameEvent(GameEvent.SAVE_ERROR));
break;
};
_so.removeEventListener(NetStatusEvent.NET_STATUS, onFlushStatus);
}
public static function get instance():EpisodesManager{
return (_instance);
}
}
}//package aq.pcge.game
Section 25
//EpisodeState (aq.pcge.game.EpisodeState)
package aq.pcge.game {
public class EpisodeState {
public static const CREATED:String = "created";
public static const INITIALIZED:String = "initialized";
public static const PLAYING:String = "playing";
public static const PAUSED:String = "paused";
public static const FINISHED:String = "finished";
public static const COMPLETED:String = "completed";
public static const FINALIZED:String = "finalized";
public static const WON:String = "won";
public static const LOST:String = "lost";
}
}//package aq.pcge.game
Section 26
//Game (aq.pcge.game.Game)
package aq.pcge.game {
import flash.display.*;
import aq.pcge.common.*;
import aq.pcge.*;
public class Game extends Screen {
public var invView:InventoryView;
public var windowsManager:GameWindowsManager;
public var levelsManager:EpisodesManager;
public var logo:Sprite;
public var gameBar:Sprite;
public var moreGamesButton:Sprite;
private static var _instance:Game;
public function Game(){
if (!_instance){
_instance = this;
if (GameApplication.platform == "md"){
logo.visible = false;
} else {
moreGamesButton.visible = false;
};
} else {
throw (new Error("[Game] : <Game> : Only one instance of this class is allowed."));
};
}
public function submitTime(_arg1:uint, _arg2:uint):void{
levelsManager.submitTime(_arg1, _arg2);
}
public function getTotalTime():uint{
return (levelsManager.getTotalTime());
}
public function getCurrentEpisode():IEpisode{
return (levelsManager.getCurrentEpisode());
}
public function getCurrentEpisodeIndex():uint{
return (levelsManager.getCurrentEpisodeIndex());
}
public function getNumEpisodes():uint{
return (levelsManager.getNumEpisodes());
}
override public function hide():void{
returnToGame();
if (levelsManager.getCurrentEpisode()){
unloadEpisode();
};
super.hide();
}
public function load():void{
levelsManager.load();
}
public function save():void{
levelsManager.save();
}
public function openFinalWindow(_arg1:uint=0, _arg2:uint=0):void{
if (GameApplication.platform == "md"){
windowsManager.openFinalWindowMobile(_arg1, _arg2);
} else {
windowsManager.openFinalWindow(_arg1, _arg2);
};
}
public function openNextWindow(_arg1:Object=null):void{
windowsManager.openNextWindow(_arg1);
}
public function openFailWindow(_arg1:Object=null):void{
windowsManager.openFailWindow(_arg1);
}
public function openItemWindow(_arg1:DisplayObject=null):void{
windowsManager.openItemWindow(_arg1);
}
public function openHelloWindow():void{
invView.visible = false;
gameBar.visible = false;
windowsManager.openHelloWindow();
}
public function openOptionsWindow():void{
windowsManager.openOptionsWindow();
}
public function returnToGame():void{
invView.visible = true;
gameBar.visible = true;
if (windowsManager.activeWindow){
windowsManager.closeActiveWindow();
};
}
public function registerEpisode(_arg1:Class, _arg2:uint):void{
levelsManager.registerEpisode(_arg1, _arg2);
}
public function unregisterEpisode(_arg1:uint):void{
levelsManager.unregisterEpisode(_arg1);
}
public function hasEpisodeAt(_arg1:uint):Boolean{
return (levelsManager.hasEpisodeAt(_arg1));
}
public function lockEpisode(_arg1:uint):void{
levelsManager.lockEpisode(_arg1);
}
public function unlockEpisode(_arg1:uint):void{
levelsManager.unlockEpisode(_arg1);
}
public function completeEpisode(_arg1:uint):void{
levelsManager.completeEpisode(_arg1);
}
public function resetEpisode(_arg1:uint):void{
levelsManager.resetEpisode(_arg1);
}
public function loadEpisode(_arg1:uint):void{
levelsManager.loadEpisode(_arg1);
}
public function unloadEpisode():void{
levelsManager.unloadEpisode();
}
public function reloadEpisode():void{
levelsManager.reloadEpisode();
}
public function startEpisode():void{
levelsManager.startEpisode();
}
public function finishEpisode():void{
levelsManager.finishEpisode();
}
public function pauseEpisode():void{
levelsManager.pauseEpisode();
}
public function resumeEpisode():void{
levelsManager.resumeEpisode();
}
public function prevEpisode():void{
levelsManager.prevEpisode();
}
public function nextEpisode():void{
levelsManager.nextEpisode();
}
public function isPrevEpisode():Boolean{
return (levelsManager.isPrevEpisode());
}
public function isNextEpisode():Boolean{
return (levelsManager.isNextEpisode());
}
public function isEpisodeCompleted(_arg1:uint):Boolean{
return (levelsManager.isEpisodeCompleted(_arg1));
}
public function isEpisodeLocked(_arg1:uint):Boolean{
return (levelsManager.isEpisodeLocked(_arg1));
}
private function onLoadError(_arg1:GameEvent):void{
}
private function onLoadComplete(_arg1:GameEvent):void{
}
private function onSaveError(_arg1:GameEvent):void{
}
private function onSaveComplete(_arg1:GameEvent):void{
}
public static function get instance():Game{
return (_instance);
}
}
}//package aq.pcge.game
Section 27
//GameBar (aq.pcge.game.GameBar)
package aq.pcge.game {
import flash.display.*;
import aq.pcge.*;
public class GameBar extends Sprite {
public var muteButton:Sprite;
public var helpButton:Sprite;
public var optionsButton:Sprite;
public function GameBar(){
if (GameApplication.platform == "md"){
muteButton.visible = false;
helpButton.visible = false;
} else {
optionsButton.visible = false;
};
}
}
}//package aq.pcge.game
Section 28
//GameConfig (aq.pcge.game.GameConfig)
package aq.pcge.game {
public class GameConfig {
public static const SAVE_LOAD:Boolean = false;
}
}//package aq.pcge.game
Section 29
//GameEvent (aq.pcge.game.GameEvent)
package aq.pcge.game {
import flash.events.*;
public class GameEvent extends Event {
private var _data:Object;
public static const EPISODE_COMPLETE:String = "episodeComplete";
public static const EPISODE_FAILED:String = "episodeFailed";
public static const LOAD_COMPLETE:String = "loadComplete";
public static const LOAD_ERROR:String = "loadError";
public static const SAVE_COMPLETE:String = "saveComplete";
public static const SAVE_ERROR:String = "saveError";
public function GameEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
_data = _arg4;
}
public function get data():Object{
return (_data);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
override public function clone():Event{
return (new GameEvent(type, bubbles, cancelable, _data));
}
}
}//package aq.pcge.game
Section 30
//GameWindowsManager (aq.pcge.game.GameWindowsManager)
package aq.pcge.game {
import flash.display.*;
import aq.pcge.common.*;
import aq.pcge.game.windows.*;
public class GameWindowsManager extends WindowsManager {
private static var _instance:GameWindowsManager;
public function GameWindowsManager(){
if (!_instance){
_instance = this;
} else {
throw (new Error("[GameWindowsManager] : <GameWindowsManager> : Only one instance of this class is allowed."));
};
}
public function openFinalWindow(_arg1:uint=0, _arg2:uint=0):void{
openActiveWindow(new FinalWindow(_arg1, _arg2));
}
public function openNextWindow(_arg1:Object=null):void{
var _local2:FlapWindow = new NextWindow();
if ((_arg1 is Object)){
if ((_arg1.onClose is Function)){
_local2.onClose = _arg1.onClose;
};
if ((_arg1.onOpen is Function)){
_local2.onOpen = _arg1.onOpen;
};
if ((_arg1.onStop is Function)){
_local2.onStop = _arg1.onStop;
};
};
openActiveWindow(_local2);
}
public function openFailWindow(_arg1:Object=null):void{
var _local2:FlapWindow = new FailWindow();
if ((_arg1 is Object)){
if ((_arg1.onClose is Function)){
_local2.onClose = _arg1.onClose;
};
if ((_arg1.onOpen is Function)){
_local2.onOpen = _arg1.onOpen;
};
if ((_arg1.onStop is Function)){
_local2.onStop = _arg1.onStop;
};
};
openActiveWindow(_local2);
}
public function openItemWindow(_arg1:DisplayObject=null):void{
openActiveWindow(new ItemWindow(_arg1));
}
public function openHelloWindow():void{
openActiveWindow(new HelloWindow());
}
public function openOptionsWindow():void{
openActiveWindow(new OptionsWindow());
}
public function openFinalWindowMobile(_arg1:uint=0, _arg2:uint=0):void{
openActiveWindow(new FinalWindowMobile(_arg1, _arg2));
}
public static function get instance():GameWindowsManager{
return (_instance);
}
}
}//package aq.pcge.game
Section 31
//IEpisode (aq.pcge.game.IEpisode)
package aq.pcge.game {
import flash.display.*;
public interface IEpisode {
function get index():int;
function set index(_arg1:int):void;
function get state():String;
function get action():Boolean;
function set action(_arg1:Boolean):void;
function getScreen():Sprite;
function getCanvas():Sprite;
function load():void;
function unload():void;
function start():void;
function finish():void;
function pause():void;
function resume():void;
function win():void;
function lose():void;
function registerItem(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null):void;
function unregisterItem(_arg1:String):void;
function retrieveItem(_arg1:String):Item;
function isItem(_arg1:String):Boolean;
function addItem(_arg1:String):void;
function removeItem(_arg1:String):void;
function getItem(_arg1:String):Item;
function hasItem(_arg1:String):Boolean;
function takeItem(_arg1:String, _arg2:Boolean=true):void;
function gainItem(_arg1:String):void;
function dropItem(_arg1:String):void;
function makeItem(_arg1:String, _arg2:Array, _arg3:Function=null):void;
function registerEvent(_arg1:String, _arg2:Boolean=false):void;
function unregisterEvent(_arg1:String):void;
function retrieveEvent(_arg1:String):EpisodeEvent;
function isEvent(_arg1:String):Boolean;
function causeEvent(_arg1:String):void;
function forceEvent(_arg1:String):void;
function setupEvent(_arg1:String, _arg2:Boolean):void;
function checkEvent(_arg1:String):Boolean;
function ifThis(_arg1:String):Boolean;
function ifNotThis(_arg1:String):Boolean;
function ifThese(_arg1:Array):Boolean;
function ifNotThese(_arg1:Array):Boolean;
function ifAny(_arg1:Array):Boolean;
function ifNotAny(_arg1:Array):Boolean;
function ifAll():Boolean;
function ifNone():Boolean;
function ifEach(_arg1:Array, _arg2:Boolean):Boolean;
function ifOneOf(_arg1:Array, _arg2:Boolean):Boolean;
function addNewActivator(_arg1:String, _arg2:Sprite, _arg3:Object=null):void;
function addActivator(_arg1:Activator):void;
function removeActivator(_arg1:String):void;
function getActivator(_arg1:String):Activator;
function hasActivator(_arg1:String):Boolean;
function destroyActivator(_arg1:String):void;
function disposeActivator(_arg1:String):void;
function addCharacter(_arg1:String, _arg2:Character):void;
function removeCharacter(_arg1:String):void;
function getCharacter(_arg1:String):Character;
function hasCharacter(_arg1:String):Boolean;
function destroyCharacter(_arg1:String):void;
function disposeCharacter(_arg1:String):void;
function addAnimation(_arg1:String, _arg2:Animation):void;
function removeAnimation(_arg1:String):void;
function getAnimation(_arg1:String):Animation;
function hasAnimation(_arg1:String):Boolean;
function destroyAnimation(_arg1:String):void;
function disposeAnimation(_arg1:String):void;
}
}//package aq.pcge.game
Section 32
//Inventory (aq.pcge.game.Inventory)
package aq.pcge.game {
import flash.display.*;
import flash.events.*;
public class Inventory extends EventDispatcher {
private var _episode:Episode;
private var _exists:Boolean;
private var _registry:Object;
private var _items:Object;
private var _view:InventoryView;
public function Inventory(_arg1:Episode){
if (!_arg1){
throw (new Error("[Inventory] : <Inventory> : Episode isn't exists."));
};
_episode = _arg1;
_registry = new Object();
_items = new Object();
_view = InventoryView.instance;
_exists = true;
}
public function get episode():IEpisode{
return (_episode);
}
public function get view():InventoryView{
return (_view);
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
_registry = undefined;
_items = undefined;
_view.reset();
_view = undefined;
_episode = undefined;
}
public function dispose():void{
var _local1:Item;
_items = undefined;
for each (_local1 in _registry) {
_local1.destroy();
};
_registry = undefined;
_view.reset();
_view = undefined;
_episode = undefined;
}
public function registerItem(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null):void{
if (!_registry[_arg1]){
_registry[_arg1] = new Item(_arg1, _arg2, _arg3, _arg4);
} else {
throw (new Error("[Inventory] : <registerItem> : Item with same name already registered."));
};
}
public function unregisterItem(_arg1:String):void{
if (_registry[_arg1]){
_registry[_arg1].dispose();
delete _registry[_arg1];
} else {
throw (new Error("[Inventory] : <unregisterItem> : Item with such name not found."));
};
}
public function retrieveItem(_arg1:String):Item{
if (_registry[_arg1]){
return (_registry[_arg1]);
};
throw (new Error("[Inventory] : <retrieveItem> : Item with such name not found."));
}
public function isItem(_arg1:String):Boolean{
return (Boolean(_registry[_arg1]));
}
public function addItem(_arg1:String):void{
if (_registry[_arg1]){
if (!_items[_arg1]){
_items[_arg1] = _registry[_arg1];
} else {
throw (new Error((("[Inventory] : <addItem> : Item '" + _arg1) + "' already added.")));
};
} else {
throw (new Error("[Inventory] : <addItem> : Item isn't registered."));
};
}
public function removeItem(_arg1:String):void{
if (_registry[_arg1]){
if (_items[_arg1]){
delete _items[_arg1];
} else {
throw (new Error((("[Inventory] : <removeItem> : Item '" + _arg1) + "' not found.")));
};
} else {
throw (new Error("[Inventory] : <removeItem> : Item isn't registered."));
};
}
public function getItem(_arg1:String):Item{
if (_registry[_arg1]){
if (_items[_arg1]){
return (_items[_arg1]);
};
throw (new Error((("[Inventory] : <getItem> : Item '" + _arg1) + "' isn't added.")));
//unresolved jump
};
throw (new Error("[Inventory] : <getItem> : Item isn't registered."));
}
public function findItem(_arg1:String):Item{
if (_registry[_arg1]){
return (_items[_arg1]);
};
throw (new Error("[Inventory] : <findItem> : Item isn't registered."));
}
public function hasItem(_arg1:String):Boolean{
if (_registry[_arg1]){
return (Boolean(_items[_arg1]));
};
throw (new Error("[Inventory] : <hasItem> : Item isn't registered."));
}
public function notHasItem(_arg1:String):Boolean{
if (_registry[_arg1]){
return (Boolean(!(_items[_arg1])));
};
throw (new Error("[Inventory] : <notHasItem> : Item isn't registered."));
}
public function hasAllItems(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (!_items[_local4]){
return (false);
};
} else {
throw (new Error("[Inventory] : <hasAllItems> : Item isn't registered."));
};
_local3++;
};
return (true);
}
public function notHasAllItems(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (_items[_local4]){
return (false);
};
} else {
throw (new Error("[Inventory] : <notHasAllItems> : Item isn't registered."));
};
_local3++;
};
return (true);
}
public function hasAnyItem(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (_items[_local4]){
return (true);
};
} else {
throw (new Error("[Inventory] : <hasAnyItem> : Item isn't registered."));
};
_local3++;
};
return (false);
}
public function notHasAnyItem(_arg1:Array):Boolean{
var _local4:String;
var _local2:uint = _arg1.length;
var _local3:uint;
while (_local3 < _local2) {
_local4 = _arg1[_local3];
if (_registry[_local4]){
if (!_items[_local4]){
return (true);
};
} else {
throw (new Error("[Inventory] : <notHasAnyItem> : Item isn't registered."));
};
_local3++;
};
return (false);
}
public function takeItem(_arg1:String, _arg2:Boolean=true):void{
addItem(_arg1);
if (_view){
_view.addItem(_registry[_arg1]);
};
if (_arg2){
showItemWindow(_arg1);
};
}
public function gainItem(_arg1:String):void{
addItem(_arg1);
if (_view){
_view.addItem(_registry[_arg1]);
};
}
public function dropItem(_arg1:String):void{
removeItem(_arg1);
if (_view){
_view.removeItem(_registry[_arg1]);
};
}
public function makeItem(_arg1:String, _arg2:Array, _arg3:Function=null):void{
var _local4:uint = _arg2.length;
var _local5:Array = new Array();
var _local6:uint;
while (_local6 < _local4) {
_local5.push(_registry[_arg2[_local6]]);
_local6++;
};
InventoryAnimator.animate(_registry[_arg1], _local5, _arg3);
}
private function showItemWindow(_arg1:String):void{
var _local3:*;
var _local4:DisplayObject;
var _local2:Item = _items[_arg1];
if (_local2.icon){
_local3 = _local2.icon;
_local4 = DisplayObject(new (_local3));
GameWindowsManager.instance.openItemWindow(_local4);
} else {
throw (new Error("[Inventory] : <showItemWindow> : Icon for item is undefined."));
};
}
}
}//package aq.pcge.game
Section 33
//InventoryAnimator (aq.pcge.game.InventoryAnimator)
package aq.pcge.game {
import flash.display.*;
import com.greensock.*;
import flash.utils.*;
import aq.pcge.*;
import aq.pcge.game.windows.*;
public class InventoryAnimator {
public static const ITEM_FLYING_IN:Number = 1;
public static const ITEM_FLYING_OUT:Number = 1;
private static const CENTER_X:Number = (GameApplication.SCREEN_WIDTH / 2);
private static const CENTER_Y:Number = (GameApplication.SCREEN_HEIGHT / 2);
private static var _item:Item;
private static var _icon:DisplayObject;
private static var _materials:Dictionary = new Dictionary();
private static var _highlight:Dictionary = new Dictionary();
private static var _matImages:Dictionary = new Dictionary();
private static var _toMove:Array = new Array();
private static var _callback:Function;
private static var _itemTween:TweenLite;
public static function animate(_arg1:Item, _arg2:Array, _arg3:Function=null):void{
var _local4:Item;
var _local5:uint;
var _local6:uint;
if (_arg1){
if (_arg2){
_local5 = _arg2.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = _arg2[_local6];
if (_local4){
_materials[_local4] = _local4;
} else {
throw (new Error("[ItemsAnimationManager] : <animate> : Wrong input."));
};
_local6++;
};
_item = _arg1;
_callback = _arg3;
InventoryView.instance.freeze = true;
for each (_local4 in _materials) {
_highlight[_local4] = _local4;
InventoryView.instance.highlightItem(_local4, onItemAnimComplete);
};
} else {
throw (new Error("[ItemsAnimationManager] : <animate> : Wrong input."));
};
} else {
throw (new Error("[ItemsAnimationManager] : <animate> : Wrong input."));
};
}
public static function reset():void{
if (_itemTween){
_itemTween.kill();
};
clear();
}
private static function onItemAnimComplete(_arg1:Item):void{
var _local3:Item;
var _local4:ItemWindow;
var _local5:DisplayObject;
delete _highlight[_arg1];
var _local2:Boolean;
for each (_local3 in _highlight) {
_local2 = false;
break;
};
if (_local2){
for each (_local3 in _materials) {
_local5 = InventoryView.instance.cutIcon(_local3);
_matImages[_local3] = _local5;
_toMove.push(_local5);
InventoryView.instance.anim.addChild(_local5);
};
(GameWindowsManager.instance.openItemWindow() as ItemWindow);
_local4 = (GameWindowsManager.instance.activeWindow as ItemWindow);
_local4.stopLifeTimer();
if (Game.instance.getChildIndex(Game.instance.invView) < Game.instance.getChildIndex(Game.instance.windowsManager)){
Game.instance.swapChildren(Game.instance.invView, Game.instance.windowsManager);
};
queryAnim(_toMove.shift());
};
}
private static function queryAnim(_arg1:Sprite):void{
var $image = _arg1;
if (_toMove.length){
_itemTween = new TweenLite($image, ITEM_FLYING_IN, {x:CENTER_X, y:CENTER_Y, onComplete:function ():void{
queryAnim(_toMove.shift());
}, onCompleteParams:[$image]});
} else {
_itemTween = new TweenLite($image, ITEM_FLYING_IN, {x:CENTER_X, y:CENTER_Y, onComplete:function ():void{
makeItem();
}});
};
}
private static function makeItem():void{
var _local2:Item;
var _local3:*;
var _local4:DisplayObject;
var _local5:ItemWindow;
var _local1:IEpisode = Game.instance.getCurrentEpisode();
for each (_local2 in _materials) {
InventoryView.instance.anim.removeChild(_matImages[_local2]);
_local1.dropItem(_local2.name);
};
_local3 = _item.icon;
_local4 = new (_local3);
InventoryView.scaleImage(_local4);
_local5 = (GameWindowsManager.instance.activeWindow as ItemWindow);
_local4.x = (_local5.holder.width / 2);
_local4.y = (_local5.holder.height / 2);
_local5.holder.addChild(_local4);
_icon = _local4;
_local5.playGFX(placeItem);
}
private static function placeItem():void{
var w:ItemWindow;
InventoryView.instance.addEmptyItem(_item);
var pos:Object = InventoryView.instance.getIconPosition(_item);
w = (GameWindowsManager.instance.activeWindow as ItemWindow);
w.holder.removeChild(_icon);
_icon.x = (_icon.x + (w.holder.x + w.x));
_icon.y = (_icon.y + (w.holder.y + w.y));
InventoryView.instance.anim.addChild(_icon);
_itemTween = new TweenLite(_icon, ITEM_FLYING_OUT, {x:pos.x, y:pos.y, onComplete:function ():void{
var _local2:*;
var _local1:* = Game.instance.getCurrentEpisode();
_local1.addItem(_item.name);
InventoryView.instance.setIcon(_item, _icon);
if (Game.instance.getChildIndex(Game.instance.invView) > Game.instance.getChildIndex(Game.instance.windowsManager)){
Game.instance.swapChildren(Game.instance.invView, Game.instance.windowsManager);
};
w.close();
InventoryView.instance.freeze = false;
if (_callback != null){
_local2 = _callback;
clear();
_local2();
} else {
clear();
};
}});
}
private static function clear():void{
_item = undefined;
_icon = undefined;
_materials = new Dictionary();
_highlight = new Dictionary();
_matImages = new Dictionary();
_toMove = new Array();
_callback = undefined;
_itemTween = undefined;
}
}
}//package aq.pcge.game
Section 34
//InventoryView (aq.pcge.game.InventoryView)
package aq.pcge.game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class InventoryView extends MovieClip {
public var anim:MovieClip;
public var iconsCont:MovieClip;
public var iconsMask:MovieClip;
private var _slots:Array;
private var _names:Object;
private var _rewind:Boolean;
private var _freeze:Boolean;
public static const LRINDENT:Number = 1;
public static const HORIZONTAL_GAP:Number = 12;
public static const VERTICAL_GAP:Number = 6;
public static const SLOT_WIDTH:Number = 71;
public static const SLOT_HEIGHT:Number = 72;
public static const ICON_WIDTH:Number = 58;
public static const ICON_HEIGHT:Number = 57;
public static const SCROLL_SPEED:Number = 5;
public static const HORIZONTAL_OFFSET:Number = 0;
public static const VERTICAL_OFFSET:Number = 0;
private static var _instance:InventoryView;
public function InventoryView(){
if (!_instance){
_instance = this;
_slots = new Array();
_names = new Object();
if (((iconsCont) && (iconsMask))){
iconsCont.mask = iconsMask;
};
} else {
throw (new Error("[InventoryView] : <InventoryView> : Only one instance of this class is allowed."));
};
}
public function get freeze():Boolean{
return (_freeze);
}
public function set freeze(_arg1:Boolean):void{
_freeze = _arg1;
}
public function addItem(_arg1:Item):void{
var _local2:uint;
var _local3:ItemIcon;
var _local4:DisplayObject;
var _local5:Class;
if (_arg1){
if (!_names[_arg1.name]){
_local2 = _slots.length;
_local3 = new ItemIcon();
_local3.addEventListener("gfxComplete", onGFXComplete);
_local3.name = ("itemIcon_" + _local2);
_local3.source = _arg1.name;
_local3.title = _arg1.title;
_local3.item = _arg1;
_local5 = _arg1.icon;
if ((((getQualifiedSuperclassName(_local5) == "flash.display::Sprite")) || ((getQualifiedSuperclassName(_local5) == "flash.display::MovieClip")))){
_local4 = new (_local5);
} else {
if (getQualifiedSuperclassName(_local5) == "flash.display::BitmapData"){
_local4 = new Bitmap(new _local5(_local5.width, _local5.height));
(_local4 as Bitmap).smoothing = true;
};
};
if (_local4){
scaleImage(_local4);
_local4.x = (SLOT_WIDTH / 2);
_local4.y = (SLOT_HEIGHT / 2);
_local3.setIcon(_local4);
} else {
throw (new Error((("[InventoryView] : <addItem> : Item's '" + _arg1.name) + "' image isn't exists.")));
};
_local3.x = HORIZONTAL_OFFSET;
_local3.y = (VERTICAL_OFFSET + (_local2 * (SLOT_HEIGHT + VERTICAL_GAP)));
iconsCont.addChild(_local3);
_names[_arg1.name] = {index:_local2, icon:_local3};
_slots.push(_arg1.name);
_rewind = true;
} else {
throw (new Error((("[InventoryView] : <addItem> : Can't add same item ('" + _arg1.name) + "').")));
};
} else {
throw (new Error("[InventoryView] : <addItem> : Can't add non-existing item."));
};
}
public function removeItem(_arg1:Item):void{
var _local2:ItemIcon;
var _local3:uint;
var _local4:uint;
if (_arg1){
if (_names[_arg1.name]){
_local2 = (iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon);
_local2.removeEventListener("gfxComplete", onGFXComplete);
_local2.onGFXComplete = undefined;
_local2.gotoAndStop(1);
iconsCont.removeChild(_local2);
if (_names[_arg1.name].index < (_slots.length - 1)){
_local3 = _slots.length;
_local4 = (_names[_arg1.name].index + 1);
while (_local4 < _local3) {
_local2 = (iconsCont.getChildByName(("itemIcon_" + _local4)) as ItemIcon);
_local2.name = ("itemIcon_" + (_local4 - 1));
_names[_local2.source].index = (_local4 - 1);
_local2.x = HORIZONTAL_OFFSET;
_local2.y = (VERTICAL_OFFSET + ((_local4 - 1) * (SLOT_HEIGHT + VERTICAL_GAP)));
_local4++;
};
};
_slots.splice(_names[_arg1.name].index, 1);
_names[_arg1.name] = undefined;
} else {
throw (new Error((("[InventoryView] : <removeItem> : Item '" + _arg1.name) + "' not found.")));
};
} else {
throw (new Error("[InventoryView] : <removeItem> : Can't remove non-existing item."));
};
}
public function highlightItem(_arg1:Item, _arg2:Function=null):void{
var _local3:ItemIcon;
if (_arg1){
if (_names[_arg1.name]){
_local3 = (iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon);
_local3.onGFXComplete = _arg2;
_local3.gotoAndPlay(2);
} else {
throw (new Error((("[InventoryView] : <removeItem> : Item '" + _arg1.name) + "' not found.")));
};
} else {
throw (new Error("[InventoryView] : <removeItem> : Can't highlight item."));
};
}
public function addEmptyItem(_arg1:Item):void{
var _local2:uint;
var _local3:ItemIcon;
if (_arg1){
if (!_names[_arg1.name]){
_local2 = _slots.length;
_local3 = new ItemIcon();
_local3.addEventListener("gfxComplete", onGFXComplete);
_local3.name = ("itemIcon_" + _local2);
_local3.source = _arg1.name;
_local3.title = _arg1.title;
_local3.item = _arg1;
_local3.x = HORIZONTAL_OFFSET;
_local3.y = (VERTICAL_OFFSET + (_local2 * (SLOT_HEIGHT + VERTICAL_GAP)));
iconsCont.addChild(_local3);
_names[_arg1.name] = {index:_local2, icon:_local3};
_slots.push(_arg1.name);
_rewind = true;
} else {
throw (new Error((("[InventoryView] : <addEmptyItem> : Can't add same item ('" + _arg1.name) + "').")));
};
} else {
throw (new Error("[InventoryView] : <addEmptyItem> : Can't add non-existing item"));
};
}
public function getIcon(_arg1:Item):DisplayObject{
if (_arg1){
if (_names[_arg1.name]){
return ((iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon).getIcon());
};
throw (new Error((("[InventoryView] : <getIcon> : Item '" + _arg1.name) + "' not found.")));
//unresolved jump
};
throw (new Error("[InventoryView] : <getIcon> : Can't get non-existing icon"));
}
public function setIcon(_arg1:Item, _arg2:DisplayObject):void{
var _local3:ItemIcon;
if (_arg1){
if (_names[_arg1.name]){
_local3 = (iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon);
if (_arg2){
scaleImage(_arg2);
_arg2.x = (SLOT_WIDTH / 2);
_arg2.y = (SLOT_HEIGHT / 2);
_local3.setIcon(_arg2);
} else {
throw (new Error((("[InventoryView] : <setIcon> : Item's '" + _local3.name) + "' image isn't exists.")));
};
} else {
throw (new Error((("[InventoryView] : <setIcon> : Item '" + _local3.name) + "' not found.")));
};
} else {
throw (new Error("[InventoryView] : <setIcon> : Can't set non-existing icon"));
};
}
public function cutIcon(_arg1:Item):DisplayObject{
var _local2:ItemIcon;
var _local3:DisplayObject;
if (_arg1){
if (_names[_arg1.name]){
_local2 = (iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon);
_local3 = _local2.getIcon();
_local3.x = (_local3.x + ((x + iconsCont.x) + _local2.x));
_local3.y = (_local3.y + ((y + iconsCont.y) + _local2.y));
_local3.name = _local2.source;
return (_local3);
};
throw (new Error((("[InventoryView] : <cutIcon> : Item '" + _arg1.name) + "' not found.")));
//unresolved jump
};
throw (new Error("[InventoryView] : <cutIcon> : Can't cut non-existing item."));
}
public function getIconPosition(_arg1:Item):Object{
var _local2:ItemIcon;
if (_arg1){
if (_names[_arg1.name]){
_local2 = (iconsCont.getChildByName(("itemIcon_" + _names[_arg1.name].index)) as ItemIcon);
return ({x:(((x + iconsCont.x) + _local2.x) + (71 / 2)), y:(((y + iconsCont.y) + _local2.y) + (72 / 2))});
};
throw (new Error((("[InventoryView] : <getIconPosition> : Item '" + _arg1.name) + "' not found.")));
//unresolved jump
};
throw (new Error("[InventoryView] : <getIconPosition> : Can't get position of non-existing item."));
}
public function reset():void{
while (iconsCont.numChildren) {
iconsCont.removeChildAt(0);
};
_slots = new Array();
_names = new Object();
}
private function onGFXComplete(_arg1:Event):void{
var _local2:ItemIcon = (_arg1.target as ItemIcon);
if (_local2){
if (_local2.onGFXComplete != null){
_local2.onGFXComplete(_local2.item);
};
} else {
throw (new Error("[InventoryViwe] : <onGFXComplete> : Internal error."));
};
}
public static function get instance():InventoryView{
return (_instance);
}
public static function scaleImage(_arg1:DisplayObject):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (_arg1.width >= _arg1.height){
_local2 = (ICON_WIDTH / _arg1.width);
_local3 = ICON_WIDTH;
_local4 = (_arg1.height * _local2);
} else {
_local2 = (ICON_HEIGHT / _arg1.height);
_local4 = ICON_HEIGHT;
_local3 = (_arg1.width * _local2);
};
_arg1.width = _local3;
_arg1.height = _local4;
}
}
}//package aq.pcge.game
Section 35
//Item (aq.pcge.game.Item)
package aq.pcge.game {
public class Item {
private var _exists:Boolean;
public var name:String;
public var icon;
public var title:String;
public var description:String;
public function Item(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null){
name = _arg1;
icon = _arg2;
title = _arg3;
description = _arg4;
_exists = true;
}
public function exists():Boolean{
return (_exists);
}
public function destroy():void{
name = undefined;
icon = undefined;
title = undefined;
description = undefined;
_exists = undefined;
}
}
}//package aq.pcge.game
Section 36
//Movement (aq.pcge.game.Movement)
package aq.pcge.game {
import flash.display.*;
import com.greensock.*;
import fl.transitions.easing.*;
public class Movement {
public static function appearAt(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null):void{
var _local6:Number;
var _local7:Number;
if (_arg1){
_arg1.x = _arg2;
_arg1.y = _arg3;
_local6 = (_arg1.scaleX / Math.abs(_arg1.scaleX));
_local7 = (_arg1.scaleY / Math.abs(_arg1.scaleY));
_arg1.scaleX = (_arg4 * _local6);
_arg1.scaleY = (_arg4 * _local7);
if (_arg5 != null){
_arg5();
};
} else {
throw (new Error("[Displacement] : <appearAt> : Object not exists."));
};
}
public static function motionTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=64):TweenLite{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (_arg1){
_local7 = Math.sqrt((Math.pow((_arg2 - _arg1.x), 2) + Math.pow((_arg3 - _arg1.y), 2)));
_local8 = (_local7 / Math.abs(_arg6));
_local9 = (_arg1.scaleX / Math.abs(_arg1.scaleX));
_local10 = (_arg1.scaleY / Math.abs(_arg1.scaleY));
return (TweenLite.to(_arg1, _local8, {x:_arg2, y:_arg3, scaleX:(_arg4 * _local9), scaleY:(_arg4 * _local10), onComplete:_arg5, ease:None.easeNone}));
};
throw (new Error("[Displacement] : <motionTo> : Object not exists."));
}
public static function onTimeTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=0):TweenLite{
var _local7:Number;
var _local8:Number;
var _local9:Number;
if (_arg1){
_local7 = Math.sqrt((Math.pow((_arg2 - _arg1.x), 2) + Math.pow((_arg3 - _arg1.y), 2)));
_local8 = (_arg1.scaleX / Math.abs(_arg1.scaleX));
_local9 = (_arg1.scaleY / Math.abs(_arg1.scaleY));
return (TweenLite.to(_arg1, _arg6, {x:_arg2, y:_arg3, scaleX:(_arg4 * _local8), scaleY:(_arg4 * _local9), onComplete:_arg5, ease:None.easeNone}));
};
throw (new Error("[Displacement] : <onTimeTo> : Object not exists."));
}
public static function vCurveTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
var length:Number;
var time:Number;
var sX:Number;
var sY:Number;
var dY:Number;
var mY:Number;
var $object = _arg1;
var $x = _arg2;
var $y = _arg3;
var $h = _arg4;
var $scale = _arg5;
var $rotat = _arg6;
var $callback = _arg7;
var $speed = _arg8;
if ($object){
length = Math.sqrt((Math.pow(($x - $object.x), 2) + Math.pow(($y - $object.y), 2)));
time = (length / Math.abs($speed));
sX = ($object.scaleX / Math.abs($object.scaleX));
sY = ($object.scaleY / Math.abs($object.scaleY));
dY = Math.abs(($object.y - $y));
mY = (Math.min($object.y, $y) + dY);
TweenLite.to($object, (time / 2), {y:(mY + $h), onComplete:function ():void{
TweenLite.to($object, (time / 2), {y:$y, ease:Strong.easeIn, overwrite:0});
}, ease:Strong.easeOut});
TweenLite.to($object, time, {x:$x, scaleX:($scale * sX), scaleY:($scale * sY), rotation:$rotat, onComplete:$callback, ease:None.easeNone, overwrite:0});
} else {
throw (new Error("[Displacement] : <vCurveTo> : Object not exists."));
};
}
public static function hCurveTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
var length:Number;
var time:Number;
var sX:Number;
var sY:Number;
var dX:Number;
var mX:Number;
var $object = _arg1;
var $x = _arg2;
var $y = _arg3;
var $w = _arg4;
var $scale = _arg5;
var $rotat = _arg6;
var $callback = _arg7;
var $speed = _arg8;
if ($object){
length = Math.sqrt((Math.pow(($x - $object.x), 2) + Math.pow(($y - $object.y), 2)));
time = (length / Math.abs($speed));
sX = ($object.scaleX / Math.abs($object.scaleX));
sY = ($object.scaleY / Math.abs($object.scaleY));
dX = Math.abs(($object.x - $x));
mX = (Math.min($object.x, $x) + dX);
TweenLite.to($object, (time / 2), {x:(mX + $w), onComplete:function ():void{
TweenLite.to($object, (time / 2), {x:$x, ease:Strong.easeIn, overwrite:0});
}, ease:Strong.easeOut});
TweenLite.to($object, time, {x:$x, scaleX:($scale * sX), scaleY:($scale * sY), rotation:$rotat, onComplete:$callback, ease:None.easeNone, overwrite:0});
} else {
throw (new Error("[Displacement] : <hCurveTo> : Object not exists."));
};
}
public static function motionVia(_arg1:DisplayObject, _arg2:Array, _arg3:Function=null, _arg4:Number=64):TimelineLite{
var _local5:TimelineLite;
var _local6:Number;
var _local7:Number;
var _local8:uint;
var _local9:uint;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
if (_arg1){
_local5 = new TimelineLite();
_local6 = (_arg1.scaleX / Math.abs(_arg1.scaleX));
_local7 = (_arg1.scaleY / Math.abs(_arg1.scaleY));
_local8 = _arg2.length;
_local9 = 0;
while (_local9 < _local8) {
_local10 = _arg2[_local9].x;
_local11 = _arg2[_local9].y;
_local12 = (_arg2[_local9].scale) ? _arg2[_local9].scale : 1;
_local13 = (_arg2[_local9].speed) ? _arg2[_local9].speed : _arg4;
_local14 = Math.sqrt((Math.pow((_local10 - _arg1.x), 2) + Math.pow((_local11 - _arg1.y), 2)));
_local15 = (_local14 / Math.abs(_local13));
if (_local9 < (_local8 - 1)){
_local5.append(new TweenLite(_arg1, _local15, {x:_local10, y:_local11, scaleX:(_local12 * _local6), scaleY:(_local12 * _local7), ease:None.easeNone}));
} else {
_local5.append(new TweenLite(_arg1, _local15, {x:_local10, y:_local11, scaleX:(_local12 * _local6), scaleY:(_local12 * _local7), onComplete:_arg3, ease:None.easeNone}));
};
_local9++;
};
_local5.play();
return (_local5);
//unresolved jump
};
throw (new Error("[Displacement] : <motionVia> : Object not exists."));
}
}
}//package aq.pcge.game
Section 37
//Cursor (aq.pcge.gui.Cursor)
package aq.pcge.gui {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class Cursor extends MovieClip {
private static var _instance:Cursor;
public function Cursor(){
addFrameScript(0, frame1, 1, frame2);
if (!_instance){
_instance = this;
mouseChildren = false;
mouseEnabled = false;
show();
} else {
throw (new Error("[Cursor] : <Cursor> : Only one instance of this class is allowed."));
};
}
public function show():void{
work();
Mouse.hide();
visible = true;
}
public function hide():void{
halt();
visible = false;
Mouse.show();
}
public function up():void{
gotoAndStop("up");
}
public function down():void{
gotoAndStop("down");
}
private function update(_arg1:Event=null):void{
x = root.mouseX;
y = root.mouseY;
}
private function work():void{
if (!stage.hasEventListener(MouseEvent.MOUSE_DOWN)){
stage.addEventListener(MouseEvent.MOUSE_DOWN, goDown);
};
if (!stage.hasEventListener(MouseEvent.MOUSE_UP)){
stage.addEventListener(MouseEvent.MOUSE_UP, goUp);
};
if (!hasEventListener(Event.ENTER_FRAME)){
addEventListener(Event.ENTER_FRAME, update);
};
if (!stage.hasEventListener(Event.MOUSE_LEAVE)){
stage.addEventListener(Event.MOUSE_LEAVE, onLeave);
};
if (!stage.hasEventListener(MouseEvent.MOUSE_MOVE)){
stage.addEventListener(MouseEvent.MOUSE_MOVE, onEnter);
};
}
private function halt():void{
if (stage.hasEventListener(MouseEvent.MOUSE_DOWN)){
stage.removeEventListener(MouseEvent.MOUSE_DOWN, goDown);
};
if (stage.hasEventListener(MouseEvent.MOUSE_UP)){
stage.removeEventListener(MouseEvent.MOUSE_UP, goUp);
};
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, update);
};
if (stage.hasEventListener(Event.MOUSE_LEAVE)){
stage.removeEventListener(Event.MOUSE_LEAVE, onLeave);
};
if (stage.hasEventListener(MouseEvent.MOUSE_MOVE)){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onEnter);
};
}
private function goDown(_arg1:MouseEvent):void{
down();
}
private function goUp(_arg1:MouseEvent):void{
up();
}
private function onLeave(_arg1:Event):void{
visible = false;
}
private function onEnter(_arg1:MouseEvent):void{
visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public static function get instance():Cursor{
return (_instance);
}
}
}//package aq.pcge.gui
Section 38
//MusicPlayer (aq.pcge.media.MusicPlayer)
package aq.pcge.media {
import flash.media.*;
import flash.events.*;
public class MusicPlayer {
private var _sound:Sound;
private var _soundChannel:SoundChannel;
private var _mute:Boolean;// = false
private var _pan:Number;// = 0
private var _volume:Number;// = 0.5
private var _state:String;// = "none"
private static var _instance:MusicPlayer;
public function MusicPlayer(){
if (!_instance){
_instance = this;
} else {
throw (new Error("[MusicPlayer] : <MusicPlayer> : Only one instance of this class is allowed."));
};
}
public function get mute():Boolean{
return (_mute);
}
public function set mute(_arg1:Boolean):void{
_mute = _arg1;
if (_soundChannel != null){
setSoundTransform();
};
}
public function get pan():Number{
return (_pan);
}
public function set pan(_arg1:Number):void{
if (_arg1 < -1){
_arg1 = -1;
};
if (_arg1 > 1){
_arg1 = 1;
};
_pan = _arg1;
if (_soundChannel != null){
setSoundTransform();
};
}
public function get volume():Number{
return (_volume);
}
public function set volume(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 1){
_arg1 = 1;
};
_volume = _arg1;
if (_soundChannel != null){
setSoundTransform();
};
}
public function get state():String{
return (_state);
}
public function get isPlaying():Boolean{
if (_state == "playing"){
return (true);
};
return (false);
}
public function get isMuted():Boolean{
return (_mute);
}
public function musicON():void{
_mute = false;
if (_soundChannel != null){
setSoundTransform();
};
}
public function musicOFF():void{
_mute = true;
if (_soundChannel != null){
setSoundTransform();
};
}
public function playMusic(_arg1:Sound):void{
if (_soundChannel != null){
_soundChannel.stop();
};
_sound = _arg1;
_soundChannel = _sound.play();
setSoundTransform();
_soundChannel.addEventListener(Event.SOUND_COMPLETE, restart);
_state = "playing";
}
public function stopMusic():void{
if (_soundChannel != null){
_soundChannel.stop();
if (_soundChannel.hasEventListener(Event.SOUND_COMPLETE) == true){
_soundChannel.removeEventListener(Event.SOUND_COMPLETE, restart);
};
};
_state = "stopped";
}
private function restart(_arg1:Event):void{
_soundChannel = _sound.play();
setSoundTransform();
_soundChannel.addEventListener(Event.SOUND_COMPLETE, restart);
_state = "playing";
}
private function setSoundTransform():void{
if (_soundChannel != null){
_soundChannel.soundTransform = new SoundTransform((int(!(_mute)) * _volume), _pan);
};
}
public static function get instance():MusicPlayer{
return (_instance);
}
}
}//package aq.pcge.media
Section 39
//Menu (aq.pcge.menu.Menu)
package aq.pcge.menu {
import aq.pcge.common.*;
public class Menu extends Screen {
public var windowsManager:MenuWindowsManager;
private static var _instance:Menu;
public function Menu(){
if (!_instance){
_instance = this;
} else {
throw (new Error("[Menu] : <Menu> : Only one instance of this class is allowed."));
};
}
override public function hide():void{
returnToMenu();
super.hide();
}
public function returnToMenu():void{
if (windowsManager.activeWindow){
windowsManager.closeActiveWindow();
};
}
public static function get instance():Menu{
return (_instance);
}
}
}//package aq.pcge.menu
Section 40
//MenuWindowsManager (aq.pcge.menu.MenuWindowsManager)
package aq.pcge.menu {
import aq.pcge.common.*;
public class MenuWindowsManager extends WindowsManager {
private static var _instance:MenuWindowsManager;
public function MenuWindowsManager(){
if (!_instance){
_instance = this;
} else {
throw (new Error("[MenuWindowsManager] : <MenuWindowsManager> : Only one instance of this class is allowed."));
};
}
public static function get instance():MenuWindowsManager{
return (_instance);
}
}
}//package aq.pcge.menu
Section 41
//Console (aq.pcge.system.Console)
package aq.pcge.system {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import aq.pcge.common.*;
import aq.pcge.*;
import flash.text.*;
public class Console extends Sprite {
public var hScrollBar:HScrollBar;
public var vScrollBar:VScrollBar;
public var display:Sprite;
public var command_tf:TextField;
public var closeButton:Sprite;
private var _cont_mc:Sprite;
private var _mask_mc:Sprite;
private var _history_tf:TextField;
private static var _instance:Console;
public function Console(){
_instance = this;
_cont_mc = (display.getChildByName("cont_mc") as Sprite);
_mask_mc = (display.getChildByName("mask_mc") as Sprite);
_history_tf = (_cont_mc.getChildByName("history_tf") as TextField);
hScrollBar.attach(_cont_mc, _mask_mc);
vScrollBar.attach(_cont_mc, _mask_mc);
closeButton.addEventListener(MouseEvent.CLICK, onCloseButtonClick);
visible = false;
if (GameApplication.gameMode == "debug"){
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyboardKeyDown);
};
}
public function show():void{
visible = true;
}
public function hide():void{
visible = false;
}
public function clearHistory():void{
_history_tf.text = "";
}
public function clearCommand():void{
command_tf.text = "";
}
public function clearAll():void{
_history_tf.text = "";
command_tf.text = "";
}
public function addHistory(_arg1:String):void{
_history_tf.appendText((("> " + _arg1) + "\n"));
}
public function addMessage(_arg1:String):void{
_history_tf.appendText((_arg1 + "\n"));
}
public function getCommand():String{
return (command_tf.text);
}
public function executeCommand(_arg1:String):void{
var _local2:Array = _arg1.split(" ", 2);
var _local3:String = _local2[0];
var _local4:String = _local2[1];
switch (_local3){
case "menu":
gotoMenu();
addHistory(((_local3 + " : ") + _local4));
break;
case "game":
gotoGame();
addHistory(((_local3 + " : ") + _local4));
break;
case "loadEpisode":
loadEpisode(uint(_local4));
addHistory(((_local3 + " : ") + _local4));
break;
case "unloadEpisode":
unloadEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "reloadEpisode":
reloadEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "prevEpisode":
prevEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "nextEpisode":
nextEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "startEpisode":
startEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "finishEpisode":
finishEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "playEpisode":
playEpisode(uint(_local4));
addHistory(((_local3 + " : ") + _local4));
break;
case "replayEpisode":
replayEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "winEpisode":
winEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "loseEpisode":
loseEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "enableEpisode":
enableEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "disableEpisode":
disableEpisode();
addHistory(((_local3 + " : ") + _local4));
break;
case "help":
addHistory(((_local3 + " : ") + _local4));
addMessage("Commands list:");
addMessage(" menu ()");
addMessage(" game ()");
addMessage(" loadEpisode (arg1)");
addMessage(" arg1 - имя эпизода");
addMessage(" unloadEpisode ()");
addMessage(" reloadEpisode ()");
addMessage(" prevEpisode ()");
addMessage(" nextEpisode ()");
addMessage(" startEpisode ()");
addMessage(" finishEpisode ()");
addMessage(" playEpisode ()");
addMessage(" replayEpisode ()");
addMessage(" winEpisode ()");
addMessage(" loseEpisode ()");
addMessage(" enableEpisode ()");
addMessage(" disableEpisode ()");
addMessage(" help ()");
addMessage(" clear ()");
addMessage(" quit ()");
addMessage(" exit ()");
break;
case "exit":
addHistory(((_local3 + " : ") + _local4));
visible = false;
break;
case "quit":
addHistory(((_local3 + " : ") + _local4));
visible = false;
break;
case "clear":
clearHistory();
break;
default:
if (_local3 != ""){
addHistory((("Unknown command '" + _local3) + "'."));
};
};
}
private function onCloseButtonClick(_arg1:MouseEvent):void{
hide();
}
private function onKeyboardKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 67){
if (!visible){
show();
} else {
if (stage.focus != command_tf){
hide();
};
};
};
if (_arg1.keyCode == 13){
if (stage.focus == command_tf){
executeCommand(command_tf.text);
};
};
}
public static function get instance():Console{
return (_instance);
}
public static function gotoMenu():void{
GameApplication.instance.gotoMenu();
}
public static function gotoGame():void{
GameApplication.instance.gotoGame();
}
public static function registerEpisode(_arg1:Class, _arg2:uint):void{
if (Game.instance){
Game.instance.registerEpisode(_arg1, _arg2);
} else {
throw (new Error("[Console] : <registerEpisode> : Game instance isn't exists."));
};
}
public static function unregisterEpisode(_arg1:uint):void{
if (Game.instance){
Game.instance.unregisterEpisode(_arg1);
} else {
throw (new Error("[Console] : <unregisterEpisode> : Game instance isn't exists."));
};
}
public static function getCurrentEpisode():IEpisode{
if (Game.instance){
return (Game.instance.getCurrentEpisode());
};
throw (new Error("[Console] : <getCurrentEpisode> : Game instance isn't exists."));
}
public static function getCurrentEpisodeIndex():int{
if (Game.instance){
return (Game.instance.getCurrentEpisodeIndex());
};
throw (new Error("[Console] : <getCurrentEpisodeIndex> : Game instance isn't exists."));
}
public static function loadEpisode(_arg1:uint):void{
if (Game.instance){
Game.instance.loadEpisode(_arg1);
} else {
throw (new Error("[Console] : <loadEpisode> : Game instance isn't exists."));
};
}
public static function unloadEpisode():void{
if (Game.instance){
Game.instance.unloadEpisode();
} else {
throw (new Error("[Console] : <unloadEpisode> : Game instance isn't exists."));
};
}
public static function reloadEpisode():void{
if (Game.instance){
Game.instance.reloadEpisode();
} else {
throw (new Error("[Console] : <reloadEpisode> : Game instance isn't exists."));
};
}
public static function prevEpisode():void{
if (Game.instance){
Game.instance.prevEpisode();
} else {
throw (new Error("[Console] : <prevEpisode> : Game instance isn't exists."));
};
}
public static function nextEpisode():void{
if (Game.instance){
Game.instance.nextEpisode();
} else {
throw (new Error("[Console] : <nextEpisode> : Game instance isn't exists."));
};
}
public static function startEpisode():void{
if (Game.instance){
Game.instance.startEpisode();
} else {
throw (new Error("[Console] : <startEpisode> : Game instance isn't exists."));
};
}
public static function finishEpisode():void{
if (Game.instance){
Game.instance.finishEpisode();
} else {
throw (new Error("[Console] : <finishEpisode> : Game instance isn't exists."));
};
}
public static function playEpisode(_arg1:uint):void{
if (Game.instance){
Game.instance.loadEpisode(_arg1);
} else {
throw (new Error("[Console] : <playEpisode> : Game instance isn't exists."));
};
}
public static function replayEpisode():void{
if (Game.instance){
Game.instance.reloadEpisode();
} else {
throw (new Error("[Console] : <replayEpisode> : Game instance isn't exists."));
};
}
public static function winEpisode():void{
if (Game.instance){
Game.instance.getCurrentEpisode().win();
} else {
throw (new Error("[Console] : <winEpisode> : Game instance isn't exists."));
};
}
public static function loseEpisode():void{
if (Game.instance){
Game.instance.getCurrentEpisode().lose();
} else {
throw (new Error("[Console] : <loseEpisode> : Game instance isn't exists."));
};
}
public static function enableEpisode():void{
if (Game.instance){
Game.instance.getCurrentEpisode().action = true;
} else {
throw (new Error("[Console] : <enableEpisode> : Game instance isn't exists."));
};
}
public static function disableEpisode():void{
if (Game.instance){
Game.instance.getCurrentEpisode().action = false;
} else {
throw (new Error("[Console] : <disableEpisode> : Game instance isn't exists."));
};
}
public static function isPrevEpisode():Boolean{
if (Game.instance){
return (Game.instance.isPrevEpisode());
};
throw (new Error("[Console] : <isPrevEpisode> : Game instance isn't exists."));
}
public static function isNextEpisode():Boolean{
if (Game.instance){
return (Game.instance.isNextEpisode());
};
throw (new Error("[Console] : <isNextEpisode> : Game instance isn't exists."));
}
}
}//package aq.pcge.system
Section 42
//GameApplication (aq.pcge.GameApplication)
package aq.pcge {
import flash.display.*;
import aq.pcge.media.*;
import flash.events.*;
import aq.pcge.system.*;
import aq.pcge.common.*;
import flash.utils.*;
import flash.system.*;
public class GameApplication extends MovieClip {
public var prel:MovieClip;
public var allowRun:Boolean;
public var gameURL:String;
public var hostName:String;
public var no_http:String;
public var no_file:String;
private var _ready:Boolean;
public var preloader:MovieClip;
public var content:MovieClip;
public var console:Console;
public var message:MovieClip;
private var _menu:Screen;
private var _game:Screen;
private var _music:MusicPlayer;
public static const SCREEN_WIDTH:uint = 800;
public static const SCREEN_HEIGHT:uint = 480;
private static var _instance:GameApplication;
public static var gameMode:String = "normal";
public static var siteLock:Boolean = false;
public static var linksOut:Boolean = true;
public static var logoLink:String = "http://www.abroy.com";
public static var moreLink:String;
public static var helpLink:String;
public static var hostName:String = "abroy.com";
public static var gameName:String = "evolution";
public static var platform:String = "pc";
public static var link01:String;
public static var link02:String;
public static var link03:String;
public static var link04:String;
public static var link05:String;
public static var link06:String;
public static var link07:String;
public static var link08:String;
public static var link09:String;
public static var link10:String;
public static var link11:String;
public static var link12:String;
public function GameApplication(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
if (!_instance){
_instance = this;
} else {
throw (new Error("[GameApplication] : <GameApplication> : Only one instance of this class is allowed."));
};
}
public function showProgress(_arg1:ProgressEvent):void{
if (_arg1.bytesTotal <= 0){
return;
};
var _local2:Number = Math.floor(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
if (preloader){
preloader.preloadBar.gotoAndStop(_local2);
};
trace((((((_arg1.bytesLoaded + "/") + _arg1.bytesTotal) + " (") + _local2) + "%)"));
if (_arg1.bytesLoaded == _arg1.bytesTotal){
removeEventListener(ProgressEvent.PROGRESS, showProgress);
trace("[%] LOADING COMPLETE");
preloader.gotoAndPlay(2);
};
}
public function init():void{
var _local1:Class;
var _local2:Class;
if (!_ready){
_local1 = (getDefinitionByName("aq.pcge.menu.Menu") as Class);
_local2 = (getDefinitionByName("aq.pcge.game.Game") as Class);
_menu = new (_local1);
_game = new (_local2);
_music = new MusicPlayer();
_ready = true;
};
}
public function ready():Boolean{
return (_ready);
}
public function gotoMenu():void{
if (_ready){
if (content.numChildren){
if (content.getChildAt(0) != _menu){
_game.hide();
content.removeChildAt(0);
};
};
_music.mute = true;
_menu.show();
content.addChildAt(_menu, 0);
};
}
public function gotoGame():void{
if (_ready){
if (content.numChildren){
if (content.getChildAt(0) != _game){
_menu.hide();
content.removeChildAt(0);
};
};
_music.mute = false;
_game.show();
content.addChildAt(_game, 0);
};
}
function frame1(){
trace("+------------------------------------------------+");
trace("| LOADING |");
trace("+------------------------------------------------+");
stop();
Security.allowDomain("http://cdn3.cpmstar.com");
GameApplication.moreLink = "http://www.abroy.com/";
GameApplication.platform = "pc";
GameApplication.siteLock = false;
GameApplication.gameMode = "normal";
GameApplication.helpLink = "http://www.abroy.com/play/adventure-games/valdis-the-viking-walkthrough/";
GameApplication.link01 = "http://www.abroy.com/play/adventure-games/e-volution/";
GameApplication.link04 = "http://www.abroy.com/play/adventure-games/cursed-princess/";
GameApplication.link03 = "http://www.abroy.com/play/adventure-games/space-job/";
GameApplication.link02 = "http://www.abroy.com/play/adventure-games/agent-woof/";
allowRun = true;
if (GameApplication.siteLock){
if (((!(GameApplication.hostName)) || (!(GameApplication.hostName.length)))){
throw (new Error("[GameApplication] : <GameApplication> : Critical Error (Wrong host name)."));
};
allowRun = false;
gameURL = loaderInfo.url;
if (gameURL.indexOf("http://") != -1){
no_http = gameURL.split("http://")[1];
hostName = no_http.split("/")[0];
} else {
no_file = gameURL.split("file:///")[1];
hostName = "localhost";
};
if (hostName.indexOf("www.") != -1){
hostName = hostName.split("www.")[1];
};
if (((hostName) && (hostName.length))){
if (hostName == GameApplication.hostName){
allowRun = true;
};
};
};
if (allowRun){
if ((((loaderInfo.bytesTotal > 0)) && ((loaderInfo.bytesLoaded == loaderInfo.bytesTotal)))){
trace((((loaderInfo.bytesLoaded + "/") + loaderInfo.bytesTotal) + " (100%)"));
trace("[%] LOADING COMPLETE");
preloader.gotoAndPlay(2);
} else {
loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
};
} else {
if (preloader){
preloader.gotoAndStop(1);
};
visible = false;
};
}
function frame2(){
trace("+------------------------------------------------+");
trace("| EXPORTING CLASSES |");
trace("+------------------------------------------------+");
nextFrame();
}
function frame3(){
trace("+------------------------------------------------+");
trace("| ABROY PRESENTS |");
trace("+------------------------------------------------+");
stop();
}
function frame4(){
trace("+------------------------------------------------+");
trace("| RUNNING |");
trace("+------------------------------------------------+");
stop();
}
public static function get instance():GameApplication{
return (_instance);
}
}
}//package aq.pcge
Section 43
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public final class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 44
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
public function insert(_arg1:TweenCore, _arg2=0):TweenCore{
var _local3:SimpleTimeline = _arg1.timeline;
if (((!(_arg1.cachedOrphan)) && (_local3))){
_local3.remove(_arg1, true);
};
_arg1.timeline = this;
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (((_arg1.cachedPaused) && (!((_local3 == this))))){
_arg1.cachedPauseTime = (_arg1.cachedStartTime + ((this.rawTime - _arg1.cachedStartTime) / _arg1.cachedTimeScale));
};
if (_lastChild){
_lastChild.nextNode = _arg1;
} else {
_firstChild = _arg1;
};
_arg1.prevNode = _lastChild;
_lastChild = _arg1;
_arg1.nextNode = null;
_arg1.cachedOrphan = false;
return (_arg1);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){
if (!_local4.cachedReversed){
_local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration;
_local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false);
};
};
_local4 = _local6;
};
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
_arg1.cachedOrphan = true;
}
}
}//package com.greensock.core
Section 45
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
public var cachedTime:Number;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var data;
public var timeline:SimpleTimeline;
public var cachedOrphan:Boolean;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
public var cachedPauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.693;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2)!=null) ? _arg2 : {};
if (this.vars.isGSVars){
this.vars = this.vars.vars;
};
this.cachedDuration = (this.cachedTotalDuration = _arg1);
_delay = (this.vars.delay) ? Number(this.vars.delay) : 0;
this.cachedTimeScale = (this.vars.timeScale) ? Number(this.vars.timeScale) : 1;
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
_local3.insert(this, _local3.cachedTotalTime);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
if (((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc))))){
this.timeline.insert(this, (_arg1 - _delay));
} else {
this.cachedStartTime = _arg1;
};
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
var _local2:Number = (_arg1 / this.cachedDuration);
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(true);
if (((((this.active) && (!(this.cachedPaused)))) && (!((_arg1 == 0))))){
this.setTotalTime((this.cachedTotalTime * _local2), true);
};
}
public function invalidate():void{
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.totalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTotalTime >= this.cachedTotalDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
this.cachedPauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - this.cachedPauseTime));
this.cachedPauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setEnabled(true, false);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (this.cachedPaused) ? this.cachedPauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
this.gc = !(_arg1);
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.cachedOrphan))){
this.timeline.insert(this, (this.cachedStartTime - _delay));
};
} else {
this.active = false;
if (((!(_arg2)) && (!(this.cachedOrphan)))){
this.timeline.remove(this, true);
};
};
return (false);
}
}
}//package com.greensock.core
Section 46
//Circ (com.greensock.easing.Circ)
package com.greensock.easing {
public class Circ {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return ((((-(_arg3) * 0.5) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
}
}//package com.greensock.easing
Section 47
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
public final class OverwriteManager {
public static const ALL_ONSTART:int = 4;
public static const CONCURRENT:int = 3;
public static const ALL_IMMEDIATE:int = 1;
public static const PREEXISTING:int = 5;
public static const AUTO:int = 2;
public static const version:Number = 6.1;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
var _local2:Boolean;
while (_arg1) {
if (_arg1.cachedPaused){
_local2 = true;
break;
};
_arg1 = _arg1.timeline;
};
return (_local2);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.6){
throw (new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."));
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:int):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local13:int;
var _local14:Number;
var _local15:Number;
var _local16:TweenCore;
var _local17:Number;
var _local18:SimpleTimeline;
if (_arg4 >= 4){
_local13 = _arg3.length;
_local5 = 0;
while (_local5 < _local13) {
_local7 = _arg3[_local5];
if (_local7 != _arg1){
if (_local7.setEnabled(false, false)){
_local6 = true;
};
} else {
if (_arg4 == 5){
break;
};
};
_local5++;
};
return (_local6);
};
var _local8:Number = (_arg1.cachedStartTime + 1E-10);
var _local9:Array = [];
var _local10:Array = [];
var _local11:int;
var _local12:int;
_local5 = _arg3.length;
while (--_local5 > -1) {
_local7 = _arg3[_local5];
if ((((((_local7 == _arg1)) || (_local7.gc))) || (((!(_local7.initted)) && (((_local8 - _local7.cachedStartTime) <= 2E-10)))))){
} else {
if (_local7.timeline != _arg1.timeline){
if (!getGlobalPaused(_local7)){
var _temp1 = _local11;
_local11 = (_local11 + 1);
var _local19 = _temp1;
_local10[_local19] = _local7;
};
} else {
if ((((((((_local7.cachedStartTime <= _local8)) && ((((_local7.cachedStartTime + _local7.totalDuration) + 1E-10) > _local8)))) && (!(_local7.cachedPaused)))) && (!((((_arg1.cachedDuration == 0)) && (((_local8 - _local7.cachedStartTime) <= 2E-10))))))){
var _temp2 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp2;
_local9[_local19] = _local7;
};
};
};
};
if (_local11 != 0){
_local14 = _arg1.cachedTimeScale;
_local15 = _local8;
_local18 = _arg1.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.cachedStartTime);
_local18 = _local18.timeline;
};
_local8 = (_local14 * _local15);
_local5 = _local11;
while (--_local5 > -1) {
_local16 = _local10[_local5];
_local14 = _local16.cachedTimeScale;
_local15 = _local16.cachedStartTime;
_local18 = _local16.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.cachedStartTime);
_local18 = _local18.timeline;
};
_local17 = (_local14 * _local15);
if ((((_local17 <= _local8)) && ((((((_local17 + (_local16.totalDuration * _local14)) + 1E-10) > _local8)) || ((_local16.cachedDuration == 0)))))){
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp3;
_local9[_local19] = _local16;
};
};
};
if (_local12 == 0){
return (_local6);
};
_local5 = _local12;
if (_arg4 == 2){
while (--_local5 > -1) {
_local7 = _local9[_local5];
if (_local7.killVars(_arg2)){
_local6 = true;
};
if ((((_local7.cachedPT1 == null)) && (_local7.initted))){
_local7.setEnabled(false, false);
};
};
} else {
while (--_local5 > -1) {
if (TweenLite(_local9[_local5]).setEnabled(false, false)){
_local6 = true;
};
};
};
return (_local6);
}
}
}//package com.greensock
Section 48
//TimelineLite (com.greensock.TimelineLite)
package com.greensock {
import com.greensock.core.*;
public class TimelineLite extends SimpleTimeline {
protected var _endCaps:Array;
protected var _labels:Object;
public static const version:Number = 1.698;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public function TimelineLite(_arg1:Object=null){
super(_arg1);
_endCaps = [null, null];
_labels = {};
this.autoRemoveChildren = Boolean((this.vars.autoRemoveChildren == true));
_hasUpdate = Boolean((typeof(this.vars.onUpdate) == "function"));
if ((this.vars.tweens is Array)){
this.insertMultiple(this.vars.tweens, 0, ((this.vars.align)!=null) ? this.vars.align : "normal", (this.vars.stagger) ? Number(this.vars.stagger) : 0);
};
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((this.cachedPauseTime) || ((this.cachedPauseTime == 0)))) ? this.cachedPauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function stop():void{
this.paused = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local8:TweenCore;
var _local9:Boolean;
var _local10:Boolean;
var _local11:TweenCore;
var _local12:Number;
if (this.gc){
this.setEnabled(true, false);
} else {
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
var _local6:Number = this.cachedStartTime;
var _local7:Number = this.cachedTimeScale;
var _local13:Boolean = this.cachedPaused;
if (_arg1 >= _local4){
if (((((!((_local5 == _local4))) || ((this.cachedDuration == 0)))) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = (this.cachedTime = _local4);
forceChildrenToEnd(_local4, _arg2);
_local9 = ((!(this.hasPausedChild())) && (!(this.cachedReversed)));
_local10 = true;
if ((((((this.cachedDuration == 0)) && (_local9))) && ((((_arg1 == 0)) || ((_rawPrevTime < 0)))))){
_arg3 = true;
};
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if ((((this.cachedDuration == 0)) && ((_rawPrevTime > 0)))){
_arg3 = true;
_local9 = true;
};
} else {
if ((((_arg1 == 0)) && (!(this.initted)))){
_arg3 = true;
};
};
if (((!((_local5 == 0))) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = 0;
this.cachedTime = 0;
forceChildrenToBeginning(0, _arg2);
_local10 = true;
if (this.cachedReversed){
_local9 = true;
};
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
};
};
_rawPrevTime = _arg1;
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
this.initted = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_local10){
} else {
if ((this.cachedTime - _local5) > 0){
_local8 = _firstChild;
while (_local8) {
_local11 = _local8.nextNode;
if (((this.cachedPaused) && (!(_local13)))){
break;
} else {
if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= this.cachedTime)))) && (!(_local8.gc)))))){
if (!_local8.cachedReversed){
_local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration;
_local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false);
};
};
};
_local8 = _local11;
};
} else {
_local8 = _lastChild;
while (_local8) {
_local11 = _local8.prevNode;
if (((this.cachedPaused) && (!(_local13)))){
break;
} else {
if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= _local5)))) && (!(_local8.gc)))))){
if (!_local8.cachedReversed){
_local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration;
_local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false);
};
};
};
_local8 = _local11;
};
};
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((((_local9) && ((((_local6 == this.cachedStartTime)) || (!((_local7 == this.cachedTimeScale))))))) && ((((_local4 >= this.totalDuration)) || ((this.cachedTime == 0)))))){
complete(true, _arg2);
};
}
override public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
var _local3:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
var _local4:TweenCore = (this.gc) ? _endCaps[1] : _lastChild;
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_local4 == _arg1){
_local4 = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_local3 == _arg1){
_local3 = _arg1.nextNode;
};
};
if (this.gc){
_endCaps[0] = _local3;
_endCaps[1] = _local4;
} else {
_firstChild = _local3;
_lastChild = _local4;
};
_arg1.cachedOrphan = true;
setDirtyCache(true);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
override public function get totalDuration():Number{
var _local1:Number;
var _local2:Number;
var _local3:TweenCore;
var _local4:Number;
var _local5:TweenCore;
if (this.cacheIsDirty){
_local1 = 0;
_local3 = (this.gc) ? _endCaps[0] : _firstChild;
_local4 = -(Infinity);
while (_local3) {
_local5 = _local3.nextNode;
if (_local3.cachedStartTime < _local4){
this.insert(_local3, (_local3.cachedStartTime - _local3.delay));
} else {
_local4 = _local3.cachedStartTime;
};
if (_local3.cachedStartTime < 0){
_local1 = (_local1 - _local3.cachedStartTime);
this.shiftChildren(-(_local3.cachedStartTime), false, -9999999999);
};
_local2 = (_local3.cachedStartTime + (_local3.totalDuration / _local3.cachedTimeScale));
if (_local2 > _local1){
_local1 = _local2;
};
_local3 = _local5;
};
this.cachedDuration = (this.cachedTotalDuration = _local1);
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function gotoAndPlay(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
play();
}
public function appendMultiple(_arg1:Array, _arg2:Number=0, _arg3:String="normal", _arg4:Number=0):Array{
return (insertMultiple(_arg1, (this.duration + _arg2), _arg3, _arg4));
}
public function set currentProgress(_arg1:Number):void{
setTotalTime((this.duration * _arg1), false);
}
public function clear(_arg1:Array=null):void{
if (_arg1 == null){
_arg1 = getChildren(false, true, true);
};
var _local2:int = _arg1.length;
while (--_local2 > -1) {
TweenCore(_arg1[_local2]).setEnabled(false, false);
};
}
public function prepend(_arg1:TweenCore, _arg2:Boolean=false):TweenCore{
shiftChildren(((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay), _arg2, 0);
return (insert(_arg1, 0));
}
public function removeLabel(_arg1:String):Number{
var _local2:Number = _labels[_arg1];
delete _labels[_arg1];
return (_local2);
}
protected function parseTimeOrLabel(_arg1):Number{
if (typeof(_arg1) == "string"){
if (!(_arg1 in _labels)){
throw (new Error((("TimelineLite error: the " + _arg1) + " label was not found.")));
};
return (getLabelTime(String(_arg1)));
};
return (Number(_arg1));
}
public function addLabel(_arg1:String, _arg2:Number):void{
_labels[_arg1] = _arg2;
}
public function hasPausedChild():Boolean{
var _local1:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local1) {
if (((_local1.cachedPaused) || ((((_local1 is TimelineLite)) && ((_local1 as TimelineLite).hasPausedChild()))))){
return (true);
};
_local1 = _local1.nextNode;
};
return (false);
}
public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{
var _local5:int;
var _local3:Array = getChildren(_arg2, true, false);
var _local4:Array = [];
var _local6:int = _local3.length;
var _local7:int;
_local5 = 0;
while (_local5 < _local6) {
if (TweenLite(_local3[_local5]).target == _arg1){
var _temp1 = _local7;
_local7 = (_local7 + 1);
var _local8 = _temp1;
_local4[_local8] = _local3[_local5];
};
_local5 = (_local5 + 1);
};
return (_local4);
}
public function gotoAndStop(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
this.paused = true;
}
public function append(_arg1:TweenCore, _arg2:Number=0):TweenCore{
return (insert(_arg1, (this.duration + _arg2)));
}
override public function get duration():Number{
var _local1:Number;
if (this.cacheIsDirty){
_local1 = this.totalDuration;
};
return (this.cachedDuration);
}
public function get useFrames():Boolean{
var _local1:SimpleTimeline = this.timeline;
while (_local1.timeline) {
_local1 = _local1.timeline;
};
return (Boolean((_local1 == TweenLite.rootFramesTimeline)));
}
public function shiftChildren(_arg1:Number, _arg2:Boolean=false, _arg3:Number=0):void{
var _local5:String;
var _local4:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local4) {
if (_local4.cachedStartTime >= _arg3){
_local4.cachedStartTime = (_local4.cachedStartTime + _arg1);
};
_local4 = _local4.nextNode;
};
if (_arg2){
for (_local5 in _labels) {
if (_labels[_local5] >= _arg3){
_labels[_local5] = (_labels[_local5] + _arg1);
};
};
};
this.setDirtyCache(true);
}
public function goto(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
}
public function killTweensOf(_arg1:Object, _arg2:Boolean=true, _arg3:Object=null):Boolean{
var _local6:TweenLite;
var _local4:Array = getTweensOf(_arg1, _arg2);
var _local5:int = _local4.length;
while (--_local5 > -1) {
_local6 = _local4[_local5];
if (_arg3 != null){
_local6.killVars(_arg3);
};
if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){
_local6.setEnabled(false, false);
};
};
return (Boolean((_local4.length > 0)));
}
override public function set duration(_arg1:Number):void{
if (((!((this.duration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.duration / _arg1);
};
}
public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="normal", _arg4:Number=0):Array{
var _local5:int;
var _local6:TweenCore;
var _local7:Number = ((Number(_arg2)) || (0));
var _local8:int = _arg1.length;
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_local7 = _labels[_arg2];
};
_local5 = 0;
while (_local5 < _local8) {
_local6 = (_arg1[_local5] as TweenCore);
insert(_local6, _local7);
if (_arg3 == "sequence"){
_local7 = (_local6.cachedStartTime + (_local6.totalDuration / _local6.cachedTimeScale));
} else {
if (_arg3 == "start"){
_local6.cachedStartTime = (_local6.cachedStartTime - _local6.delay);
};
};
_local7 = (_local7 + _arg4);
_local5 = (_local5 + 1);
};
return (_arg1);
}
public function getLabelTime(_arg1:String):Number{
return (((_arg1 in _labels)) ? Number(_labels[_arg1]) : -1);
}
override public function get rawTime():Number{
if (((this.cachedPaused) || (((!((this.cachedTotalTime == 0))) && (!((this.cachedTotalTime == this.cachedTotalDuration))))))){
return (this.cachedTotalTime);
};
return (((this.timeline.rawTime - this.cachedStartTime) * this.cachedTimeScale));
}
override public function set totalDuration(_arg1:Number):void{
if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.totalDuration / _arg1);
};
}
public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Number=-9999999999):Array{
var _local5:Array = [];
var _local6:int;
var _local7:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local7) {
if (_local7.cachedStartTime < _arg4){
} else {
if ((_local7 is TweenLite)){
if (_arg2){
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local8 = _temp1;
_local5[_local8] = _local7;
};
} else {
if (_arg3){
var _temp2 = _local6;
_local6 = (_local6 + 1);
_local8 = _temp2;
_local5[_local8] = _local7;
};
if (_arg1){
_local5 = _local5.concat(TimelineLite(_local7).getChildren(true, _arg2, _arg3));
_local6 = _local5.length;
};
};
};
_local7 = _local7.nextNode;
};
return (_local5);
}
protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _firstChild;
var _local6:Boolean = this.cachedPaused;
while (_local3) {
_local4 = _local3.nextNode;
if (((this.cachedPaused) && (!(_local6)))){
break;
} else {
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == _local3.cachedTotalDuration))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == this.cachedDuration)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == this.cachedDuration)))))){
_local3.renderTime((_local3.cachedReversed) ? 0 : _local3.cachedTotalDuration, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
};
_local3 = _local4;
};
return (_arg1);
}
protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _lastChild;
var _local6:Boolean = this.cachedPaused;
while (_local3) {
_local4 = _local3.prevNode;
if (((this.cachedPaused) && (!(_local6)))){
break;
} else {
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == 0))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == 0)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == 0)))))){
_local3.renderTime((_local3.cachedReversed) ? _local3.cachedTotalDuration : 0, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
};
_local3 = _local4;
};
return (_arg1);
}
override public function insert(_arg1:TweenCore, _arg2=0):TweenCore{
var _local6:TweenCore;
var _local7:Number;
var _local8:SimpleTimeline;
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_arg2 = Number(_labels[_arg2]);
};
var _local3:SimpleTimeline = _arg1.timeline;
if (((!(_arg1.cachedOrphan)) && (_local3))){
_local3.remove(_arg1, true);
};
_arg1.timeline = this;
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
if (((_arg1.cachedPaused) && (!((_local3 == this))))){
_arg1.cachedPauseTime = (_arg1.cachedStartTime + ((this.rawTime - _arg1.cachedStartTime) / _arg1.cachedTimeScale));
};
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
setDirtyCache(true);
var _local4:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
var _local5:TweenCore = (this.gc) ? _endCaps[1] : _lastChild;
if (_local5 == null){
_local5 = _arg1;
_local4 = _local5;
_arg1.nextNode = (_arg1.prevNode = null);
} else {
_local6 = _local5;
_local7 = _arg1.cachedStartTime;
while (((!((_local6 == null))) && ((_local7 < _local6.cachedStartTime)))) {
_local6 = _local6.prevNode;
};
if (_local6 == null){
_local4.prevNode = _arg1;
_arg1.nextNode = _local4;
_arg1.prevNode = null;
_local4 = _arg1;
} else {
if (_local6.nextNode){
_local6.nextNode.prevNode = _arg1;
} else {
if (_local6 == _local5){
_local5 = _arg1;
};
};
_arg1.prevNode = _local6;
_arg1.nextNode = _local6.nextNode;
_local6.nextNode = _arg1;
};
};
_arg1.cachedOrphan = false;
if (this.gc){
_endCaps[0] = _local4;
_endCaps[1] = _local5;
} else {
_firstChild = _local4;
_lastChild = _local5;
};
if (((((this.gc) && (!(this.cachedPaused)))) && (((this.cachedStartTime + ((_arg1.cachedStartTime + (_arg1.cachedTotalDuration / _arg1.cachedTimeScale)) / this.cachedTimeScale)) > this.timeline.cachedTime)))){
if ((((this.timeline == TweenLite.rootTimeline)) || ((this.timeline == TweenLite.rootFramesTimeline)))){
this.setTotalTime(this.cachedTotalTime, true);
};
this.setEnabled(true, false);
_local8 = this.timeline;
while (((_local8.gc) && (_local8.timeline))) {
if ((_local8.cachedStartTime + (_local8.totalDuration / _local8.cachedTimeScale)) > _local8.timeline.cachedTime){
_local8.setEnabled(true, false);
};
_local8 = _local8.timeline;
};
};
return (_arg1);
}
override public function invalidate():void{
var _local1:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local1) {
_local1.invalidate();
_local1 = _local1.nextNode;
};
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public function prependMultiple(_arg1:Array, _arg2:String="normal", _arg3:Number=0, _arg4:Boolean=false):Array{
var _local5:TimelineLite = new TimelineLite({tweens:_arg1, align:_arg2, stagger:_arg3});
shiftChildren(_local5.duration, _arg4, 0);
insertMultiple(_arg1, 0, _arg2, _arg3);
_local5.kill();
return (_arg1);
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:TweenCore;
if (_arg1 == this.gc){
if (_arg1){
_local3 = _endCaps[0];
_firstChild = _local3;
_lastChild = _endCaps[1];
_endCaps = [null, null];
} else {
_local3 = _firstChild;
_endCaps = [_firstChild, _lastChild];
_firstChild = (_lastChild = null);
};
while (_local3) {
_local3.setEnabled(_arg1, true);
_local3 = _local3.nextNode;
};
};
return (super.setEnabled(_arg1, _arg2));
}
}
}//package com.greensock
Section 49
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:int;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.698;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1, reversed:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
if (_arg1 == null){
throw (new Error("Cannot tween a null object."));
};
this.target = _arg1;
if ((((this.target is TweenCore)) && (this.vars.timeScale))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = !(this.cachedReversed);
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime >= 0){
_arg3 = true;
_local4 = (_rawPrevTime > 0);
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (((!((this.cachedTime == 0))) || ((this.cachedDuration == 0)))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_local4) && (!(this.gc)))){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
if (_local3.indexOf(this) == -1){
_local3[_local3.length] = this;
};
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
return (false);
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (this.vars.onInit){
this.vars.onInit.apply(null, this.vars.onInitParams);
};
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (--_local2 > -1) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInitAllProps", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
if (((!((_local3 == _local4.target.propName))) || ((_local4.name == "")))){
delete propTweenLookup[_local3];
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (((_arg2) && (!((_arg1 == _overwrittenProps))))){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false, _arg3:Object=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
if ((_arg1 in masterList)){
_local4 = masterList[_arg1];
_local5 = _local4.length;
while (--_local5 > -1) {
_local6 = _local4[_local5];
if (!_local6.gc){
if (_arg2){
_local6.complete(false, false);
};
if (_arg3 != null){
_local6.killVars(_arg3);
};
if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){
_local6.setEnabled(false, false);
};
};
};
if (_arg3 == null){
delete masterList[_arg1];
};
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
if (_arg3.isGSVars){
_arg3 = _arg3.vars;
};
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame = (rootFrame + 1);
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (--_local5 > -1) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 50
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
Security.allowDomain("server.cpmstar.com");
var _local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 51
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 52
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 53
//AVFPSCounter_427 (PnC_Game4_gamesit_fla.AVFPSCounter_427)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import aq.pcge.*;
public dynamic class AVFPSCounter_427 extends MovieClip {
public var fps_tf:TextField;
public var time:uint;
public var sum:Number;
public var num:uint;
public function AVFPSCounter_427(){
addFrameScript(0, frame1);
}
function frame1(){
time = getTimer();
sum = 0;
num = 0;
if (GameApplication.gameMode == "debug"){
addEventListener(Event.ENTER_FRAME, function (_arg1:Event):void{
var _local2:uint = getTimer();
var _local3:Number = (1000 / (_local2 - time));
sum = (sum + _local3);
num++;
fps_tf.text = String(Math.round((sum / num)));
time = _local2;
});
} else {
visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 54
//cont_412 (PnC_Game4_gamesit_fla.cont_412)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.text.*;
public dynamic class cont_412 extends MovieClip {
public var history_tf:TextField;
public function cont_412(){
addFrameScript(0, frame1);
}
function frame1(){
history_tf.autoSize = "left";
}
}
}//package PnC_Game4_gamesit_fla
Section 55
//Content_408 (PnC_Game4_gamesit_fla.Content_408)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import aq.pcge.*;
import aq.pcge.media.*;
public dynamic class Content_408 extends MovieClip {
public var em:EpisodesManager;
public function Content_408(){
addFrameScript(0, frame1);
}
function frame1(){
GameApplication.instance.init();
em = EpisodesManager.instance;
em.registerEpisode(Episode_01, 0);
em.registerEpisode(Episode_02, 1);
em.registerEpisode(Episode_03, 2);
em.registerEpisode(Episode_04, 3);
em.registerEpisode(Episode_05, 4);
em.registerEpisode(Episode_06, 5);
em.registerEpisode(Episode_07, 6);
em.registerEpisode(Episode_08, 7);
em.load();
em.unlockEpisode(0);
MusicPlayer.instance.playMusic(new GameMusic());
GameApplication.instance.gotoMenu();
}
}
}//package PnC_Game4_gamesit_fla
Section 56
//DustCloudGFX_23 (PnC_Game4_gamesit_fla.DustCloudGFX_23)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
public dynamic class DustCloudGFX_23 extends MovieClip {
public function DustCloudGFX_23(){
addFrameScript(0, frame1, 14, frame15);
}
function frame1(){
stop();
}
function frame15(){
dispatchEvent(new Event("animComplete"));
}
}
}//package PnC_Game4_gamesit_fla
Section 57
//Exporter_8 (PnC_Game4_gamesit_fla.Exporter_8)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class Exporter_8 extends MovieClip {
public function Exporter_8(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 58
//FPSCounter_428 (PnC_Game4_gamesit_fla.FPSCounter_428)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import aq.pcge.*;
public dynamic class FPSCounter_428 extends MovieClip {
public var fps_tf:TextField;
public var time:uint;
public function FPSCounter_428(){
addFrameScript(0, frame1);
}
function frame1(){
time = getTimer();
if (GameApplication.gameMode == "debug"){
addEventListener(Event.ENTER_FRAME, function (_arg1:Event):void{
var _local2:uint = getTimer();
fps_tf.text = String(Math.round((1000 / (_local2 - time))));
time = _local2;
});
} else {
visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 59
//HelpButton_386 (PnC_Game4_gamesit_fla.HelpButton_386)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import aq.pcge.*;
import flash.net.*;
public dynamic class HelpButton_386 extends MovieClip {
public function HelpButton_386(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (((GameApplication.helpLink) && (!((GameApplication.helpLink == ""))))){
navigateToURL(new URLRequest(GameApplication.helpLink), "_blank");
};
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 60
//hl_407 (PnC_Game4_gamesit_fla.hl_407)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class hl_407 extends MovieClip {
public function hl_407(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 61
//l1_vetka1_anim_289 (PnC_Game4_gamesit_fla.l1_vetka1_anim_289)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l1_vetka1_anim_289 extends MovieClip {
public function l1_vetka1_anim_289(){
addFrameScript(0, frame1, 13, frame14);
}
function frame1(){
stop();
}
function frame14(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 62
//l2_barrikada_335 (PnC_Game4_gamesit_fla.l2_barrikada_335)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l2_barrikada_335 extends MovieClip {
public function l2_barrikada_335(){
addFrameScript(0, frame1, 112, frame113);
}
function frame1(){
stop();
}
function frame113(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 63
//l2_door_333 (PnC_Game4_gamesit_fla.l2_door_333)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l2_door_333 extends MovieClip {
public function l2_door_333(){
addFrameScript(0, frame1, 11, frame12, 23, frame24);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame24(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 64
//l2_pech_340 (PnC_Game4_gamesit_fla.l2_pech_340)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l2_pech_340 extends MovieClip {
public function l2_pech_340(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 65
//l2_puzzle_anim_350 (PnC_Game4_gamesit_fla.l2_puzzle_anim_350)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l2_puzzle_anim_350 extends MovieClip {
public var puzzle:MovieClip;
public function l2_puzzle_anim_350(){
addFrameScript(0, frame1, 14, frame15, 29, frame30);
}
function frame1(){
stop();
}
function frame15(){
stop();
}
function frame30(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 66
//l2_puzzle_hand_352 (PnC_Game4_gamesit_fla.l2_puzzle_hand_352)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l2_puzzle_hand_352 extends MovieClip {
public function l2_puzzle_hand_352(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 67
//l3_belka_all_312 (PnC_Game4_gamesit_fla.l3_belka_all_312)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l3_belka_all_312 extends MovieClip {
public function l3_belka_all_312(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 68
//l3_belka_take_gelud_321 (PnC_Game4_gamesit_fla.l3_belka_take_gelud_321)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l3_belka_take_gelud_321 extends MovieClip {
public function l3_belka_take_gelud_321(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 69
//l3_belka_take_grib_320 (PnC_Game4_gamesit_fla.l3_belka_take_grib_320)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l3_belka_take_grib_320 extends MovieClip {
public function l3_belka_take_grib_320(){
addFrameScript(73, frame74);
}
function frame74(){
stop();
MovieClip(parent.parent).lose();
}
}
}//package PnC_Game4_gamesit_fla
Section 70
//l3_gelud_anim_301 (PnC_Game4_gamesit_fla.l3_gelud_anim_301)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l3_gelud_anim_301 extends MovieClip {
public function l3_gelud_anim_301(){
addFrameScript(0, frame1, 22, frame23);
}
function frame1(){
stop();
}
function frame23(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 71
//l3_grib_anim_299 (PnC_Game4_gamesit_fla.l3_grib_anim_299)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l3_grib_anim_299 extends MovieClip {
public function l3_grib_anim_299(){
addFrameScript(0, frame1, 41, frame42, 59, frame60);
}
function frame1(){
stop();
}
function frame42(){
stop();
MovieClip(parent).mushroomIn = true;
}
function frame60(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 72
//l3_kora_302 (PnC_Game4_gamesit_fla.l3_kora_302)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l3_kora_302 extends MovieClip {
public function l3_kora_302(){
addFrameScript(0, frame1, 53, frame54);
}
function frame1(){
stop();
}
function frame54(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 73
//l3_vetka2_anim_291 (PnC_Game4_gamesit_fla.l3_vetka2_anim_291)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l3_vetka2_anim_291 extends MovieClip {
public function l3_vetka2_anim_291(){
addFrameScript(0, frame1, 13, frame14);
}
function frame1(){
stop();
}
function frame14(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 74
//l4_druid_all_265 (PnC_Game4_gamesit_fla.l4_druid_all_265)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l4_druid_all_265 extends MovieClip {
public function l4_druid_all_265(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 75
//l4_druid_vin_270 (PnC_Game4_gamesit_fla.l4_druid_vin_270)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l4_druid_vin_270 extends MovieClip {
public function l4_druid_vin_270(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
MovieClip(parent.parent).goWin2();
}
}
}//package PnC_Game4_gamesit_fla
Section 76
//l4_puzzle_276 (PnC_Game4_gamesit_fla.l4_puzzle_276)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l4_puzzle_276 extends MovieClip {
public var gl3:MovieClip;
public var gl4:MovieClip;
public var pl1:MovieClip;
public var it1:MovieClip;
public var gl5:MovieClip;
public var pl2:MovieClip;
public var it2:MovieClip;
public var gl6:MovieClip;
public var pl3:MovieClip;
public var it3:MovieClip;
public var gl7:MovieClip;
public var pl4:MovieClip;
public var it4:MovieClip;
public var gl8:MovieClip;
public var gl9:MovieClip;
public var gl1:MovieClip;
public var gl2:MovieClip;
public function l4_puzzle_276(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PnC_Game4_gamesit_fla
Section 77
//l4_puzzle_anim_275 (PnC_Game4_gamesit_fla.l4_puzzle_anim_275)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l4_puzzle_anim_275 extends MovieClip {
public var puzzle:MovieClip;
public function l4_puzzle_anim_275(){
addFrameScript(0, frame1, 11, frame12, 23, frame24);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame24(){
stop();
MovieClip(parent).ded.gotoAndStop(2);
}
}
}//package PnC_Game4_gamesit_fla
Section 78
//l4_puzzle_glow1_anim_277 (PnC_Game4_gamesit_fla.l4_puzzle_glow1_anim_277)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l4_puzzle_glow1_anim_277 extends MovieClip {
public function l4_puzzle_glow1_anim_277(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 79
//l5_parus_anim_201 (PnC_Game4_gamesit_fla.l5_parus_anim_201)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_parus_anim_201 extends MovieClip {
public function l5_parus_anim_201(){
addFrameScript(0, frame1, 9, frame10);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 80
//l5_puzzle_anim_227 (PnC_Game4_gamesit_fla.l5_puzzle_anim_227)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l5_puzzle_anim_227 extends MovieClip {
public var puzzle:MovieClip;
public function l5_puzzle_anim_227(){
addFrameScript(0, frame1, 11, frame12, 23, frame24);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame24(){
stop();
MovieClip(parent).ship.play();
}
}
}//package PnC_Game4_gamesit_fla
Section 81
//l5_puzzle_part1_229 (PnC_Game4_gamesit_fla.l5_puzzle_part1_229)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part1_229 extends MovieClip {
public function l5_puzzle_part1_229(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 82
//l5_puzzle_part10_238 (PnC_Game4_gamesit_fla.l5_puzzle_part10_238)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part10_238 extends MovieClip {
public function l5_puzzle_part10_238(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 83
//l5_puzzle_part11_239 (PnC_Game4_gamesit_fla.l5_puzzle_part11_239)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part11_239 extends MovieClip {
public function l5_puzzle_part11_239(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 84
//l5_puzzle_part12_240 (PnC_Game4_gamesit_fla.l5_puzzle_part12_240)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part12_240 extends MovieClip {
public function l5_puzzle_part12_240(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 85
//l5_puzzle_part13_241 (PnC_Game4_gamesit_fla.l5_puzzle_part13_241)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part13_241 extends MovieClip {
public function l5_puzzle_part13_241(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 86
//l5_puzzle_part14_242 (PnC_Game4_gamesit_fla.l5_puzzle_part14_242)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part14_242 extends MovieClip {
public function l5_puzzle_part14_242(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 87
//l5_puzzle_part15_243 (PnC_Game4_gamesit_fla.l5_puzzle_part15_243)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part15_243 extends MovieClip {
public function l5_puzzle_part15_243(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 88
//l5_puzzle_part16_244 (PnC_Game4_gamesit_fla.l5_puzzle_part16_244)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part16_244 extends MovieClip {
public function l5_puzzle_part16_244(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 89
//l5_puzzle_part17_245 (PnC_Game4_gamesit_fla.l5_puzzle_part17_245)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part17_245 extends MovieClip {
public function l5_puzzle_part17_245(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 90
//l5_puzzle_part18_246 (PnC_Game4_gamesit_fla.l5_puzzle_part18_246)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part18_246 extends MovieClip {
public function l5_puzzle_part18_246(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 91
//l5_puzzle_part19_247 (PnC_Game4_gamesit_fla.l5_puzzle_part19_247)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part19_247 extends MovieClip {
public function l5_puzzle_part19_247(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 92
//l5_puzzle_part2_230 (PnC_Game4_gamesit_fla.l5_puzzle_part2_230)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part2_230 extends MovieClip {
public function l5_puzzle_part2_230(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 93
//l5_puzzle_part20_248 (PnC_Game4_gamesit_fla.l5_puzzle_part20_248)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part20_248 extends MovieClip {
public function l5_puzzle_part20_248(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 94
//l5_puzzle_part21_249 (PnC_Game4_gamesit_fla.l5_puzzle_part21_249)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part21_249 extends MovieClip {
public function l5_puzzle_part21_249(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 95
//l5_puzzle_part22_250 (PnC_Game4_gamesit_fla.l5_puzzle_part22_250)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part22_250 extends MovieClip {
public function l5_puzzle_part22_250(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 96
//l5_puzzle_part23_251 (PnC_Game4_gamesit_fla.l5_puzzle_part23_251)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part23_251 extends MovieClip {
public function l5_puzzle_part23_251(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 97
//l5_puzzle_part24_252 (PnC_Game4_gamesit_fla.l5_puzzle_part24_252)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part24_252 extends MovieClip {
public function l5_puzzle_part24_252(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 98
//l5_puzzle_part25_253 (PnC_Game4_gamesit_fla.l5_puzzle_part25_253)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part25_253 extends MovieClip {
public function l5_puzzle_part25_253(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 99
//l5_puzzle_part3_231 (PnC_Game4_gamesit_fla.l5_puzzle_part3_231)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part3_231 extends MovieClip {
public function l5_puzzle_part3_231(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 100
//l5_puzzle_part4_232 (PnC_Game4_gamesit_fla.l5_puzzle_part4_232)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part4_232 extends MovieClip {
public function l5_puzzle_part4_232(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 101
//l5_puzzle_part5_233 (PnC_Game4_gamesit_fla.l5_puzzle_part5_233)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part5_233 extends MovieClip {
public function l5_puzzle_part5_233(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 102
//l5_puzzle_part6_234 (PnC_Game4_gamesit_fla.l5_puzzle_part6_234)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part6_234 extends MovieClip {
public function l5_puzzle_part6_234(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 103
//l5_puzzle_part7_235 (PnC_Game4_gamesit_fla.l5_puzzle_part7_235)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part7_235 extends MovieClip {
public function l5_puzzle_part7_235(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 104
//l5_puzzle_part8_236 (PnC_Game4_gamesit_fla.l5_puzzle_part8_236)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part8_236 extends MovieClip {
public function l5_puzzle_part8_236(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 105
//l5_puzzle_part9_237 (PnC_Game4_gamesit_fla.l5_puzzle_part9_237)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_puzzle_part9_237 extends MovieClip {
public function l5_puzzle_part9_237(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 106
//l5_ship_200 (PnC_Game4_gamesit_fla.l5_ship_200)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l5_ship_200 extends MovieClip {
public var anim:MovieClip;
public var sail:MovieClip;
public var crack:MovieClip;
public function l5_ship_200(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 107
//l5_ship_anim_199 (PnC_Game4_gamesit_fla.l5_ship_anim_199)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l5_ship_anim_199 extends MovieClip {
public var ship:MovieClip;
public function l5_ship_anim_199(){
addFrameScript(0, frame1, 51, frame52);
}
function frame1(){
stop();
}
function frame52(){
stop();
MovieClip(parent).win();
}
}
}//package PnC_Game4_gamesit_fla
Section 108
//l6_geizer_182 (PnC_Game4_gamesit_fla.l6_geizer_182)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l6_geizer_182 extends MovieClip {
public var steam:MovieClip;
public var skull:MovieClip;
public var steamSkull:MovieClip;
public var wood:MovieClip;
public var bones:MovieClip;
public function l6_geizer_182(){
addFrameScript(0, frame1, 79, frame80, 91, frame92, 103, frame104);
}
function frame1(){
if (MovieClip(parent).skullOk){
steamSkull.visible = false;
};
if (((MovieClip(parent).tubeOk) || (MovieClip(parent).cannonOk))){
steam.visible = false;
};
}
function frame80(){
gotoAndPlay(1);
}
function frame92(){
stop();
MovieClip(parent).hero.playAnim("refuse", function (){
MovieClip(parent).lose();
});
}
function frame104(){
stop();
if (!MovieClip(parent).stoneOk){
MovieClip(parent).hero.playAnim("refuse", function (){
MovieClip(parent).lose();
});
};
}
}
}//package PnC_Game4_gamesit_fla
Section 109
//l6_rock_brige_anim_188 (PnC_Game4_gamesit_fla.l6_rock_brige_anim_188)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l6_rock_brige_anim_188 extends MovieClip {
public function l6_rock_brige_anim_188(){
addFrameScript(0, frame1, 1, frame2, 23, frame24);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame24(){
stop();
MovieClip(parent).goWin();
}
}
}//package PnC_Game4_gamesit_fla
Section 110
//l7_door_151 (PnC_Game4_gamesit_fla.l7_door_151)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_door_151 extends MovieClip {
public function l7_door_151(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame1(){
stop();
}
function frame10(){
stop();
MovieClip(parent).goWin2();
}
function frame20(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 111
//l7_puzzle_anim_153 (PnC_Game4_gamesit_fla.l7_puzzle_anim_153)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l7_puzzle_anim_153 extends MovieClip {
public var puzzle:MovieClip;
public function l7_puzzle_anim_153(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
function frame20(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 112
//l7_puzzle_C1_anim_163 (PnC_Game4_gamesit_fla.l7_puzzle_C1_anim_163)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_puzzle_C1_anim_163 extends MovieClip {
public function l7_puzzle_C1_anim_163(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31);
}
function frame1(){
stop();
MovieClip(parent.parent.parent).testWin();
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame31(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 113
//l7_puzzle_C2_anim_161 (PnC_Game4_gamesit_fla.l7_puzzle_C2_anim_161)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_puzzle_C2_anim_161 extends MovieClip {
public function l7_puzzle_C2_anim_161(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31);
}
function frame1(){
stop();
MovieClip(parent.parent.parent).testWin();
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame31(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 114
//l7_puzzle_C3_anim_159 (PnC_Game4_gamesit_fla.l7_puzzle_C3_anim_159)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_puzzle_C3_anim_159 extends MovieClip {
public function l7_puzzle_C3_anim_159(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31);
}
function frame1(){
stop();
MovieClip(parent.parent.parent).testWin();
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame31(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 115
//l7_puzzle_C4_anim_157 (PnC_Game4_gamesit_fla.l7_puzzle_C4_anim_157)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_puzzle_C4_anim_157 extends MovieClip {
public function l7_puzzle_C4_anim_157(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31);
}
function frame1(){
stop();
MovieClip(parent.parent.parent).testWin();
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame31(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 116
//l7_puzzle_C5_anim_155 (PnC_Game4_gamesit_fla.l7_puzzle_C5_anim_155)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l7_puzzle_C5_anim_155 extends MovieClip {
public function l7_puzzle_C5_anim_155(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31);
}
function frame1(){
stop();
MovieClip(parent.parent.parent).testWin();
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame31(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 117
//l8_chest_62 (PnC_Game4_gamesit_fla.l8_chest_62)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l8_chest_62 extends MovieClip {
public var knife:MovieClip;
public var door:MovieClip;
public function l8_chest_62(){
addFrameScript(0, frame1, 37, frame38, 38, frame39, 39, frame40, 40, frame41);
}
function frame1(){
stop();
}
function frame38(){
stop();
}
function frame39(){
stop();
}
function frame40(){
stop();
}
function frame41(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 118
//l8_romes_all_70 (PnC_Game4_gamesit_fla.l8_romes_all_70)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l8_romes_all_70 extends MovieClip {
public function l8_romes_all_70(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 119
//l8_romes_die_80 (PnC_Game4_gamesit_fla.l8_romes_die_80)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l8_romes_die_80 extends MovieClip {
public function l8_romes_die_80(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 120
//l8_romes_die2_81 (PnC_Game4_gamesit_fla.l8_romes_die2_81)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l8_romes_die2_81 extends MovieClip {
public function l8_romes_die2_81(){
addFrameScript(9, frame10, 17, frame18);
}
function frame10(){
MovieClip(parent.parent).hero.playAnim("die", function (){
MovieClip(parent.parent).lose();
});
}
function frame18(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 121
//l8_romes_take_ugli_78 (PnC_Game4_gamesit_fla.l8_romes_take_ugli_78)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class l8_romes_take_ugli_78 extends MovieClip {
public function l8_romes_take_ugli_78(){
addFrameScript(32, frame33);
}
function frame33(){
gotoAndPlay(17);
}
}
}//package PnC_Game4_gamesit_fla
Section 122
//l8_tatem_67 (PnC_Game4_gamesit_fla.l8_tatem_67)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class l8_tatem_67 extends MovieClip {
public var totem:MovieClip;
public function l8_tatem_67(){
addFrameScript(0, frame1, 29, frame30, 30, frame31, 62, frame63, 63, frame64);
}
function frame1(){
stop();
}
function frame30(){
stop();
MovieClip(parent).hero.playAnim("refuse", function (){
MovieClip(parent).lose();
});
}
function frame31(){
stop();
}
function frame63(){
stop();
}
function frame64(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 123
//Logo_39 (PnC_Game4_gamesit_fla.Logo_39)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class Logo_39 extends MovieClip {
public function Logo_39(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
try {
navigateToURL(new URLRequest("http://www.abroy.com"), "_blank");
} catch(error:Error) {
};
}
function frame1(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 124
//logo_403 (PnC_Game4_gamesit_fla.logo_403)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class logo_403 extends MovieClip {
public function logo_403(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 125
//logoBtn_flashgames_397 (PnC_Game4_gamesit_fla.logoBtn_flashgames_397)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class logoBtn_flashgames_397 extends MovieClip {
public function logoBtn_flashgames_397(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://flashgames.it"), "_blank");
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 126
//MEMCounter_426 (PnC_Game4_gamesit_fla.MEMCounter_426)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import aq.pcge.*;
import flash.system.*;
public dynamic class MEMCounter_426 extends MovieClip {
public var mem_tf:TextField;
public var mb:uint;
public function MEMCounter_426(){
addFrameScript(0, frame1);
}
function frame1(){
mb = (0x0400 * 0x0400);
if (GameApplication.gameMode == "debug"){
addEventListener(Event.ENTER_FRAME, function (_arg1:Event):void{
mem_tf.text = String(Math.round((System.totalMemory / mb)));
});
} else {
visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 127
//Message_424 (PnC_Game4_gamesit_fla.Message_424)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import aq.pcge.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Message_424 extends MovieClip {
public function Message_424(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (!parent["console"].visible){
parent["console"].show();
} else {
parent["console"].hide();
};
}
function frame1(){
stop();
if (GameApplication.gameMode == "debug"){
addEventListener(MouseEvent.CLICK, onClick);
} else {
visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 128
//MoreGamesButton_394 (PnC_Game4_gamesit_fla.MoreGamesButton_394)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import aq.pcge.*;
import flash.net.*;
public dynamic class MoreGamesButton_394 extends MovieClip {
public function MoreGamesButton_394(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
if (((GameApplication.moreLink) && (GameApplication.moreLink.length))){
try {
navigateToURL(new URLRequest(GameApplication.moreLink), "_blank");
} catch(error:Error) {
};
};
}
function frame1(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 129
//MoreGamesButton_399 (PnC_Game4_gamesit_fla.MoreGamesButton_399)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import aq.pcge.*;
import flash.net.*;
public dynamic class MoreGamesButton_399 extends MovieClip {
public function MoreGamesButton_399(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
if (((GameApplication.moreLink) && (GameApplication.moreLink.length))){
try {
navigateToURL(new URLRequest(GameApplication.moreLink), "_blank");
} catch(error:Error) {
};
};
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 130
//MuteButton_387 (PnC_Game4_gamesit_fla.MuteButton_387)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public dynamic class MuteButton_387 extends MovieClip {
public function MuteButton_387(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (currentFrame == 1){
setVolume(0);
nextFrame();
} else {
setVolume(1);
prevFrame();
};
}
public function setVolume(_arg1:Number):void{
SoundMixer.soundTransform = new SoundTransform(_arg1);
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
if (SoundMixer.soundTransform.volume == 0){
gotoAndStop(2);
};
}
}
}//package PnC_Game4_gamesit_fla
Section 131
//OptBackButton_16 (PnC_Game4_gamesit_fla.OptBackButton_16)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class OptBackButton_16 extends MovieClip {
public function OptBackButton_16(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (parent){
var _local2 = parent;
_local2["close"]();
};
}
function frame1(){
buttonMode = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 132
//OptHelpButton_17 (PnC_Game4_gamesit_fla.OptHelpButton_17)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import aq.pcge.*;
import flash.net.*;
public dynamic class OptHelpButton_17 extends MovieClip {
public function OptHelpButton_17(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (((GameApplication.helpLink) && (!((GameApplication.helpLink == ""))))){
navigateToURL(new URLRequest(GameApplication.helpLink), "_blank");
};
}
function frame1(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 133
//OptionsButton_388 (PnC_Game4_gamesit_fla.OptionsButton_388)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
public dynamic class OptionsButton_388 extends MovieClip {
public function OptionsButton_388(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (!GameWindowsManager.instance.activeWindow){
Game.instance.openOptionsWindow();
};
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 134
//OptMenuButton_18 (PnC_Game4_gamesit_fla.OptMenuButton_18)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import aq.pcge.*;
public dynamic class OptMenuButton_18 extends MovieClip {
public function OptMenuButton_18(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
Game.instance.unloadEpisode();
Game.instance.returnToGame();
GameApplication.instance.gotoMenu();
}
function frame1(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 135
//OptMuteButton_20 (PnC_Game4_gamesit_fla.OptMuteButton_20)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public dynamic class OptMuteButton_20 extends MovieClip {
public function OptMuteButton_20(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
if (currentFrame == 1){
setVolume(0);
nextFrame();
} else {
setVolume(1);
prevFrame();
};
}
public function setVolume(_arg1:Number):void{
SoundMixer.soundTransform = new SoundTransform(_arg1);
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
if (SoundMixer.soundTransform.volume == 0){
gotoAndStop(2);
};
}
}
}//package PnC_Game4_gamesit_fla
Section 136
//PlayButton_25 (PnC_Game4_gamesit_fla.PlayButton_25)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
public dynamic class PlayButton_25 extends MovieClip {
public function PlayButton_25(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
Game.instance.returnToGame();
Game.instance.loadEpisode(0);
}
function frame1(){
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 137
//PlayButton_398 (PnC_Game4_gamesit_fla.PlayButton_398)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import aq.pcge.*;
public dynamic class PlayButton_398 extends MovieClip {
public function PlayButton_398(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
Game.instance.openHelloWindow();
GameApplication.instance.gotoGame();
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package PnC_Game4_gamesit_fla
Section 138
//PlayButton_5 (PnC_Game4_gamesit_fla.PlayButton_5)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PlayButton_5 extends MovieClip {
public function PlayButton_5(){
addFrameScript(0, frame1, 9, frame10);
}
public function onClick(_arg1:MouseEvent):void{
var _local2 = root;
_local2["gotoAndPlay"](2);
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onClick);
}
function frame10(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 139
//PlayButtonBg_4 (PnC_Game4_gamesit_fla.PlayButtonBg_4)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class PlayButtonBg_4 extends MovieClip {
public function PlayButtonBg_4(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 140
//POSMonitor_425 (PnC_Game4_gamesit_fla.POSMonitor_425)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import aq.pcge.*;
public dynamic class POSMonitor_425 extends MovieClip {
public var x_tf:TextField;
public var y_tf:TextField;
public function POSMonitor_425(){
addFrameScript(0, frame1);
}
function frame1(){
if (GameApplication.gameMode == "debug"){
addEventListener(Event.ENTER_FRAME, function (_arg1:Event):void{
if (root){
x_tf.text = root.mouseX.toString();
y_tf.text = root.mouseY.toString();
};
});
} else {
visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 141
//PreloadBar_2 (PnC_Game4_gamesit_fla.PreloadBar_2)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PreloadBar_2 extends MovieClip {
public function PreloadBar_2(){
addFrameScript(0, frame1, 99, frame100);
}
function frame1(){
stop();
}
function frame100(){
stop();
root["preloader"].gotoAndPlay(2);
}
}
}//package PnC_Game4_gamesit_fla
Section 142
//Preloader_1 (PnC_Game4_gamesit_fla.Preloader_1)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import CPMStar.*;
public dynamic class Preloader_1 extends MovieClip {
public var adBox:MovieClip;
public var preloadBar:MovieClip;
public var CPMStarPoolID:int;
public var CPMStarSubPoolID:int;
public var ad:DisplayObject;
public function Preloader_1(){
addFrameScript(0, frame1, 38, frame39);
}
function frame1(){
stop();
CPMStarPoolID = 18840;
CPMStarSubPoolID = 1191;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
}
function frame39(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 143
//Presenter_401 (PnC_Game4_gamesit_fla.Presenter_401)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class Presenter_401 extends MovieClip {
public function Presenter_401(){
addFrameScript(149, frame150);
}
function frame150(){
MovieClip(parent).nextFrame();
}
}
}//package PnC_Game4_gamesit_fla
Section 144
//romesoldier_idle_306 (PnC_Game4_gamesit_fla.romesoldier_idle_306)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class romesoldier_idle_306 extends MovieClip {
public function romesoldier_idle_306(){
addFrameScript(88, frame89, 176, frame177, 225, frame226, 238, frame239, 245, frame246);
}
function frame89(){
if (MovieClip(parent).mushroomIn){
gotoAndPlay(178);
};
}
function frame177(){
gotoAndPlay(1);
}
function frame226(){
stop();
MovieClip(parent).goWin2();
}
function frame239(){
MovieClip(parent).hero.playAnim("die", function (){
MovieClip(parent).lose();
});
}
function frame246(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 145
//Viking_die_104 (PnC_Game4_gamesit_fla.Viking_die_104)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_die_104 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_die_104(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame17(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 146
//Viking_head_die_105 (PnC_Game4_gamesit_fla.Viking_head_die_105)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class Viking_head_die_105 extends MovieClip {
public function Viking_head_die_105(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 147
//Viking_head_refused_103 (PnC_Game4_gamesit_fla.Viking_head_refused_103)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class Viking_head_refused_103 extends MovieClip {
public function Viking_head_refused_103(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 148
//Viking_idle_83 (PnC_Game4_gamesit_fla.Viking_idle_83)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_idle_83 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_idle_83(){
addFrameScript(0, frame1);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
}
}//package PnC_Game4_gamesit_fla
Section 149
//viking_l2_iron_shield_ax_113 (PnC_Game4_gamesit_fla.viking_l2_iron_shield_ax_113)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class viking_l2_iron_shield_ax_113 extends MovieClip {
public function viking_l2_iron_shield_ax_113(){
addFrameScript(43, frame44);
}
function frame44(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 150
//Viking_l2_UP_steps_107 (PnC_Game4_gamesit_fla.Viking_l2_UP_steps_107)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_l2_UP_steps_107 extends MovieClip {
public function Viking_l2_UP_steps_107(){
addFrameScript(29, frame30, 59, frame60);
}
function frame30(){
MovieClip(parent.parent).shield.visible = false;
}
function frame60(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 151
//Viking_l2_use_ax_114 (PnC_Game4_gamesit_fla.Viking_l2_use_ax_114)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l2_use_ax_114 extends MovieClip {
public function Viking_l2_use_ax_114(){
addFrameScript(121, frame122);
}
function frame122(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 152
//Viking_l2_use_hammer_108 (PnC_Game4_gamesit_fla.Viking_l2_use_hammer_108)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_l2_use_hammer_108 extends MovieClip {
public function Viking_l2_use_hammer_108(){
addFrameScript(13, frame14, 79, frame80);
}
function frame14(){
MovieClip(parent.parent).oven.gotoAndStop(2);
}
function frame80(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 153
//Viking_l3_throw_gelud_119 (PnC_Game4_gamesit_fla.Viking_l3_throw_gelud_119)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l3_throw_gelud_119 extends MovieClip {
public function Viking_l3_throw_gelud_119(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 154
//Viking_l3_throw_grib_121 (PnC_Game4_gamesit_fla.Viking_l3_throw_grib_121)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l3_throw_grib_121 extends MovieClip {
public function Viking_l3_throw_grib_121(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 155
//Viking_l3_use_golob_117 (PnC_Game4_gamesit_fla.Viking_l3_use_golob_117)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l3_use_golob_117 extends MovieClip {
public function Viking_l3_use_golob_117(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 156
//Viking_l5_jump_125 (PnC_Game4_gamesit_fla.Viking_l5_jump_125)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l5_jump_125 extends MovieClip {
public function Viking_l5_jump_125(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 157
//Viking_l5_jump_in_208 (PnC_Game4_gamesit_fla.Viking_l5_jump_in_208)
package PnC_Game4_gamesit_fla {
import flash.display.*;
public dynamic class Viking_l5_jump_in_208 extends MovieClip {
public function Viking_l5_jump_in_208(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package PnC_Game4_gamesit_fla
Section 158
//Viking_l5_use_hummer_123 (PnC_Game4_gamesit_fla.Viking_l5_use_hummer_123)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l5_use_hummer_123 extends MovieClip {
public function Viking_l5_use_hummer_123(){
addFrameScript(73, frame74);
}
function frame74(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 159
//Viking_l8_jump_135 (PnC_Game4_gamesit_fla.Viking_l8_jump_135)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_l8_jump_135 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_l8_jump_135(){
addFrameScript(39, frame40, 77, frame78);
}
function frame40(){
MovieClip(parent.parent).enemy.visible = false;
}
function frame78(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 160
//Viking_l8_throw_knife_138 (PnC_Game4_gamesit_fla.Viking_l8_throw_knife_138)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l8_throw_knife_138 extends MovieClip {
public function Viking_l8_throw_knife_138(){
addFrameScript(33, frame34);
}
function frame34(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 161
//Viking_l8_use_ax_136 (PnC_Game4_gamesit_fla.Viking_l8_use_ax_136)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_l8_use_ax_136 extends MovieClip {
public function Viking_l8_use_ax_136(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 162
//Viking_refuse_98 (PnC_Game4_gamesit_fla.Viking_refuse_98)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_refuse_98 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_refuse_98(){
addFrameScript(0, frame1, 14, frame15);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame15(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 163
//Viking_take_94 (PnC_Game4_gamesit_fla.Viking_take_94)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_take_94 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_take_94(){
addFrameScript(0, frame1, 7, frame8, 16, frame17);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame8(){
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_KEYFRAME, true));
}
function frame17(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 164
//Viking_take_up_96 (PnC_Game4_gamesit_fla.Viking_take_up_96)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_take_up_96 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_take_up_96(){
addFrameScript(0, frame1, 7, frame8, 16, frame17);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame8(){
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_KEYFRAME, true));
}
function frame17(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 165
//Viking_use_95 (PnC_Game4_gamesit_fla.Viking_use_95)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_use_95 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_use_95(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame19(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 166
//Viking_use_bola_131 (PnC_Game4_gamesit_fla.Viking_use_bola_131)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
public dynamic class Viking_use_bola_131 extends MovieClip {
public function Viking_use_bola_131(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 167
//Viking_use_spoon_126 (PnC_Game4_gamesit_fla.Viking_use_spoon_126)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_use_spoon_126 extends MovieClip {
public function Viking_use_spoon_126(){
addFrameScript(15, frame16, 30, frame31);
}
function frame16(){
MovieClip(parent.parent).coal.visible = false;
}
function frame31(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 168
//Viking_use_spoon_129 (PnC_Game4_gamesit_fla.Viking_use_spoon_129)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_use_spoon_129 extends MovieClip {
public function Viking_use_spoon_129(){
addFrameScript(25, frame26, 34, frame35);
}
function frame26(){
MovieClip(parent.parent).enemy.gotoAndStop(2);
}
function frame35(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 169
//Viking_use_up_97 (PnC_Game4_gamesit_fla.Viking_use_up_97)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_use_up_97 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_use_up_97(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame19(){
stop();
dispatchEvent(new CharacterEvent(CharacterEvent.ANIM_COMPLETE, true));
}
}
}//package PnC_Game4_gamesit_fla
Section 170
//Viking_walk_93 (PnC_Game4_gamesit_fla.Viking_walk_93)
package PnC_Game4_gamesit_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Viking_walk_93 extends MovieClip {
public var body:MovieClip;
public var helmet:MovieClip;
public function Viking_walk_93(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
if (!MovieClip(parent.parent).helmetOk){
helmet.visible = false;
};
if (!MovieClip(parent.parent).swordOk){
body.sword.visible = false;
};
if (!MovieClip(parent.parent).shieldOk){
body.shield.visible = false;
};
}
function frame20(){
gotoAndPlay(5);
}
}
}//package PnC_Game4_gamesit_fla
Section 171
//Episode_01 (Episode_01)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_01 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public function Episode_01(){
addFrameScript(0, frame1);
}
public function takeShield():void{
action = false;
hero.playAnim("walk");
hero.turnTo(shield.x);
hero.moveTo(280, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use_up", function (){
shield.visible = false;
hero.anim.body.shield.visible = true;
shieldOk = true;
action = true;
heroIdle();
testWin();
});
});
}
public function takeSword():void{
action = false;
hero.playAnim("walk");
hero.turnTo(sword.x);
hero.moveTo(150, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use_up", function (){
sword.visible = false;
hero.anim.body.sword.visible = true;
swordOk = true;
action = true;
heroIdle();
testWin();
});
});
}
public function testWin():void{
if (((((helmetOk) && (swordOk))) && (shieldOk))){
action = false;
goWin2();
};
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
registerItem("rog1", Item_Rog1);
registerItem("rog2", Item_Rog2);
registerItem("helm", Item_Helm);
registerItem("helmet", Item_Helmet);
swordOk = false;
helmetOk = false;
shieldOk = false;
addNewActivator("do2", do2, {onClick:function ():void{
action = false;
hero.turnTo(rog1.x);
heroFindItem("rog1", rog1, function (){
action = true;
if (((((hasItem("rog1")) && (hasItem("rog2")))) && (hasItem("helm")))){
makeItem("helmet", ["helm", "rog1", "rog2"], function ():void{
action = true;
helmetOk = true;
dropItem("helmet");
hero.anim.helmet.visible = true;
testWin();
});
};
}, "take_up", "do2", 30, 30);
}});
addNewActivator("do3", do3, {onClick:function ():void{
action = false;
hero.turnTo(rog2.x);
heroFindItem("rog2", rog2, function (){
action = true;
if (((((hasItem("rog1")) && (hasItem("rog2")))) && (hasItem("helm")))){
makeItem("helmet", ["helm", "rog1", "rog2"], function ():void{
action = true;
helmetOk = true;
dropItem("helmet");
hero.anim.helmet.visible = true;
testWin();
});
};
}, "take_up", "do3", 30, 30);
}});
addNewActivator("do4", do4, {onClick:function ():void{
action = false;
hero.turnTo(helm.x);
heroFindItem("helm", helm, function (){
action = true;
if (((((hasItem("rog1")) && (hasItem("rog2")))) && (hasItem("helm")))){
if (((((hasItem("helm")) && (hasItem("rog1")))) && (hasItem("rog2")))){
makeItem("helmet", ["helm", "rog1", "rog2"], function ():void{
action = true;
helmetOk = true;
dropItem("helmet");
hero.anim.helmet.visible = true;
testWin();
});
} else {
action = true;
};
};
}, "take", "do4", 30, 30);
}});
addNewActivator("do1", do1, {onClick:function ():void{
if (!swordOk){
takeSword();
};
}});
addNewActivator("do5", do5, {onClick:function ():void{
if (!shieldOk){
takeShield();
};
}});
heroIdle();
start();
}
}
}//package
Section 172
//Episode_02 (Episode_02)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_02 extends Episode {
public var swordOk;
public var shieldOk;
public var helmetOk;
public var fireOk:Boolean;
public var ladderOk:Boolean;
public var shieldOk2:Boolean;
public var barricadeOk:Boolean;
public var can:Boolean;
public function Episode_02(){
addFrameScript(0, frame1);
}
public function testOk():void{
if (((((((puzzle.puzzle.fire1.visible) && (puzzle.puzzle.fire2.visible))) && (puzzle.puzzle.fire3.visible))) && (puzzle.puzzle.fire4.visible))){
action = true;
puzzle.play();
oven.gotoAndStop(2);
can = true;
fireOk = true;
swapChildren(hero, puzzle);
};
}
public function takeShield():void{
action = false;
hero.playAnim("walk");
hero.turnTo(oven.x);
hero.moveTo(288, hero.y, function (){
dropItem("ladder");
ladder2.visible = true;
hero.turnOn("left");
hero.playAnim("UP_steps", function (){
takeItem("shield", true);
action = true;
heroIdle();
});
});
}
public function placeShield():void{
action = false;
hero.playAnim("walk");
hero.turnTo(oven.x);
hero.moveTo(170, hero.y, function (){
dropItem("shield");
hero.turnOn("left");
hero.playAnim("use_up", function (){
oven.gotoAndStop(3);
shieldOk2 = true;
action = true;
heroIdle();
});
});
}
public function crashBarricade():void{
action = false;
hero.playAnim("walk");
hero.turnTo(barricade.x);
hero.moveTo(460, hero.y, function (){
dropItem("axe");
hero.turnOn("right");
barricade.play();
hero.playAnim("use_ax", function (){
barricadeOk = true;
action = true;
heroIdle();
});
});
}
public function goWin():void{
action = false;
hero.playAnim("walk");
hero.turnTo(door.x);
hero.moveTo(540, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use", function (){
door.play();
action = false;
goWin2();
});
});
}
public function makeAxe():void{
action = false;
hero.playAnim("walk");
hero.turnTo(oven.x);
hero.moveTo(180, hero.y, function (){
dropItem("hammer");
dropItem("tool");
hero.turnOn("left");
hero.playAnim("use_hummer", function (){
action = true;
takeItem("blade", true);
if (((hasItem("wood")) && (hasItem("blade")))){
makeItem("axe", ["wood", "blade"], function ():void{
action = true;
});
};
action = true;
heroIdle();
});
});
}
public function beginPuzzle():void{
action = false;
hero.playAnim("walk");
hero.turnTo(oven.x);
hero.moveTo(170, hero.y, function (){
can = false;
hero.turnOn("left");
puzzle.puzzle.fire1.visible = false;
puzzle.puzzle.fire2.visible = false;
puzzle.puzzle.fire3.visible = false;
puzzle.puzzle.fire4.visible = false;
hero.playAnim("use", function (){
swapChildren(hero, puzzle);
puzzle.gotoAndPlay(2);
do5.visible = true;
do6.visible = true;
do7.visible = true;
do11.visible = true;
do12.visible = true;
action = false;
heroIdle();
});
});
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(650, 380, function (){
hero.moveTo(950, hero.y, function (){
win();
});
});
}
function frame1(){
oven.gotoAndStop(1);
puzzle.gotoAndStop(1);
barricade.gotoAndStop(1);
door.gotoAndStop(1);
do5.visible = false;
do6.visible = false;
do7.visible = false;
do12.visible = false;
do11.visible = false;
ladder2.visible = false;
swordOk = true;
shieldOk = true;
helmetOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
registerItem("wood", Item_Wood);
registerItem("tool", Item_Tool);
registerItem("ladder", Item_Ladder);
registerItem("shield", Item_IronShield);
registerItem("hammer", Item_Hammer);
registerItem("blade", Item_Blade);
registerItem("axe", Item_Axe);
fireOk = false;
ladderOk = false;
shieldOk2 = false;
barricadeOk = false;
addNewActivator("do1", do1, {onClick:function ():void{
if (can){
action = false;
hero.turnTo(do1.x);
heroFindItem("tool", tool, function (){
action = true;
}, "take", "do1", 30, 30);
};
}});
addNewActivator("do3", do3, {onClick:function ():void{
if (can){
action = false;
hero.turnTo(do3.x);
heroFindItem("hammer", hammer, function (){
action = true;
}, "take", "do3", 30, 30);
};
}});
addNewActivator("do8", do8, {onClick:function ():void{
if (can){
if (!ladderOk){
action = false;
hero.turnTo(ladder.x);
heroFindItem("ladder", ladder, function (){
action = true;
ladderOk = true;
}, "take", null, 30, 30);
} else {
if (barricadeOk){
goWin();
} else {
if (hasItem("axe")){
crashBarricade();
};
};
};
};
}});
addNewActivator("do9", do9, {onClick:function ():void{
if (can){
if (((((shieldOk2) && (hasItem("tool")))) && (hasItem("hammer")))){
makeAxe();
} else {
if (((((!(shieldOk2)) && (hasItem("shield")))) && (fireOk))){
placeShield();
} else {
if (!fireOk){
beginPuzzle();
};
};
};
};
}});
addNewActivator("do5", do5, {onClick:function ():void{
if (puzzle.puzzle.lever1.currentFrame == 1){
puzzle.puzzle.lever1.nextFrame();
} else {
puzzle.puzzle.lever1.prevFrame();
};
puzzle.puzzle.fire1.visible = !(puzzle.puzzle.fire1.visible);
puzzle.puzzle.fire2.visible = !(puzzle.puzzle.fire2.visible);
testOk();
}});
addNewActivator("do6", do6, {onClick:function ():void{
if (puzzle.puzzle.lever2.currentFrame == 1){
puzzle.puzzle.lever2.nextFrame();
} else {
puzzle.puzzle.lever2.prevFrame();
};
puzzle.puzzle.fire3.visible = !(puzzle.puzzle.fire3.visible);
puzzle.puzzle.fire2.visible = !(puzzle.puzzle.fire2.visible);
testOk();
}});
addNewActivator("do7", do7, {onClick:function ():void{
if (puzzle.puzzle.lever3.currentFrame == 1){
puzzle.puzzle.lever3.nextFrame();
} else {
puzzle.puzzle.lever3.prevFrame();
};
puzzle.puzzle.fire1.visible = !(puzzle.puzzle.fire1.visible);
puzzle.puzzle.fire3.visible = !(puzzle.puzzle.fire3.visible);
testOk();
}});
addNewActivator("do11", do11, {onClick:function ():void{
if (puzzle.puzzle.lever4.currentFrame == 1){
puzzle.puzzle.lever4.nextFrame();
} else {
puzzle.puzzle.lever4.prevFrame();
};
puzzle.puzzle.fire4.visible = !(puzzle.puzzle.fire4.visible);
puzzle.puzzle.fire3.visible = !(puzzle.puzzle.fire3.visible);
testOk();
}});
addNewActivator("do12", do12, {onClick:function ():void{
puzzle.puzzle.lever1.gotoAndStop(1);
puzzle.puzzle.lever2.gotoAndStop(1);
puzzle.puzzle.lever3.gotoAndStop(1);
puzzle.puzzle.lever4.gotoAndStop(1);
puzzle.puzzle.fire1.visible = false;
puzzle.puzzle.fire2.visible = false;
puzzle.puzzle.fire3.visible = false;
puzzle.puzzle.fire4.visible = false;
}});
can = true;
addNewActivator("do2", do2, {onClick:function ():void{
if (can){
action = false;
hero.turnTo(do2.x);
heroFindItem("wood", wood, function (){
action = true;
if (((hasItem("wood")) && (hasItem("blade")))){
makeItem("axe", ["wood", "blade"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do2", 30, 30);
};
}});
addNewActivator("do4", do4, {onClick:function ():void{
if (hasItem("ladder")){
takeShield();
removeActivator("do4");
} else {
heroRefuse();
};
}});
heroIdle();
start();
}
}
}//package
Section 173
//Episode_03 (Episode_03)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_03 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var vetka2Ok:Boolean;
public var vetka1Ok:Boolean;
public var trapOk:Boolean;
public var squirrelOk:Boolean;
public var mushroomIn:Boolean;
public function Episode_03(){
addFrameScript(0, frame1);
}
public function vetka1fix():void{
branch1.gotoAndPlay(2);
vetka1Ok = true;
}
public function vetka2fix():void{
branch2.gotoAndPlay(2);
vetka2Ok = true;
}
public function placeTrap():void{
action = false;
hero.playAnim("walk");
hero.turnTo(epicScene.x);
hero.moveTo(221, hero.y, function (){
dropItem("trap");
hero.turnOn("right");
epicScene.gotoAndPlay(2);
hero.playAnim("use_golob", function (){
trapOk = true;
action = true;
heroIdle();
});
});
}
public function goDie():void{
action = false;
hero.playAnim("walk");
hero.turnTo(epicScene.x);
hero.moveTo(353, hero.y, function (){
hero.turnOn("right");
enemy.gotoAndPlay("kick");
hero.playAnim("use", function (){
trapOk = true;
action = true;
heroIdle();
});
});
}
public function throwMushroomAndLose():void{
action = false;
hero.playAnim("walk");
hero.turnTo(mushroom_anim.x);
hero.moveTo(99, hero.y, function (){
dropItem("mushroom");
hero.turnOn("right");
hero.playAnim("l3_throw_grib", function (){
mushroom_anim.visible = true;
mushroom_anim.gotoAndPlay(43);
squirrel.gotoAndStop(2);
action = false;
heroIdle();
});
});
}
public function throwAcorn():void{
action = false;
hero.playAnim("walk");
hero.turnTo(mushroom_anim.x);
hero.moveTo(99, hero.y, function (){
dropItem("acorn");
hero.turnOn("right");
hero.playAnim("l3_throw_golud", function (){
squirrelOk = true;
acorn_anim.visible = true;
acorn_anim.gotoAndPlay(2);
squirrel.gotoAndStop(3);
action = true;
heroIdle();
});
});
}
public function poisonEnemy():void{
action = false;
hero.playAnim("walk");
hero.turnTo(mushroom_anim.x);
hero.moveTo(99, hero.y, function (){
dropItem("mushroom");
hero.turnOn("right");
hero.playAnim("l3_throw_grib", function (){
mushroom_anim.visible = true;
mushroom_anim.gotoAndPlay(2);
action = false;
heroIdle();
});
});
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
mushroom_anim.gotoAndStop(1);
mushroom_anim.visible = false;
acorn_anim.gotoAndStop(1);
acorn_anim.visible = false;
epicScene.gotoAndStop(1);
squirrel.gotoAndStop(1);
registerItem("trap", Item_Trap);
registerItem("rope", Item_Rope);
registerItem("mushroom", Item_Mushroom);
registerItem("acorn", Item_Acorn);
registerItem("kora", Item_Kora);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
vetka2Ok = false;
vetka1Ok = false;
trapOk = false;
squirrelOk = false;
mushroomIn = false;
addNewActivator("do1", do1, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("kora", kora, function (){
if (((hasItem("kora")) && (hasItem("rope")))){
makeItem("trap", ["kora", "rope"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do1", 30, 30);
}});
addNewActivator("do2", do2, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("rope", rope, function (){
if (((hasItem("kora")) && (hasItem("rope")))){
makeItem("trap", ["kora", "rope"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do2", 30, 30);
}});
addNewActivator("do3", do3, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("acorn", acorn, function (){
action = true;
}, "take_up", "do3", 30, 30);
}});
addNewActivator("do4", do4, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("mushroom", mushroom, function (){
action = true;
}, "take_up", "do4", 30, 30);
}});
addNewActivator("do5", do5, {onClick:function ():void{
if (!vetka1Ok){
vetka1fix();
};
}});
addNewActivator("do6", do6, {onClick:function ():void{
if (!vetka2Ok){
vetka2fix();
};
}});
addNewActivator("do7", do7, {onClick:function ():void{
if (((!(trapOk)) && (hasItem("trap")))){
placeTrap();
} else {
heroRefuse();
};
}});
addNewActivator("do9", do9, {onClick:function ():void{
goDie();
}});
addNewActivator("do8", do8, {onClick:function ():void{
if (((((vetka2Ok) && (vetka1Ok))) && (trapOk))){
if (((squirrelOk) && (hasItem("mushroom")))){
poisonEnemy();
} else {
if (!squirrelOk){
if (hasItem("acorn")){
throwAcorn();
} else {
if (hasItem("mushroom")){
throwMushroomAndLose();
} else {
heroRefuse();
};
};
};
};
};
}});
heroIdle();
start();
}
}
}//package
Section 174
//Episode_04 (Episode_04)
package {
import flash.display.*;
import com.greensock.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import com.greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_04 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var vetka2Ok:Boolean;
public var vetka1Ok:Boolean;
public var trapOk:Boolean;
public var squirrelOk:Boolean;
public var mushroomIn:Boolean;
public var can:Boolean;
public var mc;
public var arraIT:Array;
public var arraR:Array;
public var arraGl:Array;
public var currClip:MovieClip;
public var tempX:Number;
public var tempY:Number;
public var range:Number;
public function Episode_04(){
addFrameScript(0, frame1);
}
public function puzzleBegin():void{
hero.playAnim("walk");
hero.turnTo(310);
hero.moveTo(310, hero.y, function (){
heroIdle();
trace("ok1");
do1.visible = false;
do2.visible = false;
do3.visible = false;
do4.visible = false;
mc.it1.visible = true;
mc.it2.visible = true;
mc.it3.visible = true;
mc.it4.visible = true;
dropItem("it1");
dropItem("it2");
dropItem("it3");
dropItem("it4");
trace("ok2");
puzzle.gotoAndPlay(2);
trace("ok3");
swapChildren(hero, puzzle);
var _local1:int;
while (_local1 < arraIT.length) {
trace("ok4");
arraIT[_local1].addEventListener(MouseEvent.MOUSE_DOWN, startDragF);
trace("ok5");
_local1++;
};
});
}
public function startDragF(_arg1:MouseEvent):void{
currClip = MovieClip(_arg1.currentTarget);
tempX = currClip.x;
tempY = currClip.y;
currClip.startDrag();
puzzle.puzzle.addChild(currClip);
stage.addEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
}
public function stage_onMouseUp(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
currClip.stopDrag();
var _local2:Number = -1;
var _local3:int;
while (_local3 < arraIT.length) {
if (currClip == arraIT[_local3]){
_local2 = _local3;
};
_local3++;
};
if (getDistance(arraIT[_local2], arraR[_local2]) < 10){
arraIT[_local2].visible = false;
arraR[_local2].visible = true;
arraGl[_local2].gotoAndStop(3);
} else {
if ((((_local2 == 2)) && ((getDistance(arraIT[_local2], arraR[(_local2 + 1)]) < 10)))){
arraIT[_local2].visible = false;
arraR[(_local2 + 1)].visible = true;
arraGl[(_local2 + 1)].gotoAndStop(3);
} else {
if ((((_local2 == 3)) && ((getDistance(arraIT[_local2], arraR[(_local2 - 1)]) < 10)))){
arraIT[_local2].visible = false;
arraR[(_local2 - 1)].visible = true;
arraGl[(_local2 - 1)].gotoAndStop(3);
} else {
TweenLite.to(currClip, 0.5, {x:tempX, y:tempY, ease:Circ.easeOut});
};
};
};
currClip = null;
testWin();
}
public function testWin():void{
var _local1:Boolean;
var _local2:int;
while (_local2 < arraR.length) {
if (!arraR[_local2].visible){
_local1 = false;
};
_local2++;
};
if (_local1){
puzzle.play();
swapChildren(hero, puzzle);
};
}
public function getDistance(_arg1, _arg2):Number{
var _local3:Number = Math.abs((Math.abs(_arg1.x) - Math.abs(_arg2.x)));
var _local4:Number = Math.abs((Math.abs(_arg1.y) - Math.abs(_arg2.y)));
var _local5:Number = 10000;
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
return (_local5);
}
public function goDie():void{
action = false;
hero.playAnim("walk");
hero.turnTo(epicScene.x);
hero.moveTo(353, hero.y, function (){
hero.turnOn("right");
enemy.gotoAndPlay("kick");
hero.playAnim("use", function (){
trapOk = true;
action = true;
heroIdle();
});
});
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
texture.mouseEnabled = false;
texture.mouseChildren = false;
texture.enabled = false;
registerItem("it1", Item_It1);
registerItem("it2", Item_It2);
registerItem("it3", Item_It3);
registerItem("it4", Item_It4);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
vetka2Ok = false;
vetka1Ok = false;
trapOk = false;
squirrelOk = false;
mushroomIn = false;
addNewActivator("do1", do1, {onClick:function ():void{
if (can){
action = false;
hero.turnOn("right");
heroFindItem("it1", it1, function (){
action = true;
}, "take", "do1", 30, 30);
};
}});
addNewActivator("do2", do2, {onClick:function ():void{
if (can){
action = false;
hero.turnOn("right");
heroFindItem("it2", it2, function (){
action = true;
}, "take", "do2", 30, 30);
};
}});
addNewActivator("do3", do3, {onClick:function ():void{
if (can){
action = false;
hero.turnOn("right");
heroFindItem("it3", it3, function (){
action = true;
}, "take", "do3", 30, 30);
};
}});
addNewActivator("do4", do4, {onClick:function ():void{
if (can){
action = false;
hero.turnOn("right");
heroFindItem("it4", it4, function (){
action = true;
}, "take", "do4", 30, 30);
};
}});
can = true;
addNewActivator("puzzle", puzzle, {onClick:function ():void{
if (((((((hasItem("it1")) && (hasItem("it2")))) && (hasItem("it3")))) && (hasItem("it4")))){
if (can){
puzzleBegin();
};
can = false;
} else {
heroRefuse();
};
}});
mc = puzzle.puzzle;
arraIT = [mc.it1, mc.it2, mc.it3, mc.it4];
arraR = [mc.pl1, mc.pl2, mc.pl3, mc.pl4];
arraGl = [mc.gl1, mc.gl2, mc.gl3, mc.gl4];
mc.gl5.gotoAndStop(3);
mc.gl6.gotoAndStop(3);
mc.gl7.gotoAndStop(3);
mc.gl8.gotoAndStop(3);
mc.gl9.gotoAndStop(3);
mc.it1.visible = false;
mc.it2.visible = false;
mc.it3.visible = false;
mc.it4.visible = false;
mc.pl1.visible = false;
mc.pl2.visible = false;
mc.pl3.visible = false;
mc.pl4.visible = false;
range = 5;
heroIdle();
start();
}
}
}//package
Section 175
//Episode_05 (Episode_05)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_05 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var onBoard:Boolean;
public var shield2Ok:Boolean;
public var resinOk:Boolean;
public var crackOk:Boolean;
public var sailOk:Boolean;
public function Episode_05(){
addFrameScript(0, frame1);
}
public function placeSail():void{
action = false;
hero.playAnim("walk");
hero.turnTo(422);
hero.moveTo(422, hero.y, function (){
dropItem("sail");
hero.turnOn("left");
hero.playAnim("use_up", function (){
ship.ship.sail.gotoAndPlay(2);
sailOk = true;
action = true;
heroIdle();
});
});
}
public function plaseResin():void{
action = false;
hero.playAnim("walk");
hero.turnTo(480);
hero.moveTo(480, hero.y, function (){
dropItem("resin");
hero.turnOn("right");
hero.playAnim("use", function (){
ship.ship.crack.resin.visible = true;
resinOk = true;
action = true;
heroIdle();
});
});
}
public function placeShield():void{
action = false;
hero.playAnim("walk");
hero.turnTo(480);
hero.moveTo(480, hero.y, function (){
dropItem("shield");
hero.turnOn("right");
hero.playAnim("use", function (){
ship.ship.crack.shield.visible = true;
shield2Ok = true;
action = true;
heroIdle();
});
});
}
public function placeNails():void{
action = false;
hero.playAnim("walk");
hero.turnTo(450);
hero.moveTo(450, hero.y, function (){
dropItem("nailsHammer");
hero.turnOn("right");
hero.playAnim("l5_use_hummer", function (){
ship.ship.crack.nails.visible = true;
crackOk = true;
action = true;
heroIdle();
});
});
}
public function jumpOnBoard():void{
action = false;
hero.playAnim("walk");
hero.turnTo(422);
hero.moveTo(422, hero.y, function (){
hero.turnOn("right");
hero.playAnim("l5_jump", function (){
ship.ship.gotoAndStop(2);
hero.visible = false;
puzzleBegin();
onBoard = true;
action = true;
});
});
}
public function testWin():void{
var _local1:* = puzzle.puzzle;
if ((((((((((((((((((((((((((((((((((((((((((((((((((_local1.p11.currentFrame == 1)) && ((_local1.p12.currentFrame == 1)))) && ((_local1.p13.currentFrame == 1)))) && ((_local1.p14.currentFrame == 1)))) && ((_local1.p15.currentFrame == 1)))) && ((_local1.p11.currentFrame == 1)))) && ((_local1.p22.currentFrame == 1)))) && ((_local1.p23.currentFrame == 1)))) && ((_local1.p24.currentFrame == 1)))) && ((_local1.p25.currentFrame == 1)))) && ((_local1.p11.currentFrame == 1)))) && ((_local1.p32.currentFrame == 1)))) && ((_local1.p33.currentFrame == 1)))) && ((_local1.p34.currentFrame == 1)))) && ((_local1.p35.currentFrame == 1)))) && ((_local1.p11.currentFrame == 1)))) && ((_local1.p42.currentFrame == 1)))) && ((_local1.p43.currentFrame == 1)))) && ((_local1.p44.currentFrame == 1)))) && ((_local1.p45.currentFrame == 1)))) && ((_local1.p11.currentFrame == 1)))) && ((_local1.p52.currentFrame == 1)))) && ((_local1.p53.currentFrame == 1)))) && ((_local1.p54.currentFrame == 1)))) && ((_local1.p55.currentFrame == 1)))){
action = false;
puzzle.play();
};
}
public function puzzleBegin():void{
d11.visible = true;
d12.visible = true;
d13.visible = true;
d14.visible = true;
d15.visible = true;
d21.visible = true;
d22.visible = true;
d23.visible = true;
d24.visible = true;
d25.visible = true;
d31.visible = true;
d32.visible = true;
d33.visible = true;
d34.visible = true;
d35.visible = true;
d41.visible = true;
d42.visible = true;
d43.visible = true;
d44.visible = true;
d45.visible = true;
d51.visible = true;
d52.visible = true;
d53.visible = true;
d54.visible = true;
d55.visible = true;
puzzle.puzzle.p11.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p12.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p13.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p14.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p15.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p21.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p22.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p23.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p24.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p25.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p31.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p32.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p33.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p34.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p35.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p41.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p42.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p43.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p44.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p45.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p51.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p52.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p53.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p54.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.puzzle.p55.gotoAndStop(Math.floor((Math.random() * 4)));
puzzle.visible = true;
puzzle.play();
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
texture.mouseEnabled = false;
texture.mouseChildren = false;
texture.enabled = false;
ship.gotoAndStop(1);
puzzle.gotoAndStop(1);
ship.ship.gotoAndStop(1);
ship.ship.sail.gotoAndStop(1);
ship.ship.crack.shield.visible = false;
ship.ship.crack.nails.visible = false;
ship.ship.crack.resin.visible = false;
registerItem("resin", Item_Resin);
registerItem("shield", Item_Shield3);
registerItem("sail", Item_Sail);
registerItem("nails", Item_Nails);
registerItem("nailsHammer", Item_Nails_Hammer);
registerItem("hammer", Item_Hammer14);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
onBoard = false;
shield2Ok = false;
resinOk = false;
crackOk = false;
sailOk = false;
addNewActivator("do1", do1, {onClick:function ():void{
action = false;
hero.turnOn("left");
heroFindItem("resin", resin, function (){
action = true;
}, "take", "do1", 30, 30);
}});
addNewActivator("do2", do2, {onClick:function ():void{
action = false;
heroFindItem("sail", sail, function (){
action = true;
}, "take", "do2", 30, 30);
}});
addNewActivator("do3", do3, {onClick:function ():void{
action = false;
heroFindItem("shield", shield, function (){
action = true;
}, "take_up", "do3", 30, 30);
}});
addNewActivator("do4", do4, {onClick:function ():void{
action = false;
heroFindItem("nails", nails, function (){
if (((hasItem("nails")) && (hasItem("hammer")))){
makeItem("nailsHammer", ["nails", "hammer"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do4", 30, 30);
}});
addNewActivator("do5", do5, {onClick:function ():void{
action = false;
heroFindItem("hammer", hammer, function (){
if (((hasItem("nails")) && (hasItem("hammer")))){
makeItem("nailsHammer", ["nails", "hammer"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do5", 30, 30);
}});
addNewActivator("do6", do6, {onClick:function ():void{
if (hasItem("sail")){
placeSail();
sailOk = true;
};
}});
addNewActivator("do7", do7, {onClick:function ():void{
if (((hasItem("resin")) && (!(resinOk)))){
plaseResin();
} else {
if (((((hasItem("shield")) && (!(shield2Ok)))) && (resinOk))){
placeShield();
} else {
if (((((hasItem("nailsHammer")) && (!(crackOk)))) && (shield2Ok))){
placeNails();
} else {
heroRefuse();
};
};
};
}});
addNewActivator("do8", do8, {onClick:function ():void{
if (((crackOk) && (sailOk))){
jumpOnBoard();
} else {
heroRefuse();
};
}});
addNewActivator("d11", d11, {onClick:function ():void{
if (puzzle.puzzle.p11.currentFrame == 4){
puzzle.puzzle.p11.gotoAndStop(1);
} else {
puzzle.puzzle.p11.nextFrame();
};
testWin();
}});
addNewActivator("d15", d15, {onClick:function ():void{
if (puzzle.puzzle.p15.currentFrame == 4){
puzzle.puzzle.p15.gotoAndStop(1);
} else {
puzzle.puzzle.p15.nextFrame();
};
testWin();
}});
addNewActivator("d12", d12, {onClick:function ():void{
if (puzzle.puzzle.p12.currentFrame == 4){
puzzle.puzzle.p12.gotoAndStop(1);
} else {
puzzle.puzzle.p12.nextFrame();
};
testWin();
}});
addNewActivator("d13", d13, {onClick:function ():void{
if (puzzle.puzzle.p13.currentFrame == 4){
puzzle.puzzle.p13.gotoAndStop(1);
} else {
puzzle.puzzle.p13.nextFrame();
};
testWin();
}});
addNewActivator("d14", d14, {onClick:function ():void{
if (puzzle.puzzle.p14.currentFrame == 4){
puzzle.puzzle.p14.gotoAndStop(1);
} else {
puzzle.puzzle.p14.nextFrame();
};
testWin();
}});
addNewActivator("d21", d21, {onClick:function ():void{
if (puzzle.puzzle.p21.currentFrame == 4){
puzzle.puzzle.p21.gotoAndStop(1);
} else {
puzzle.puzzle.p21.nextFrame();
};
testWin();
}});
addNewActivator("d25", d25, {onClick:function ():void{
if (puzzle.puzzle.p25.currentFrame == 4){
puzzle.puzzle.p25.gotoAndStop(1);
} else {
puzzle.puzzle.p25.nextFrame();
};
testWin();
}});
addNewActivator("d22", d22, {onClick:function ():void{
if (puzzle.puzzle.p22.currentFrame == 4){
puzzle.puzzle.p22.gotoAndStop(1);
} else {
puzzle.puzzle.p22.nextFrame();
};
testWin();
}});
addNewActivator("d23", d23, {onClick:function ():void{
if (puzzle.puzzle.p23.currentFrame == 4){
puzzle.puzzle.p23.gotoAndStop(1);
} else {
puzzle.puzzle.p23.nextFrame();
};
testWin();
}});
addNewActivator("d24", d24, {onClick:function ():void{
if (puzzle.puzzle.p24.currentFrame == 4){
puzzle.puzzle.p24.gotoAndStop(1);
} else {
puzzle.puzzle.p24.nextFrame();
};
testWin();
}});
addNewActivator("d31", d31, {onClick:function ():void{
if (puzzle.puzzle.p31.currentFrame == 4){
puzzle.puzzle.p31.gotoAndStop(1);
} else {
puzzle.puzzle.p31.nextFrame();
};
testWin();
}});
addNewActivator("d35", d35, {onClick:function ():void{
if (puzzle.puzzle.p35.currentFrame == 4){
puzzle.puzzle.p35.gotoAndStop(1);
} else {
puzzle.puzzle.p35.nextFrame();
};
testWin();
}});
addNewActivator("d32", d32, {onClick:function ():void{
if (puzzle.puzzle.p32.currentFrame == 4){
puzzle.puzzle.p32.gotoAndStop(1);
} else {
puzzle.puzzle.p32.nextFrame();
};
testWin();
}});
addNewActivator("d33", d33, {onClick:function ():void{
if (puzzle.puzzle.p33.currentFrame == 4){
puzzle.puzzle.p33.gotoAndStop(1);
} else {
puzzle.puzzle.p33.nextFrame();
};
testWin();
}});
addNewActivator("d34", d34, {onClick:function ():void{
if (puzzle.puzzle.p34.currentFrame == 4){
puzzle.puzzle.p34.gotoAndStop(1);
} else {
puzzle.puzzle.p34.nextFrame();
};
testWin();
}});
addNewActivator("d41", d41, {onClick:function ():void{
if (puzzle.puzzle.p41.currentFrame == 4){
puzzle.puzzle.p41.gotoAndStop(1);
} else {
puzzle.puzzle.p41.nextFrame();
};
testWin();
}});
addNewActivator("d45", d45, {onClick:function ():void{
if (puzzle.puzzle.p45.currentFrame == 4){
puzzle.puzzle.p45.gotoAndStop(1);
} else {
puzzle.puzzle.p45.nextFrame();
};
testWin();
}});
addNewActivator("d42", d42, {onClick:function ():void{
if (puzzle.puzzle.p42.currentFrame == 4){
puzzle.puzzle.p42.gotoAndStop(1);
} else {
puzzle.puzzle.p42.nextFrame();
};
testWin();
}});
addNewActivator("d43", d43, {onClick:function ():void{
if (puzzle.puzzle.p43.currentFrame == 4){
puzzle.puzzle.p43.gotoAndStop(1);
} else {
puzzle.puzzle.p43.nextFrame();
};
testWin();
}});
addNewActivator("d44", d44, {onClick:function ():void{
if (puzzle.puzzle.p44.currentFrame == 4){
puzzle.puzzle.p44.gotoAndStop(1);
} else {
puzzle.puzzle.p44.nextFrame();
};
testWin();
}});
addNewActivator("d51", d51, {onClick:function ():void{
if (puzzle.puzzle.p51.currentFrame == 4){
puzzle.puzzle.p51.gotoAndStop(1);
} else {
puzzle.puzzle.p51.nextFrame();
};
testWin();
}});
addNewActivator("d55", d55, {onClick:function ():void{
if (puzzle.puzzle.p55.currentFrame == 4){
puzzle.puzzle.p55.gotoAndStop(1);
} else {
puzzle.puzzle.p55.nextFrame();
};
testWin();
}});
addNewActivator("d52", d52, {onClick:function ():void{
if (puzzle.puzzle.p52.currentFrame == 4){
puzzle.puzzle.p52.gotoAndStop(1);
} else {
puzzle.puzzle.p52.nextFrame();
};
testWin();
}});
addNewActivator("d53", d53, {onClick:function ():void{
if (puzzle.puzzle.p53.currentFrame == 4){
puzzle.puzzle.p53.gotoAndStop(1);
} else {
puzzle.puzzle.p53.nextFrame();
};
testWin();
}});
addNewActivator("d54", d54, {onClick:function ():void{
if (puzzle.puzzle.p54.currentFrame == 4){
puzzle.puzzle.p54.gotoAndStop(1);
} else {
puzzle.puzzle.p54.nextFrame();
};
testWin();
}});
puzzle.visible = false;
d11.visible = false;
d12.visible = false;
d13.visible = false;
d14.visible = false;
d15.visible = false;
d21.visible = false;
d22.visible = false;
d23.visible = false;
d24.visible = false;
d25.visible = false;
d31.visible = false;
d32.visible = false;
d33.visible = false;
d34.visible = false;
d35.visible = false;
d41.visible = false;
d42.visible = false;
d43.visible = false;
d44.visible = false;
d45.visible = false;
d51.visible = false;
d52.visible = false;
d53.visible = false;
d54.visible = false;
d55.visible = false;
heroIdle();
start();
}
}
}//package
Section 176
//Episode_06 (Episode_06)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_06 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var woodOk:Boolean;
public var bonesOk:Boolean;
public var stoneOk:Boolean;
public var rockOk:Boolean;
public var skullOk:Boolean;
public var cannonOk:Boolean;
public var tubeOk:Boolean;
public function Episode_06(){
addFrameScript(0, frame1);
}
public function crackRock():void{
action = false;
hero.playAnim("walk");
hero.turnTo(450);
hero.moveTo(450, hero.y, function (){
dropItem("stone");
hero.turnOn("right");
hero.playAnim("use_up", function (){
rock.gotoAndStop(2);
stoneOk = true;
action = true;
heroIdle();
});
});
}
public function placeSkull():void{
action = false;
hero.playAnim("walk");
hero.turnTo(153);
hero.moveTo(153, hero.y, function (){
dropItem("skull");
hero.turnOn("right");
hero.playAnim("use_up", function (){
epicScene.skull.visible = true;
skullOk = true;
action = true;
heroIdle();
if (cannonOk){
if (stoneOk){
epicScene.gotoAndPlay(93);
rock.gotoAndPlay(3);
} else {
epicScene.gotoAndPlay(93);
};
} else {
if (tubeOk){
epicScene.gotoAndPlay(81);
};
};
});
});
}
public function placeCannon():void{
action = false;
hero.playAnim("walk");
hero.turnTo(250);
hero.moveTo(250, hero.y, function (){
dropItem("cannon");
hero.turnOn("right");
hero.playAnim("use_up", function (){
trace("oko");
epicScene.bones.visible = true;
trace("oko 2");
cannonOk = true;
action = false;
heroIdle();
if (skullOk){
if (stoneOk){
epicScene.gotoAndPlay(93);
rock.gotoAndPlay(3);
} else {
epicScene.gotoAndPlay(93);
};
};
});
});
}
public function placeTube():void{
action = false;
hero.playAnim("walk");
hero.turnTo(250);
hero.moveTo(250, hero.y, function (){
dropItem("tube");
hero.turnOn("right");
hero.playAnim("use_up", function (){
epicScene.wood.visible = true;
epicScene.steam.visible = false;
tubeOk = true;
action = false;
heroIdle();
if (skullOk){
epicScene.gotoAndPlay(81);
};
});
});
}
public function goWin():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(372, 380, function (){
hero.moveTo(545, 215, function (){
goWin2();
});
});
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
rock.gotoAndStop(1);
epicScene.wood.visible = false;
epicScene.bones.visible = false;
epicScene.skull.visible = false;
epicScene.gotoAndPlay(1);
registerItem("tube", Item_WoodTube);
registerItem("woodPart1", Item_WoodPart1);
registerItem("woodPart2", Item_WoodPart2);
registerItem("cannon", Item_WoodCannon);
registerItem("stone", Item_Stone);
registerItem("skull", Item_Skull);
registerItem("bones", Item_Bones);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
woodOk = false;
bonesOk = false;
stoneOk = false;
rockOk = false;
skullOk = false;
cannonOk = false;
tubeOk = false;
addNewActivator("do1", do1, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("woodPart1", woodPart1, function (){
if (((hasItem("woodPart1")) && (hasItem("woodPart2")))){
makeItem("tube", ["woodPart1", "woodPart2"], function ():void{
if (((hasItem("tube")) && (hasItem("bones")))){
makeItem("cannon", ["tube", "bones"], function ():void{
action = true;
});
} else {
action = true;
};
});
} else {
action = true;
};
}, "take", "do1", 30, 30);
}});
addNewActivator("do2", do2, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("woodPart2", woodPart2, function (){
if (((hasItem("woodPart1")) && (hasItem("woodPart2")))){
makeItem("tube", ["woodPart1", "woodPart2"], function ():void{
if (((hasItem("tube")) && (hasItem("bones")))){
makeItem("cannon", ["tube", "bones"], function ():void{
action = true;
});
} else {
action = true;
};
});
} else {
action = true;
};
}, "take", "do2", 30, 30);
}});
addNewActivator("do7", do7, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("bones", bones, function (){
if (((hasItem("tube")) && (hasItem("bones")))){
makeItem("cannon", ["tube", "bones"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do7", 30, 30);
}});
addNewActivator("do3", do3, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("stone", stone, function (){
action = true;
}, "take", "do3", 30, 30);
}});
addNewActivator("do4", do4, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("skull", skull, function (){
action = true;
}, "take", "do4", 30, 30);
}});
addNewActivator("do5", do5, {onClick:function ():void{
if (hasItem("stone")){
crackRock();
};
}});
addNewActivator("do6", do6, {onClick:function ():void{
if (((hasItem("skull")) && (!(skullOk)))){
placeSkull();
} else {
if (hasItem("cannon")){
placeCannon();
} else {
if (hasItem("tube")){
placeTube();
};
};
};
}});
heroIdle();
start();
}
}
}//package
Section 177
//Episode_07 (Episode_07)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_07 extends Episode {
public var arrayFrames:Array;
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var doorOk:Boolean;
public var can;
public function Episode_07(){
addFrameScript(0, frame1);
}
public function beginPuzzle():void{
action = false;
hero.playAnim("walk");
hero.turnTo(290);
hero.moveTo(290, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use", function (){
swapChildren(hero, puzzle);
can = true;
puzzle.play();
in1.visible = true;
in2.visible = true;
in3.visible = true;
in4.visible = true;
in5.visible = true;
action = true;
heroIdle();
});
});
}
public function testWin():void{
var _local1:*;
if (can){
_local1 = puzzle.puzzle;
if ((((((((((_local1.p1.currentFrame == 1)) && ((_local1.p2.currentFrame == 1)))) && ((_local1.p3.currentFrame == 1)))) && ((_local1.p4.currentFrame == 1)))) && ((_local1.p5.currentFrame == 1)))){
action = false;
puzzle.play();
swapChildren(hero, puzzle);
door.play();
};
};
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("right");
hero.moveTo(950, hero.y, function (){
win();
});
}
function frame1(){
texture.mouseEnabled = false;
texture.mouseChildren = false;
texture.enabled = false;
door.gotoAndStop(1);
puzzle.gotoAndStop(1);
arrayFrames = [1, 11, 21, 31];
puzzle.puzzle.p1.gotoAndStop(arrayFrames[Math.floor((Math.random() * arrayFrames.length))]);
puzzle.puzzle.p2.gotoAndStop(arrayFrames[Math.floor((Math.random() * arrayFrames.length))]);
puzzle.puzzle.p3.gotoAndStop(arrayFrames[Math.floor((Math.random() * arrayFrames.length))]);
puzzle.puzzle.p4.gotoAndStop(arrayFrames[Math.floor((Math.random() * arrayFrames.length))]);
puzzle.puzzle.p5.gotoAndStop(arrayFrames[Math.floor((Math.random() * arrayFrames.length))]);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
doorOk = false;
addNewActivator("do1", do1, {onClick:function ():void{
beginPuzzle();
}});
addNewActivator("in1", in1, {onClick:function ():void{
if (puzzle.puzzle.p1.currentFrame == 41){
puzzle.puzzle.p1.gotoAndPlay(1);
} else {
puzzle.puzzle.p1.play();
};
}});
addNewActivator("in2", in2, {onClick:function ():void{
if (puzzle.puzzle.p2.currentFrame == 41){
puzzle.puzzle.p2.gotoAndPlay(1);
} else {
puzzle.puzzle.p2.play();
};
}});
addNewActivator("in3", in3, {onClick:function ():void{
if (puzzle.puzzle.p3.currentFrame == 41){
puzzle.puzzle.p3.gotoAndPlay(1);
} else {
puzzle.puzzle.p3.play();
};
}});
addNewActivator("in4", in4, {onClick:function ():void{
if (puzzle.puzzle.p4.currentFrame == 41){
puzzle.puzzle.p4.gotoAndPlay(1);
} else {
puzzle.puzzle.p4.play();
};
}});
addNewActivator("in5", in5, {onClick:function ():void{
if (puzzle.puzzle.p5.currentFrame == 41){
puzzle.puzzle.p5.gotoAndPlay(1);
} else {
puzzle.puzzle.p5.play();
};
}});
can = false;
in1.visible = false;
in2.visible = false;
in3.visible = false;
in4.visible = false;
in5.visible = false;
heroIdle();
start();
}
}
}//package
Section 178
//Episode_08 (Episode_08)
package {
import flash.display.*;
import aq.pcge.game.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_08 extends Episode {
public var swordOk:Boolean;
public var helmetOk:Boolean;
public var shieldOk:Boolean;
public var chestOk:Boolean;
public var enemyBlindOk:Boolean;
public var enemyDieOk:Boolean;
public var doorTaked:Boolean;
public var coalTaked:Boolean;
public var totemOk;
public var doorPlaced;
public var can;
public function Episode_08(){
addFrameScript(0, frame1);
}
public function blindEnemy():void{
action = false;
hero.playAnim("walk");
hero.turnTo(enemy.x);
hero.moveTo(307, hero.y, function (){
dropItem("spoonCoal");
hero.turnOn("right");
hero.playAnim("l8_use_spoon+ugli", function (){
enemyBlindOk = true;
action = true;
heroIdle();
});
});
}
public function killEnemy():void{
action = false;
hero.playAnim("walk");
hero.turnTo(enemy.x);
hero.moveTo(307, hero.y, function (){
dropItem("weapon");
hero.turnOn("right");
hero.playAnim("use_bola", function (){
enemyDieOk = true;
enemy.gotoAndStop(3);
action = true;
heroIdle();
});
});
}
public function die():void{
action = false;
hero.playAnim("walk");
hero.turnTo(enemy.x);
hero.moveTo(307, hero.y, function (){
dropItem("weapon");
hero.turnOn("right");
hero.playAnim("use_bola", function (){
enemy.gotoAndStop(4);
action = false;
heroIdle();
});
});
}
public function takeAxe():void{
action = false;
hero.playAnim("walk");
hero.turnTo(enemy.x);
hero.moveTo(375, hero.y, function (){
hero.turnOn("right");
hero.playAnim("jump+take+jump", function (){
takeItem("axe");
action = true;
heroIdle();
});
});
}
public function crackChest():void{
action = false;
hero.playAnim("walk");
hero.turnTo(chest.x);
hero.moveTo(195, hero.y, function (){
dropItem("axe");
hero.turnOn("left");
chest.gotoAndPlay(2);
hero.playAnim("l8_use_ax", function (){
chestOk = true;
action = true;
heroIdle();
});
});
}
public function takeKnife():void{
action = false;
hero.playAnim("walk");
hero.turnTo(chest.x);
hero.moveTo(195, hero.y, function (){
hero.turnOn("left");
hero.playAnim("use", function (){
chest.knife.visible = false;
takeItem("knife", true);
action = true;
heroIdle();
});
});
}
public function takeDoor():void{
action = false;
hero.playAnim("walk");
hero.turnTo(195);
hero.moveTo(195, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use", function (){
chest.door.visible = false;
takeItem("door", true);
action = true;
heroIdle();
});
});
}
public function placeDoor():void{
action = false;
hero.playAnim("walk");
hero.turnTo(360);
hero.moveTo(360, hero.y, function (){
dropItem("door");
hero.turnOn("right");
hero.playAnim("use", function (){
totem.gotoAndStop(31);
action = true;
heroIdle();
doorPlaced = true;
});
});
}
public function takeTotem():void{
action = false;
hero.playAnim("walk");
hero.turnTo(360);
hero.moveTo(360, hero.y, function (){
hero.turnOn("right");
hero.playAnim("use", function (){
totem.gotoAndStop(64);
takeItem("totem", true);
goWin2();
action = true;
});
});
}
public function throwKnifeRight():void{
action = false;
hero.playAnim("walk");
hero.turnTo(280);
hero.moveTo(280, hero.y, function (){
dropItem("knife");
hero.turnOn("right");
totem.play();
hero.playAnim("l8_throw_knife", function (){
totemOk = true;
action = true;
heroIdle();
});
});
}
public function goWin2():void{
action = false;
hero.playAnim("walk");
hero.turnOn("left");
action = false;
can = false;
hero.moveTo(-100, hero.y, function (){
action = false;
win();
});
}
function frame1(){
chest.gotoAndStop(1);
enemy.gotoAndStop(1);
totem.gotoAndStop(1);
registerItem("skull", Item_Skull);
registerItem("spoon", Item_Spoon);
registerItem("door", Item_Door);
registerItem("skull2", Item_Skull);
registerItem("chain", Item_Chain);
registerItem("weapon", Item_Weapon);
registerItem("knife", Item_Knife);
registerItem("axe", Item_Axe2);
registerItem("totem", Item_Totem);
registerItem("spoonCoal", Item_SpoonCoal);
swordOk = true;
helmetOk = true;
shieldOk = true;
hero.anim.body.shield.visible = true;
hero.anim.body.sword.visible = true;
hero.anim.helmet.visible = true;
chestOk = false;
enemyBlindOk = false;
enemyDieOk = false;
doorTaked = false;
coalTaked = false;
addNewActivator("do1", do1, {onClick:function ():void{
action = false;
hero.turnOn("left");
heroFindItem("skull", skull, function (){
if (((hasItem("skull2")) && (hasItem("chain")))){
makeItem("weapon", ["skull", "skull2", "chain"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do1", 30, 30);
}});
addNewActivator("do2", do2, {onClick:function ():void{
action = false;
hero.turnOn("left");
heroFindItem("skull2", skull2, function (){
if (((hasItem("skull")) && (hasItem("chain")))){
makeItem("weapon", ["skull", "skull2", "chain"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do2", 30, 30);
}});
addNewActivator("do3", do3, {onClick:function ():void{
action = false;
hero.turnOn("left");
heroFindItem("chain", chain, function (){
if (((hasItem("skull")) && (hasItem("skull2")))){
makeItem("weapon", ["skull", "skull2", "chain"], function ():void{
action = true;
});
} else {
action = true;
};
}, "take", "do3", 30, 30);
}});
addNewActivator("do4", do4, {onClick:function ():void{
action = false;
hero.turnOn("right");
heroFindItem("spoon", spoon, function (){
action = true;
}, "take", "do4", 30, 30);
}});
addNewActivator("do5", do5, {onClick:function ():void{
if (((!(coalTaked)) && (hasItem("spoon")))){
coalTaked = true;
action = false;
hero.playAnim("walk");
hero.turnTo(185);
hero.moveTo(185, hero.y, function (){
dropItem("spoon");
hero.turnOn("right");
hero.playAnim("l8_use_spoon", function (){
takeItem("spoonCoal", true);
action = true;
heroIdle();
});
});
} else {
if (((!(doorTaked)) && (chestOk))){
doorTaked = true;
takeDoor();
} else {
hero.playAnim("refuse", function (){
action = true;
});
};
};
}});
addNewActivator("do6", do6, {onClick:function ():void{
if (can){
if (hasItem("spoonCoal")){
blindEnemy();
} else {
if (hasItem("weapon")){
if (enemyBlindOk){
killEnemy();
} else {
die();
};
} else {
if (((((enemyDieOk) && (!(hasItem("axe"))))) && (!(chestOk)))){
takeAxe();
} else {
heroRefuse();
};
};
};
};
}});
addNewActivator("do7", do7, {onClick:function ():void{
if (can){
if (hasItem("axe")){
crackChest();
} else {
if (((chestOk) && (!(hasItem("knife"))))){
takeKnife();
} else {
heroRefuse();
};
};
};
}});
totemOk = false;
addNewActivator("do8", do8, {onClick:function ():void{
if (can){
if (hasItem("door")){
placeDoor();
} else {
if (totemOk){
takeTotem();
} else {
heroRefuse();
};
};
};
}});
doorPlaced = false;
addNewActivator("do9", do9, {onClick:function ():void{
if (can){
if (hasItem("knife")){
if (doorPlaced){
throwKnifeRight();
} else {
throwKnifeRight();
};
} else {
heroRefuse();
};
};
}});
can = true;
heroIdle();
start();
}
}
}//package
Section 179
//GameImage01 (GameImage01)
package {
import flash.display.*;
public dynamic class GameImage01 extends BitmapData {
public function GameImage01(_arg1:int=120, _arg2:int=120){
super(_arg1, _arg2);
}
}
}//package
Section 180
//GameImage02 (GameImage02)
package {
import flash.display.*;
public dynamic class GameImage02 extends BitmapData {
public function GameImage02(_arg1:int=120, _arg2:int=120){
super(_arg1, _arg2);
}
}
}//package
Section 181
//GameImage03 (GameImage03)
package {
import flash.display.*;
public dynamic class GameImage03 extends BitmapData {
public function GameImage03(_arg1:int=120, _arg2:int=120){
super(_arg1, _arg2);
}
}
}//package
Section 182
//GameImage04 (GameImage04)
package {
import flash.display.*;
public dynamic class GameImage04 extends BitmapData {
public function GameImage04(_arg1:int=120, _arg2:int=120){
super(_arg1, _arg2);
}
}
}//package
Section 183
//GameMusic (GameMusic)
package {
import flash.media.*;
public dynamic class GameMusic extends Sound {
}
}//package
Section 184
//GameSlot (GameSlot)
package {
import aq.pcge.game.buttons.*;
public dynamic class GameSlot extends LinkBox {
}
}//package
Section 185
//HeroL1 (HeroL1)
package {
import aq.pcge.game.*;
public dynamic class HeroL1 extends Character {
public function HeroL1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame10(){
stop();
}
function frame11(){
stop();
}
function frame12(){
stop();
}
function frame13(){
stop();
}
function frame14(){
stop();
}
function frame15(){
stop();
}
function frame16(){
stop();
}
function frame17(){
stop();
}
function frame18(){
stop();
}
function frame19(){
stop();
}
function frame20(){
stop();
}
function frame21(){
stop();
}
function frame22(){
stop();
}
}
}//package
Section 186
//Item_Acorn (Item_Acorn)
package {
import flash.display.*;
public dynamic class Item_Acorn extends MovieClip {
}
}//package
Section 187
//Item_Axe (Item_Axe)
package {
import flash.display.*;
public dynamic class Item_Axe extends MovieClip {
}
}//package
Section 188
//Item_Axe2 (Item_Axe2)
package {
import flash.display.*;
public dynamic class Item_Axe2 extends MovieClip {
}
}//package
Section 189
//Item_Blade (Item_Blade)
package {
import flash.display.*;
public dynamic class Item_Blade extends MovieClip {
}
}//package
Section 190
//Item_Bones (Item_Bones)
package {
import flash.display.*;
public dynamic class Item_Bones extends MovieClip {
}
}//package
Section 191
//Item_Chain (Item_Chain)
package {
import flash.display.*;
public dynamic class Item_Chain extends MovieClip {
}
}//package
Section 192
//Item_Door (Item_Door)
package {
import flash.display.*;
public dynamic class Item_Door extends MovieClip {
}
}//package
Section 193
//Item_Hammer (Item_Hammer)
package {
import flash.display.*;
public dynamic class Item_Hammer extends MovieClip {
}
}//package
Section 194
//Item_Hammer14 (Item_Hammer14)
package {
import flash.display.*;
public dynamic class Item_Hammer14 extends MovieClip {
}
}//package
Section 195
//Item_Helm (Item_Helm)
package {
import flash.display.*;
public dynamic class Item_Helm extends MovieClip {
}
}//package
Section 196
//Item_Helmet (Item_Helmet)
package {
import flash.display.*;
public dynamic class Item_Helmet extends MovieClip {
}
}//package
Section 197
//Item_IronShield (Item_IronShield)
package {
import flash.display.*;
public dynamic class Item_IronShield extends MovieClip {
}
}//package
Section 198
//Item_It1 (Item_It1)
package {
import flash.display.*;
public dynamic class Item_It1 extends MovieClip {
}
}//package
Section 199
//Item_It2 (Item_It2)
package {
import flash.display.*;
public dynamic class Item_It2 extends MovieClip {
}
}//package
Section 200
//Item_It3 (Item_It3)
package {
import flash.display.*;
public dynamic class Item_It3 extends MovieClip {
}
}//package
Section 201
//Item_It4 (Item_It4)
package {
import flash.display.*;
public dynamic class Item_It4 extends MovieClip {
}
}//package
Section 202
//Item_Knife (Item_Knife)
package {
import flash.display.*;
public dynamic class Item_Knife extends MovieClip {
}
}//package
Section 203
//Item_Kora (Item_Kora)
package {
import flash.display.*;
public dynamic class Item_Kora extends MovieClip {
}
}//package
Section 204
//Item_Ladder (Item_Ladder)
package {
import flash.display.*;
public dynamic class Item_Ladder extends MovieClip {
}
}//package
Section 205
//Item_Mushroom (Item_Mushroom)
package {
import flash.display.*;
public dynamic class Item_Mushroom extends MovieClip {
}
}//package
Section 206
//Item_Nails (Item_Nails)
package {
import flash.display.*;
public dynamic class Item_Nails extends MovieClip {
}
}//package
Section 207
//Item_Nails_Hammer (Item_Nails_Hammer)
package {
import flash.display.*;
public dynamic class Item_Nails_Hammer extends MovieClip {
}
}//package
Section 208
//Item_Resin (Item_Resin)
package {
import flash.display.*;
public dynamic class Item_Resin extends MovieClip {
}
}//package
Section 209
//Item_Rog1 (Item_Rog1)
package {
import flash.display.*;
public dynamic class Item_Rog1 extends MovieClip {
}
}//package
Section 210
//Item_Rog2 (Item_Rog2)
package {
import flash.display.*;
public dynamic class Item_Rog2 extends MovieClip {
}
}//package
Section 211
//Item_Rope (Item_Rope)
package {
import flash.display.*;
public dynamic class Item_Rope extends MovieClip {
}
}//package
Section 212
//Item_Sail (Item_Sail)
package {
import flash.display.*;
public dynamic class Item_Sail extends MovieClip {
}
}//package
Section 213
//Item_Shield3 (Item_Shield3)
package {
import flash.display.*;
public dynamic class Item_Shield3 extends MovieClip {
}
}//package
Section 214
//Item_Skull (Item_Skull)
package {
import flash.display.*;
public dynamic class Item_Skull extends MovieClip {
}
}//package
Section 215
//Item_Spoon (Item_Spoon)
package {
import flash.display.*;
public dynamic class Item_Spoon extends MovieClip {
}
}//package
Section 216
//Item_SpoonCoal (Item_SpoonCoal)
package {
import flash.display.*;
public dynamic class Item_SpoonCoal extends MovieClip {
}
}//package
Section 217
//Item_Stone (Item_Stone)
package {
import flash.display.*;
public dynamic class Item_Stone extends MovieClip {
}
}//package
Section 218
//Item_Tool (Item_Tool)
package {
import flash.display.*;
public dynamic class Item_Tool extends MovieClip {
}
}//package
Section 219
//Item_Totem (Item_Totem)
package {
import flash.display.*;
public dynamic class Item_Totem extends MovieClip {
}
}//package
Section 220
//Item_Trap (Item_Trap)
package {
import flash.display.*;
public dynamic class Item_Trap extends MovieClip {
}
}//package
Section 221
//Item_Weapon (Item_Weapon)
package {
import flash.display.*;
public dynamic class Item_Weapon extends MovieClip {
}
}//package
Section 222
//Item_Wood (Item_Wood)
package {
import flash.display.*;
public dynamic class Item_Wood extends MovieClip {
}
}//package
Section 223
//Item_WoodCannon (Item_WoodCannon)
package {
import flash.display.*;
public dynamic class Item_WoodCannon extends MovieClip {
}
}//package
Section 224
//Item_WoodPart1 (Item_WoodPart1)
package {
import flash.display.*;
public dynamic class Item_WoodPart1 extends MovieClip {
}
}//package
Section 225
//Item_WoodPart2 (Item_WoodPart2)
package {
import flash.display.*;
public dynamic class Item_WoodPart2 extends MovieClip {
public var stone2:MovieClip;
}
}//package
Section 226
//Item_WoodTube (Item_WoodTube)
package {
import flash.display.*;
public dynamic class Item_WoodTube extends MovieClip {
}
}//package
Section 227
//ItemIcon (ItemIcon)
package {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ItemIcon extends MovieClip {
public var image:MovieClip;
public var bounds:MovieClip;
public var source:String;
public var title:String;
public var onGFXComplete:Function;
public function ItemIcon(){
addFrameScript(0, frame1, 1, frame2, 24, frame25);
}
public function setIcon(_arg1:DisplayObject):void{
while (image.holder.numChildren) {
image.holder.removeChildAt(0);
};
image.holder.addChild(_arg1);
}
public function getIcon():DisplayObject{
return ((image.holder.numChildren) ? image.holder.getChildAt(0) : null);
}
function frame1(){
stop();
}
function frame2(){
image.holder.gotoAndStop(1);
}
function frame25(){
dispatchEvent(new Event("gfxComplete"));
image.holder.gotoAndPlay(2);
}
}
}//package
Section 228
//WMCurtain (WMCurtain)
package {
import flash.display.*;
public dynamic class WMCurtain extends Sprite {
}
}//package