Section 1
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var start:Number;
public var name:String;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var priority:int;
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 2
//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);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:TweenCore;
var _local5:Number;
var _local6:TweenCore;
_local4 = _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 addChild(_arg1:TweenCore):void{
if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
};
_arg1.nextNode = _firstChild;
_firstChild = _arg1;
_arg1.prevNode = null;
_arg1.cachedOrphan = false;
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
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 3
//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;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.38;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
var _local3:SimpleTimeline;
_rawPrevTime = -1;
super();
this.vars = ((_arg2)!=null) ? _arg2 : {};
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;
};
};
_local3 = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
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{
var _local2:Boolean;
_local2 = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
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{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function invalidate():void{
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
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 reversed():Boolean{
return (this.cachedReversed);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore;
_local2 = (_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){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setTotalTime(this.cachedTotalTime, false);
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 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : 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{
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.gc))){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (!_arg2){
this.timeline.remove(this, true);
};
};
this.gc = !(_arg1);
return (false);
}
}
}//package com.greensock.core
Section 4
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
public 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.02;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
while (_arg1) {
if (_arg1.cachedPaused){
return (true);
};
_arg1 = _arg1.timeline;
};
return (false);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.1){
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:uint):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local8:Number;
var _local9:Array;
var _local10:Array;
var _local11:uint;
var _local12:uint;
var _local13:uint;
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);
};
_local8 = (_arg1.cachedStartTime + 1E-10);
_local9 = [];
_local10 = [];
_local11 = 0;
_local12 = 0;
_local5 = _arg3.length;
while (--_local5 > -1) {
_local7 = _arg3[_local5];
if ((((_local7 == _arg1)) || (_local7.gc))){
} 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)))) && (!(getGlobalPaused(_local7))))){
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 5
//TimelineLite (com.greensock.TimelineLite)
package com.greensock {
import com.greensock.core.*;
import flash.utils.*;
public class TimelineLite extends SimpleTimeline {
protected var _endCaps:Array;
protected var _labels:Object;
public static const version:Number = 1.38;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public function TimelineLite(_arg1:Object=null){
super(_arg1);
_endCaps = [];
_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 stop():void{
this.paused = true;
}
public function get useFrames():Boolean{
var _local1:SimpleTimeline;
_local1 = this.timeline;
while (_local1.timeline) {
_local1 = _local1.timeline;
};
return (Boolean((_local1 == TweenLite.rootFramesTimeline)));
}
override public function get rawTime():Number{
if (((!((this.cachedTotalTime == 0))) && (!((this.cachedTotalTime == this.cachedTotalDuration))))){
return (this.cachedTotalTime);
};
return (((this.timeline.rawTime - this.cachedStartTime) * this.cachedTimeScale));
}
public function append(_arg1:TweenCore, _arg2:Number=0):void{
insert(_arg1, (this.duration + _arg2));
}
public function getLabelTime(_arg1:String):Number{
return (((_arg1 in _labels)) ? Number(_labels[_arg1]) : -1);
}
override public function set duration(_arg1:Number):void{
if (((!((this.duration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.duration / _arg1);
};
}
protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):Number{
var _local3:TweenCore;
var _local4:TweenCore;
var _local5:Number;
var _local6:Boolean;
_local3 = _lastChild;
_local6 = 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 invalidate():void{
var _local1:TweenCore;
_local1 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
while (_local1) {
_local1.invalidate();
_local1 = _local1.nextNode;
};
}
public function appendMultiple(_arg1:Array, _arg2:Number=0, _arg3:String="normal", _arg4:Number=0):void{
insertMultiple(_arg1, (this.duration + _arg2), _arg3, _arg4);
}
public function goto(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
}
public function clear(_arg1:Array=null):void{
var _local2:int;
if (_arg1 == null){
_arg1 = getChildren(false, true, true);
};
_local2 = _arg1.length;
while (--_local2 > -1) {
TweenCore(_arg1[_local2]).setEnabled(false, false);
};
}
public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Number=-9999999999):Array{
var _local5:Array;
var _local6:uint;
var _local7:TweenCore;
_local5 = [];
_local6 = 0;
_local7 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
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));
};
};
};
_local7 = _local7.nextNode;
};
return (_local5);
}
protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):Number{
var _local3:TweenCore;
var _local4:TweenCore;
var _local5:Number;
var _local6:Boolean;
_local3 = _firstChild;
_local6 = 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);
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:TweenCore;
var _local4:TweenCore;
if (_arg1 == this.gc){
if (_arg1){
_local3 = _endCaps[0];
_firstChild = _local3;
_lastChild = _endCaps[1];
} else {
_local3 = _firstChild;
_endCaps = [_firstChild, _lastChild];
_firstChild = (_lastChild = null);
};
while (_local3) {
_local3.setEnabled(_arg1, true);
_local3 = _local3.nextNode;
};
};
return (super.setEnabled(_arg1, _arg2));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:TweenCore;
var _local9:Boolean;
var _local10:Boolean;
var _local11:TweenCore;
var _local12:Number;
var _local13:Boolean;
if (this.gc){
this.setEnabled(true, false);
} else {
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
};
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
_local5 = this.cachedTime;
_local6 = this.cachedStartTime;
_local7 = this.cachedTimeScale;
_local13 = this.cachedPaused;
if (_arg1 >= _local4){
if ((((_rawPrevTime <= _local4)) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = (this.cachedTime = _local4);
forceChildrenToEnd(_local4, _arg2);
_local9 = !(this.hasPausedChild());
_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;
};
};
if ((((_rawPrevTime >= 0)) && (!((_rawPrevTime == _arg1))))){
forceChildrenToBeginning(0, _arg2);
this.cachedTotalTime = 0;
this.cachedTime = 0;
_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);
};
}
public function set currentProgress(_arg1:Number):void{
setTotalTime((this.duration * _arg1), false);
}
public function prepend(_arg1:TweenCore, _arg2:Boolean=false):void{
shiftChildren(((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay), _arg2, 0);
insert(_arg1, 0);
}
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 gotoAndStop(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
this.paused = true;
}
override public function get duration():Number{
var _local1:Number;
if (this.cacheIsDirty){
_local1 = this.totalDuration;
};
return (this.cachedDuration);
}
override public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
var _local3:TweenCore;
var _local4:TweenCore;
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
_local3 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
_local4 = ((_lastChild)!=null) ? _lastChild : _endCaps[1];
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 shiftChildren(_arg1:Number, _arg2:Boolean=false, _arg3:Number=0):void{
var _local4:TweenCore;
var _local5:String;
_local4 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
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 hasPausedChild():Boolean{
var _local1:TweenCore;
_local1 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
while (_local1) {
if (((_local1.cachedPaused) || ((((_local1 is TimelineLite)) && ((_local1 as TimelineLite).hasPausedChild()))))){
return (true);
};
_local1 = _local1.nextNode;
};
return (false);
}
public function insert(_arg1:TweenCore, _arg2=0):void{
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_arg2 = Number(_labels[_arg2]);
};
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
addChild(_arg1);
}
public function prependMultiple(_arg1:Array, _arg2:String="normal", _arg3:Number=0, _arg4:Boolean=false):void{
var _local5:TimelineLite;
_local5 = new TimelineLite({tweens:_arg1, align:_arg2, stagger:_arg3});
shiftChildren(_local5.duration, _arg4, 0);
insertMultiple(_arg1, 0, _arg2, _arg3);
_local5.kill();
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
public function gotoAndPlay(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
play();
}
public function removeLabel(_arg1:String):Number{
var _local2:Number;
_local2 = _labels[_arg1];
delete _labels[_arg1];
return (_local2);
}
public function addLabel(_arg1:String, _arg2:Number):void{
_labels[_arg1] = _arg2;
}
public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:uint;
var _local7:uint;
_local3 = getChildren(_arg2, true, false);
_local4 = [];
_local6 = _local3.length;
_local7 = 0;
_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++;
};
return (_local4);
}
public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="normal", _arg4:Number=0):void{
var _local5:int;
var _local6:TweenCore;
var _local7:Number;
var _local8:uint;
_local7 = ((Number(_arg2)) || (0));
_local8 = _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++;
};
}
public function killTweensOf(_arg1:Object, _arg2:Boolean=true, _arg3:Object=null):Boolean{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
_local4 = getTweensOf(_arg1, _arg2);
_local5 = _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 totalDuration(_arg1:Number):void{
if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.totalDuration / _arg1);
};
}
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 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
_local4 = -(Infinity);
while (_local3) {
_local5 = _local3.nextNode;
if (_local3.cachedStartTime < _local4){
this.addChild(_local3);
_local4 = _local3.prevNode.cachedStartTime;
} 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 set timeScale(_arg1:Number):void{
var _local2:Number;
if (_arg1 == 0){
_arg1 = 0.0001;
};
_local2 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
override public function addChild(_arg1:TweenCore):void{
var _local2:TweenCore;
var _local3:TweenCore;
var _local4:TweenCore;
var _local5:Number;
if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
setDirtyCache(true);
_local2 = ((_firstChild)!=null) ? _firstChild : _endCaps[0];
_local3 = ((_lastChild)!=null) ? _lastChild : _endCaps[1];
if (_local3 == null){
_local3 = _arg1;
_local2 = _local3;
_arg1.nextNode = (_arg1.prevNode = null);
} else {
_local4 = _local3;
_local5 = _arg1.cachedStartTime;
while (((!((_local4 == null))) && ((_local5 <= _local4.cachedStartTime)))) {
_local4 = _local4.prevNode;
};
if (_local4 == null){
_local2.prevNode = _arg1;
_arg1.nextNode = _local2;
_arg1.prevNode = null;
_local2 = _arg1;
} else {
if (_local4.nextNode){
_local4.nextNode.prevNode = _arg1;
} else {
if (_local4 == _local3){
_local3 = _arg1;
};
};
_arg1.prevNode = _local4;
_arg1.nextNode = _local4.nextNode;
_local4.nextNode = _arg1;
};
};
_arg1.cachedOrphan = false;
if (this.gc){
_endCaps[0] = _local2;
_endCaps[1] = _local3;
} else {
_firstChild = _local2;
_lastChild = _local3;
};
}
}
}//package com.greensock
Section 6
//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 {
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrite:uint;
protected var _notifyPluginsOfEnabled:Boolean;
protected var _hasPlugins:Boolean;
public var cachedPT1:PropTween;
protected var _overwrittenProps:Object;
public var propTweenLookup:Object;
protected var _ease:Function;
public static const version:Number = 11.36;
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, roundProps: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};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:Array;
var _local5:TweenLite;
ratio = 0;
super(_arg2, _arg3);
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);
_local4 = 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);
};
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number;
var _local6:PropTween;
_local5 = this.cachedTime;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
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 = true;
};
_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))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
_local6 = 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){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
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("onInit", 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;
}
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 invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
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 (_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 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 {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
return (false);
}
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{
_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++;
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 7
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_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 easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 8
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
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 easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _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 9
//_ExportEpisodesMC_39 (p_fla._ExportEpisodesMC_39)
package p_fla {
import flash.display.*;
public dynamic class _ExportEpisodesMC_39 extends MovieClip {
public var episode_01:Episode_01;
public var episode_05:Episode_05;
public var episode_06:Episode_06;
public var episode_08:Episode_08;
public var episode_02:Episode_02;
public var episode_03:Episode_03;
public var episode_04:Episode_04;
public var episode_07:Episode_07;
public function _ExportEpisodesMC_39(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 10
//_ExportSoundsMC_14 (p_fla._ExportSoundsMC_14)
package p_fla {
import flash.display.*;
public dynamic class _ExportSoundsMC_14 extends MovieClip {
public function _ExportSoundsMC_14(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
}
function frame2(){
stop();
}
}
}//package p_fla
Section 11
//_ExportWindowsMC_15 (p_fla._ExportWindowsMC_15)
package p_fla {
import flash.display.*;
public dynamic class _ExportWindowsMC_15 extends MovieClip {
public var windowInstr:WindowInstructions;
public var windowItem:WindowItem;
public var windowFinal:WindowFinal;
public var windowYouAH:WindowYouAreHistory;
public var windowNextL:WindowNextLevel;
public function _ExportWindowsMC_15(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 12
//_nextBtn_553 (p_fla._nextBtn_553)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class _nextBtn_553 extends MovieClip {
public var hitMc:MovieClip;
public function _nextBtn_553(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame9(){
play();
}
function frame8(){
stop();
}
function frame2(){
play();
}
public function onClick(_arg1:MouseEvent):void{
if (Console.currentEpisode){
Console.currentEpisode.start();
Console.hidePrologue();
};
}
}
}//package p_fla
Section 13
//action_02__584 (p_fla.action_02__584)
package p_fla {
import flash.display.*;
public dynamic class action_02__584 extends MovieClip {
public function action_02__584(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 14
//action_02__600 (p_fla.action_02__600)
package p_fla {
import flash.display.*;
public dynamic class action_02__600 extends MovieClip {
public function action_02__600(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 15
//action_03_589 (p_fla.action_03_589)
package p_fla {
import flash.display.*;
public dynamic class action_03_589 extends MovieClip {
public function action_03_589(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 16
//action_03_leve4__593 (p_fla.action_03_leve4__593)
package p_fla {
import flash.display.*;
public dynamic class action_03_leve4__593 extends MovieClip {
public function action_03_leve4__593(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 17
//action_03_leve7_616 (p_fla.action_03_leve7_616)
package p_fla {
import flash.display.*;
public dynamic class action_03_leve7_616 extends MovieClip {
public function action_03_leve7_616(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 18
//action_03_leve8__603 (p_fla.action_03_leve8__603)
package p_fla {
import flash.display.*;
public dynamic class action_03_leve8__603 extends MovieClip {
public function action_03_leve8__603(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 19
//action_03_leve8_606 (p_fla.action_03_leve8_606)
package p_fla {
import flash.display.*;
public dynamic class action_03_leve8_606 extends MovieClip {
public function action_03_leve8_606(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 20
//ant_move_Bend_446 (p_fla.ant_move_Bend_446)
package p_fla {
import flash.display.*;
public dynamic class ant_move_Bend_446 extends MovieClip {
public var anim_1:MovieClip;
public var anim_2:MovieClip;
public function ant_move_Bend_446(){
addFrameScript(0, frame1, 4, frame5, 11, frame12, 34, frame35, 88, frame89);
}
function frame89(){
stop();
}
function frame12(){
stop();
}
function frame1(){
stop();
}
function frame5(){
stop();
}
function frame35(){
stop();
}
}
}//package p_fla
Section 21
//Banner_560 (p_fla.Banner_560)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class Banner_560 extends MovieClip {
public var link:String;
public function Banner_560(){
addFrameScript(0, frame1);
}
public function onMouseClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(link), "_blank");
}
function frame1(){
link = "http://mediapartner.bigpoint.net/scripts/click.php?anid=930034&anbid=39450778";
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onMouseClick);
}
}
}//package p_fla
Section 22
//birdHead_391 (p_fla.birdHead_391)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class birdHead_391 extends MovieClip {
public function birdHead_391(){
addFrameScript(0, frame1, 41, frame42, 81, frame82);
}
function frame82(){
stop();
parent["birdLegLeft"].gotoAndPlay("fallDown");
parent["birdLegRight"].gotoAndPlay("fallDown");
}
function frame1(){
stop();
}
function frame42(){
stop();
var _local1 = parent;
_local1["lose"]();
}
}
}//package p_fla
Section 23
//birdLeg_375 (p_fla.birdLeg_375)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class birdLeg_375 extends MovieClip {
public function birdLeg_375(){
addFrameScript(0, frame1, 61, frame62, 62, frame63, 90, frame91);
}
function frame91(){
stop();
if (name == "birdLegRight"){
parent["bug"].wait();
var _local1 = parent;
_local1["startHintTimer"]();
parent["action"] = true;
_local1 = parent;
_local1["causeEvent"]("birdDown");
};
}
function frame1(){
stop();
}
function frame62(){
stop();
var _local1 = parent;
_local1["lose"]();
}
function frame63(){
stop();
}
}
}//package p_fla
Section 24
//blood_01_129 (p_fla.blood_01_129)
package p_fla {
import flash.display.*;
public dynamic class blood_01_129 extends MovieClip {
public function blood_01_129(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 25
//blood_01_137 (p_fla.blood_01_137)
package p_fla {
import flash.display.*;
public dynamic class blood_01_137 extends MovieClip {
public function blood_01_137(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 26
//blood_01_162 (p_fla.blood_01_162)
package p_fla {
import flash.display.*;
public dynamic class blood_01_162 extends MovieClip {
public function blood_01_162(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 27
//blood_01_230 (p_fla.blood_01_230)
package p_fla {
import flash.display.*;
public dynamic class blood_01_230 extends MovieClip {
public function blood_01_230(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 28
//blood_01_281 (p_fla.blood_01_281)
package p_fla {
import flash.display.*;
public dynamic class blood_01_281 extends MovieClip {
public function blood_01_281(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 29
//blood_01_95 (p_fla.blood_01_95)
package p_fla {
import flash.display.*;
public dynamic class blood_01_95 extends MovieClip {
public function blood_01_95(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 30
//bug_closeHole_251 (p_fla.bug_closeHole_251)
package p_fla {
import flash.display.*;
public dynamic class bug_closeHole_251 extends MovieClip {
public var callback:Function;
public function bug_closeHole_251(){
addFrameScript(30, frame31, 46, frame47);
}
function frame31(){
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
function frame47(){
stop();
var _local1 = parent;
_local1["wait"]();
parent.parent["action"] = true;
}
}
}//package p_fla
Section 31
//bug_crawl_237 (p_fla.bug_crawl_237)
package p_fla {
import flash.display.*;
public dynamic class bug_crawl_237 extends MovieClip {
public var callback:Function;
public function bug_crawl_237(){
addFrameScript(82, frame83, 100, frame101);
}
function frame83(){
gotoAndPlay(24);
}
function frame101(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 32
//bug_crawlUp_111 (p_fla.bug_crawlUp_111)
package p_fla {
import flash.display.*;
public dynamic class bug_crawlUp_111 extends MovieClip {
public function bug_crawlUp_111(){
addFrameScript(77, frame78);
}
function frame78(){
}
}
}//package p_fla
Section 33
//bug_cutGrass_202 (p_fla.bug_cutGrass_202)
package p_fla {
import flash.display.*;
public dynamic class bug_cutGrass_202 extends MovieClip {
public var callback:Function;
public function bug_cutGrass_202(){
addFrameScript(48, frame49);
}
function frame49(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 34
//bug_die_90 (p_fla.bug_die_90)
package p_fla {
import flash.display.*;
public dynamic class bug_die_90 extends MovieClip {
public var callback:Function;
public function bug_die_90(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 35
//bug_dieByAnts_147 (p_fla.bug_dieByAnts_147)
package p_fla {
import flash.display.*;
public dynamic class bug_dieByAnts_147 extends MovieClip {
public var callback:Function;
public function bug_dieByAnts_147(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 36
//bug_dieByCar_102 (p_fla.bug_dieByCar_102)
package p_fla {
import flash.display.*;
public dynamic class bug_dieByCar_102 extends MovieClip {
public var callback:Function;
public function bug_dieByCar_102(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 37
//bug_dieByCaterpillar_253 (p_fla.bug_dieByCaterpillar_253)
package p_fla {
import flash.display.*;
public dynamic class bug_dieByCaterpillar_253 extends MovieClip {
public var callback:Function;
public function bug_dieByCaterpillar_253(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 38
//bug_dieByPitch_163 (p_fla.bug_dieByPitch_163)
package p_fla {
import flash.display.*;
public dynamic class bug_dieByPitch_163 extends MovieClip {
public var callback:Function;
public function bug_dieByPitch_163(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 39
//bug_dieBySpider_186 (p_fla.bug_dieBySpider_186)
package p_fla {
import flash.display.*;
public dynamic class bug_dieBySpider_186 extends MovieClip {
public var callback:Function;
public function bug_dieBySpider_186(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 40
//bug_dieBySunRays_231 (p_fla.bug_dieBySunRays_231)
package p_fla {
import flash.display.*;
public dynamic class bug_dieBySunRays_231 extends MovieClip {
public var callback:Function;
public function bug_dieBySunRays_231(){
addFrameScript(89, frame90);
}
function frame90(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 41
//bug_dieByWasp_167 (p_fla.bug_dieByWasp_167)
package p_fla {
import flash.display.*;
public dynamic class bug_dieByWasp_167 extends MovieClip {
public var callback:Function;
public function bug_dieByWasp_167(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 42
//bug_dieFallDown_224 (p_fla.bug_dieFallDown_224)
package p_fla {
import flash.display.*;
public dynamic class bug_dieFallDown_224 extends MovieClip {
public var callback:Function;
public function bug_dieFallDown_224(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 43
//bug_dieInCar_96 (p_fla.bug_dieInCar_96)
package p_fla {
import flash.display.*;
public dynamic class bug_dieInCar_96 extends MovieClip {
public var callback:Function;
public function bug_dieInCar_96(){
addFrameScript(71, frame72);
}
function frame72(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 44
//bug_final_77 (p_fla.bug_final_77)
package p_fla {
import flash.display.*;
public dynamic class bug_final_77 extends MovieClip {
public function bug_final_77(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["win"]();
}
}
}//package p_fla
Section 45
//bug_fly_117 (p_fla.bug_fly_117)
package p_fla {
import flash.display.*;
public dynamic class bug_fly_117 extends MovieClip {
public var seedParashute:MovieClip;
public function bug_fly_117(){
addFrameScript(238, frame239);
}
function frame239(){
}
}
}//package p_fla
Section 46
//bug_getInCar_89 (p_fla.bug_getInCar_89)
package p_fla {
import flash.display.*;
public dynamic class bug_getInCar_89 extends MovieClip {
public var callback:Function;
public function bug_getInCar_89(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 47
//bug_grassJump_123 (p_fla.bug_grassJump_123)
package p_fla {
import flash.display.*;
public dynamic class bug_grassJump_123 extends MovieClip {
public var callback:Function;
public function bug_grassJump_123(){
addFrameScript(114, frame115);
}
function frame115(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 48
//bug_hideBehindPlant_176 (p_fla.bug_hideBehindPlant_176)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bug_hideBehindPlant_176 extends MovieClip {
public var callback:Function;
public function bug_hideBehindPlant_176(){
addFrameScript(46, frame47, 52, frame53);
}
function frame47(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
function frame53(){
stop();
parent.parent["bug"].wait();
parent.parent["action"] = true;
}
}
}//package p_fla
Section 49
//bug_idle_71 (p_fla.bug_idle_71)
package p_fla {
import flash.display.*;
public dynamic class bug_idle_71 extends MovieClip {
public function bug_idle_71(){
addFrameScript(430, frame431);
}
function frame431(){
}
}
}//package p_fla
Section 50
//bug_idle_83 (p_fla.bug_idle_83)
package p_fla {
import flash.display.*;
public dynamic class bug_idle_83 extends MovieClip {
public function bug_idle_83(){
addFrameScript(430, frame431);
}
function frame431(){
}
}
}//package p_fla
Section 51
//bug_makeDummy_191 (p_fla.bug_makeDummy_191)
package p_fla {
import flash.display.*;
public dynamic class bug_makeDummy_191 extends MovieClip {
public var callback:Function;
public function bug_makeDummy_191(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 52
//bug_makeParachute_105 (p_fla.bug_makeParachute_105)
package p_fla {
import flash.display.*;
public dynamic class bug_makeParachute_105 extends MovieClip {
public var callback:Function;
public function bug_makeParachute_105(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 53
//bug_makeRoof_98 (p_fla.bug_makeRoof_98)
package p_fla {
import flash.display.*;
public dynamic class bug_makeRoof_98 extends MovieClip {
public var callback:Function;
public function bug_makeRoof_98(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 54
//bug_makeTool01_196 (p_fla.bug_makeTool01_196)
package p_fla {
import flash.display.*;
public dynamic class bug_makeTool01_196 extends MovieClip {
public var callback:Function;
public function bug_makeTool01_196(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 55
//bug_outOfCar_103 (p_fla.bug_outOfCar_103)
package p_fla {
import flash.display.*;
public dynamic class bug_outOfCar_103 extends MovieClip {
public var callback:Function;
public function bug_outOfCar_103(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 56
//bug_pickUp_86 (p_fla.bug_pickUp_86)
package p_fla {
import flash.display.*;
public dynamic class bug_pickUp_86 extends MovieClip {
public var callback:Function;
public var toTake:String;
public var sprite:Sprite;
public function bug_pickUp_86(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
if (parent["itemToTake"] != ""){
callback = parent["animCallback"];
parent["animCallback"] = null;
toTake = parent["itemToTake"];
parent["itemToTake"] = "";
sprite = parent["itemSprite"];
parent["itemSprite"] = null;
Console.getCurrentEpisode().getItem(toTake, sprite, callback);
} else {
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
};
}
}
}//package p_fla
Section 57
//bug_stoneJump_130 (p_fla.bug_stoneJump_130)
package p_fla {
import flash.display.*;
public dynamic class bug_stoneJump_130 extends MovieClip {
public var callback:Function;
public function bug_stoneJump_130(){
addFrameScript(134, frame135);
}
function frame135(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 58
//bug_stuckAndDie_184 (p_fla.bug_stuckAndDie_184)
package p_fla {
import flash.display.*;
public dynamic class bug_stuckAndDie_184 extends MovieClip {
public var callback:Function;
public function bug_stuckAndDie_184(){
addFrameScript(25, frame26, 48, frame49);
}
function frame26(){
gotoAndPlay(9);
}
function frame49(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 59
//bug_take_85 (p_fla.bug_take_85)
package p_fla {
import flash.display.*;
public dynamic class bug_take_85 extends MovieClip {
public var callback:Function;
public var toTake:String;
public var sprite:Sprite;
public function bug_take_85(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
if (parent["itemToTake"] != ""){
callback = parent["animCallback"];
parent["animCallback"] = null;
toTake = parent["itemToTake"];
parent["itemToTake"] = "";
sprite = parent["itemSprite"];
parent["itemSprite"] = null;
Console.getCurrentEpisode().getItem(toTake, sprite, callback);
} else {
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
};
}
}
}//package p_fla
Section 60
//bug_takePitch_174 (p_fla.bug_takePitch_174)
package p_fla {
import flash.display.*;
public dynamic class bug_takePitch_174 extends MovieClip {
public var callback:Function;
public function bug_takePitch_174(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 61
//bug_throwAcorn_187 (p_fla.bug_throwAcorn_187)
package p_fla {
import flash.display.*;
public dynamic class bug_throwAcorn_187 extends MovieClip {
public var callback:Function;
public function bug_throwAcorn_187(){
addFrameScript(30, frame31, 46, frame47);
}
function frame31(){
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
function frame47(){
stop();
var _local1 = parent;
_local1["wait"]();
}
}
}//package p_fla
Section 62
//bug_throwBones_243 (p_fla.bug_throwBones_243)
package p_fla {
import flash.display.*;
public dynamic class bug_throwBones_243 extends MovieClip {
public var callback:Function;
public function bug_throwBones_243(){
addFrameScript(164, frame165);
}
function frame165(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 63
//bug_throwDummy_182 (p_fla.bug_throwDummy_182)
package p_fla {
import flash.display.*;
public dynamic class bug_throwDummy_182 extends MovieClip {
public var callback:Function;
public function bug_throwDummy_182(){
addFrameScript(30, frame31, 46, frame47);
}
function frame31(){
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
function frame47(){
stop();
var _local1 = parent;
_local1["wait"]();
}
}
}//package p_fla
Section 64
//bug_throwStone_139 (p_fla.bug_throwStone_139)
package p_fla {
import flash.display.*;
public dynamic class bug_throwStone_139 extends MovieClip {
public var callback:Function;
public var stone:MovieClip;
public function bug_throwStone_139(){
addFrameScript(30, frame31, 46, frame47);
}
function frame31(){
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
function frame47(){
stop();
var _local1 = parent;
_local1["wait"]();
}
}
}//package p_fla
Section 65
//bug_useKnot_100 (p_fla.bug_useKnot_100)
package p_fla {
import flash.display.*;
public dynamic class bug_useKnot_100 extends MovieClip {
public var callback:Function;
public function bug_useKnot_100(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 66
//bug_useKnotInCar_87 (p_fla.bug_useKnotInCar_87)
package p_fla {
import flash.display.*;
public dynamic class bug_useKnotInCar_87 extends MovieClip {
public var callback:Function;
public function bug_useKnotInCar_87(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 67
//bug_useLens_213 (p_fla.bug_useLens_213)
package p_fla {
import flash.display.*;
public dynamic class bug_useLens_213 extends MovieClip {
public var callback:Function;
public function bug_useLens_213(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 68
//bug_useLongStick_180 (p_fla.bug_useLongStick_180)
package p_fla {
import flash.display.*;
public dynamic class bug_useLongStick_180 extends MovieClip {
public var callback:Function;
public function bug_useLongStick_180(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 69
//bug_useTendril_219 (p_fla.bug_useTendril_219)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bug_useTendril_219 extends MovieClip {
public var callback:Function;
public function bug_useTendril_219(){
addFrameScript(15, frame16, 44, frame45);
}
function frame16(){
parent.parent["bluebell"].gotoAndPlay("_movedByBug");
}
function frame45(){
stop();
if (parent["animCallback"] != null){
callback = parent["animCallback"];
parent["animCallback"] = null;
callback();
};
}
}
}//package p_fla
Section 70
//bug_walk_75 (p_fla.bug_walk_75)
package p_fla {
import flash.display.*;
public dynamic class bug_walk_75 extends MovieClip {
public function bug_walk_75(){
addFrameScript(25, frame26);
}
function frame26(){
}
}
}//package p_fla
Section 71
//bug_walk_84 (p_fla.bug_walk_84)
package p_fla {
import flash.display.*;
public dynamic class bug_walk_84 extends MovieClip {
public function bug_walk_84(){
addFrameScript(25, frame26);
}
function frame26(){
}
}
}//package p_fla
Section 72
//bugBear_anim_272 (p_fla.bugBear_anim_272)
package p_fla {
import flash.display.*;
public dynamic class bugBear_anim_272 extends MovieClip {
public var anim:MovieClip;
public function bugBear_anim_272(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 73
//bush4_42 (p_fla.bush4_42)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bush4_42 extends MovieClip {
public function bush4_42(){
addFrameScript(0, frame1, 39, frame40);
}
function frame1(){
stop();
}
function frame40(){
stop();
parent["lotOfLight"].visible = true;
parent["bluebell"].gotoAndPlay("_budsUp");
}
}
}//package p_fla
Section 74
//bushMask_44 (p_fla.bushMask_44)
package p_fla {
import flash.display.*;
public dynamic class bushMask_44 extends MovieClip {
public function bushMask_44(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package p_fla
Section 75
//butterfly2_361 (p_fla.butterfly2_361)
package p_fla {
import flash.display.*;
public dynamic class butterfly2_361 extends MovieClip {
public function butterfly2_361(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
play();
}
function frame19(){
gotoAndPlay(1);
}
}
}//package p_fla
Section 76
//button_9 (p_fla.button_9)
package p_fla {
import flash.display.*;
public dynamic class button_9 extends MovieClip {
public function button_9(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package p_fla
Section 77
//car_507 (p_fla.car_507)
package p_fla {
import flash.display.*;
public dynamic class car_507 extends MovieClip {
public function car_507(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
gotoAndPlay("in");
}
function frame1(){
stop();
}
}
}//package p_fla
Section 78
//carAll_506 (p_fla.carAll_506)
package p_fla {
import flash.display.*;
public dynamic class carAll_506 extends MovieClip {
public var anim:MovieClip;
public function carAll_506(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package p_fla
Section 79
//cherv_267 (p_fla.cherv_267)
package p_fla {
import flash.display.*;
public dynamic class cherv_267 extends MovieClip {
public function cherv_267(){
addFrameScript(67, frame68, 136, frame137, 169, frame170);
}
function frame170(){
stop();
}
function frame137(){
stop();
}
function frame68(){
gotoAndPlay(1);
}
}
}//package p_fla
Section 80
//Console_562 (p_fla.Console_562)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Console_562 extends MovieClip {
public var sbh;
public var btnClose:MovieClip;
public var sbv;
public var scrollerH:MovieClip;
public var scrollerV:MovieClip;
public var content:MovieClip;
public var command_tf:TextField;
public function Console_562(){
addFrameScript(0, frame1);
}
public function clearAll():void{
content.cont_mc.history_tf.text = "";
command_tf.text = "";
}
public function getCommand():String{
return (command_tf.text);
}
public function addMessage(_arg1:String):void{
content.cont_mc.history_tf.text = (content.cont_mc.history_tf.text + (_arg1 + "\n"));
}
public function clearCommand():void{
command_tf.text = "";
}
function frame1(){
sbv = new ScrollBarV(content.cont_mc, content.mask_mc, scrollerV.track_mc, scrollerV.thumb_mc, scrollerV.btnUp, scrollerV.btnDown);
sbh = new ScrollBarH(content.cont_mc, content.mask_mc, scrollerH.track_mc, scrollerH.thumb_mc, scrollerH.btnLeft, scrollerH.btnRight);
btnClose.addEventListener(MouseEvent.CLICK, onBtnCloseClick);
}
public function clearHistory():void{
content.cont_mc.history_tf.text = "";
}
public function onBtnCloseClick(_arg1:MouseEvent):void{
visible = false;
}
public function addHistory(_arg1:String):void{
content.cont_mc.history_tf.text = (content.cont_mc.history_tf.text + (("> " + _arg1) + "\n"));
}
}
}//package p_fla
Section 81
//cont_565 (p_fla.cont_565)
package p_fla {
import flash.display.*;
import flash.text.*;
public dynamic class cont_565 extends MovieClip {
public var history_tf:TextField;
public function cont_565(){
addFrameScript(0, frame1);
}
function frame1(){
history_tf.autoSize = "left";
}
}
}//package p_fla
Section 82
//content_564 (p_fla.content_564)
package p_fla {
import flash.display.*;
public dynamic class content_564 extends MovieClip {
public var cont_mc:MovieClip;
public var mask_mc:MovieClip;
}
}//package p_fla
Section 83
//counterfoil_big_294 (p_fla.counterfoil_big_294)
package p_fla {
import flash.display.*;
public dynamic class counterfoil_big_294 extends MovieClip {
public function counterfoil_big_294(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
}
}
}//package p_fla
Section 84
//Cover_524 (p_fla.Cover_524)
package p_fla {
import flash.display.*;
public dynamic class Cover_524 extends MovieClip {
public var preloader:MovieClip;
}
}//package p_fla
Section 85
//dandelion_478 (p_fla.dandelion_478)
package p_fla {
import flash.display.*;
public dynamic class dandelion_478 extends MovieClip {
public function dandelion_478(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 86
//dark_46 (p_fla.dark_46)
package p_fla {
import flash.display.*;
public dynamic class dark_46 extends MovieClip {
public function dark_46(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 87
//Epilogue_543 (p_fla.Epilogue_543)
package p_fla {
import flash.display.*;
public dynamic class Epilogue_543 extends MovieClip {
public function Epilogue_543(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 88
//finalAnimationLevel7_282 (p_fla.finalAnimationLevel7_282)
package p_fla {
import flash.display.*;
public dynamic class finalAnimationLevel7_282 extends MovieClip {
public function finalAnimationLevel7_282(){
addFrameScript(94, frame95);
}
function frame95(){
stop();
var _local1 = parent.parent;
_local1["win"]();
}
}
}//package p_fla
Section 89
//FPSDisplay_537 (p_fla.FPSDisplay_537)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public dynamic class FPSDisplay_537 extends MovieClip {
public var _tf:TextField;
public var begTime:Number;
public function FPSDisplay_537(){
addFrameScript(0, frame1);
}
function frame1(){
begTime = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);
}
public function onEnterFrameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = (getTimer() - begTime);
_local3 = (1000 / _local2);
if (_local3 >= 24){
_tf.textColor = 0xFF00;
} else {
if (_local3 >= 12){
_tf.textColor = 0xFFFF00;
} else {
_tf.textColor = 0xFF0000;
};
};
_tf.text = _local3.toFixed(3);
begTime = getTimer();
}
}
}//package p_fla
Section 90
//hint_help_522 (p_fla.hint_help_522)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public dynamic class hint_help_522 extends MovieClip {
public var lifeTimer:Timer;
public function hint_help_522(){
addFrameScript(0, frame1);
}
public function closeIt():void{
lifeTimer.start();
}
function frame1(){
lifeTimer = new Timer(10000, 1);
lifeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onLifeEnd);
}
public function onLifeEnd(_arg1:TimerEvent):void{
lifeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onLifeEnd);
parent.removeChild(this);
}
}
}//package p_fla
Section 91
//HintButton_540 (p_fla.HintButton_540)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class HintButton_540 extends MovieClip {
public var _fill:MovieClip;
public var initialized;
public function HintButton_540(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
if (!initialized){
useHandCursor = true;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.CLICK, onClick);
initialized = true;
};
}
function frame2(){
stop();
_fill.scaleY = 0;
}
public function onEnterFrame(_arg1:Event):void{
if (currentFrame == 2){
if (Console.currentEpisode){
if (((_fill) && ((Console.currentEpisode.state == "STARTED")))){
_fill.scaleY = -(Console.currentEpisode.getHintFill());
if (Console.currentEpisode.isHintReady()){
buttonMode = true;
} else {
buttonMode = false;
filters = null;
};
};
};
};
}
public function onClick(_arg1:MouseEvent):void{
if (currentFrame == 2){
if (Console.currentEpisode){
if (((Console.currentEpisode.isHintReady()) && (Console.currentEpisode.action))){
Console.currentEpisode.restartHintTimer();
if (Console.currentEpisode.showHint != null){
Console.currentEpisode.showHint();
};
Tracer.report("[i]", "Hint used.", "HintButton");
buttonMode = false;
filters = null;
};
};
};
}
}
}//package p_fla
Section 92
//hl_8 (p_fla.hl_8)
package p_fla {
import flash.display.*;
public dynamic class hl_8 extends MovieClip {
public function hl_8(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package p_fla
Section 93
//leafMov_473 (p_fla.leafMov_473)
package p_fla {
import flash.display.*;
public dynamic class leafMov_473 extends MovieClip {
public function leafMov_473(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package p_fla
Section 94
//levelEndPicture_29 (p_fla.levelEndPicture_29)
package p_fla {
import flash.display.*;
public dynamic class levelEndPicture_29 extends MovieClip {
public function levelEndPicture_29(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 95
//logo_20 (p_fla.logo_20)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class logo_20 extends MovieClip {
public function logo_20(){
addFrameScript(0, frame1);
}
public function onMouseClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.abroy.com"), "_blank");
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onMouseClick);
}
}
}//package p_fla
Section 96
//logo_4 (p_fla.logo_4)
package p_fla {
import flash.display.*;
public dynamic class logo_4 extends MovieClip {
public function logo_4(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package p_fla
Section 97
//Logotype_534 (p_fla.Logotype_534)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class Logotype_534 extends MovieClip {
public function Logotype_534(){
addFrameScript(0, frame1);
}
public function onMouseClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.abroy.com"), "_blank");
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, onMouseClick);
}
}
}//package p_fla
Section 98
//lvl3_action_03__596 (p_fla.lvl3_action_03__596)
package p_fla {
import flash.display.*;
public dynamic class lvl3_action_03__596 extends MovieClip {
public function lvl3_action_03__596(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 99
//lvl3_branch1_ant_447 (p_fla.lvl3_branch1_ant_447)
package p_fla {
import flash.display.*;
public dynamic class lvl3_branch1_ant_447 extends MovieClip {
public function lvl3_branch1_ant_447(){
addFrameScript(143, frame144);
}
function frame144(){
trace("-|1|- (ants anim)");
}
}
}//package p_fla
Section 100
//lvl3_branch2_ant_458 (p_fla.lvl3_branch2_ant_458)
package p_fla {
import flash.display.*;
public dynamic class lvl3_branch2_ant_458 extends MovieClip {
public function lvl3_branch2_ant_458(){
addFrameScript(143, frame144);
}
function frame144(){
trace("-|2|- (ants anim)");
}
}
}//package p_fla
Section 101
//lvl3_bug_crawlUpWStone_433 (p_fla.lvl3_bug_crawlUpWStone_433)
package p_fla {
import flash.display.*;
public dynamic class lvl3_bug_crawlUpWStone_433 extends MovieClip {
public var stone:MovieClip;
}
}//package p_fla
Section 102
//lvl3_bugWGrass_425 (p_fla.lvl3_bugWGrass_425)
package p_fla {
import flash.display.*;
public dynamic class lvl3_bugWGrass_425 extends MovieClip {
public function lvl3_bugWGrass_425(){
addFrameScript(0, frame1, 123, frame124);
}
function frame1(){
}
function frame124(){
stop();
var _local1 = parent.parent;
_local1["lose"]();
}
}
}//package p_fla
Section 103
//lvl3_bugWGrassWStone_432 (p_fla.lvl3_bugWGrassWStone_432)
package p_fla {
import flash.display.*;
public dynamic class lvl3_bugWGrassWStone_432 extends MovieClip {
public var stone:MovieClip;
public function lvl3_bugWGrassWStone_432(){
addFrameScript(0, frame1, 97, frame98, 105, frame106, 110, frame111, 115, frame116, 145, frame146);
}
function frame98(){
stop();
var _local1 = parent.parent;
_local1["extCall"]();
}
function frame106(){
stop();
}
function frame1(){
}
function frame111(){
stop();
}
function frame116(){
stop();
}
function frame146(){
stop();
}
}
}//package p_fla
Section 104
//lvl3_manyAnts2_445 (p_fla.lvl3_manyAnts2_445)
package p_fla {
import flash.display.*;
public dynamic class lvl3_manyAnts2_445 extends MovieClip {
public var anim:MovieClip;
public function lvl3_manyAnts2_445(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package p_fla
Section 105
//lvl5_bugDieWasp_blood_01_173 (p_fla.lvl5_bugDieWasp_blood_01_173)
package p_fla {
import flash.display.*;
public dynamic class lvl5_bugDieWasp_blood_01_173 extends MovieClip {
public function lvl5_bugDieWasp_blood_01_173(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package p_fla
Section 106
//lvl5_bugDieWasp_sprite449_172 (p_fla.lvl5_bugDieWasp_sprite449_172)
package p_fla {
import flash.display.*;
public dynamic class lvl5_bugDieWasp_sprite449_172 extends MovieClip {
public function lvl5_bugDieWasp_sprite449_172(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 107
//lvl5_butterfly2_367 (p_fla.lvl5_butterfly2_367)
package p_fla {
import flash.display.*;
public dynamic class lvl5_butterfly2_367 extends MovieClip {
public function lvl5_butterfly2_367(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
play();
}
function frame19(){
gotoAndPlay(1);
}
}
}//package p_fla
Section 108
//lvl5_flowerWWasp_338 (p_fla.lvl5_flowerWWasp_338)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lvl5_flowerWWasp_338 extends MovieClip {
public function lvl5_flowerWWasp_338(){
addFrameScript(29, frame30, 86, frame87, 163, frame164, 168, frame169, 207, frame208, 264, frame265);
}
function frame265(){
stop();
var _local1 = parent;
_local1["win"]();
}
function frame164(){
stop();
var _local1 = parent;
_local1["restartHintTimer"]();
parent["action"] = true;
_local1 = parent;
_local1["causeEvent"]("flowerCutted");
parent["a$_placePitch"].visible = true;
}
function frame87(){
stop();
parent["wasp"] = new Wasp();
parent["wasp"].x = 529.5;
parent["wasp"].y = 51;
parent["wasp"].scaleX = (parent["wasp"].scaleX * -1);
parent.addChild(parent["wasp"]);
if (parent["ifThis"]("bugHid")){
var _local1 = parent;
_local1["waspFlyAway"]();
} else {
_local1 = parent;
_local1["bugDieByWasp"]();
};
}
function frame208(){
parent["bug"].visible = false;
}
function frame169(){
stop();
}
function frame30(){
gotoAndPlay(1);
}
}
}//package p_fla
Section 109
//lvl6_carpet_leafs_324 (p_fla.lvl6_carpet_leafs_324)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lvl6_carpet_leafs_324 extends MovieClip {
public function lvl6_carpet_leafs_324(){
addFrameScript(64, frame65);
}
function frame65(){
stop();
if (root){
parent["bug"].wait();
parent["action"] = true;
var _local1 = parent;
_local1["causeEvent"]("bridgePlaced");
};
}
}
}//package p_fla
Section 110
//lvl6_fly_walking_307 (p_fla.lvl6_fly_walking_307)
package p_fla {
import flash.display.*;
public dynamic class lvl6_fly_walking_307 extends MovieClip {
public var anim:MovieClip;
public function lvl6_fly_walking_307(){
addFrameScript(0, frame1, 20, frame21, 31, frame32);
}
function frame1(){
stop();
}
function frame21(){
stop();
var _local1 = parent;
_local1["causeEvent"]("flyDown");
_local1 = parent;
_local1["spiderComeIn"]();
}
function frame32(){
stop();
}
}
}//package p_fla
Section 111
//lvl6_spider_All_315 (p_fla.lvl6_spider_All_315)
package p_fla {
import flash.display.*;
public dynamic class lvl6_spider_All_315 extends MovieClip {
public function lvl6_spider_All_315(){
addFrameScript(4, frame5, 52, frame53, 79, frame80, 111, frame112);
}
function frame80(){
stop();
}
function frame5(){
stop();
}
function frame112(){
gotoAndPlay(81);
}
function frame53(){
gotoAndPlay(6);
}
}
}//package p_fla
Section 112
//lvl7_action_03__612 (p_fla.lvl7_action_03__612)
package p_fla {
import flash.display.*;
public dynamic class lvl7_action_03__612 extends MovieClip {
public function lvl7_action_03__612(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
var _local1 = parent;
_local1["nextFrame"]();
}
}
}//package p_fla
Section 113
//lvl7_egg_02_270 (p_fla.lvl7_egg_02_270)
package p_fla {
import flash.display.*;
public dynamic class lvl7_egg_02_270 extends MovieClip {
public function lvl7_egg_02_270(){
addFrameScript(0, frame1, 90, frame91);
}
function frame91(){
gotoAndPlay(49);
}
function frame1(){
stop();
}
}
}//package p_fla
Section 114
//lvl8_bug_WBluebell_68 (p_fla.lvl8_bug_WBluebell_68)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lvl8_bug_WBluebell_68 extends MovieClip {
public function lvl8_bug_WBluebell_68(){
addFrameScript(8, frame9, 25, frame26, 37, frame38, 58, frame59, 86, frame87, 163, frame164);
}
function frame164(){
stop();
parent["bugGoodbye"].visible = true;
parent["bugGoodbye"].gotoAndPlay(2);
}
function frame87(){
parent["bug"].visible = false;
}
function frame26(){
stop();
var _local1 = parent;
_local1["bugRideFlower"]();
}
function frame9(){
stop();
}
function frame38(){
parent["bug"].x = 53.6;
parent["bug"].y = 163.7;
parent["bug"].visible = true;
var _local1 = parent;
_local1["restartHintTimer"]();
parent["bug"].wait();
parent["action"] = true;
}
function frame59(){
stop();
}
}
}//package p_fla
Section 115
//main_help_523 (p_fla.main_help_523)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public dynamic class main_help_523 extends MovieClip {
public var lifeTimer:Timer;
public function main_help_523(){
addFrameScript(0, frame1);
}
public function closeIt():void{
lifeTimer.start();
}
function frame1(){
lifeTimer = new Timer(10000, 1);
lifeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onLifeEnd);
}
public function onLifeEnd(_arg1:TimerEvent):void{
lifeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onLifeEnd);
parent.removeChild(this);
}
}
}//package p_fla
Section 116
//mainMenuBtn_25 (p_fla.mainMenuBtn_25)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class mainMenuBtn_25 extends MovieClip {
public var hitMc:MovieClip;
public function mainMenuBtn_25(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame9(){
play();
}
function frame8(){
stop();
}
function frame2(){
play();
}
public function onClick(_arg1:MouseEvent):void{
Console.enterMainMenu();
}
}
}//package p_fla
Section 117
//MainTimeline (p_fla.MainTimeline)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var message:MovieClip;
public var prel:MovieClip;
public var memDisplay:MovieClip;
public var sitelocked:Boolean;
public var console:MovieClip;
public var debugmode:Boolean;
public var pcgame;
public var allowRun:Boolean;
public var fpsDisplay:MovieClip;
public var cover:MovieClip;
public var spfDisplay:MovieClip;
public var game:Game;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
trace("+------------------------------------------------+");
trace("| MAIN MENU |");
trace("+------------------------------------------------+");
stop();
if (Console.mPlayer.isPlaying){
Console.mPlayer.stopMusic();
};
Console.pcgame = this;
if (!debugmode){
memDisplay.visible = false;
spfDisplay.visible = false;
fpsDisplay.visible = false;
};
}
function frame1(){
trace("+------------------------------------------------+");
trace("| PRELOADER |");
trace("+------------------------------------------------+");
stop();
allowRun = true;
sitelocked = false;
debugmode = false;
if (sitelocked){
if (loaderInfo.url.indexOf("http://www.abroy.com") == -1){
allowRun = false;
};
};
if (debugmode){
Game.gamemode = "debug";
};
if (sitelocked){
Game.sitelock = true;
};
if (allowRun){
pcgame = this;
loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
} else {
prel.pr_body.gotoAndStop(1);
visible = false;
};
}
public function showProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.floor(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
_local3 = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 45));
prel.pr_body.gotoAndStop(_local2);
trace((((((_arg1.bytesLoaded + "/") + _arg1.bytesTotal) + " (") + _local2) + "%)"));
if (_arg1.bytesLoaded >= _arg1.bytesTotal){
removeEventListener(ProgressEvent.PROGRESS, showProgress);
prel.gotoAndPlay(2);
trace("[%] LOADING COMPLETE");
};
}
function frame4(){
trace("+------------------------------------------------+");
trace("| MAIN GAME |");
trace("+------------------------------------------------+");
stop();
Console.mPlayer.playMusic(new GameMusic());
console.visible = false;
console.alpha = 1;
console.clearAll();
if (debugmode){
message.gotoAndStop(2);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onGameKeyDown);
};
}
function frame2(){
trace("+------------------------------------------------+");
trace("| EXPORT CLASSES |");
trace("+------------------------------------------------+");
nextFrame();
}
public function onGameKeyDown(_arg1:KeyboardEvent):void{
if (Game.inst){
if (_arg1.keyCode == 67){
if (!console.visible){
console.visible = true;
} else {
if (stage.focus != console.command_tf){
console.visible = false;
};
};
};
if (_arg1.keyCode == 13){
if (stage.focus == console.command_tf){
CommandProcessor.process(console.getCommand());
};
};
} else {
_arg1.target.removeEventListener(KeyboardEvent.KEY_DOWN, onGameKeyDown);
};
}
}
}//package p_fla
Section 118
//med_drop_bug_276 (p_fla.med_drop_bug_276)
package p_fla {
import flash.display.*;
public dynamic class med_drop_bug_276 extends MovieClip {
public function med_drop_bug_276(){
addFrameScript(71, frame72);
}
function frame72(){
stop();
var _local1 = parent.parent;
_local1["lose"]();
}
}
}//package p_fla
Section 119
//MemoryDisplay_535 (p_fla.MemoryDisplay_535)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class MemoryDisplay_535 extends MovieClip {
public var _tf:TextField;
public function MemoryDisplay_535(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);
}
public function onEnterFrameHandler(_arg1:Event):void{
var _local2:Number;
_local2 = Utils.getTotalMemory();
if (_local2 <= 16){
_tf.textColor = 0xFF00;
} else {
if (_local2 <= 24){
_tf.textColor = 0xFFFF00;
} else {
_tf.textColor = 0xFF0000;
};
};
_tf.text = _local2.toFixed(3);
}
}
}//package p_fla
Section 120
//Message_561 (p_fla.Message_561)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Message_561 extends MovieClip {
public function Message_561(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
addEventListener(MouseEvent.CLICK, onClick);
}
public function onClick(_arg1:MouseEvent):void{
if (!parent["console"].visible){
parent["console"].visible = true;
} else {
parent["console"].visible = false;
};
}
}
}//package p_fla
Section 121
//moreGamesBtn_27 (p_fla.moreGamesBtn_27)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class moreGamesBtn_27 extends MovieClip {
public var hitMc:MovieClip;
public function moreGamesBtn_27(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame9(){
play();
}
function frame8(){
stop();
}
function frame2(){
play();
}
public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.abroy.com"), "_blank");
}
}
}//package p_fla
Section 122
//moreGamesBtn_532 (p_fla.moreGamesBtn_532)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class moreGamesBtn_532 extends MovieClip {
public function moreGamesBtn_532(){
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
function frame4(){
stop();
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame2(){
play();
}
function frame5(){
play();
}
public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.abroy.com"), "_blank");
}
}
}//package p_fla
Section 123
//MuteButton_558 (p_fla.MuteButton_558)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class MuteButton_558 extends MovieClip {
public var hit_mc:MovieClip;
public function MuteButton_558(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.hitArea = hit_mc;
hit_mc.visible = false;
mouseChildren = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, onClick);
}
function frame2(){
stop();
}
public function onClick(_arg1:MouseEvent):void{
if (currentFrame == 1){
Console.mPlayer.musicOFF();
nextFrame();
} else {
Console.mPlayer.musicON();
prevFrame();
};
}
}
}//package p_fla
Section 124
//nextBtn_30 (p_fla.nextBtn_30)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class nextBtn_30 extends MovieClip {
public var hitMc:MovieClip;
public function nextBtn_30(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame9(){
play();
}
function frame8(){
stop();
}
function frame2(){
play();
}
public function onClick(_arg1:MouseEvent):void{
Console.nextEpisode();
}
}
}//package p_fla
Section 125
//play_btn_10 (p_fla.play_btn_10)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class play_btn_10 extends MovieClip {
public var hit_mc:MovieClip;
public function play_btn_10(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 10, frame11, 19, frame20);
}
function frame10(){
stop();
}
function frame1(){
stop();
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, btnClick);
}
function frame20(){
gotoAndStop("begin");
}
function frame2(){
play();
}
function frame11(){
play();
}
public function btnClick(_arg1:MouseEvent):void{
var _local2 = root;
_local2["gotoAndPlay"](2);
}
}
}//package p_fla
Section 126
//playBtn_37 (p_fla.playBtn_37)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class playBtn_37 extends MovieClip {
public var hitMc:MovieClip;
public function playBtn_37(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 11, frame12);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame12(){
play();
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame2(){
play();
}
function frame11(){
stop();
}
public function onClick(_arg1:MouseEvent):void{
Console.playEpisode("first");
}
}
}//package p_fla
Section 127
//playBtn_530 (p_fla.playBtn_530)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class playBtn_530 extends MovieClip {
public function playBtn_530(){
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
function frame4(){
stop();
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame2(){
play();
}
function frame5(){
play();
}
public function onClick(_arg1:MouseEvent):void{
Console.enterMainGame();
}
}
}//package p_fla
Section 128
//playBtn_554 (p_fla.playBtn_554)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class playBtn_554 extends MovieClip {
public var hitMc:MovieClip;
public function playBtn_554(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 11, frame12);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame12(){
play();
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame2(){
play();
}
function frame11(){
stop();
}
public function onClick(_arg1:MouseEvent):void{
if (Console.currentEpisode){
Console.currentEpisode.start();
Console.hidePrologue();
};
}
}
}//package p_fla
Section 129
//preloadBar_2 (p_fla.preloadBar_2)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class preloadBar_2 extends MovieClip {
public var prel;
public function preloadBar_2(){
addFrameScript(0, frame1, 99, frame100);
}
function frame1(){
}
function frame100(){
stop();
prel = root["prel"];
prel.gotoAndPlay(2);
}
}
}//package p_fla
Section 130
//Preloader_1 (p_fla.Preloader_1)
package p_fla {
import flash.display.*;
public dynamic class Preloader_1 extends MovieClip {
public var prel;
public var pr_body:MovieClip;
public var play_btn:MovieClip;
public function Preloader_1(){
addFrameScript(0, frame1, 53, frame54, 102, frame103, 110, frame111, 124, frame125);
}
function frame1(){
stop();
prel = root["prel"];
}
function frame103(){
}
function frame111(){
}
function frame125(){
stop();
}
function frame54(){
}
}
}//package p_fla
Section 131
//Prolog_01_545 (p_fla.Prolog_01_545)
package p_fla {
import flash.display.*;
public dynamic class Prolog_01_545 extends MovieClip {
public var playBtn:MovieClip;
public var ready:Boolean;
public function Prolog_01_545(){
addFrameScript(0, frame1, 279, frame280);
}
function frame280(){
stop();
}
function frame1(){
stop();
ready = true;
}
}
}//package p_fla
Section 132
//Prolog_02_557 (p_fla.Prolog_02_557)
package p_fla {
import flash.display.*;
public dynamic class Prolog_02_557 extends MovieClip {
public var playBtn:MovieClip;
public var ready:Boolean;
public function Prolog_02_557(){
addFrameScript(0, frame1, 279, frame280);
}
function frame280(){
stop();
}
function frame1(){
stop();
ready = true;
}
}
}//package p_fla
Section 133
//Prologue_544 (p_fla.Prologue_544)
package p_fla {
import flash.display.*;
public dynamic class Prologue_544 extends MovieClip {
public var images:MovieClip;
public function Prologue_544(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 134
//retryBtn_17 (p_fla.retryBtn_17)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class retryBtn_17 extends MovieClip {
public var hitMc:MovieClip;
public function retryBtn_17(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 11, frame12);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame12(){
play();
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame2(){
play();
}
function frame11(){
stop();
}
public function onClick(_arg1:MouseEvent):void{
Console.replayEpisode();
}
}
}//package p_fla
Section 135
//scrollerH_572 (p_fla.scrollerH_572)
package p_fla {
import flash.display.*;
public dynamic class scrollerH_572 extends MovieClip {
public var track_mc:MovieClip;
public var btnRight:MovieClip;
public var btnLeft:MovieClip;
public var thumb_mc:MovieClip;
}
}//package p_fla
Section 136
//scrollerV_567 (p_fla.scrollerV_567)
package p_fla {
import flash.display.*;
public dynamic class scrollerV_567 extends MovieClip {
public var btnUp:MovieClip;
public var btnDown:MovieClip;
public var track_mc:MovieClip;
public var thumb_mc:MovieClip;
}
}//package p_fla
Section 137
//seedMov_479 (p_fla.seedMov_479)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class seedMov_479 extends MovieClip {
public function seedMov_479(){
addFrameScript(0, frame1, 73, frame74);
}
function frame74(){
stop();
parent.parent["seed"].visible = true;
var _local1 = parent.parent;
_local1["causeEvent"]("seedFall");
parent.parent["action"] = true;
}
function frame1(){
}
}
}//package p_fla
Section 138
//skipBtn_547 (p_fla.skipBtn_547)
package p_fla {
import flash.display.*;
import flash.events.*;
public dynamic class skipBtn_547 extends MovieClip {
public var hitMc:MovieClip;
public function skipBtn_547(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9);
}
public function onMouseOver(_arg1:MouseEvent):void{
gotoAndPlay("over");
}
function frame1(){
stop();
mouseChildren = false;
buttonMode = true;
this.hitArea = hitMc;
addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onClick);
}
public function onMouseOut(_arg1:MouseEvent):void{
gotoAndPlay("up");
}
function frame9(){
play();
}
function frame8(){
stop();
}
function frame2(){
play();
}
public function onClick(_arg1:MouseEvent):void{
if (Console.currentEpisode){
Console.currentEpisode.start();
Console.hidePrologue();
};
}
}
}//package p_fla
Section 139
//smoke_47 (p_fla.smoke_47)
package p_fla {
import flash.display.*;
public dynamic class smoke_47 extends MovieClip {
public function smoke_47(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package p_fla
Section 140
//SPFDisplay_536 (p_fla.SPFDisplay_536)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public dynamic class SPFDisplay_536 extends MovieClip {
public var _tf:TextField;
public var begTime:Number;
public function SPFDisplay_536(){
addFrameScript(0, frame1);
}
function frame1(){
begTime = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);
}
public function onEnterFrameHandler(_arg1:Event):void{
var _local2:Number;
_local2 = (getTimer() - begTime);
if (_local2 <= 42){
_tf.textColor = 0xFF00;
} else {
if (_local2 <= 83){
_tf.textColor = 0xFFFF00;
} else {
_tf.textColor = 0xFF0000;
};
};
_tf.text = ("" + _local2);
begTime = getTimer();
}
}
}//package p_fla
Section 141
//sprite449_128 (p_fla.sprite449_128)
package p_fla {
import flash.display.*;
public dynamic class sprite449_128 extends MovieClip {
public function sprite449_128(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 142
//sprite449_160 (p_fla.sprite449_160)
package p_fla {
import flash.display.*;
public dynamic class sprite449_160 extends MovieClip {
public function sprite449_160(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 143
//sprite449_229 (p_fla.sprite449_229)
package p_fla {
import flash.display.*;
public dynamic class sprite449_229 extends MovieClip {
public function sprite449_229(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 144
//sprite449_269 (p_fla.sprite449_269)
package p_fla {
import flash.display.*;
public dynamic class sprite449_269 extends MovieClip {
public function sprite449_269(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 145
//sprite449_431 (p_fla.sprite449_431)
package p_fla {
import flash.display.*;
public dynamic class sprite449_431 extends MovieClip {
public function sprite449_431(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 146
//sprite449_94 (p_fla.sprite449_94)
package p_fla {
import flash.display.*;
public dynamic class sprite449_94 extends MovieClip {
public function sprite449_94(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package p_fla
Section 147
//stalk_animated_417 (p_fla.stalk_animated_417)
package p_fla {
import flash.display.*;
public dynamic class stalk_animated_417 extends MovieClip {
public var anim:MovieClip;
public function stalk_animated_417(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 148
//Story_539 (p_fla.Story_539)
package p_fla {
import flash.display.*;
public dynamic class Story_539 extends MovieClip {
public function Story_539(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package p_fla
Section 149
//toyCar_505 (p_fla.toyCar_505)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class toyCar_505 extends MovieClip {
public var initialized:Boolean;
public var roof:MovieClip;
public var car:MovieClip;
public function toyCar_505(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
if (!initialized){
gotoAndStop(1);
};
}
function frame1(){
stop();
initialized = false;
gotoAndStop(2);
initialized = true;
}
function frame2(){
stop();
if (!initialized){
gotoAndStop(1);
};
car.anim.gotoAndStop(1);
}
}
}//package p_fla
Section 150
//WaterDrop_135 (p_fla.WaterDrop_135)
package p_fla {
import flash.display.*;
public dynamic class WaterDrop_135 extends MovieClip {
public function WaterDrop_135(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 151
//WaterDrop_476 (p_fla.WaterDrop_476)
package p_fla {
import flash.display.*;
public dynamic class WaterDrop_476 extends MovieClip {
public function WaterDrop_476(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 152
//WaterDrop_91 (p_fla.WaterDrop_91)
package p_fla {
import flash.display.*;
public dynamic class WaterDrop_91 extends MovieClip {
public function WaterDrop_91(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package p_fla
Section 153
//WaterDrop_anim_136 (p_fla.WaterDrop_anim_136)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WaterDrop_anim_136 extends MovieClip {
public var prnt;
public var mstr;
public function WaterDrop_anim_136(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
mstr = parent.parent;
prnt = parent;
mstr.removeChild(prnt);
}
}
}//package p_fla
Section 154
//WaterDrop_anim_477 (p_fla.WaterDrop_anim_477)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WaterDrop_anim_477 extends MovieClip {
public var prnt;
public var mstr;
public function WaterDrop_anim_477(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
mstr = parent.parent;
prnt = parent;
mstr.removeChild(prnt);
}
}
}//package p_fla
Section 155
//WaterDrop_anim_516 (p_fla.WaterDrop_anim_516)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WaterDrop_anim_516 extends MovieClip {
public var prnt;
public var mstr;
public function WaterDrop_anim_516(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
mstr = parent.parent;
prnt = parent;
mstr.removeChild(prnt);
}
}
}//package p_fla
Section 156
//WaterDrop_anim_92 (p_fla.WaterDrop_anim_92)
package p_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WaterDrop_anim_92 extends MovieClip {
public var prnt;
public var mstr;
public function WaterDrop_anim_92(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
mstr = parent.parent;
prnt = parent;
mstr.removeChild(prnt);
}
}
}//package p_fla
Section 157
//Activator (Activator)
package {
import flash.display.*;
import flash.events.*;
public class Activator {
private var sprite:Sprite;
private var name:String;
private var target:Sprite;
private var state:String;
private var mode:String;
private var onPointCondition:Function;
private var onPointEvent:String;
private var onClick:Function;
private var onPoint:Function;
private var onClickCondition:Function;
private var region:Sprite;
private var onClickEvent:String;
private var episode:Episode;
public function Activator(_arg1:String, _arg2:Episode, _arg3:Sprite, _arg4:Object){
if (!_arg2.isActivator(_arg1)){
this.name = _arg1;
this.episode = _arg2;
this.target = _arg3;
this.sprite = ((_arg4.sprite is Sprite)) ? _arg4.sprite : null;
this.region = ((_arg4.region is Sprite)) ? _arg4.region : null;
this.state = ((_arg4.state is String)) ? _arg4.state : "active";
this.mode = ((_arg4.mode is String)) ? _arg4.mode : "ever";
this.onClick = ((_arg4.onClick is Function)) ? _arg4.onClick : null;
this.onPoint = ((_arg4.onPoint is Function)) ? _arg4.onPoint : null;
this.onClickCondition = ((_arg4.onClickCondition is Function)) ? _arg4.onClickCondition : null;
this.onPointCondition = ((_arg4.onPointCondition is Function)) ? _arg4.onPointCondition : null;
this.onClickEvent = ((_arg4.onClickEvent is String)) ? _arg4.onClickEvent : null;
this.onPointEvent = ((_arg4.onPointEvent is String)) ? _arg4.onPointEvent : null;
_arg3.tabEnabled = false;
if (_arg4.autoInit != false){
init();
};
} else {
Tracer.report("[X]", "Activator already exists.", "Activator");
};
}
public function activate():void{
state = "active";
target.buttonMode = true;
target.useHandCursor = true;
}
public function deactivate():void{
state = "inactive";
target.buttonMode = false;
target.useHandCursor = false;
}
public function halt():void{
if (target.hasEventListener(MouseEvent.CLICK)){
target.removeEventListener(MouseEvent.CLICK, onClickHandler);
};
if (target.hasEventListener(MouseEvent.MOUSE_OVER)){
target.removeEventListener(MouseEvent.MOUSE_OVER, onClickHandler);
};
target.buttonMode = false;
target.useHandCursor = false;
}
public function init():void{
target.addEventListener(MouseEvent.CLICK, onClickHandler);
target.addEventListener(MouseEvent.MOUSE_OVER, onPointHandler);
target.buttonMode = true;
target.useHandCursor = true;
}
public function kill():void{
deactivate();
halt();
name = undefined;
episode = undefined;
target = undefined;
sprite = undefined;
region = undefined;
state = undefined;
mode = undefined;
onClick = undefined;
onPoint = undefined;
onClickCondition = undefined;
onPointCondition = undefined;
onClickEvent = undefined;
onPointEvent = undefined;
}
private function onPointHandler(_arg1:MouseEvent):void{
if ((((state == "active")) && (episode.action))){
if ((((onPointCondition == null)) || (((!((onPointCondition == null))) && (onPointCondition()))))){
if (onPoint != null){
onPoint();
Tracer.report("[i]", (("Activator '" + name) + "': onPoint()."), "Activator");
if (onPointEvent){
episode.causeEvent(onPointEvent);
};
if (mode == "once"){
state = "inactive";
};
};
};
};
}
private function onClickHandler(_arg1:MouseEvent):void{
if ((((state == "active")) && (episode.action))){
if ((((onClickCondition == null)) || (((!((onClickCondition == null))) && (onClickCondition()))))){
if (onClick != null){
if (sprite){
sprite.filters = null;
};
if (region){
region.filters = null;
region.visible = false;
};
onClick();
Tracer.report("[i]", (("Activator '" + name) + "': onClick()."), "Activator");
if (onClickEvent){
episode.causeEvent(onClickEvent);
};
if (mode == "once"){
state = "inactive";
};
};
};
};
}
}
}//package
Section 158
//Animation (Animation)
package {
import flash.display.*;
import flash.events.*;
public class Animation {
private var prevLabel:String;
private var name:String;
private var order:Array;
private var loops:uint;
private var nextLabel:String;
private var target:MovieClip;
private var index:uint;
private var frame:uint;
private var label:String;
private var episode:Episode;
private var labels:Object;
public function Animation(_arg1:String, _arg2:Episode, _arg3:MovieClip, _arg4:Object){
var _local5:*;
super();
if (!_arg2.isAnimation(_arg1)){
this.name = _arg1;
this.episode = _arg2;
this.target = _arg3;
labels = new Object();
for (_local5 in _arg4) {
if ((((_arg4[_local5] is uint)) || ((_arg4[_local5] is String)))){
if (_arg4[_local5] <= _arg3.totalFrames){
labels[_local5] = _arg4[_local5];
} else {
Tracer.report("[X]", "'frame' can't be greater than total frames number.", "Animation");
};
};
};
} else {
Tracer.report("[X]", "Animation already exists.", "Animation");
};
}
public function play(_arg1:String):void{
if (labels[_arg1]){
if (this.label){
prevLabel = this.label;
};
this.label = _arg1;
loops = 0;
target.gotoAndStop(labels[_arg1]);
target.addEventListener(Event.ENTER_FRAME, animationStarter);
} else {
Tracer.report("[X]", (("There is no such label. {" + _arg1) + "}"), "Animation");
};
}
public function playLoops(_arg1:String, _arg2:uint):void{
if (labels[_arg1]){
if (this.label){
prevLabel = this.label;
};
this.label = _arg1;
loops = _arg2;
target.gotoAndStop(labels[_arg1]);
target.addEventListener(Event.ENTER_FRAME, animationStarter);
} else {
Tracer.report("[X]", (("There is no such label. {" + _arg1) + "}"), "Animation");
};
}
public function playOnce(_arg1:String):void{
if (labels[_arg1]){
if (this.label){
prevLabel = this.label;
};
this.label = _arg1;
loops = 1;
target.gotoAndStop(labels[_arg1]);
target.addEventListener(Event.ENTER_FRAME, animationStarter);
} else {
Tracer.report("[X]", (("There is no such label. {" + _arg1) + "}"), "Animation");
};
}
public function kill():void{
if (target.hasEventListener("Event")){
};
label = null;
order = null;
prevLabel = null;
nextLabel = null;
name = null;
episode = null;
target = null;
labels = null;
}
private function animationHandler(_arg1:Event):void{
if (_arg1.target.anim){
if (_arg1.target.anim.currentFrame == _arg1.target.anim.totalFrames){
trace("next animation");
_arg1.target.removeEventListener(Event.ENTER_FRAME, animationHandler);
if (nextLabel){
index++;
trace(("index=" + index));
if (order[(index + 1)]){
nextLabel = order[(index + 1)];
} else {
nextLabel = null;
};
target.addEventListener(Event.ENTER_FRAME, animationHandler);
play(order[index]);
} else {
_arg1.target.anim.stop();
};
};
};
}
private function animationStarter(_arg1:Event):void{
if (_arg1.target.anim){
_arg1.target.removeEventListener(Event.ENTER_FRAME, animationStarter);
_arg1.target.anim.gotoAndPlay(1);
if (loops > 0){
target.addEventListener(Event.ENTER_FRAME, animationStopper);
};
};
}
private function animationStopper(_arg1:Event):void{
if (_arg1.target.anim.currentFrame == _arg1.target.anim.totalFrames){
if (loops == 1){
_arg1.target.removeEventListener(Event.ENTER_FRAME, animationStopper);
_arg1.target.anim.stop();
} else {
loops--;
};
};
}
public function playOrder(_arg1:Array):void{
var _local2:int;
var _local3:uint;
var _local4:uint;
_local2 = _arg1.length;
while (_local2--) {
if (labels[_arg1[_local2]] == null){
Tracer.report("[X]", "Sequence contains wrong label(s).", "Animation");
return;
};
};
order = new Array();
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
order[_local4] = _arg1[_local4];
trace(order[_local4]);
_local4++;
};
index = 0;
if (order[(index + 1)]){
nextLabel = order[(index + 1)];
} else {
nextLabel = null;
};
target.addEventListener(Event.ENTER_FRAME, animationHandler);
this.play(order[index]);
}
public function resume():void{
if (target.anim){
target.anim.play();
} else {
Tracer.report("[X]", "No animation to resume.", "Animation");
};
}
public function pause():void{
if (target.anim){
target.anim.stop();
} else {
Tracer.report("[X]", "No animation to pause.", "Animation");
};
}
}
}//package
Section 159
//Bomb (Bomb)
package {
import flash.display.*;
public dynamic class Bomb extends MovieClip {
}
}//package
Section 160
//Bug (Bug)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public dynamic class Bug extends MovieClip {
public var anim:MovieClip;
public var returnToFrame:uint;
public var animCallback:Function;
public var itemToTake:String;
public var die1:MovieClip;
public var itemSprite:Sprite;
public var idleTimer:Timer;
public var initialized:Boolean;
public function Bug(){
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, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44);
}
public function turnTo(_arg1:Number):void{
if (_arg1 <= x){
if (scaleX < 0){
scaleX = (scaleX * -1);
};
} else {
if (scaleX > 0){
scaleX = (scaleX * -1);
};
};
}
function frame25(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function turnBack():void{
stopIdleTimer();
if (scaleX < 0){
};
scaleX = (scaleX * -1);
}
public function walkTo(_arg1:Number):void{
if (anim){
anim.stop();
};
stopIdleTimer();
turnTo(_arg1);
gotoAndStop("walk");
}
public function turnOn(_arg1:String):void{
stopIdleTimer();
switch (_arg1){
case "left":
if (scaleX < 0){
scaleX = (scaleX * -1);
};
break;
case "right":
if (scaleX > 0){
scaleX = (scaleX * -1);
};
break;
};
}
function frame10(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame14(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame18(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function startIdle(_arg1:TimerEvent):void{
if (anim){
anim.stop();
};
gotoAndStop("idle");
}
function frame3(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame7(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame1(){
stop();
initialized = false;
animCallback = null;
itemToTake = "";
itemSprite = null;
initialized = true;
if (returnToFrame){
gotoAndStop(returnToFrame);
} else {
gotoAndStop("none");
};
}
function frame19(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function wait():void{
if (anim){
anim.stop();
};
gotoAndStop("none");
startIdleTimer();
}
function frame5(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame9(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame13(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame4(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame8(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame21(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function playAnim(_arg1:String, _arg2:Function=null):void{
if (anim){
anim.stop();
};
stopIdleTimer();
animCallback = _arg2;
gotoAndStop(_arg1);
}
function frame15(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame23(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame24(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame36(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame16(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame17(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame22(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function takeItem(_arg1:String, _arg2:Sprite=null, _arg3:Function=null):void{
if (anim){
anim.stop();
};
stopIdleTimer();
itemToTake = _arg1;
itemSprite = _arg2;
animCallback = _arg3;
gotoAndStop("take");
}
function frame27(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame11(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame34(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function startIdleTimer():void{
idleTimer = new Timer(3000, 1);
idleTimer.addEventListener(TimerEvent.TIMER_COMPLETE, startIdle);
idleTimer.start();
}
function frame28(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame29(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame6(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame40(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame37(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame39(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame26(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame2(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame33(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame43(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame12(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame41(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame30(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame32(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame42(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame20(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function pickUpItem(_arg1:String, _arg2:Sprite=null, _arg3:Function=null):void{
if (anim){
anim.stop();
};
stopIdleTimer();
itemToTake = _arg1;
itemSprite = _arg2;
animCallback = _arg3;
gotoAndStop("pickUp");
}
function frame35(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame44(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame38(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
function frame31(){
stop();
if (!initialized){
returnToFrame = currentFrame;
gotoAndStop(1);
};
}
public function stopIdleTimer():void{
if (idleTimer){
idleTimer.reset();
};
}
}
}//package
Section 161
//CommandProcessor (CommandProcessor)
package {
public class CommandProcessor {
public static function process(_arg1:String):void{
var _local2:Array;
var _local3:String;
var _local4:String;
var _local5:*;
var _local6:Array;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.split(" ", 2);
_local3 = _local2[0];
_local4 = _local2[1];
if (Game.inst){
_local5 = Game.inst.root["getChildByName"]("console");
};
if (_local5){
switch (_local3){
case "mainMenu":
Console.enterMainMenu();
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "setHintFillTime":
Console.setHintFillTime(Number(_local4));
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "setHintIdleTime":
Console.setHintIdleTime(Number(_local4));
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "redefineHintTimer":
_local6 = _local4.split(",");
_local7 = Number(_local6[0]);
_local8 = Number(_local6[1]);
Console.redefineHintTimer(_local7, _local8);
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "playEpisode":
Console.playEpisode(_local4);
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "replayEpisode":
Console.replayEpisode(_local4);
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "nextEpisode":
Console.nextEpisode();
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "prevEpisode":
Console.prevEpisode();
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "pause":
Console.currentEpisode.action = false;
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "resume":
Console.currentEpisode.action = true;
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "loseEpisode":
Console.loseEpisode();
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "winEpisode":
Console.winEpisode();
_local5.addHistory(((_local3 + " : ") + _local4));
break;
case "help":
_local5.addHistory(((_local3 + " : ") + _local4));
_local5.addMessage("Commands list:");
_local5.addMessage(" mainMenu ()");
_local5.addMessage(" setHintFillTime (arg1)");
_local5.addMessage(" arg1 - число секунд заполнения");
_local5.addMessage(" setHintIdleTime (arg1)");
_local5.addMessage(" arg1 - число секунд бездействия");
_local5.addMessage(" redefineHintTimer (arg1, arg2)");
_local5.addMessage(" arg1 - число секунд заполнения;");
_local5.addMessage(" arg2 - число секунд бездействия");
_local5.addMessage(" playEpisode (arg1)");
_local5.addMessage(" arg1 - имя эпизода или ничего");
_local5.addMessage(" replayEpisode (arg1)");
_local5.addMessage(" arg1 - имя эпизода или ничего");
_local5.addMessage(" nextEpisode ()");
_local5.addMessage(" prevEpisode ()");
_local5.addMessage(" loseEpisode ()");
_local5.addMessage(" winEpisode ()");
_local5.addMessage(" pausee ()");
_local5.addMessage(" resume ()");
_local5.addMessage(" help ()");
_local5.addMessage(" clear ()");
_local5.addMessage(" quit ()");
_local5.addMessage(" exit ()");
break;
case "exit":
_local5.addHistory(((_local3 + " : ") + _local4));
_local5.visible = false;
break;
case "quit":
_local5.addHistory(((_local3 + " : ") + _local4));
_local5.visible = false;
break;
case "clear":
_local5.clearHistory();
break;
default:
if (_local3 != ""){
_local5.addHistory((("Unknown command '" + _local3) + "'."));
};
};
};
}
}
}//package
Section 162
//Console (Console)
package {
public class Console {
public static var pcgame;
public static var mPlayer:MusicPlayer = new MusicPlayer();
public static function registerEpilogue(_arg1:String, _arg2):void{
if (Game.inst){
Game.inst.registerEpilogue(_arg1, _arg2);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "registerEpilogue");
};
}
public static function get currentEpisode():Episode{
if (Game.inst){
return (Game.inst.getCurrentEpisode());
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "currentEpisode");
return (null);
}
public static function enterMainGame():void{
if (pcgame){
pcgame.gotoAndStop("game");
};
}
public static function isPrevEpisode():Boolean{
if (Game.inst){
return (Game.inst.isPrevEpisode());
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "isPrevEpisode");
return (false);
}
public static function nextEpisode():void{
if (Game.inst){
Game.inst.nextEpisode();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "nextEpisode");
};
}
public static function getEpisodeIndex(_arg1:String=null):uint{
if (Game.inst){
return (Game.inst.getEpisodeIndex(_arg1));
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "getEpisodeIndex");
return (NaN);
}
public static function prevEpisode():void{
if (Game.inst){
Game.inst.prevEpisode();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "prevEpisode");
};
}
public static function registerPrologue(_arg1:String, _arg2):void{
if (Game.inst){
Game.inst.registerPrologue(_arg1, _arg2);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "registerPrologue");
};
}
public static function redefineHintTimer(_arg1:Number, _arg2:Number):void{
if ((((_arg1 > 0)) || ((_arg2 > 0)))){
if (currentEpisode){
currentEpisode.redefineHintTimer(_arg1, _arg2);
};
};
}
public static function showEpilogue(_arg1:String):void{
if (Game.inst){
Game.inst.showEpilogue(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "showEpilogue");
};
}
public static function replayEpisode(_arg1:String=null):void{
if (Game.inst){
Game.inst.replayEpisode(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "replayEpisode");
};
}
public static function isNextEpisode():Boolean{
if (Game.inst){
return (Game.inst.isNextEpisode());
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "isNextEpisode");
return (false);
}
public static function registerEpisode(_arg1:String, _arg2:uint):void{
if (Game.inst){
Game.inst.registerEpisode(_arg1, _arg2);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "registerEpisode");
};
}
public static function enableAction():void{
if (Game.inst){
Game.inst.enableAction();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "enableAction");
};
}
public static function unregisterEpisode(_arg1:String):void{
if (Game.inst){
Game.inst.unregisterEpisode(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "unregisterEpisode");
};
}
public static function setHintFillTime(_arg1:Number):void{
if (_arg1 > 0){
if (currentEpisode){
currentEpisode.redefineHintTimer(_arg1);
};
};
}
public static function unregisterEpilogue(_arg1:String):void{
if (Game.inst){
Game.inst.unregisterEpilogue(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "unregisterEpilogue");
};
}
public static function unregisterPrologue(_arg1:String):void{
if (Game.inst){
Game.inst.unregisterPrologue(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "unregisterPrologue");
};
}
public static function showPrologue(_arg1:String):void{
if (Game.inst){
Game.inst.showPrologue(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "showPrologue");
};
}
public static function loseEpisode():void{
if (Game.inst){
if (currentEpisode){
Game.inst.hidePrologue();
Game.inst.hideEpilogue();
Game.inst.story.visible = true;
currentEpisode.lose();
} else {
Tracer.report("[X]", "No current episode.", "Console", "loseEpisode");
};
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "loseEpisode");
};
}
public static function playEpisode(_arg1:String=null):void{
if (Game.inst){
Game.inst.playEpisode(_arg1);
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "playEpisode");
};
}
public static function hidePrologue():void{
if (Game.inst){
Game.inst.hidePrologue();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "hidePrologue");
};
}
public static function setHintIdleTime(_arg1:Number):void{
if (_arg1 > 0){
if (currentEpisode){
currentEpisode.redefineHintTimer(-1, _arg1);
};
};
}
public static function formatTime(_arg1:Number, _arg2:Boolean=true):String{
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = _arg1;
if (!_arg2){
_local3 = Math.floor((_arg1 / 1000));
};
_local4 = Math.floor((_local3 / (60 * 60)));
_local5 = (Math.floor((_local3 / 60)) - (_local4 * 60));
_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 static function enterMainMenu():void{
if (pcgame){
if (currentEpisode){
Game.inst.closeEpisode();
};
Utils.disposeDisplayObject(Game.inst);
pcgame.gotoAndStop("menu");
};
}
public static function getEpisodeName(_arg1:uint=0):String{
if (Game.inst){
return (Game.inst.getEpisodeName(_arg1));
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "getEpisodeName");
return ("");
}
public static function getCurrentEpisode():Episode{
if (Game.inst){
return (Game.inst.getCurrentEpisode());
};
Tracer.report("[X]", "Game wasn't initialized.", "Console", "getCurrentEpisode");
return (null);
}
public static function startEpisode():void{
if (Game.inst){
Game.inst.startEpisode();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "startEpisode");
};
}
public static function hideEpilogue():void{
if (Game.inst){
Game.inst.hideEpilogue();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "hideEpilogue");
};
}
public static function disableAction():void{
if (Game.inst){
Game.inst.disableAction();
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "disableAction");
};
}
public static function winEpisode():void{
if (Game.inst){
if (currentEpisode){
Game.inst.hidePrologue();
Game.inst.hideEpilogue();
Game.inst.story.visible = true;
currentEpisode.win();
} else {
Tracer.report("[X]", "No current episode.", "Console", "winEpisode");
};
} else {
Tracer.report("[X]", "Game wasn't initialized.", "Console", "winEpisode");
};
}
}
}//package
Section 163
//Displacement (Displacement)
package {
import flash.display.*;
import com.greensock.*;
import fl.transitions.easing.*;
public class Displacement {
public static function motionTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=64):void{
var _local7:Number;
var _local8:Number;
var _local9:*;
var _local10:*;
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));
TweenLite.to(_arg1, _local8, {x:_arg2, y:_arg3, scaleX:(_arg4 * _local9), scaleY:(_arg4 * _local10), onComplete:_arg5, ease:None.easeNone});
} else {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
public static function vCurveTo(_arg1:Sprite, _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:*;
var sY:*;
var dY:*;
var mY:*;
var object = _arg1;
var x = _arg2;
var y = _arg3;
var h = _arg4;
var scale = _arg5;
var rot = _arg6;
var funct = _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 (){
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:rot, onComplete:funct, ease:None.easeNone, overwrite:0});
} else {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
public static function onTimeTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=0):void{
var _local7:Number;
var _local8:*;
var _local9:*;
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));
TweenLite.to(_arg1, _arg6, {x:_arg2, y:_arg3, scaleX:(_arg4 * _local8), scaleY:(_arg4 * _local9), onComplete:_arg5, ease:None.easeNone});
} else {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
public static function appearAt(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null):void{
var _local6:*;
var _local7:*;
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 {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
public static function hCurveTo(_arg1:Sprite, _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:*;
var sY:*;
var dX:*;
var mX:*;
var object = _arg1;
var x = _arg2;
var y = _arg3;
var w = _arg4;
var scale = _arg5;
var rot = _arg6;
var funct = _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 (){
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:rot, onComplete:funct, ease:None.easeNone, overwrite:0});
} else {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
public static function motionVia(_arg1:Sprite, _arg2:Array, _arg3:Function=null, _arg4:Number=128):void{
var _local5:TimelineLite;
var _local6:*;
var _local7:*;
var _local8:uint;
var _local9:uint;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
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();
} else {
Tracer.report("[X]", "Object isn't exists.", "[Displacement]");
};
}
}
}//package
Section 164
//Episode (Episode)
package {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.filters.*;
public class Episode extends MovieClip {
public var a$_exit:MovieClip;
public var boneLadder:MovieClip;
private var itemsRegistry:Object;
public var finalize:Function;// = null
public var extCall:Function;// = null
public var counterfoilBig:MovieClip;
public var birdLegLeft:MovieClip;
public var cleanOut:Function;// = null
public var a$_placePitch:MovieClip;
public var bugBear:MovieClip;
public var bluebell:MovieClip;
public var stone:MovieClip;
public var hintIdleTime:Number;// = 30
public var stone2:Item_Stone;
public var stone3:MovieClip;
public var stone5:MovieClip;
private var eventsRegistry:Object;
public var countTime:Number;// = 0
public var birdLegRight:MovieClip;
public var h$_crawlUp:MovieClip;
public var waterDrop:MovieClip;
public var state:String;// = "NONE"
private var hintFillTimer:Timer;
public var a$_crawlUp:MovieClip;
public var egg1:MovieClip;
public var egg2:MovieClip;
public var movingLeaf:MovieClip;
public var h$_throwDummy:MovieClip;
public var a$_throwBones:MovieClip;
public var brushwood:Item_Brushwood;
public var lotOfLight:MovieClip;
public var poorFly:MovieClip;
public var mainHelpText:MovieClip;
public var a$_web:MovieClip;
public var rope:Item_Rope;
private var hintIdleTimer:Timer;
public var firebush:MovieClip;
public var light:MovieClip;
private var begHintFillTime:Number;
public var a$_seed:MovieClip;
public var bridgeFromLeaves:MovieClip;
public var inventory:Inventory;
private var begTime:Number;
public var rope2:MovieClip;
public var counterfoil1:Item_Counterfoil;
public var counterfoil2:Item_Counterfoil;
public var counterfoil3:Item_Counterfoil;
public var pin:Item_Pin;
public var toyCar:MovieClip;
public var a$_stickLong:MovieClip;
public var evilEgg:MovieClip;
private var camera_t:Sprite;
private var camera_x:Number;
public var a$_takeLeaves:MovieClip;
private var camera_y:Number;
public var bone2:Item_Bone;
public var bone3:Item_Bone;
public var bone4:Item_Bone;
public var bone1:Item_Bone;
public var thread:MovieClip;
public var a$_rope2:MovieClip;
public var action:Boolean;
public var birdHead:MovieClip;
public var h$_throwBones:MovieClip;
private var endTime:Number;
public var flower:MovieClip;
private var activatorsRegistry:Object;
private var bonusTimer:Timer;
public var plant:Item_Plant;
public var seed:Item_Seed;
public var butterfly:MovieClip;
public var bug:Bug;
public var stickLong2:MovieClip;
public var stickLong3:MovieClip;
public var knot:Item_Knot;
public var hintFillTime:Number;// = 60
public var score:int;// = 0
public var knot2:MovieClip;
public var petal_2:Item_Petal;
public var petal_3:Item_Petal;
public var petal_1:Item_Petal;
private var animationsRegistry:Object;
public var time:Number;
private var player:Sprite;
public var spider:MovieClip;
public var intCall:Function;// = null
public var dandelion:MovieClip;
private var waypointsRegistry:Object;
public var waitForReady:Boolean;
public var a$_throwStone:MovieClip;
public var berry:Item_Berry;
public var a$_death:MovieClip;
public var stickLong:Item_StickLong;
public var showHint:Function;// = null
public var pitch:MovieClip;
public var a$_throwDummy:MovieClip;
public var flower_2:MovieClip;
public var web:MovieClip;
public var web2:MovieClip;
public var web3:MovieClip;
private var hintReady:Boolean;// = false
public var flower_1:MovieClip;
public var leaf:Item_Leaf;
public var a$_tendril:MovieClip;
public var ants:MovieClip;
public var glass:Item_Glass;
public var worm2:MovieClip;
public var worm1:MovieClip;
public var acorn:Item_Acorn;
public var leaf_1:MovieClip;
public var leaf_2:MovieClip;
public var a$_stamen:MovieClip;
public var leaf_4:MovieClip;
public var initialize:Function;// = null
public var leaf_3:MovieClip;
public var bonusTime:Number;// = 0
public var stalk:MovieClip;
public var hintHelpText:MovieClip;
public var stamen:Item_Stamen;
public var a$_rope:MovieClip;
public var tendril:Item_Tendril;
public var seed2:Item_Seed2;
public var wdrop:Item_WDrop;
public var bugGoodbye:MovieClip;
public function Episode(){
bonusTime = 0;
countTime = 0;
hintFillTime = 60;
hintIdleTime = 30;
showHint = null;
hintReady = false;
initialize = null;
finalize = null;
cleanOut = null;
intCall = null;
extCall = null;
score = 0;
state = "NONE";
super();
state = "CREATED";
init();
Tracer.report("[$]", "EPISODE_CREATED");
}
public function stopBonusTimer():void{
if (bonusTimer){
if (bonusTimer.running){
bonusTimer.stop();
};
};
}
public function listInventoryItems():void{
inventory.listItems();
}
public function listAnimationsRegistry():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: animationsRegistry:");
_local1 = 0;
for (_local2 in animationsRegistry) {
trace((((" - " + _local2) + " = ") + animationsRegistry[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
public function listItemsRegistry():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: itemsRegistry:");
_local1 = 0;
for (_local2 in itemsRegistry) {
trace((((" - " + _local2) + " = ") + itemsRegistry[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
private function stopHintIdleTimer():void{
hintIdleTimer.stop();
}
public function ifNotThis(_arg1:String):Boolean{
if (eventsRegistry[_arg1] == false){
return (true);
};
return (false);
}
public function start():void{
Tracer.report("[$]", "EPISODE_ATTEMPT_TO_START");
if (state == "READY"){
hintFillTimer = new Timer(1000, 0);
hintFillTimer.addEventListener(TimerEvent.TIMER, onHintFillTimer);
hintIdleTimer = new Timer((1000 * hintIdleTime), 0);
hintIdleTimer.addEventListener(TimerEvent.TIMER, onHintIdleTimer);
if (hintFillTime > 0){
startHintFillTimer();
} else {
if (hintFillTime == 0){
hintReady = true;
startHintIdleTimer();
};
};
Game.inst.hintButton.gotoAndStop(2);
if (initialize != null){
initialize();
};
Game.inst.story.visible = true;
Game.inst.hintButton.visible = true;
action = true;
state = "STARTED";
Tracer.report("[$]", "EPISODE_STARTED");
begTime = getTimer();
} else {
Tracer.report("[!]", "Episode isn't ready yet. Waiting...", "Episode");
waitForReady = true;
Tracer.report("[$]", "EPISODE_WAIT_FOR_READY");
};
}
public function startBonusTimer(_arg1:Number):void{
bonusTime = _arg1;
countTime = bonusTime;
bonusTimer = new Timer(1000, bonusTime);
bonusTimer.addEventListener(TimerEvent.TIMER, onBonusTimer);
bonusTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onBonusTimerComplete);
bonusTimer.start();
}
public function cameraTo(_arg1:Number, _arg2:Number, _arg3:Function=null, _arg4:Number=64):void{
var _local5:Number;
var _local6:Number;
_local5 = Math.sqrt((Math.pow((_arg1 - camera_x), 2) + Math.pow((_arg2 - camera_y), 2)));
_local6 = (_local5 / Math.abs(_arg4));
camera_x = _arg1;
camera_y = _arg2;
TweenLite.to(this, _local6, {x:(-(camera_x) + (Game.screen_w / 2)), y:(-(camera_y) + (Game.screen_h / 2)), onComplete:_arg3});
}
public function registerItem(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null):Boolean{
if (!itemsRegistry[_arg1]){
itemsRegistry[_arg1] = new Item(_arg1, _arg2, _arg3, _arg4);
return (true);
};
Tracer.report("[X]", "Item already registered.", "Episode");
return (false);
}
public function finish():void{
if (!time){
endTime = getTimer();
time = (endTime - begTime);
Game.inst.totalTime = (Game.inst.totalTime + time);
};
if (((hintIdleTimer) && (hintIdleTimer.running))){
hintIdleTimer.reset();
};
if (((hintFillTimer) && (hintFillTimer.running))){
hintFillTimer.reset();
};
if (((bonusTimer) && (bonusTimer.running))){
bonusTimer.reset();
};
if (finalize != null){
finalize();
};
}
public function motionVia(_arg1:Sprite, _arg2:Array, _arg3:Function=null, _arg4:Number=128):void{
if (_arg1){
Displacement.motionVia(_arg1, _arg2, _arg3, _arg4);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function removeWaypoint(_arg1:String):void{
if (waypointsRegistry[_arg1]){
waypointsRegistry[_arg1].kill();
waypointsRegistry[_arg1] = null;
delete waypointsRegistry[_arg1];
} else {
Tracer.report("[X]", "Waypoint isn't exists.", "Episode");
};
}
public function appearAt(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null):void{
if (_arg1){
Displacement.appearAt(_arg1, _arg2, _arg3, _arg4, _arg5);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function ifEach(_arg1:Array, _arg2:Boolean):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if (eventsRegistry[_arg1[_local4]] != _arg2){
return (false);
};
_local4++;
};
return (true);
}
public function listEventsRegistry():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: eventsRegistry:");
_local1 = 0;
for (_local2 in eventsRegistry) {
trace((((" - " + _local2) + " = ") + eventsRegistry[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
public function listChildren():void{
var _local1:uint;
var _local2:uint;
trace("[S] LIST: children:");
_local1 = numChildren;
_local2 = 0;
while (_local2 < _local1) {
trace((((" - " + getChildAt(_local2).name) + " = ") + getChildAt(_local2)));
_local2++;
};
trace((" Total number: " + _local1));
}
public function externalCall():void{
var _local1:Function;
if (extCall != null){
_local1 = extCall;
extCall = null;
_local1();
};
}
public function motionTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=64):void{
if (_arg1){
Displacement.motionTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function getScore():Number{
return (score);
}
public function applyItems(_arg1:Array, _arg2:Function=null, _arg3:Boolean=false):Boolean{
var _local4:String;
var _local5:uint;
var _local6:uint;
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = _arg1[_local6];
if (itemsRegistry[_local4]){
if (inventory.hasItem(_local4)){
};
} else {
Tracer.report("[X]", "Item isn't registered.", "Episode");
return (false);
};
_local6++;
};
if (_arg3){
_local6 = 0;
while (_local6 < _local5) {
_local4 = _arg1[_local6];
inventory.removeItem(_local4);
_local6++;
};
};
if (_arg2 != null){
_arg2();
};
return (true);
}
public function onTimeTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null, _arg6:Number=0):void{
if (_arg1){
Displacement.onTimeTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function isActivator(_arg1:String):Boolean{
if (activatorsRegistry[_arg1]){
return (true);
};
return (false);
}
private function init():void{
eventsRegistry = new Object();
activatorsRegistry = new Object();
waypointsRegistry = new Object();
animationsRegistry = new Object();
itemsRegistry = new Object();
camera_x = (Game.screen_w / 2);
camera_y = (Game.screen_h / 2);
inventory = new Inventory(this);
state = "INITED";
}
private function onHintFillTimer(_arg1:TimerEvent):void{
if (hintFillTimer.currentCount >= hintFillTime){
hintFillTimer.stop();
hintReady = true;
Tracer.report("[i]", "HintTimer: filled and ready.", "Episode");
restartHintIdleTimer();
};
}
public function useItem(_arg1:String, _arg2:Function=null, _arg3:Boolean=false):Boolean{
if (itemsRegistry[_arg1]){
if (inventory.hasItem(_arg1)){
if (_arg3){
inventory.removeItem(_arg1);
};
if (_arg2 != null){
_arg2();
};
return (true);
};
} else {
Tracer.report("[X]", "Item isn't registered.", "Episode");
};
return (false);
}
public function isHintReady():Boolean{
return (hintReady);
}
public function ifThis(_arg1:String):Boolean{
if (eventsRegistry[_arg1] == true){
return (true);
};
return (false);
}
private function onHintIdleTimer(_arg1:TimerEvent):void{
var _local2:GlowFilter;
if (hintReady){
if (Game.inst.hintButton){
_local2 = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
Game.inst.hintButton.filters = [_local2];
Tracer.report("[i]", "HintTimer: feel free to use hint.", "Episode");
resetHintIdleTimer();
};
};
}
public function unregisterItem(_arg1:String):Boolean{
if (itemsRegistry[_arg1]){
itemsRegistry[_arg1].kill();
itemsRegistry[_arg1] = null;
delete itemsRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Item isn't registered.", "Episode");
return (false);
}
public function isAnimation(_arg1:String):Boolean{
if (animationsRegistry[_arg1]){
return (true);
};
return (false);
}
public function enableAction():void{
action = true;
}
public function ifNotAny(_arg1:Array):Boolean{
var _local2:Boolean;
var _local3:uint;
var _local4:uint;
_local2 = false;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if (eventsRegistry[_arg1[_local4]] == false){
_local2 = true;
};
_local4++;
};
return (_local2);
}
private function onBonusTimer(_arg1:TimerEvent):void{
countTime--;
}
public function registerEvent(_arg1:String, _arg2:Boolean=false):Boolean{
if (eventsRegistry[_arg1] == null){
eventsRegistry[_arg1] = _arg2;
return (true);
};
Tracer.report("[X]", "Event already registered.", "Episode");
return (false);
}
public function getPlayer():Sprite{
return (player);
}
public function setPlayer(_arg1:Sprite):void{
player = _arg1;
}
public function listWaypointsRegistry():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: waypointsRegistry:");
_local1 = 0;
for (_local2 in waypointsRegistry) {
trace((((" - " + _local2) + " = ") + waypointsRegistry[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
public function ifNone():Boolean{
var _local1:String;
for (_local1 in eventsRegistry) {
if (_local1 == true){
return (false);
};
};
return (true);
}
private function onBonusTimerComplete(_arg1:TimerEvent):void{
if (countTime > 0){
countTime = 0;
};
bonusTimer.removeEventListener(TimerEvent.TIMER, onBonusTimer);
bonusTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onBonusTimerComplete);
Tracer.report("[i]", "BonusTimer: completed.", "Episode");
}
public function setupEvent(_arg1:String, _arg2:Boolean):Boolean{
if (eventsRegistry[_arg1] != null){
eventsRegistry[_arg1] = _arg2;
return (true);
};
Tracer.report("[X]", "Event isn't registered.", "Episode");
return (false);
}
public function getHintFill():Number{
var _local1:Number;
if (hintFillTime > 0){
if (hintFillTimer){
if (hintFillTimer.running){
_local1 = ((getTimer() - begHintFillTime) / (1000 * hintFillTime));
if (_local1 > 1){
_local1 = 1;
};
return (_local1);
} else {
if (hintReady){
return (1);
};
return (0);
};
} else {
return (0);
};
//unresolved jump
};
return (1);
}
public function makeItem(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:String=null):Boolean{
var i:uint;
var iLim:uint;
var timer:Timer;
var makeIt:Function;
var item = _arg1;
var materials = _arg2;
var time = _arg3;
var eventName = _arg4;
iLim = materials.length;
i = 0;
while (i < iLim) {
if (!inventory.hasItem(materials[i])){
return (false);
};
i = (i + 1);
};
if (time > 0){
makeIt = function (_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, makeIt);
inventory.makeItem(item, materials);
if (eventName){
causeEvent(eventName);
};
};
timer = new Timer((time * 1000), 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, makeIt);
timer.start();
} else {
inventory.makeItem(item, materials);
if (eventName){
causeEvent(eventName);
};
};
return (true);
}
public function cameraAt(_arg1:Number, _arg2:Number, _arg3:Function=null):void{
camera_x = _arg1;
camera_y = _arg2;
this.x = (-(camera_x) + (Game.screen_w / 2));
this.y = (-(camera_y) + (Game.screen_h / 2));
if (_arg3 != null){
_arg3();
};
}
public function hCurveTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
if (_arg1){
Displacement.hCurveTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function moveToWaypoint(_arg1:Sprite, _arg2:String, _arg3:Function=null, _arg4:Number=64):void{
var wp:*;
var object = _arg1;
var name = _arg2;
var funct = _arg3;
var speed = _arg4;
if (waypointsRegistry[name]){
wp = waypointsRegistry[name];
motionTo(object, wp.x, wp.y, wp.scale, function (){
funct();
if ((wp.funct is Function)){
wp.funct();
};
}, speed);
} else {
Tracer.report("[X]", "Waypoint isn't exists.", "Episode");
};
}
public function callActivator(_arg1:String):Activator{
if (activatorsRegistry[_arg1]){
return (activatorsRegistry[_arg1]);
};
Tracer.report("[X]", "Activator isn't registered.", "Episode");
return (null);
}
public function forceEvent(_arg1:String):Boolean{
if (eventsRegistry[_arg1] != null){
dispatchEvent(new Event(_arg1));
return (true);
};
Tracer.report("[X]", "Event isn't registered.", "Episode");
return (false);
}
public function vCurveTo(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=0, _arg7:Function=null, _arg8:Number=64):void{
if (_arg1){
Displacement.vCurveTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
} else {
Tracer.report("[X]", "Object isn't exists.", "Episode");
};
}
public function callItem(_arg1:String):Item{
if (itemsRegistry[_arg1]){
return (itemsRegistry[_arg1]);
};
Tracer.report("[X]", "Item isn't registered.", "Episode");
return (null);
}
public function getTimeBonus():Number{
return (countTime);
}
public function erase():void{
var _local1:String;
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
if (((hintIdleTimer) && (hintIdleTimer.running))){
hintIdleTimer.reset();
};
if (((hintFillTimer) && (hintFillTimer.running))){
hintFillTimer.reset();
};
if (((bonusTimer) && (bonusTimer.running))){
bonusTimer.reset();
};
if (cleanOut != null){
cleanOut();
};
for (_local1 in activatorsRegistry) {
removeActivator(_local1);
};
activatorsRegistry = undefined;
for (_local2 in itemsRegistry) {
unregisterItem(_local2);
};
itemsRegistry = undefined;
for (_local3 in eventsRegistry) {
unregisterEvent(_local3);
};
eventsRegistry = undefined;
for (_local4 in animationsRegistry) {
removeAnimation(_local4);
};
animationsRegistry = undefined;
for (_local5 in waypointsRegistry) {
removeWaypoint(_local5);
};
waypointsRegistry = undefined;
inventory.kill();
inventory = undefined;
bonusTime = undefined;
countTime = undefined;
bonusTimer = undefined;
camera_x = undefined;
camera_y = undefined;
camera_t = undefined;
begTime = undefined;
endTime = undefined;
hintFillTimer = undefined;
hintIdleTimer = undefined;
hintFillTime = undefined;
hintIdleTime = undefined;
showHint = undefined;
hintReady = undefined;
begHintFillTime = undefined;
initialize = undefined;
finalize = undefined;
cleanOut = undefined;
intCall = undefined;
extCall = undefined;
player = undefined;
score = undefined;
time = undefined;
action = undefined;
state = undefined;
waitForReady = undefined;
}
public function cameraVia(_arg1:Array, _arg2:Function=null, _arg3:Number=128):void{
var _local4:TimelineLite;
var _local5:uint;
var _local6:uint;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:Number;
_local4 = new TimelineLite();
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _arg1[_local6].x;
_local8 = _arg1[_local6].y;
_local9 = Math.sqrt((Math.pow((_local7 - camera_x), 2) + Math.pow((_local8 - camera_y), 2)));
_local10 = (_local9 / Math.abs(_arg3));
camera_x = _local7;
camera_y = _local8;
if (_local6 < (_local5 - 1)){
_local4.append(new TweenLite(this, _local10, {x:(-(camera_x) + (Game.screen_w / 2)), y:(-(camera_y) + (Game.screen_h / 2))}));
} else {
_local4.append(new TweenLite(this, _local10, {x:(-(camera_x) + (Game.screen_w / 2)), y:(-(camera_y) + (Game.screen_h / 2)), onComplete:_arg2}));
};
_local6++;
};
_local4.play();
}
public function internalCall():void{
var _local1:Function;
if (intCall != null){
_local1 = intCall;
intCall = null;
_local1();
};
}
public function putItem(_arg1:String, _arg2=null, _arg3:Number=0, _arg4:Number=0, _arg5:Function=null):Boolean{
var _local6:*;
if (itemsRegistry[_arg1]){
if (inventory.hasItem(_arg1)){
inventory.removeItem(_arg1);
if (_arg2){
if ((_arg2 is Sprite)){
_arg2.x = _arg3;
_arg2.y = _arg4;
_arg2.visible = true;
} else {
_local6 = new (_arg2);
_local6.x = _arg3;
_local6.y = _arg4;
addChild(_local6);
};
};
if (_arg5 != null){
_arg5();
};
return (true);
};
} else {
Tracer.report("[X]", "Item isn't registered.", "Episode");
};
return (false);
}
public function callAnimation(_arg1:String):Animation{
if (animationsRegistry[_arg1]){
return (animationsRegistry[_arg1]);
};
Tracer.report("[X]", "Animation isn't registered.", "Episode");
return (null);
}
public function startHintTimer():void{
startHintFillTimer();
}
public function redefineHintTimer(_arg1:Number=-1, _arg2:Number=-1):void{
if (hintFillTimer){
hintFillTimer.reset();
};
if (hintIdleTimer){
hintIdleTimer.reset();
};
hintReady = false;
if (_arg1 > 0){
hintFillTime = _arg1;
};
if (_arg2 > 0){
hintIdleTime = _arg2;
};
hintIdleTimer.delay = (1000 * hintIdleTime);
if (hintFillTime > 0){
startHintFillTimer();
} else {
if (hintFillTime == 0){
hintReady = true;
startHintIdleTimer();
};
};
Tracer.report("[i]", "Hint timer redefined.", "Episode");
}
public function removeActivator(_arg1:String):Boolean{
if (activatorsRegistry[_arg1]){
activatorsRegistry[_arg1].kill();
activatorsRegistry[_arg1] = null;
delete activatorsRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Activator isn't registered.", "Episode");
return (false);
}
private function restartHintFillTimer():void{
if (hintFillTime > 0){
hintFillTimer.reset();
hintReady = false;
begHintFillTime = getTimer();
hintFillTimer.start();
} else {
startHintIdleTimer();
};
}
public function lose():void{
action = false;
finish();
Game.showYouAreHistoryWindow();
state = "FINISHED";
}
public function stopHintTimer():void{
stopHintFillTimer();
startHintIdleTimer();
}
private function restartHintIdleTimer():void{
hintIdleTimer.reset();
hintIdleTimer.start();
}
public function ifAll():Boolean{
var _local1:String;
for (_local1 in eventsRegistry) {
if (_local1 == false){
return (false);
};
};
return (true);
}
public function disableAction():void{
action = false;
}
public function isItem(_arg1:String):Boolean{
if (itemsRegistry[_arg1]){
return (true);
};
return (false);
}
public function removeAnimation(_arg1:String):Boolean{
if (animationsRegistry[_arg1]){
animationsRegistry[_arg1].kill();
animationsRegistry[_arg1] = null;
delete animationsRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Animation isn't registered.", "Episode");
return (false);
}
public function ifThese(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (eventsRegistry[_arg1[_local3]] == false){
return (false);
};
_local3++;
};
return (true);
}
private function startHintFillTimer():void{
if (hintFillTime > 0){
hintReady = false;
begHintFillTime = getTimer();
hintFillTimer.start();
} else {
startHintIdleTimer();
};
}
public function addActivator(_arg1:String, _arg2:Sprite, _arg3:Object):Boolean{
if (!activatorsRegistry[_arg1]){
activatorsRegistry[_arg1] = new Activator(_arg1, this, _arg2, _arg3);
return (true);
};
Tracer.report("[X]", "Activator already registered.", "Episode");
return (false);
}
public function ifAny(_arg1:Array):Boolean{
var _local2:Boolean;
var _local3:uint;
var _local4:uint;
_local2 = false;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if (eventsRegistry[_arg1[_local4]] == true){
_local2 = true;
};
_local4++;
};
return (_local2);
}
public function getItem(_arg1:String, _arg2:Sprite=null, _arg3:Function=null):Boolean{
if (itemsRegistry[_arg1]){
inventory.takeItem(_arg1);
if (_arg2){
removeChild(_arg2);
};
if (_arg3 != null){
_arg3();
};
return (true);
} else {
Tracer.report("[X]", "Item isn't registered.", "Episode");
};
return (false);
}
public function isEvent(_arg1:String):Boolean{
if (eventsRegistry[_arg1] != null){
return (true);
};
Tracer.report("[X]", "Event isn't registered.", "Episode");
return (false);
}
private function resetHintFillTimer():void{
if (hintFillTime > 0){
hintFillTimer.reset();
hintReady = false;
} else {
stopHintIdleTimer();
};
}
public function ifNotThese(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (eventsRegistry[_arg1[_local3]] == true){
return (false);
};
_local3++;
};
return (true);
}
public function restartHintTimer():void{
restartHintFillTimer();
}
public function causeEvent(_arg1:String):Boolean{
if (eventsRegistry[_arg1] != null){
dispatchEvent(new Event(_arg1));
eventsRegistry[_arg1] = true;
return (true);
};
Tracer.report("[X]", "Event isn't registered.", "Episode");
return (false);
}
public function listActivatorsRegistry():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: activatorsRegistry:");
_local1 = 0;
for (_local2 in activatorsRegistry) {
trace((((" - " + _local2) + " = ") + activatorsRegistry[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
public function ifOneOf(_arg1:Array, _arg2:Boolean):Boolean{
var _local3:Boolean;
var _local4:uint;
var _local5:uint;
_local3 = false;
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
if (eventsRegistry[_arg1[_local5]] == _arg2){
_local3 = true;
};
_local5++;
};
return (_local3);
}
private function startHintIdleTimer():void{
hintIdleTimer.start();
}
public function addWaypoint(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Function=null):void{
if (!waypointsRegistry[_arg1]){
waypointsRegistry[_arg1] = new Waypoint(_arg1, this, _arg2, _arg3, _arg4, _arg5);
} else {
Tracer.report("[X]", "Waypoint already exists.", "Episode");
};
}
public function unregisterEvent(_arg1:String):Boolean{
if (eventsRegistry[_arg1] != null){
eventsRegistry[_arg1] = null;
delete eventsRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Event isn't registered.", "Episode");
return (false);
}
private function stopHintFillTimer():void{
if (hintFillTime > 0){
hintFillTimer.stop();
hintReady = false;
} else {
stopHintIdleTimer();
};
}
public function win():void{
action = false;
finish();
if (Console.isNextEpisode()){
Game.showNextLevelWindow();
} else {
Game.showFinalWindow();
if (!Game.sitelock){
Game.inst.getChildByName("banner").visible = true;
};
};
state = "FINISHED";
}
public function addAnimation(_arg1:String, _arg2:MovieClip, _arg3:Object):Boolean{
if (!animationsRegistry[_arg1]){
animationsRegistry[_arg1] = new Animation(_arg1, this, _arg2, _arg3);
return (true);
};
Tracer.report("[X]", "Animation already registered.", "Episode");
return (false);
}
private function resetHintIdleTimer():void{
hintIdleTimer.reset();
}
}
}//package
Section 165
//Episode_01 (Episode_01)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import com.greensock.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_01 extends Episode {
public var b;
public var carSpeed:Number;
public var dirX:Number;
public var dirY:Number;
public var waterDropTimer;
public var bugSpeed:Number;
public var glowFilter:GlowFilter;
public function Episode_01(){
addFrameScript(0, frame1);
}
public function bugTakeWeb():void{
if (((((!(bug)) || (!(web)))) || (!(web.visible)))){
trace("[X] Script Animation: 'takeWeb' is impossible.");
return;
};
action = false;
a$_web.visible = false;
if (bug.x <= web.x){
dirX = 60;
} else {
dirX = 50;
};
bug.walkTo((web.x + dirX));
motionTo(bug, (web.x + dirX), 430, 1, function (){
var bugY:*;
bugY = bug.y;
TweenLite.to(bug, 0.35, {ease:Strong.easeIn, y:(bug.y - 50), onComplete:function (){
TweenLite.to(bug, 0.35, {ease:Strong.easeInOut, y:bugY});
}});
bug.takeItem("web", web, function (){
if (inventory.hasAll(["leaf", "web", "brushwood"])){
bug.stopIdleTimer();
bugMakeRoof();
} else {
action = true;
};
});
}, bugSpeed);
}
function frame1(){
if (root){
hintFillTime = 0;
hintIdleTime = 0;
initialize = function (){
waterDropTimer.start();
bug.startIdleTimer();
hintHelpText.closeIt();
mainHelpText.closeIt();
};
cleanOut = function (){
waterDropTimer.stop();
};
registerItem("leaf", Item_Leaf);
registerItem("web", Item_Web);
registerItem("brushwood", Item_Brushwood);
registerItem("knot", Item_Knot);
registerItem("roof", Item_Roof_anim);
registerEvent("roofMade");
registerEvent("roofPlaced");
registerEvent("gotInTheCar");
registerEvent("stoneMoved");
addActivator("leaf", leaf, {sprite:leaf, onClick:function (){
if (ifNotThis("gotInTheCar")){
bugTakeLeaf();
} else {
bugOutOfCar(function (){
bugTakeLeaf();
});
};
}});
addActivator("web", a$_web, {sprite:web, onClick:function (){
if (ifNotThis("gotInTheCar")){
bugTakeWeb();
} else {
bugOutOfCar(function (){
bugTakeWeb();
});
};
}});
addActivator("brushwood", brushwood, {sprite:brushwood, onClick:function (){
if (ifNotThis("gotInTheCar")){
bugTakeBrushwood();
} else {
bugOutOfCar(function (){
bugTakeBrushwood();
});
};
}});
addActivator("knot", knot, {sprite:knot, onClick:function (){
if (ifNotThis("gotInTheCar")){
bugTakeKnot();
} else {
bugOutOfCar(function (){
bugTakeKnot();
});
};
}});
addActivator("stone", stone, {sprite:stone, onClick:function (){
if (inventory.hasItem("knot")){
if (ifThis("gotInTheCar")){
if (ifThis("roofPlaced")){
bugWin();
} else {
bugDieInCar();
};
} else {
bugDieSmashed();
};
};
}});
addActivator("toyCar", toyCar, {sprite:toyCar, onClick:function (){
if (inventory.hasItem("roof")){
bugPlaceRoof();
} else {
if (ifThis("gotInTheCar")){
bugOutOfCar();
} else {
bugGetInCar();
};
};
}});
addActivator("death", a$_death, {onClick:function (){
if (ifNotThis("gotInTheCar")){
bugDieInGrass();
};
}});
bugSpeed = 128;
carSpeed = 128;
waterDropTimer = new Timer(125, 0);
waterDropTimer.addEventListener(TimerEvent.TIMER, createWaterDrop);
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("leaf")) && ((leaf.visible == true)))){
restartHintTimer();
leaf.filters = [glowFilter];
return;
};
if (((getChildByName("brushwood")) && ((brushwood.visible == true)))){
restartHintTimer();
brushwood.filters = [glowFilter];
return;
};
if (((getChildByName("web")) && ((web.visible == true)))){
restartHintTimer();
web.filters = [glowFilter];
return;
};
if (((getChildByName("knot")) && ((knot.visible == true)))){
restartHintTimer();
knot.filters = [glowFilter];
return;
};
if (((((getChildByName("toyCar")) && ((toyCar.visible == true)))) && (ifNotThis("roofPlaced")))){
restartHintTimer();
toyCar.filters = [glowFilter];
return;
};
if (((((((getChildByName("toyCar")) && ((toyCar.visible == true)))) && (ifThis("roofPlaced")))) && (ifNotThis("gotInTheCar")))){
restartHintTimer();
toyCar.filters = [glowFilter];
return;
};
if (((getChildByName("stone")) && ((stone.visible == true)))){
restartHintTimer();
stone.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugDieSmashed():void{
if (((!(bug)) || (!(toyCar)))){
trace("[X] Script Animation: 'dieSmashed' is impossible.");
return;
};
action = false;
if (bug.x <= stone.x){
dirX = -60;
} else {
dirX = -60;
};
bug.walkTo((stone.x + dirX));
motionTo(bug, (stone.x + dirX), 436, 1, function (){
bug.turnTo(stone.x);
bug.playAnim("useKnot", function (){
var dieNow:Function;
dieNow = function (_arg1:Event):void{
if (toyCar.x < bug.x){
bug.removeEventListener(Event.ENTER_FRAME, dieNow);
bug.gotoAndStop("dieByCar");
};
};
useItem("knot", function (){
stone.visible = false;
causeEvent("stoneMoved");
}, true);
toyCar.car.anim.gotoAndPlay(1);
motionTo(toyCar, -200, 355, 1, lose, carSpeed);
bug.addEventListener(Event.ENTER_FRAME, dieNow);
});
}, bugSpeed);
}
public function bugDieInGrass():void{
if (!bug){
trace("[X] Script Animation: 'dieInGrass' is impossible.");
return;
};
action = false;
bug.walkTo(138);
motionTo(bug, 138, 441, 1, function (){
bug.animCallback = lose;
bug.gotoAndStop("die");
}, bugSpeed);
}
public function bugWin():void{
if (((((!(b)) || (!(toyCar)))) || (!(toyCar.roof)))){
trace("[X] Script Animation: 'win' is impossible.");
return;
};
action = false;
b.playAnim("useKnotInCar", function (){
useItem("knot", function (){
stone.visible = false;
causeEvent("stoneMoved");
}, true);
toyCar.filters = null;
toyCar.car.anim.gotoAndPlay(1);
motionTo(toyCar, -200, 355, 1, win, carSpeed);
});
}
public function bugGetInCar():void{
if (((b) || (!(bug)))){
trace("[X] Script Animation: 'getInCar' is impossible.");
trace(((("b=" + b) + " bug=") + bug));
return;
};
action = false;
if (bug.scaleX < 0){
dirX = 110;
} else {
dirX = 110;
};
bug.walkTo((toyCar.x + dirX));
motionTo(bug, (toyCar.x + dirX), 430, 1, function (){
bug.turnOn("left");
bug.playAnim("getInCar", function (){
bug.visible = false;
b = new Bug();
b.x = 85;
b.y = 41;
b.gotoAndStop("sitInCar");
toyCar.addChild(b);
if (toyCar.roof){
toyCar.setChildIndex(toyCar.roof, (toyCar.numChildren - 1));
};
causeEvent("gotInTheCar");
action = true;
});
}, bugSpeed);
}
public function bugTakeBrushwood():void{
if (((((!(bug)) || (!(brushwood)))) || (!(brushwood.visible)))){
trace("[X] Script Animation: 'takeBrushwood' is impossible.");
return;
};
action = false;
if (bug.x <= brushwood.x){
dirX = 30;
} else {
dirX = 30;
};
bug.walkTo((brushwood.x + dirX));
motionTo(bug, (brushwood.x + dirX), 423, 1, function (){
bug.takeItem("brushwood", brushwood, function (){
if (inventory.hasAll(["leaf", "web", "brushwood"])){
bug.stopIdleTimer();
bugMakeRoof();
} else {
action = true;
};
});
}, bugSpeed);
}
public function bugTakeKnot():void{
if (((((!(bug)) || (!(knot)))) || (!(knot.visible)))){
trace("[X] Script Animation: 'takeKnot' is impossible.");
return;
};
action = false;
if (bug.x <= knot.x){
dirX = 0;
} else {
dirX = 10;
};
bug.walkTo((knot.x + dirX));
motionTo(bug, (knot.x + dirX), 439, 1, function (){
bug.pickUpItem("knot", knot, function (){
action = true;
});
}, bugSpeed);
}
public function bugOutOfCar(_arg1:Function=null):void{
var callback = _arg1;
if (((!(b)) || (!(bug)))){
trace("[X] Script Animation: 'outOfCar' is impossible.");
return;
};
action = false;
b.playAnim("outOfCar", function (){
toyCar.removeChild(b);
b = null;
bug.visible = true;
bug.x = (toyCar.x + 110);
bug.y = 430;
bug.wait();
setupEvent("gotInTheCar", false);
if (callback != null){
callback();
};
action = true;
});
}
public function bugPlaceRoof():void{
if (((!(bug)) || (!(toyCar)))){
trace("[X] Script Animation: 'placeRoof' is impossible.");
return;
};
action = false;
bug.walkTo((toyCar.x + 30));
if (bug.scaleX < 0){
dirX = 100;
} else {
dirX = 80;
};
motionTo(bug, (toyCar.x + dirX), 424, 1, function (){
useItem("roof", function (){
causeEvent("roofPlaced");
toyCar.gotoAndStop(3);
}, true);
bug.wait();
action = true;
}, bugSpeed);
}
public function bugDieInCar():void{
if (((((!(b)) || (!(toyCar)))) || (toyCar.roof))){
trace("[X] Script Animation: 'dieInCar' is impossible.");
return;
};
action = false;
b.playAnim("useKnotInCar", function (){
useItem("knot", function (){
stone.visible = false;
causeEvent("stoneMoved");
}, true);
toyCar.car.anim.gotoAndPlay(1);
motionTo(toyCar, -200, 355, 1, lose, carSpeed);
b.playAnim("dieInCar");
});
}
public function bugMakeRoof():void{
makeItem("roof", ["leaf", "web", "brushwood"], 0, "roofMade");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugTakeLeaf():void{
if (((((!(bug)) || (!(leaf)))) || (!(leaf.visible)))){
trace("[X] Script Animation: 'takeLeaf' is impossible.");
return;
};
action = false;
if (bug.x <= leaf.x){
dirX = 40;
} else {
dirX = 40;
};
bug.walkTo((leaf.x + dirX));
motionTo(bug, (leaf.x + dirX), 423, 1, function (){
bug.takeItem("leaf", leaf, function (){
if (inventory.hasAll(["leaf", "web", "brushwood"])){
bug.stopIdleTimer();
bugMakeRoof();
} else {
action = true;
};
});
}, bugSpeed);
}
public function createWaterDrop(_arg1:TimerEvent):void{
var begX:*;
var begY:*;
var endX:*;
var endY:*;
var wd:*;
var event = _arg1;
begX = ((0.5 * 640) * Math.random());
begY = 0;
endX = ((begX - (640 / 4)) + 20);
endY = 425;
if (endX >= 0){
endY = (endY - (10 * (endX / (640 / 2))));
};
wd = new WaterDrop();
wd.x = begX;
wd.y = begY;
addChild(wd);
TweenLite.to(wd, 2, {x:endX, y:endY, onComplete:function (){
wd.gotoAndStop(2);
}, ease:None.easeNone});
}
}
}//package
Section 166
//Episode_02 (Episode_02)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import com.greensock.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_02 extends Episode {
public var dirX:Number;
public var dirY:Number;
public var bugSpeed:Number;
public var flStone;
public var glowFilter:GlowFilter;
public function Episode_02(){
addFrameScript(0, frame1);
}
public function bugCrawlUp():void{
if (!bug){
trace("[X] Script Animation: 'crawlUp' is impossible.");
trace(("bug=" + bug));
return;
};
action = false;
if (bug.x <= 525){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((525 + dirX));
motionTo(bug, (525 + dirX), 430.8, 1, function (){
bug.playAnim("crawlUp");
motionTo(bug, (525 + dirX), 260, 1, function (){
causeEvent("onStone");
bug.turnOn("left");
if (ifThis("parachuteMade")){
inventory.removeItem("parachute");
bug.playAnim("fly");
motionTo(bug, -76, 392, 1, win);
} else {
bug.animCallback = lose;
bug.gotoAndStop("stoneJump");
};
});
}, bugSpeed);
}
public function bugTakeStone():void{
if (((((!(bug)) || (!(stone2)))) || (!(stone2.visible)))){
trace("[X] Script Animation: 'takeStone' is impossible.");
return;
};
action = false;
if (bug.x <= stone2.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((stone2.x + dirX));
motionTo(bug, (stone2.x + dirX), 430.8, 1, function (){
bug.pickUpItem("stone", stone2, function (){
action = true;
});
}, bugSpeed);
}
public function bugTakeWeb():void{
if (((((!(bug)) || (!(web2)))) || (!(web2.visible)))){
trace("[X] Script Animation: 'takeWeb' is impossible.");
return;
};
action = false;
a$_web.visible = false;
if (bug.x <= web2.x){
dirX = 60;
} else {
dirX = 50;
};
bug.walkTo((web2.x + dirX));
motionTo(bug, (web2.x + dirX), 430.8, 1, function (){
var bugY:*;
bugY = bug.y;
TweenLite.to(bug, 0.35, {ease:Strong.easeIn, y:(bug.y - 50), onComplete:function (){
TweenLite.to(bug, 0.35, {ease:Strong.easeInOut, y:bugY});
}});
bug.takeItem("web", web2, function (){
if (inventory.hasAll(["seed", "web"])){
bug.stopIdleTimer();
bugMakeParachute();
} else {
action = true;
};
});
}, bugSpeed);
}
function frame1(){
if (root){
movingLeaf.gotoAndStop(1);
waterDrop.gotoAndStop(1);
dandelion.gotoAndStop(1);
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
h$_crawlUp.visible = false;
h$_crawlUp.alpha = 1;
seed.visible = false;
bug.startIdleTimer();
};
registerItem("seed", Item_Seed);
registerItem("web", Item_Web);
registerItem("stone", Item_Stone);
registerItem("parachute", Item_Parachute_anim);
registerEvent("seedFall");
registerEvent("parachuteMade");
registerEvent("onStone");
addActivator("web", a$_web, {sprite:web2, onClick:function (){
bugTakeWeb();
}});
addActivator("stone", stone2, {sprite:stone2, onClick:function (){
bugTakeStone();
}});
addActivator("seed", a$_seed, {sprite:seed, onClick:function (){
bugTakeSeed();
}});
addActivator("crawlUp", a$_crawlUp, {region:h$_crawlUp, onClick:function (){
if (ifNotThis("onStone")){
bugCrawlUp();
};
}});
addActivator("movingLeaf", movingLeaf, {sprite:movingLeaf, onClick:function (){
if (inventory.hasItem("stone")){
bugThrowStone();
};
}});
addActivator("death", a$_death, {onClick:function (){
if (ifNotThis("onStone")){
bugDieGrassJumping();
};
}});
bugSpeed = 128;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("stone2")) && ((stone2.visible == true)))){
restartHintTimer();
stone2.filters = [glowFilter];
return;
};
if (((getChildByName("movingLeaf")) && (ifNotThis("seedFall")))){
restartHintTimer();
movingLeaf.filters = [glowFilter];
return;
};
if (((getChildByName("seed")) && ((seed.visible == true)))){
restartHintTimer();
seed.filters = [glowFilter];
return;
};
if (((getChildByName("web2")) && ((web2.visible == true)))){
restartHintTimer();
web2.filters = [glowFilter];
return;
};
if (((getChildByName("h$_crawlUp")) && (ifNotThis("onStone")))){
restartHintTimer();
h$_crawlUp.visible = true;
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugDieGrassJumping():void{
if (!bug){
trace("[X] Script Animation: 'dieGrassJumping' is impossible.");
return;
};
action = false;
bug.walkTo(412.4);
motionTo(bug, 412.4, 430.8, 1, function (){
bug.animCallback = lose;
bug.gotoAndStop("grassJump");
}, bugSpeed);
}
public function bugTakeSeed():void{
if (((((!(bug)) || (!(seed)))) || (!(seed.visible)))){
trace("[X] Script Animation: 'takeSeed' is impossible.");
return;
};
action = false;
a$_seed.visible = false;
if (bug.x <= seed.x){
dirX = 0;
} else {
dirX = 20;
};
bug.walkTo((seed.x + dirX));
motionTo(bug, (seed.x + dirX), 430.8, 1, function (){
bug.pickUpItem("seed", seed, function (){
if (inventory.hasAll(["seed", "web"])){
bug.stopIdleTimer();
bugMakeParachute();
} else {
action = true;
};
});
}, bugSpeed);
}
public function bugThrowStone():void{
if (!bug){
trace("[X] Script Animation: 'throwStone' is impossible.");
return;
};
action = false;
bug.walkTo(412.4);
motionTo(bug, 412.4, 430.8, 1, function (){
inventory.removeItem("stone");
bug.playAnim("throwStone", function (){
flStone = new FlyingStone();
flStone.width = 19.1;
flStone.height = 20.1;
flStone.x = 380;
flStone.y = 350;
addChild(flStone);
motionTo(flStone, 121.8, 74.7, flStone.scaleX, function (){
motionTo(flStone, -50, 0, flStone.scaleX, function (){
flStone.visible = false;
}, 0x0100);
movingLeaf.play();
motionTo(waterDrop, 93.3, 236.3, 1, function (){
waterDrop.gotoAndStop(2);
dandelion.gotoAndStop(2);
}, 0x0100);
}, 0x0200);
});
}, bugSpeed);
}
public function bugMakeParachute():void{
makeItem("parachute", ["seed", "web"], 0, "parachuteMade");
extCall = function (){
bug.wait();
action = true;
};
}
}
}//package
Section 167
//Episode_03 (Episode_03)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_03 extends Episode {
public var dirX:Number;
public var dirY:Number;
public var bugSpeed:Number;
public var glowFilter:GlowFilter;
public function Episode_03(){
addFrameScript(0, frame1);
}
public function bugTakeStone():void{
if (((((!(bug)) || (!(stone3)))) || (!(stone3.visible)))){
trace("[X] Script Animation: 'takeStone' is impossible.");
return;
};
action = false;
if (bug.x <= stone3.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((stone3.x + dirX));
motionTo(bug, (stone3.x + dirX), 430.8, 1, function (){
bug.pickUpItem("stone", stone3, function (){
action = true;
});
}, bugSpeed);
}
function frame1(){
if (root){
stalk.gotoAndStop(1);
ants.anim.gotoAndStop(1);
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
bug.startIdleTimer();
};
cleanOut = function (){
ants.anim.gotoAndStop(1);
if (ants.anim.anim_1){
ants.anim.anim_1.gotoAndStop(1);
ants.anim.anim_1.visible = false;
ants.anim.removeChild(ants.anim.anim_1);
};
if (ants.anim.anim_2){
ants.anim.anim_2.gotoAndStop(1);
ants.anim.anim_2.visible = false;
ants.anim.removeChild(ants.anim.anim_2);
};
ants.removeChild(ants.anim);
};
registerItem("pin", Item_Pin);
registerItem("stone", Item_Stone);
registerItem("thread", Item_Thread);
registerItem("tool01", Item_Tool01_anim);
registerEvent("tool01Made");
registerEvent("stalkBent");
registerEvent("threadPlaced");
registerEvent("tool01Placed");
registerEvent("antsMoved");
addActivator("pin", pin, {sprite:pin, onClick:function (){
bugTakePin();
}});
addActivator("stone", stone3, {sprite:stone3, onClick:function (){
bugTakeStone();
}});
addActivator("thread", thread, {sprite:thread, onClick:function (){
bugTakeThread();
}});
addActivator("stalk", stalk, {sprite:stalk, onClick:function (){
switch (stalk.currentFrame){
case 1:
bugCrawlOnStalk();
break;
case 3:
if (inventory.hasItem("tool01")){
bugPlaceThreadAndPin();
} else {
if (inventory.hasItem("thread")){
bugPlaceThread();
} else {
if (((inventory.hasItem("pin")) && ((stalk.anim.currentLabel == "_WBow")))){
bugPlacePin();
} else {
if (stalk.anim.currentLabel == "_WBowWpin"){
bugThrowThreadAndPin();
} else {
if (stalk.anim.currentLabel == "_Ready2Up"){
bugReleaseThreadAndPin();
};
};
};
};
};
break;
};
}});
addActivator("exit", a$_exit, {onClick:function (){
if (ifThis("antsMoved")){
bugLeave();
} else {
bugDieByAnts();
};
}});
bugSpeed = 128;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("stone3")) && ((stone3.visible == true)))){
restartHintTimer();
stone3.filters = [glowFilter];
return;
};
if (((getChildByName("stalk")) && ((getChildByName("stalk")["currentFrame"] == 1)))){
restartHintTimer();
stalk.filters = [glowFilter];
return;
};
if (((getChildByName("thread")) && ((thread.visible == true)))){
restartHintTimer();
thread.filters = [glowFilter];
return;
};
if (((getChildByName("pin")) && ((pin.visible == true)))){
restartHintTimer();
pin.filters = [glowFilter];
return;
};
if (((((getChildByName("stalk")) && ((getChildByName("stalk")["currentFrame"] == 3)))) && (ifNotThis("antsMoved")))){
restartHintTimer();
stalk.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugLeave():void{
if (!bug){
trace("[X] Script Animation: 'leave' is impossible.");
return;
};
action = false;
bug.walkTo(-100);
motionTo(bug, -100, 431.4, 1, function (){
win();
}, bugSpeed);
}
public function bugThrowThreadAndPin():void{
if (((!(bug)) || ((!(stalk.anim.currentLabel) == "_WBowWpin")))){
trace("[X] Script Animation: 'throwThreadAndPin' is impossible.");
return;
};
action = false;
if (bug.x <= 280){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((280 + dirX));
motionTo(bug, (280 + dirX), 430.8, 1, function (){
bug.wait();
stalk.anim.gotoAndPlay("_Ready2Up");
ants.anim.gotoAndPlay("_idleWPin");
action = true;
}, bugSpeed);
}
public function bugDieByAnts():void{
if (!bug){
trace("[X] Script Animation: 'bugDieByAnts' is impossible.");
return;
};
action = false;
bug.walkTo(137.3);
motionTo(bug, 137.3, 431.4, 1, function (){
bug.animCallback = lose;
bug.gotoAndStop("dieByAnts");
}, bugSpeed);
}
public function bugReleaseThreadAndPin():void{
if (((!(bug)) || ((!(stalk.anim.currentLabel) == "_Ready2Up")))){
trace("[X] Script Animation: 'releaseThreadAndPin' is impossible.");
return;
};
action = false;
if (bug.x <= 538.5){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((538.5 + dirX));
motionTo(bug, (538.5 + dirX), 430.8, 1, function (){
bug.wait();
stalk.anim.gotoAndPlay("_BendUp");
ants.anim.gotoAndPlay("_up_animation");
causeEvent("antsMoved");
action = true;
}, bugSpeed);
}
public function bugPlaceThreadAndPin():void{
if (((!(bug)) || (!(inventory.hasItem("tool01"))))){
trace("[X] Script Animation: 'placeThreadAndPin' is impossible.");
return;
};
action = false;
if (bug.x <= 538.5){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((538.5 + dirX));
motionTo(bug, (538.5 + dirX), 430.8, 1, function (){
bug.wait();
inventory.removeItem("tool01");
stalk.anim.gotoAndPlay("_WBowWpin");
action = true;
}, bugSpeed);
}
public function bugPlacePin():void{
if (((((!(bug)) || (!(inventory.hasItem("pin"))))) || (!((stalk.anim.currentLabel == "_WBow"))))){
trace("[X] Script Animation: 'placePin' is impossible.");
return;
};
action = false;
if (bug.x <= 300){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((300 + dirX));
motionTo(bug, (300 + dirX), 430.8, 1, function (){
bug.wait();
inventory.removeItem("pin");
stalk.anim.gotoAndPlay("_WBowWpin");
action = true;
}, bugSpeed);
}
public function bugTakePin():void{
if (((((!(bug)) || (!(pin)))) || (!(pin.visible)))){
trace("[X] Script Animation: 'takePin' is impossible.");
return;
};
action = false;
if (bug.x <= pin.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((pin.x + dirX));
motionTo(bug, (pin.x + dirX), 430.8, 1, function (){
bug.pickUpItem("pin", pin, function (){
if (inventory.hasAll(["pin", "thread"])){
bug.stopIdleTimer();
bugMakeTool01();
} else {
action = true;
};
});
}, bugSpeed);
}
public function bugMakeTool01():void{
makeItem("tool01", ["pin", "thread"], 0, "tool01Made");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugPlaceThread():void{
if (((!(bug)) || (!(inventory.hasItem("thread"))))){
trace("[X] Script Animation: 'placeThread' is impossible.");
return;
};
action = false;
if (bug.x <= 538.5){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((538.5 + dirX));
motionTo(bug, (538.5 + dirX), 430.8, 1, function (){
bug.wait();
inventory.removeItem("thread");
stalk.anim.gotoAndPlay("_WBow");
action = true;
}, bugSpeed);
}
public function bugTakeThread():void{
if (((((!(bug)) || (!(thread)))) || (!(thread.visible)))){
trace("[X] Script Animation: 'takeThread' is impossible.");
return;
};
action = false;
if (bug.x <= thread.x){
dirX = 10;
} else {
dirX = 0;
};
bug.walkTo((thread.x + dirX));
motionTo(bug, (thread.x + dirX), 430.8, 1, function (){
bug.takeItem("thread", thread, function (){
if (inventory.hasAll(["pin", "thread"])){
bug.stopIdleTimer();
bugMakeTool01();
} else {
action = true;
};
});
}, bugSpeed);
}
public function bugCrawlOnStalk():void{
if (!bug){
trace("[X] Script Animation: 'crawlOnStalk' is impossible.");
trace(("bug=" + bug));
return;
};
action = false;
if (bug.x <= stalk.x){
dirX = 0;
} else {
dirX = 130;
};
bug.walkTo((stalk.x + dirX));
motionTo(bug, (stalk.x + dirX), 430.8, 1, function (){
if (inventory.hasItem("stone")){
inventory.removeItem("stone");
bug.gotoAndStop("none");
bug.visible = false;
extCall = function (){
bug.x = 538.5;
bug.y = 430.8;
bug.visible = true;
bug.wait();
action = true;
};
stalk.gotoAndStop(3);
} else {
bug.gotoAndStop("none");
bug.visible = false;
stalk.gotoAndStop(2);
};
}, bugSpeed);
}
}
}//package
Section 168
//Episode_04 (Episode_04)
package {
import flash.display.*;
import flash.filters.*;
public dynamic class Episode_04 extends Episode {
public var dummy:MovieClip;
public var dirX:Number;
public var dirY:Number;
public var bugSpeed:Number;
public var glowFilter:GlowFilter;
public function Episode_04(){
addFrameScript(0, frame1);
}
public function bugTakeStickLong():void{
if (((((!(bug)) || (!(stickLong)))) || (!(stickLong.visible)))){
trace("[X] Script Animation: 'stickLong' is impossible.");
return;
};
action = false;
if (bug.x <= stickLong.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((stickLong.x + dirX));
motionTo(bug, (stickLong.x + dirX), 439, 1, function (){
bug.takeItem("stickLong", stickLong, function (){
action = true;
});
}, bugSpeed);
}
function frame1(){
if (root){
birdHead.gotoAndStop(1);
birdLegLeft.gotoAndStop(1);
birdLegRight.gotoAndStop(1);
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
h$_throwDummy.visible = false;
h$_throwDummy.alpha = 1;
bug.startIdleTimer();
};
registerItem("berry", Item_Berry);
registerItem("stickLong", Item_StickLong);
registerItem("seed", Item_Seed2);
registerItem("dummy", Item_Dummy_anim);
registerEvent("dummyMade");
registerEvent("dummyPlaced");
registerEvent("birdDown");
addActivator("stickLong", stickLong, {sprite:stickLong, onClick:function (){
bugTakeStickLong();
}});
addActivator("seed", seed2, {sprite:seed2, onClick:function (){
bugTakeSeed();
}});
addActivator("berry", berry, {sprite:berry, onClick:function (){
if (inventory.hasItem("stickLong")){
bugTakeBerry();
};
}});
addActivator("throwDummy", a$_throwDummy, {onClick:function (){
if (inventory.hasItem("dummy")){
bugThrowDummy();
};
}});
addActivator("exit", a$_exit, {onClick:function (){
if (ifThis("birdDown")){
bugLeave();
} else {
bugDieByBird();
};
}});
addActivator("death", birdLegLeft, {onClick:function (){
bugDieSmashed();
}});
bugSpeed = 128;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("stickLong")) && ((stickLong.visible == true)))){
restartHintTimer();
stickLong.filters = [glowFilter];
return;
};
if (((getChildByName("seed2")) && ((seed2.visible == true)))){
restartHintTimer();
seed2.filters = [glowFilter];
return;
};
if (((getChildByName("berry")) && ((berry.visible == true)))){
restartHintTimer();
berry.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugDieSmashed():void{
if (!bug){
trace("[X] Script Animation: 'dieSmashed' is impossible.");
return;
};
action = false;
bug.walkTo(306.9);
motionTo(bug, 306.9, 438.1, 1, function (){
bug.gotoAndStop("none");
bug.visible = false;
birdLegLeft.gotoAndPlay("smashBug");
}, bugSpeed);
}
public function bugLeave():void{
if (!bug){
trace("[X] Script Animation: 'leave' is impossible.");
return;
};
action = false;
bug.walkTo(-100);
motionTo(bug, -100, 431.4, 1, function (){
win();
}, bugSpeed);
}
public function bugTakeSeed():void{
if (((((!(bug)) || (!(seed2)))) || (!(seed2.visible)))){
trace("[X] Script Animation: 'takeSeed' is impossible.");
return;
};
action = false;
if (bug.x <= seed2.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((seed2.x + dirX));
motionTo(bug, (seed2.x + dirX), 439, 1, function (){
bug.pickUpItem("seed", seed2, function (){
if (inventory.hasAll(["seed", "berry"])){
bug.stopIdleTimer();
bugMakeDummy();
} else {
action = true;
};
});
}, bugSpeed);
}
public function bugDieByBird():void{
if (!bug){
trace("[X] Script Animation: 'dieByBird' is impossible.");
return;
};
action = false;
bug.walkTo(205.4);
motionTo(bug, 205.4, 428.8, 1, function (){
bug.gotoAndStop("none");
bug.visible = false;
birdHead.gotoAndPlay("eatBug");
}, bugSpeed);
}
public function bugTakeBerry():void{
if (((((!(bug)) || (!(berry)))) || (!(berry.visible)))){
trace("[X] Script Animation: 'takeBerry' is impossible.");
return;
};
action = false;
if (bug.x <= berry.x){
dirX = -20;
} else {
dirX = 50;
};
bug.walkTo((berry.x + dirX));
motionTo(bug, (berry.x + dirX), 439, 1, function (){
inventory.removeItem("stickLong");
bug.playAnim("useLongStick", function (){
bug.gotoAndStop("none");
motionTo(berry, berry.x, bug.y, 1, function (){
bug.pickUpItem("berry", berry, function (){
if (inventory.hasAll(["seed", "berry"])){
bug.stopIdleTimer();
bugMakeDummy();
} else {
action = true;
};
});
}, 0x0100);
});
}, bugSpeed);
}
public function bugThrowDummy():void{
action = false;
if (bug.x <= 466.6){
dirX = 0;
} else {
dirX = 50;
};
bug.walkTo((466.6 + dirX));
motionTo(bug, (466.6 + dirX), 439, 1, function (){
bug.turnOn("left");
bug.playAnim("throwDummy", function (){
inventory.removeItem("dummy");
dummy = new Item_Dummy();
dummy.x = (bug.x - 50);
dummy.y = (bug.y - 100);
addChild(dummy);
vCurveTo(dummy, 230.9, 353.7, -80, 1, 65, function (){
causeEvent("dummyPlaced");
birdHead.gotoAndPlay("eatDummy");
dummy.visible = false;
}, 128);
});
}, bugSpeed);
}
public function bugMakeDummy():void{
makeItem("dummy", ["seed", "berry"], 0, "dummyMade");
extCall = function (){
bug.wait();
action = true;
};
}
}
}//package
Section 169
//Episode_05 (Episode_05)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public dynamic class Episode_05 extends Episode {
public var dirX:Number;
public var dirY:Number;
public var bf_xmspeed:Number;
public var bf_movedir:String;
public var bugSpeed:Number;
public var wasp:MovieClip;
public var flStone:MovieClip;
public var glowFilter:GlowFilter;
public function Episode_05(){
addFrameScript(0, frame1);
}
public function bugPlacePitch():void{
if (!bug){
trace("[X] Script Animation: 'placePitch' is impossible.");
return;
};
action = false;
if (bug.x <= 279){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((279 + dirX));
motionTo(bug, (279 + dirX), 427.9, 1, function (){
bug.turnOn("left");
inventory.removeItem("pitch");
flower.gotoAndPlay("_flowerWPitch");
causeEvent("pitchPlaced");
bug.wait();
}, bugSpeed);
}
public function bugTakeStone():void{
if (((((!(bug)) || (!(stone5)))) || (!(stone5.visible)))){
trace("[X] Script Animation: 'takeStone' is impossible.");
return;
};
action = false;
if (bug.x <= stone5.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((stone5.x + dirX));
motionTo(bug, (stone5.x + dirX), 423, 1, function (){
bug.pickUpItem("stone", stone5, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugDieByWasp():void{
if (((!(bug)) || (!(wasp)))){
trace("[X] Script Animation: 'dieByWasp' is impossible.");
return;
};
action = false;
motionTo(wasp, bug.x, (bug.y - 150), 1, function (){
wasp.gotoAndPlay("_hitAndFlyAway");
bug.playAnim("dieByWasp", lose);
}, 0x0100);
}
function frame1(){
if (root){
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
a$_placePitch.visible = false;
flyButterfly();
bug.startIdleTimer();
};
cleanOut = function (){
if (butterfly.hasEventListener(Event.ENTER_FRAME)){
butterfly.removeEventListener(Event.ENTER_FRAME, butterflyOnEnterFrame);
};
};
registerItem("stone", Item_Stone);
registerItem("glass", Item_Glass);
registerItem("knot", Item_Knot);
registerItem("plant", Item_Plant);
registerItem("pitch", Item_Pitch);
registerEvent("waspFlewAway");
registerEvent("bugHid");
registerEvent("flowerCutted");
registerEvent("pitchPlaced");
addActivator("knot", knot2, {sprite:knot2, onClick:function (){
bugTakeKnot();
}});
addActivator("glass", glass, {sprite:glass, onClick:function (){
bugTakeGlass();
}});
addActivator("stone", stone5, {sprite:stone5, onClick:function (){
bugTakeStone();
}});
addActivator("plant", plant, {sprite:plant, onClick:function (){
bugTakePlant();
}});
addActivator("pitch", pitch, {sprite:pitch, onClick:function (){
if (inventory.hasItem("knot")){
bugTakePitch();
} else {
if (((!(inventory.hasItem("pitch"))) && (ifNotThis("pitchPlaced")))){
bugDieByPitch();
};
};
}});
addActivator("wasp", a$_throwStone, {sprite:flower, onClick:function (){
if (inventory.hasItem("stone")){
a$_throwStone.visible = false;
bugThrowStone();
};
}});
addActivator("flower", flower, {sprite:flower, onClick:function (){
if (((inventory.hasItem("glass")) && (ifThis("waspFlewAway")))){
bugCutFlower();
};
}});
addActivator("placePitch", a$_placePitch, {sprite:flower, onClick:function (){
if (((inventory.hasItem("pitch")) && (ifThis("flowerCutted")))){
bugPlacePitch();
};
}});
bugSpeed = 128;
bf_movedir = "left";
bf_xmspeed = 8;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("stone5")) && ((stone5.visible == true)))){
restartHintTimer();
stone5.filters = [glowFilter];
return;
};
if (((getChildByName("plant")) && ((plant.visible == true)))){
restartHintTimer();
plant.filters = [glowFilter];
return;
};
if (((getChildByName("flower")) && (ifNotThis("waspFlewAway")))){
restartHintTimer();
flower.filters = [glowFilter];
return;
};
if (((getChildByName("glass")) && ((glass.visible == true)))){
restartHintTimer();
glass.filters = [glowFilter];
return;
};
if (ifNotThis("flowerCutted")){
restartHintTimer();
flower.filters = [glowFilter];
return;
};
if (((getChildByName("knot2")) && ((knot2.visible == true)))){
restartHintTimer();
knot2.filters = [glowFilter];
return;
};
if (inventory.hasItem("knot")){
restartHintTimer();
pitch.filters = [glowFilter];
return;
};
if (ifNotThis("pitchPlaced")){
restartHintTimer();
flower.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function waspFlyAway():void{
if (((!(bug)) || (!(wasp)))){
trace("[X] Script Animation: 'flyAway' is impossible.");
return;
};
action = false;
motionTo(wasp, -100, -100, 1, function (){
bug.anim.gotoAndPlay("_unhide");
causeEvent("waspFlewAway");
}, 0x0100);
}
public function bugTakePlant():void{
if (((((!(bug)) || (!(plant)))) || (!(plant.visible)))){
trace("[X] Script Animation: 'takePlant' is impossible.");
return;
};
action = false;
if (bug.x <= plant.x){
dirX = 0;
} else {
dirX = 70;
};
bug.walkTo((plant.x + dirX));
motionTo(bug, (plant.x + dirX), 423, 1, function (){
bug.pickUpItem("plant", plant, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugDieByPitch():void{
if (!bug){
trace("[X] Script Animation: 'dieByPitch' is impossible.");
return;
};
action = false;
if (bug.x <= pitch.x){
dirX = 0;
} else {
dirX = 30;
};
bug.walkTo((pitch.x + dirX));
motionTo(bug, (pitch.x + dirX), 423, 1, function (){
bug.playAnim("dieByPitch", function (){
lose();
});
}, bugSpeed);
}
public function bugTakeKnot():void{
if (((((!(bug)) || (!(knot2)))) || (!(knot2.visible)))){
trace("[X] Script Animation: 'takeKnot' is impossible.");
return;
};
action = false;
if (bug.x <= knot2.x){
dirX = -70;
} else {
dirX = -70;
};
bug.walkTo((knot2.x + dirX));
motionTo(bug, (knot2.x + dirX), 430, 1, function (){
bug.pickUpItem("knot", knot2, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugThrowStone():void{
if (!bug){
trace("[X] Script Animation: 'throwStone' is impossible.");
return;
};
action = false;
bug.walkTo(308.6);
motionTo(bug, 308.6, 427.9, 1, function (){
bug.turnOn("right");
bug.playAnim("throwStone", function (){
inventory.removeItem("stone");
if (inventory.hasItem("plant")){
causeEvent("bugHid");
bug.playAnim("hideBehindPlant");
inventory.removeItem("plant");
};
flStone = new FlyingStone();
flStone.width = 19.1;
flStone.height = 20.1;
flStone.x = 380;
flStone.y = 350;
addChild(flStone);
motionTo(flStone, 505.9, 131, flStone.scaleX, function (){
flower.gotoAndPlay("_waspAngry");
motionTo(flStone, 670, 480, (flStone.scaleX * 1.5), function (){
}, 0x0100);
}, 0x0200);
});
}, bugSpeed);
}
public function butterflyOnEnterFrame(_arg1:Event):void{
var event = _arg1;
if (ifNotThis("pitchPlaced")){
switch (bf_movedir){
case "left":
if (butterfly.x > -500){
butterfly.x = (butterfly.x - bf_xmspeed);
} else {
bf_movedir = "right";
butterfly.scaleX = (butterfly.scaleX * -1);
};
break;
case "right":
if (butterfly.x < 1140){
butterfly.x = (butterfly.x + bf_xmspeed);
} else {
bf_movedir = "left";
butterfly.scaleX = (butterfly.scaleX * -1);
};
break;
};
} else {
butterfly.removeEventListener(Event.ENTER_FRAME, butterflyOnEnterFrame);
if (butterfly.x <= 237){
butterfly.scaleX = (-1 * Math.abs(butterfly.scaleX));
dirX = 100;
} else {
butterfly.scaleX = (1 * Math.abs(butterfly.scaleX));
dirX = -50;
};
motionTo(butterfly, (237 + dirX), 270, Math.abs(butterfly.scaleX), function (){
butterfly.visible = false;
flower.gotoAndPlay("_butterflyFlyingAway");
}, 128);
};
}
public function bugTakePitch():void{
if (((((!(bug)) || (!(pitch)))) || (!(pitch.visible)))){
trace("[X] Script Animation: 'takePitch' is impossible.");
return;
};
action = false;
if (bug.x <= pitch.x){
dirX = 0;
} else {
dirX = 30;
};
bug.walkTo((pitch.x + dirX));
motionTo(bug, (pitch.x + dirX), 423, 1, function (){
bug.playAnim("takePitch", function (){
inventory.removeItem("knot");
getItem("pitch");
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugTakeGlass():void{
if (((((!(bug)) || (!(glass)))) || (!(glass.visible)))){
trace("[X] Script Animation: 'takeGlass' is impossible.");
return;
};
action = false;
if (bug.x <= glass.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((glass.x + dirX));
motionTo(bug, (glass.x + dirX), 430, 1, function (){
bug.pickUpItem("glass", glass, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugCutFlower():void{
if (!bug){
trace("[X] Script Animation: 'cutFlower' is impossible.");
return;
};
action = false;
if (bug.x <= flower.x){
dirX = -100;
} else {
dirX = 0;
};
bug.walkTo((flower.x + dirX));
motionTo(bug, (flower.x + dirX), 427.9, 1, function (){
bug.turnOn("left");
inventory.removeItem("glass");
bug.playAnim("cutGrass", function (){
flower.gotoAndPlay("_flowerDown");
bug.wait();
});
}, bugSpeed);
}
public function flyButterfly():void{
butterfly.addEventListener(Event.ENTER_FRAME, butterflyOnEnterFrame);
}
}
}//package
Section 170
//Episode_06 (Episode_06)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Episode_06 extends Episode {
public var pf_xmspeed:Number;
public var dirX:Number;
public var dirY:Number;
public var pf_movedir:String;
public var bugSpeed:Number;
public var flAcorn:MovieClip;
public var glowFilter:GlowFilter;
public function Episode_06(){
addFrameScript(0, frame1);
}
public function bugTakeWeb():void{
if (((((!(bug)) || (!(web3)))) || (!(web3.visible)))){
trace("[X] Script Animation: 'takeWeb' is impossible.");
return;
};
action = false;
if (bug.x <= web3.x){
dirX = 30;
} else {
dirX = 20;
};
bug.walkTo((web3.x + dirX));
motionTo(bug, (web3.x + dirX), 439, 1, function (){
bug.pickUpItem("web", web3, function (){
if (inventory.hasAll(["web", "leaves"])){
bugMakeBridge();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function poorFlyOnEnterFrame(_arg1:Event):void{
if (ifNotThis("flyDown")){
switch (pf_movedir){
case "left":
if (poorFly.x > 0){
poorFly.x = (poorFly.x - pf_xmspeed);
} else {
pf_movedir = "right";
poorFly.scaleX = (poorFly.scaleX * -1);
poorFly.x = (poorFly.x + (poorFly.width / 2));
};
break;
case "right":
if (poorFly.x < 90){
poorFly.x = (poorFly.x + pf_xmspeed);
} else {
pf_movedir = "left";
poorFly.scaleX = (poorFly.scaleX * -1);
poorFly.x = (poorFly.x + (-(poorFly.width) / 2));
};
break;
};
} else {
poorFly.removeEventListener(Event.ENTER_FRAME, poorFlyOnEnterFrame);
};
}
public function bugTakeStickLong():void{
if (((((!(bug)) || (!(stickLong2)))) || (!(stickLong2.visible)))){
trace("[X] Script Animation: 'takeStickLong' is impossible.");
return;
};
action = false;
if (bug.x <= stickLong2.x){
dirX = 0;
} else {
dirX = 30;
};
bug.walkTo((stickLong2.x + dirX));
motionTo(bug, (stickLong2.x + dirX), 420, 1, function (){
bug.pickUpItem("stickLong", stickLong2, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugPlaceBridge():void{
if (((!(bug)) || (bridgeFromLeaves.visible))){
trace("[X] Script Animation: 'placeBridge' is impossible.");
return;
};
action = false;
if (bug.x <= bridgeFromLeaves.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((bridgeFromLeaves.x + dirX));
motionTo(bug, (bridgeFromLeaves.x + dirX), 439, 1, function (){
bug.turnOn("left");
bug.playAnim("pickUp", function (){
inventory.removeItem("bridge");
bridgeFromLeaves.visible = true;
bridgeFromLeaves.gotoAndPlay(1);
});
}, bugSpeed);
}
function frame1(){
if (root){
bridgeFromLeaves.gotoAndStop(1);
spider.gotoAndStop(1);
poorFly.gotoAndStop(1);
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
bridgeFromLeaves.visible = false;
movePoorFly();
bug.startIdleTimer();
};
cleanOut = function (){
poorFly.removeEventListener(Event.ENTER_FRAME, poorFlyOnEnterFrame);
};
registerItem("web", Item_Web);
registerItem("stickLong", Item_StickLong);
registerItem("acorn", Item_Acorn);
registerItem("leaves", Item_Leaf);
registerItem("bridge", Item_Bridge_anim);
registerEvent("flyDown");
registerEvent("bridgeMade");
registerEvent("spiderBusy");
registerEvent("leavesFallen");
registerEvent("bridgePlaced");
addActivator("stickLong", stickLong2, {sprite:stickLong2, onClick:function (){
bugTakeStickLong();
}});
addActivator("web", web3, {sprite:web3, onClick:function (){
bugTakeWeb();
}});
addActivator("acorn", acorn, {sprite:acorn, onClick:function (){
bugTakeAcorn();
}});
addActivator("takeLeaves", a$_takeLeaves, {onClick:function (){
if (inventory.hasItem("stickLong")){
bugTakeLeaves();
};
}});
addActivator("poorFly", poorFly, {sprite:poorFly, onClick:function (){
if (((inventory.hasItem("acorn")) && (ifNotThis("flyDown")))){
bugThrowAcorn();
};
}});
addActivator("exit", a$_exit, {onClick:function (){
if (((ifThis("bridgePlaced")) && (ifThis("spiderBusy")))){
bugLeave();
} else {
if (ifThis("bridgePlaced")){
bugDieBySpider();
} else {
if (((((ifThis("bridgeMade")) && (ifNotThis("bridgePlaced")))) && (inventory.hasItem("bridge")))){
bugPlaceBridge();
} else {
if (ifNotThis("spiderBusy")){
bugStuckAndDie();
};
};
};
};
}});
bugSpeed = 128;
pf_movedir = "left";
pf_xmspeed = 4;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("web3")) && ((web3.visible == true)))){
restartHintTimer();
web3.filters = [glowFilter];
return;
};
if (((getChildByName("stickLong2")) && ((stickLong2.visible == true)))){
restartHintTimer();
stickLong2.filters = [glowFilter];
return;
};
if (((getChildByName("acorn")) && ((acorn.visible == true)))){
restartHintTimer();
acorn.filters = [glowFilter];
return;
};
if (((getChildByName("poorFly")) && (ifNotThis("flyDown")))){
restartHintTimer();
poorFly.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugLeave():void{
if (!bug){
trace("[X] Script Animation: 'leave' is impossible.");
return;
};
action = false;
bug.walkTo(-76.9);
motionTo(bug, -76.9, 363.8, 1, function (){
win();
}, bugSpeed);
}
public function bugMakeBridge():void{
makeItem("bridge", ["web", "leaves"], 0, "bridgeMade");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugStuckAndDie():void{
if (!bug){
trace("[X] Script Animation: 'stuckAndDie' is impossible.");
trace(("bug=" + bug));
return;
};
action = false;
if (bug.scaleX < 215.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((215.6 + dirX));
motionTo(bug, (215.6 + dirX), 430, 1, function (){
bug.playAnim("stuckAndDie", lose);
spider.gotoAndPlay("_attack");
onTimeTo(spider, 450, 230, spider.scaleX, function (){
bug.anim.gotoAndPlay("_die");
spider.gotoAndPlay("_eating");
}, 1.1);
}, bugSpeed);
}
public function bugTakeLeaves():void{
if (((((!(bug)) || (!(acorn)))) || (!(acorn.visible)))){
trace("[X] Script Animation: 'takeAcorn' is impossible.");
return;
};
action = false;
if (bug.x <= leaf_1.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((leaf_1.x + dirX));
motionTo(bug, (leaf_1.x + dirX), 430, 1, function (){
bug.turnOn("right");
bug.playAnim("useLongStick", function (){
inventory.removeItem("stickLong");
leaf_1.visible = false;
leaf_2.visible = false;
leaf_3.visible = false;
leaf_4.visible = false;
getItem("leaves");
if (inventory.hasAll(["web", "leaves"])){
bugMakeBridge();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugThrowAcorn():void{
action = false;
if (bug.x <= 436.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((436.6 + dirX));
motionTo(bug, (436.6 + dirX), 419, 1, function (){
bug.turnOn("left");
bug.playAnim("throwAcorn", function (){
inventory.removeItem("acorn");
flAcorn = new Item_Acorn();
flAcorn.x = (bug.x - 50);
flAcorn.y = (bug.y - 100);
addChild(flAcorn);
poorFly.removeEventListener(Event.ENTER_FRAME, poorFlyOnEnterFrame);
poorFly.anim.gotoAndStop(1);
poorFly.scaleX = -1;
poorFly.x = (poorFly.x + (poorFly.width / 2));
motionTo(flAcorn, poorFly.x, poorFly.y, 1, function (){
poorFly.gotoAndPlay("_down");
motionTo(flAcorn, -100, 480, 1, function (){
flAcorn.visible = false;
}, 0x0100);
}, 0x0100);
});
}, bugSpeed);
}
public function spiderComeIn():void{
action = false;
if (spider.x <= 543.1){
dirX = 0;
} else {
dirX = 0;
};
spider.gotoAndPlay("_attack");
onTimeTo(spider, (poorFly.x + 170), 61.8, spider.scaleX, function (){
spider.gotoAndPlay("_eating");
poorFly.gotoAndPlay("_spider");
causeEvent("spiderBusy");
bug.wait();
action = true;
}, 1.1);
}
public function bugTakeAcorn():void{
if (((((!(bug)) || (!(acorn)))) || (!(acorn.visible)))){
trace("[X] Script Animation: 'takeAcorn' is impossible.");
return;
};
action = false;
if (bug.x <= acorn.x){
dirX = 0;
} else {
dirX = 50;
};
bug.walkTo((acorn.x + dirX));
motionTo(bug, (acorn.x + dirX), 460, 1, function (){
bug.pickUpItem("acorn", acorn, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugDieBySpider():void{
if (!bug){
trace("[X] Script Animation: 'dieBySpider' is impossible.");
trace(("bug=" + bug));
return;
};
action = false;
if (bug.scaleX < 215.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((215.6 + dirX));
motionTo(bug, (215.6 + dirX), 430, 1, function (){
bug.playAnim("dieBySpider", lose);
spider.gotoAndPlay("_attack");
onTimeTo(spider, 450, 230, spider.scaleX, function (){
spider.gotoAndPlay("_eating");
}, 1.1);
}, bugSpeed);
}
public function movePoorFly():void{
poorFly.addEventListener(Event.ENTER_FRAME, poorFlyOnEnterFrame);
}
}
}//package
Section 171
//Episode_07 (Episode_07)
package {
import flash.filters.*;
public dynamic class Episode_07 extends Episode {
public var dirX:Number;
public var dirY:Number;
public var bugSpeed:Number;
public var glowFilter:GlowFilter;
public function Episode_07(){
addFrameScript(0, frame1);
}
public function bugCrawlUp():void{
if (!bug){
trace("[X] Script Animation: 'crawlUp' is impossible.");
return;
};
action = false;
if (bug.x <= counterfoilBig.x){
dirX = 0;
} else {
dirX = 20;
};
bug.walkTo((counterfoilBig.x + dirX));
motionTo(bug, (counterfoilBig.x + dirX), 430, 1, function (){
bug.playAnim("crawl", function (){
bug.walkTo(600);
motionTo(bug, 600, bug.y, 1, function (){
setupEvent("onBottom", false);
bug.wait();
action = true;
}, bugSpeed);
});
motionTo(bug, bug.x, 175, 1, function (){
bug.anim.gotoAndPlay("_jumpDown");
}, bugSpeed);
}, bugSpeed);
}
public function bugTakeStickLong():void{
if (((((!(bug)) || (!(stickLong3)))) || (!(stickLong3.visible)))){
trace("[X] Script Animation: 'takeStickLong' is impossible.");
return;
};
action = false;
if (bug.x <= stickLong3.x){
dirX = 20;
} else {
dirX = 30;
};
a$_stickLong.visible = false;
bug.walkTo((stickLong3.x + dirX));
motionTo(bug, (stickLong3.x + dirX), 430, 1, function (){
bug.takeItem("stickLong", stickLong3, function (){
if (((inventory.hasAll(["rope", "stickLong"])) && (inventory.hasAny(["bone1", "bone2", "bone3", "bone4"])))){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
function frame1(){
if (root){
evilEgg.gotoAndStop(1);
counterfoilBig.gotoAndStop(23);
bugBear.gotoAndStop(1);
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
h$_throwBones.visible = false;
h$_throwBones.alpha = 1;
bug.startIdleTimer();
boneLadder.visible = false;
};
registerItem("bone1", Item_Bone);
registerItem("bone2", Item_Bone);
registerItem("bone3", Item_Bone);
registerItem("bone4", Item_Bone);
registerItem("rope", Item_Web);
registerItem("counterfoil1", Item_Counterfoil);
registerItem("counterfoil2", Item_Counterfoil);
registerItem("counterfoil3", Item_Counterfoil);
registerItem("stickLong", Item_StickLong);
registerItem("egg1", Item_Egg);
registerItem("egg2", Item_Egg);
registerItem("bridle", Item_Bridle_anim);
registerItem("bait", Item_Bait_anim);
registerEvent("onBottom");
registerEvent("bridleMade");
registerEvent("baitMade");
registerEvent("worm1Off");
registerEvent("worm2Off");
addActivator("counterfoilBig", counterfoilBig, {sprite:counterfoilBig, onClick:function (){
if (ifNotThis("onBottom")){
bugCrawlDown();
} else {
bugCrawlUp();
};
}});
addActivator("counterfoil1", counterfoil1, {sprite:counterfoil1, onClick:function (){
if (ifNotThis("onBottom")){
bugTakeCounterfoil1();
};
}});
addActivator("counterfoil2", counterfoil2, {sprite:counterfoil2, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeCounterfoil2();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("counterfoil3", counterfoil3, {sprite:counterfoil3, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeCounterfoil3();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("stickLong", a$_stickLong, {sprite:stickLong3, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeStickLong();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("rope", a$_rope2, {sprite:rope2, onClick:function (){
if (ifThis("onBottom")){
bugTakeRope();
};
}});
addActivator("egg1", egg1, {sprite:egg1, onClick:function (){
if (ifThis("onBottom")){
bugTakeEgg1();
};
}});
addActivator("egg2", egg2, {sprite:egg2, onClick:function (){
if (ifThis("onBottom")){
bugTakeEgg2();
};
}});
addActivator("bone1", bone1, {sprite:bone1, onClick:function (){
if (ifThis("onBottom")){
bugTakeBone1();
};
}});
addActivator("bone2", bone2, {sprite:bone2, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeBone2();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("bone3", bone3, {sprite:bone3, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeBone3();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("bone4", bone4, {sprite:bone4, onClick:function (){
if (ifThis("onBottom")){
if (ifThis("worm1Off")){
if (ifThis("worm2Off")){
bugTakeBone4();
} else {
bugDieByWorm2();
};
} else {
bugDieByWorm1();
};
};
}});
addActivator("throwBones", a$_throwBones, {region:h$_throwBones, onClick:function (){
if (ifThis("onBottom")){
if (inventory.hasNotLessOf(3, ["bone1", "bone2", "bone3", "bone4"])){
bugThrowBones();
};
};
}});
addActivator("worm1", worm1, {sprite:worm1, onClick:function (){
if (ifThis("onBottom")){
if (((inventory.hasAny(["egg1", "egg2"])) && (ifNotThis("worm1Off")))){
bugCloseHole1();
} else {
if (ifNotThis("worm1Off")){
bugDieByWorm1();
};
};
};
}});
addActivator("worm2", worm2, {sprite:worm2, onClick:function (){
if (ifThis("onBottom")){
if (((inventory.hasAny(["egg1", "egg2"])) && (ifNotThis("worm2Off")))){
if (ifThis("worm1Off")){
bugCloseHole2();
} else {
bugDieByWorm1();
};
} else {
if (ifNotThis("worm2Off")){
bugDieByWorm2();
};
};
};
}});
addActivator("evilEgg", evilEgg, {sprite:evilEgg, onClick:function (){
if (ifThis("onBottom")){
bugDieByCaterpillar();
};
}});
addActivator("boneLadder", boneLadder, {sprite:boneLadder, onClick:function (){
if (ifThis("onBottom")){
bugRideBugBear();
};
}});
bugSpeed = 128;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("counterfoil1")) && ((counterfoil1.visible == true)))){
restartHintTimer();
counterfoil1.filters = [glowFilter];
return;
};
if (((getChildByName("egg1")) && ((egg1.visible == true)))){
restartHintTimer();
egg1.filters = [glowFilter];
return;
};
if (((getChildByName("egg2")) && ((egg2.visible == true)))){
restartHintTimer();
egg2.filters = [glowFilter];
return;
};
if (((getChildByName("rope2")) && ((rope2.visible == true)))){
restartHintTimer();
rope2.filters = [glowFilter];
return;
};
if (((getChildByName("bone1")) && ((bone1.visible == true)))){
restartHintTimer();
bone1.filters = [glowFilter];
return;
};
if (((((getChildByName("worm1")) && (ifNotThis("worm1Off")))) && (inventory.hasAny(["egg1", "egg2"])))){
restartHintTimer();
worm1.filters = [glowFilter];
return;
};
if (((((getChildByName("worm2")) && (ifNotThis("worm2Off")))) && (inventory.hasAny(["egg1", "egg2"])))){
restartHintTimer();
worm2.filters = [glowFilter];
return;
};
if (((getChildByName("stickLong3")) && ((stickLong3.visible == true)))){
restartHintTimer();
stickLong3.filters = [glowFilter];
return;
};
if (((getChildByName("counterfoil2")) && ((counterfoil2.visible == true)))){
restartHintTimer();
counterfoil2.filters = [glowFilter];
return;
};
if (((getChildByName("counterfoil3")) && ((counterfoil3.visible == true)))){
restartHintTimer();
counterfoil3.filters = [glowFilter];
return;
};
if (((getChildByName("bone2")) && ((bone2.visible == true)))){
restartHintTimer();
bone2.filters = [glowFilter];
return;
};
if (((getChildByName("bone3")) && ((bone3.visible == true)))){
restartHintTimer();
bone3.filters = [glowFilter];
return;
};
if (((getChildByName("bone4")) && ((bone4.visible == true)))){
restartHintTimer();
bone4.filters = [glowFilter];
return;
};
if (boneLadder.visible == false){
restartHintTimer();
h$_throwBones.visible = true;
return;
};
if (((getChildByName("boneLadder")) && ((boneLadder.visible == true)))){
restartHintTimer();
boneLadder.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugThrowBones():void{
if (((((!(bug)) || (!(a$_throwBones)))) || (!(a$_throwBones.visible)))){
trace("[X] Script Animation: 'throwBones' is impossible.");
return;
};
action = false;
if (bug.x <= a$_throwBones.x){
dirX = -54;
} else {
dirX = 150;
};
a$_throwBones.visible = false;
bug.walkTo((a$_throwBones.x + dirX));
motionTo(bug, (a$_throwBones.x + dirX), 430, 1, function (){
a$_throwBones.visible = false;
inventory.removeItem("bone1");
inventory.removeItem("bone2");
inventory.removeItem("bone3");
inventory.removeItem("bone4");
bug.playAnim("throwBones", function (){
if (bug.x <= a$_throwBones.x){
boneLadder.scaleX = -1;
};
boneLadder.visible = true;
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugTakeEgg1():void{
if (((((!(bug)) || (!(egg1)))) || (!(egg1.visible)))){
trace("[X] Script Animation: 'takeEgg1' is impossible.");
return;
};
action = false;
if (bug.x <= egg1.x){
dirX = -20;
} else {
dirX = 0;
};
bug.walkTo((egg1.x + dirX));
motionTo(bug, (egg1.x + dirX), 430, 1, function (){
bug.pickUpItem("egg1", egg1, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugTakeEgg2():void{
if (((((!(bug)) || (!(egg2)))) || (!(egg2.visible)))){
trace("[X] Script Animation: 'takeEgg2' is impossible.");
return;
};
action = false;
if (bug.x <= egg2.x){
dirX = -30;
} else {
dirX = 0;
};
bug.walkTo((egg2.x + dirX));
motionTo(bug, (egg2.x + dirX), 430, 1, function (){
bug.pickUpItem("egg2", egg2, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugTakeRope():void{
if (((((!(bug)) || (!(rope2)))) || (!(rope2.visible)))){
trace("[X] Script Animation: 'takeRope' is impossible.");
return;
};
action = false;
if (bug.x <= rope2.x){
dirX = 50;
} else {
dirX = 50;
};
a$_rope2.visible = false;
bug.walkTo((rope2.x + dirX));
motionTo(bug, (rope2.x + dirX), 430, 1, function (){
bug.takeItem("rope", rope2, function (){
if (((inventory.hasAll(["rope", "stickLong"])) && (inventory.hasAny(["bone1", "bone2", "bone3", "bone4"])))){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugDieByCaterpillar():void{
if (!bug){
trace("[X] Script Animation: 'dieByCaterpillar' is impossible.");
return;
};
action = false;
if (bug.x <= evilEgg.x){
dirX = 120;
} else {
dirX = 120;
};
bug.walkTo((evilEgg.x + dirX));
motionTo(bug, (evilEgg.x + dirX), 430, 1, function (){
bug.turnOn("left");
bug.playAnim("dieByCaterpillar", lose);
evilEgg.gotoAndPlay("_attack");
}, bugSpeed);
}
public function bugRideBugBear():void{
if (!bug){
trace("[X] Script Animation: 'rideBugBear' is impossible.");
return;
};
action = false;
if (bug.x <= boneLadder.x){
dirX = 0;
} else {
dirX = 10;
};
bug.walkTo((boneLadder.x + dirX));
motionTo(bug, (boneLadder.x + dirX), 430, 1, function (){
bug.playAnim("crawl");
motionTo(bug, (boneLadder.x + dirX), 210, 1, function (){
bug.walkTo((bug.x - 120));
motionTo(bug, (bug.x - 120), 205, 1, function (){
bug.gotoAndStop("none");
bug.visible = false;
if (inventory.hasAll(["bridle", "bait"])){
inventory.removeItem("bait");
inventory.removeItem("bridle");
bugBear.gotoAndStop(4);
} else {
bugBear.gotoAndStop(3);
};
}, bugSpeed);
}, bugSpeed);
}, bugSpeed);
}
public function bugMakeBridle():void{
makeItem("bridle", ["counterfoil1", "counterfoil2", "counterfoil3"], 0, "bridleMade");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugCrawlDown():void{
if (!bug){
trace("[X] Script Animation: 'crawlDown' is impossible.");
return;
};
action = false;
if (bug.x <= counterfoilBig.x){
dirX = 0;
} else {
dirX = 20;
};
bug.walkTo((counterfoilBig.x + dirX));
motionTo(bug, (counterfoilBig.x + dirX), 175, 1, function (){
bug.playAnim("crawl", function (){
setupEvent("onBottom", true);
bug.wait();
action = true;
});
motionTo(bug, bug.x, 430, 1, function (){
bug.anim.gotoAndPlay("_jumpDown");
}, bugSpeed);
}, bugSpeed);
}
public function bugTakeBone1():void{
if (((((!(bug)) || (!(bone1)))) || (!(bone1.visible)))){
trace("[X] Script Animation: 'takeBone1' is impossible.");
return;
};
action = false;
if (bug.x <= bone1.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((bone1.x + dirX));
motionTo(bug, (bone1.x + dirX), 430, 1, function (){
bug.pickUpItem("bone1", bone1, function (){
if (inventory.hasAll(["rope", "stickLong"])){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeBone3():void{
if (((((!(bug)) || (!(bone3)))) || (!(bone3.visible)))){
trace("[X] Script Animation: 'takeBone3' is impossible.");
return;
};
action = false;
if (bug.x <= bone3.x){
dirX = 0;
} else {
dirX = 10;
};
bug.walkTo((bone3.x + dirX));
motionTo(bug, (bone3.x + dirX), 430, 1, function (){
bug.pickUpItem("bone3", bone3, function (){
if (inventory.hasAll(["rope", "stickLong"])){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeBone4():void{
if (((((!(bug)) || (!(bone4)))) || (!(bone4.visible)))){
trace("[X] Script Animation: 'takeBone4' is impossible.");
return;
};
action = false;
if (bug.x <= bone4.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((bone4.x + dirX));
motionTo(bug, (bone4.x + dirX), 430, 1, function (){
bug.takeItem("bone4", bone4, function (){
if (inventory.hasAll(["rope", "stickLong"])){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeBone2():void{
if (((((!(bug)) || (!(bone2)))) || (!(bone2.visible)))){
trace("[X] Script Animation: 'takeBone2' is impossible.");
return;
};
action = false;
if (bug.x <= bone2.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((bone2.x + dirX));
motionTo(bug, (bone2.x + dirX), 430, 1, function (){
bug.pickUpItem("bone2", bone2, function (){
if (inventory.hasAll(["rope", "stickLong"])){
bugMakeBait();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugCloseHole1():void{
if (!bug){
trace("[X] Script Animation: 'closeHole1' is impossible.");
return;
};
action = false;
if (bug.x <= worm1.x){
dirX = -80;
} else {
dirX = 20;
};
callActivator("worm1").deactivate();
bug.walkTo((worm1.x + dirX));
motionTo(bug, (worm1.x + dirX), 430, 1, function (){
var egg:Item;
egg = inventory.getAny(["egg1", "egg2"]);
inventory.removeItem(egg.name);
bug.playAnim("closeHole", function (){
worm1.gotoAndPlay("cv_died");
causeEvent("worm1Off");
});
}, bugSpeed);
}
public function bugCloseHole2():void{
if (!bug){
trace("[X] Script Animation: 'closeHole2' is impossible.");
return;
};
action = false;
if (bug.x <= worm2.x){
dirX = 0;
} else {
dirX = 100;
};
callActivator("worm2").deactivate();
bug.walkTo((worm2.x + dirX));
motionTo(bug, (worm2.x + dirX), 430, 1, function (){
var egg:Item;
egg = inventory.getAny(["egg1", "egg2"]);
inventory.removeItem(egg.name);
bug.playAnim("closeHole", function (){
worm2.gotoAndPlay("cv_died");
causeEvent("worm2Off");
});
}, bugSpeed);
}
public function bugTakeCounterfoil1():void{
if (((((!(bug)) || (!(counterfoil1)))) || (!(counterfoil1.visible)))){
trace("[X] Script Animation: 'takeCounterfoil1' is impossible.");
return;
};
action = false;
if (bug.x <= counterfoil1.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((counterfoil1.x + dirX));
motionTo(bug, (counterfoil1.x + dirX), 175, 1, function (){
bug.takeItem("counterfoil1", counterfoil1, function (){
if (inventory.hasAll(["counterfoil1", "counterfoil2", "counterfoil3"])){
bugMakeBridle();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeCounterfoil2():void{
if (((((!(bug)) || (!(counterfoil2)))) || (!(counterfoil2.visible)))){
trace("[X] Script Animation: 'takeCounterfoil2' is impossible.");
return;
};
action = false;
if (bug.x <= counterfoil2.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((counterfoil2.x + dirX));
motionTo(bug, (counterfoil2.x + dirX), 430, 1, function (){
bug.takeItem("counterfoil2", counterfoil2, function (){
if (inventory.hasAll(["counterfoil1", "counterfoil2", "counterfoil3"])){
bugMakeBridle();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeCounterfoil3():void{
if (((((!(bug)) || (!(counterfoil3)))) || (!(counterfoil3.visible)))){
trace("[X] Script Animation: 'takeCounterfoil3' is impossible.");
return;
};
action = false;
if (bug.x <= counterfoil3.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((counterfoil3.x + dirX));
motionTo(bug, (counterfoil3.x + dirX), 430, 1, function (){
bug.takeItem("counterfoil3", counterfoil3, function (){
if (inventory.hasAll(["counterfoil1", "counterfoil2", "counterfoil3"])){
bugMakeBridle();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugDieByWorm1():void{
if (!bug){
trace("[X] Script Animation: 'dieByWorm1' is impossible.");
return;
};
action = false;
if (bug.x <= worm1.x){
dirX = 0;
} else {
dirX = -120;
};
bug.walkTo((worm1.x + dirX));
motionTo(bug, (worm1.x + dirX), 430, 1, function (){
bug.playAnim("dieByCaterpillar", lose);
worm1.gotoAndPlay("cv_eat");
}, bugSpeed);
}
public function bugDieByWorm2():void{
if (!bug){
trace("[X] Script Animation: 'dieByWorm2' is impossible.");
return;
};
action = false;
if (bug.x <= worm2.x){
dirX = 0;
} else {
dirX = 120;
};
bug.walkTo((worm2.x + dirX));
motionTo(bug, (worm2.x + dirX), 430, 1, function (){
bug.playAnim("dieByCaterpillar", lose);
worm2.gotoAndPlay("cv_eat");
}, bugSpeed);
}
public function bugMakeBait():void{
var bone:Item;
bone = inventory.getAny(["bone1", "bone2", "bone3", "bone4"]);
makeItem("bait", ["rope", "stickLong", bone.name], 0, "baitMade");
extCall = function (){
bug.wait();
action = true;
};
}
}
}//package
Section 172
//Episode_08 (Episode_08)
package {
import flash.filters.*;
public dynamic class Episode_08 extends Episode {
public var dirX:Number;
public var dirY:Number;
public var bugSpeed:Number;
public var glowFilter:GlowFilter;
public function Episode_08(){
addFrameScript(0, frame1);
}
public function bugUseParaglider():void{
if (!bug){
trace("[X] Script Animation: 'useParaglider' is impossible.");
return;
};
action = false;
if (bug.x <= 466.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((466.6 + dirX));
motionTo(bug, (466.6 + dirX), 168.7, 1, function (){
bug.turnOn("left");
inventory.removeItem("paraglider");
bug.playAnim("fly2");
causeEvent("paragliderUsed");
motionTo(bug, 290.6, 192.7, 1, function (){
bug.wait();
action = true;
}, bugSpeed);
}, bugSpeed);
}
public function bugDieFallDown():void{
if (!bug){
trace("[X] Script Animation: 'dieFallDown' is impossible.");
return;
};
action = false;
if (bug.x <= 466.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((466.6 + dirX));
motionTo(bug, (466.6 + dirX), 168.7, 1, function (){
bug.turnOn("left");
bug.playAnim("dieFallDown", lose);
}, bugSpeed);
}
function frame1(){
if (root){
bugGoodbye.gotoAndStop(1);
bugGoodbye.visible = false;
firebush.gotoAndStop(1);
lotOfLight.visible = false;
hintFillTime = 30;
hintIdleTime = 30;
initialize = function (){
bug.startIdleTimer();
};
registerItem("petal", Item_Petal);
registerItem("stamen", Item_Stamen);
registerItem("rope", Item_Web);
registerItem("paraglider", Item_Paraglider_anim);
registerItem("wdrop", Item_WDrop);
registerItem("lens", Item_Lens_anim);
registerItem("tendril", Item_Tendril);
registerEvent("paragliderMade");
registerEvent("paragliderUsed");
registerEvent("tendrilUsed");
registerEvent("lensMade");
registerEvent("lensUsed");
addActivator("petal", petal_1, {sprite:petal_1, onClick:function (){
bugTakePetal();
}});
addActivator("stamen", a$_stamen, {sprite:stamen, onClick:function (){
if (((ifNotThis("paragliderUsed")) && (ifNotThis("tendrilUsed")))){
bugTakeStamen();
};
}});
addActivator("rope", a$_rope, {sprite:rope, onClick:function (){
bugTakeRope();
}});
addActivator("wdrop", wdrop, {sprite:wdrop, onClick:function (){
if (ifThis("tendrilUsed")){
bugTakeWDrop();
};
}});
addActivator("tendril", a$_tendril, {sprite:tendril, onClick:function (){
if (ifThis("paragliderUsed")){
bugTakeTendril();
};
}});
addActivator("flower2", flower_2, {sprite:flower_2, onClick:function (){
if (((ifNotThis("paragliderUsed")) && (ifNotThis("tendrilUsed")))){
if (inventory.hasItem("paraglider")){
bugUseParaglider();
} else {
bugDieFallDown();
};
};
}});
addActivator("bluebell", bluebell, {sprite:bluebell, onClick:function (){
if (inventory.hasItem("tendril")){
bugUseTendril();
} else {
if (ifThis("paragliderUsed")){
bugDieFallDown2();
};
};
}});
addActivator("light", light, {sprite:light, onClick:function (){
if (ifThis("tendrilUsed")){
if (ifThis("lensMade")){
bugUseLens();
} else {
if (inventory.hasItem("wdrop")){
bugDieBySunRays();
};
};
};
}});
bugSpeed = 128;
showHint = function (){
glowFilter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, false);
if (((getChildByName("stamen")) && ((stamen.visible == true)))){
restartHintTimer();
stamen.filters = [glowFilter];
return;
};
if (((getChildByName("petal_1")) && ((petal_1.visible == true)))){
restartHintTimer();
petal_1.filters = [glowFilter];
return;
};
if (((getChildByName("rope")) && ((rope.visible == true)))){
restartHintTimer();
rope.filters = [glowFilter];
return;
};
if (((getChildByName("flower_2")) && (ifNotThis("paragliderUsed")))){
restartHintTimer();
flower_2.filters = [glowFilter];
return;
};
if (((getChildByName("tendril")) && ((tendril.visible == true)))){
restartHintTimer();
tendril.filters = [glowFilter];
return;
};
if (((getChildByName("bluebell")) && (ifNotThis("tendrilUsed")))){
restartHintTimer();
bluebell.filters = [glowFilter];
return;
};
if (((getChildByName("wdrop")) && ((wdrop.visible == true)))){
restartHintTimer();
wdrop.filters = [glowFilter];
return;
};
if (((getChildByName("light")) && (ifNotThis("lensUsed")))){
restartHintTimer();
light.filters = [glowFilter];
return;
};
};
state = "READY";
Tracer.report("[$]", "EPISODE_READY");
if (waitForReady){
this.start();
};
};
}
public function bugTakeRope():void{
if (((((!(bug)) || (!(rope)))) || (!(rope.visible)))){
trace("[X] Script Animation: 'takeRope' is impossible.");
return;
};
action = false;
a$_rope.visible = false;
if (bug.x <= rope.x){
dirX = 0;
} else {
dirX = 50;
};
bug.walkTo((rope.x + dirX));
motionTo(bug, (rope.x + dirX), 185, 1, function (){
bug.takeItem("rope", rope, function (){
if (inventory.hasAll(["petal", "rope"])){
bugMakeParaglider();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugTakeStamen():void{
if (((((!(bug)) || (!(stamen)))) || (!(stamen.visible)))){
trace("[X] Script Animation: 'takeStamen' is impossible.");
return;
};
action = false;
a$_stamen.visible = false;
if (bug.x <= stamen.x){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((stamen.x + dirX));
motionTo(bug, (stamen.x + dirX), 185, 1, function (){
bug.pickUpItem("stamen", stamen, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugDieFallDown2():void{
if (!bug){
trace("[X] Script Animation: 'dieFallDown2' is impossible.");
return;
};
action = false;
if (bug.x <= 222){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((222 + dirX));
motionTo(bug, (222 + dirX), 168.7, 1, function (){
bug.turnOn("left");
bug.playAnim("dieFallDown", lose);
}, bugSpeed);
}
public function bugTakePetal():void{
if (((((!(bug)) || (!(petal_1)))) || (!(petal_1.visible)))){
trace("[X] Script Animation: 'takePetal' is impossible.");
return;
};
action = false;
if (bug.x <= petal_1.x){
dirX = 0;
} else {
dirX = 20;
};
bug.walkTo((petal_1.x + dirX));
motionTo(bug, (petal_1.x + dirX), 185, 1, function (){
bug.pickUpItem("petal", petal_1, function (){
if (inventory.hasAll(["petal", "rope"])){
bugMakeParaglider();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
public function bugMakeParaglider():void{
makeItem("paraglider", ["petal", "rope"], 0, "paragliderMade");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugDieBySunRays():void{
if (!bug){
trace("[X] Script Animation: 'dieBySunRays' is impossible.");
return;
};
action = false;
if (bug.x <= 53.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((53.6 + dirX));
motionTo(bug, (73.6 + dirX), 163.7, 1, function (){
bug.turnOn("right");
bug.playAnim("dieBySunRays", lose);
}, bugSpeed);
}
public function bugUseTendril():void{
if (!bug){
trace("[X] Script Animation: 'useTendril' is impossible.");
return;
};
action = false;
if (bug.x <= 290){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((290 + dirX));
motionTo(bug, (290 + dirX), 190, 1, function (){
bug.turnOn("left");
inventory.removeItem("tendril");
causeEvent("tendrilUsed");
bug.playAnim("useTendril");
}, bugSpeed);
}
public function bugUseLens():void{
if (!bug){
trace("[X] Script Animation: 'useLens' is impossible.");
return;
};
action = false;
if (bug.x <= 53.6){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((53.6 + dirX));
motionTo(bug, (73.6 + dirX), 163.7, 1, function (){
bug.turnOn("right");
inventory.removeItem("lens");
causeEvent("lensUsed");
bug.playAnim("useLens", function (){
firebush.gotoAndPlay(2);
});
}, bugSpeed);
}
public function bugTakeTendril():void{
if (((((!(bug)) || (!(tendril)))) || (!(tendril.visible)))){
trace("[X] Script Animation: 'takeTendril' is impossible.");
return;
};
action = false;
a$_tendril.visible = false;
if (bug.x <= tendril.x){
dirX = 0;
} else {
dirX = 100;
};
bug.walkTo((tendril.x + dirX));
motionTo(bug, (tendril.x + dirX), 192.3, 1, function (){
bug.pickUpItem("tendril", tendril, function (){
bug.wait();
action = true;
});
}, bugSpeed);
}
public function bugMakeLens():void{
makeItem("lens", ["stamen", "wdrop"], 0, "lensMade");
extCall = function (){
bug.wait();
action = true;
};
}
public function bugRideFlower():void{
if (!bug){
trace("[X] Script Animation: 'useLens' is impossible.");
return;
};
action = false;
if (bug.x <= 165){
dirX = 0;
} else {
dirX = 0;
};
bug.walkTo((165 + dirX));
motionTo(bug, (165 + dirX), 160, 1, function (){
bug.gotoAndStop("none");
bug.visible = false;
bluebell.gotoAndPlay("_rideFlower");
}, bugSpeed);
}
public function bugTakeWDrop():void{
if (((((!(bug)) || (!(wdrop)))) || (!(wdrop.visible)))){
trace("[X] Script Animation: 'takeWDrop' is impossible.");
return;
};
action = false;
if (bug.x <= wdrop.x){
dirX = -10;
} else {
dirX = 0;
};
bug.walkTo((wdrop.x + dirX));
motionTo(bug, (wdrop.x + dirX), 163.7, 1, function (){
bug.pickUpItem("wdrop", wdrop, function (){
if (inventory.hasItem("stamen")){
bugMakeLens();
} else {
bug.wait();
action = true;
};
});
}, bugSpeed);
}
}
}//package
Section 173
//FlyingStone (FlyingStone)
package {
import flash.display.*;
public dynamic class FlyingStone extends MovieClip {
}
}//package
Section 174
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Game extends MovieClip {
public var story:MovieClip;
private var epiloguesRegistry:Object;
public var prologues:MovieClip;
public var banner:MovieClip;
public var totalTime:Number;// = 0
private var episodesRegistry:Object;
private var prologuesRegistry:Object;
private var currentEpisode:Episode;
public var hintButton:MovieClip;
private var episodesData:Object;
private var currentEpisodeIndex:uint;
public var totalScore:Number;// = 0
private var episodesOrder:Array;
public var logo:MovieClip;
public var epilogues:MovieClip;
public var muteButton:MovieClip;
private var currentEpisodeName:String;
public static const screen_w:Number = 640;
public static const screen_h:Number = 480;
public static var inst:MovieClip;
public static var sitelock:Boolean = false;
public static var gamemode:String = "normal";
public static var activeWindow = null;
public function Game(){
totalScore = 0;
totalTime = 0;
super();
addFrameScript(0, frame1);
Game.inst = this;
init();
if (prologues){
prologues.visible = false;
};
if (epilogues){
epilogues.visible = false;
};
Game.showInstructionsWindow();
}
public function registerEpisode(_arg1:String, _arg2:uint, _arg3, _arg4:Object=null):Boolean{
if (!episodesRegistry[_arg1]){
if (!episodesOrder[_arg2]){
episodesRegistry[_arg1] = _arg2;
episodesOrder[_arg2] = _arg1;
episodesData[_arg1] = new Object();
episodesData[_arg1].eClass = _arg3;
if (_arg4){
episodesData[_arg1].prologue = ((_arg4.prologue is String)) ? _arg4.prologue : "";
episodesData[_arg1].epilogue = ((_arg4.epilogue is String)) ? _arg4.epilogue : "";
} else {
episodesData[_arg1].prologue = "";
episodesData[_arg1].epilogue = "";
};
return (true);
} else {
Tracer.report("[X]", "Wrong order index.", "Game");
};
} else {
Tracer.report("[X]", "Episode already exists.", "Game");
};
return (false);
}
public function getEpisodeIndex(_arg1:String=null):uint{
if (((_arg1) && (!((_arg1 == ""))))){
if (episodesRegistry[_arg1]){
return (episodesRegistry[_arg1]);
};
} else {
if (((currentEpisode) && (currentEpisodeIndex))){
return (currentEpisodeIndex);
};
};
Tracer.report("[X]", "Wrong episode's name.", "Game");
return (NaN);
}
private function init():void{
episodesOrder = new Array();
episodesRegistry = new Object();
episodesData = new Object();
currentEpisodeIndex = 1;
prologuesRegistry = new Object();
epiloguesRegistry = new Object();
totalScore = 0;
}
public function closeEpisode():void{
terminateEpisode();
}
public function hideEpilogue():void{
epilogues.visible = false;
if (epilogues.images){
epilogues.images.gotoAndStop(1);
};
}
public function registerPrologue(_arg1:String, _arg2):Boolean{
if (!prologuesRegistry[_arg1]){
if ((((_arg2 is String)) || ((_arg2 is uint)))){
prologuesRegistry[_arg1] = _arg2;
return (true);
};
Tracer.report("[X]", "Frame must be 'String' or 'uint'.", "Game");
} else {
Tracer.report("[X]", "Prologue already exists.", "Game");
};
return (false);
}
public function replayEpisode(_arg1:String=null):void{
var _local2:*;
var _local3:*;
if (_arg1){
if (episodesRegistry[_arg1]){
closeActiveWindow();
_local3 = currentEpisodeIndex;
currentEpisodeIndex = episodesRegistry[_arg1];
if (_local3 != currentEpisodeIndex){
terminateEpisode();
createEpisode();
startCurrentEpisode();
} else {
if (story.numChildren > 0){
currentEpisode = (story.getChildAt(0) as Episode);
if (currentEpisode.state != "READY"){
recreateEpisode();
};
} else {
createEpisode();
};
startCurrentEpisode();
};
} else {
Tracer.report("[X]", "Wrong episode's name.", "Game");
};
} else {
if (currentEpisode){
closeActiveWindow();
if (currentEpisode.state != "READY"){
recreateEpisode();
};
startCurrentEpisode();
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
};
}
public function isNextEpisode():Boolean{
if ((currentEpisodeIndex + 1) >= episodesOrder.length){
return (false);
};
if (episodesOrder[(currentEpisodeIndex + 1)]){
return (true);
};
return (false);
}
public function unregisterEpisode(_arg1:String):Boolean{
if (!episodesRegistry[_arg1]){
episodesOrder[episodesRegistry[_arg1]] = null;
episodesRegistry[_arg1] = null;
delete episodesRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Episode isn't registered.", "Game");
return (false);
}
public function playEpisode(_arg1:String=null):void{
var _local2:String;
var _local3:*;
if (_arg1){
if (episodesRegistry[_arg1]){
closeActiveWindow();
_local3 = currentEpisodeIndex;
currentEpisodeIndex = episodesRegistry[_arg1];
if (_local3 != currentEpisodeIndex){
terminateEpisode();
createEpisode();
establishEpisode(_arg1);
} else {
if (story.numChildren > 0){
currentEpisode = (story.getChildAt(0) as Episode);
if (currentEpisode.state != "READY"){
recreateEpisode();
};
} else {
createEpisode();
};
establishEpisode(_arg1);
};
} else {
Tracer.report("[X]", "Wrong episode's name.", "Game");
};
} else {
if (currentEpisode){
closeActiveWindow();
if (currentEpisode.state != "READY"){
recreateEpisode();
};
startCurrentEpisode();
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
};
}
public function getCurrentEpisode():Episode{
if (currentEpisode){
return (currentEpisode);
};
if (story.numChildren > 0){
currentEpisode = (story.getChildAt(0) as Episode);
return (currentEpisode);
};
return (null);
}
public function disableAction():void{
if (currentEpisode){
currentEpisode.disableAction();
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
}
private function recreateEpisode():void{
var _local1:*;
if (story.numChildren){
if (!currentEpisode){
currentEpisode = (story.getChildAt(0) as Episode);
};
_local1 = Class(getDefinitionByName(getQualifiedClassName(currentEpisode)));
terminateEpisode();
currentEpisode = new (_local1);
story.addChild(currentEpisode);
};
}
public function prevEpisode():void{
var _local1:*;
if (currentEpisode){
if (episodesOrder[(currentEpisodeIndex - 1)]){
closeActiveWindow();
_local1 = episodesOrder[(currentEpisodeIndex - 1)];
currentEpisodeIndex = episodesRegistry[_local1];
terminateEpisode();
createEpisode();
establishEpisode(_local1);
} else {
Tracer.report("[X]", "There isn't prev episode.", "Game");
};
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
}
public function startEpisode():void{
startCurrentEpisode();
}
private function createEpisode():void{
var _local1:*;
_local1 = episodesData[episodesOrder[currentEpisodeIndex]].eClass;
currentEpisode = new (_local1);
story.addChild(currentEpisode);
}
public function showPrologue(_arg1:String):void{
if (prologuesRegistry[_arg1]){
if (prologues.currentFrame != prologuesRegistry[_arg1]){
prologues.images.ready = false;
prologues.gotoAndStop(prologuesRegistry[_arg1]);
playPrologue();
} else {
prologues.images.gotoAndPlay(1);
};
prologues.visible = true;
} else {
Tracer.report("[X]", "Prologue isn't defined.", "Game");
};
}
private function terminateEpisode():void{
if (story.numChildren){
if (!currentEpisode){
currentEpisode = (story.getChildAt(0) as Episode);
};
currentEpisode.finish();
currentEpisode.erase();
currentEpisode.state = "STOPPED";
story.removeChild(currentEpisode);
currentEpisode = null;
};
}
public function registerEpilogue(_arg1:String, _arg2):Boolean{
if (!epiloguesRegistry[_arg1]){
if ((((_arg2 is String)) || ((_arg2 is uint)))){
epiloguesRegistry[_arg1] = _arg2;
return (true);
};
Tracer.report("[X]", "Frame must be 'String' or 'uint'.", "Game");
} else {
Tracer.report("[X]", "Epilogue already exists.", "Game");
};
return (false);
}
private function startCurrentEpisode():void{
if (((currentEpisode) && ((currentEpisode.state == "READY")))){
currentEpisode.start();
} else {
addEventListener(Event.ENTER_FRAME, startCurrentEpisodeIfExist);
};
}
private function establishEpisode(_arg1:String):void{
var _local2:*;
hideEpilogue();
hidePrologue();
_local2 = episodesData[_arg1].prologue;
if (prologuesRegistry[_local2] != null){
showPrologue(_local2);
} else {
startCurrentEpisode();
};
}
public function nextEpisode():void{
var _local1:*;
if (currentEpisode){
if (episodesOrder[(currentEpisodeIndex + 1)]){
closeActiveWindow();
_local1 = episodesOrder[(currentEpisodeIndex + 1)];
currentEpisodeIndex = episodesRegistry[_local1];
terminateEpisode();
createEpisode();
establishEpisode(_local1);
} else {
Tracer.report("[X]", "There isn't next episode.", "Game");
};
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
}
public function showEpilogue(_arg1:String):void{
if (epiloguesRegistry[_arg1]){
if (epilogues.currentFrame != epiloguesRegistry[_arg1]){
epilogues.images.ready = false;
epilogues.gotoAndStop(epiloguesRegistry[_arg1]);
playEpilogue();
} else {
epilogues.images.gotoAndPlay(1);
};
epilogues.visible = true;
} else {
Tracer.report("[X]", "Epilogue isn't defined.", "Game");
};
}
function frame1(){
story.visible = false;
hintButton.visible = false;
banner.visible = false;
registerEpisode("first", 1, Episode_01, {prologue:"firstStory"});
registerEpisode("second", 2, Episode_02);
registerEpisode("third", 3, Episode_03);
registerEpisode("fourth", 4, Episode_04);
registerEpisode("fifth", 5, Episode_05);
registerEpisode("sixth", 6, Episode_06);
registerEpisode("seventh", 7, Episode_07);
registerEpisode("eighth", 8, Episode_08);
registerPrologue("firstStory", 1);
}
public function enableAction():void{
if (currentEpisode){
currentEpisode.enableAction();
} else {
Tracer.report("[X]", "Current episode isn't defined.", "Game");
};
}
private function playPrologue():void{
if (((prologues.images) && (prologues.images.ready))){
prologues.images.gotoAndPlay(2);
} else {
addEventListener(Event.ENTER_FRAME, playPrologueIfExist);
};
}
private function playEpilogueIfExist(_arg1:Event):void{
if (((epilogues.images) && (epilogues.images.ready))){
_arg1.target.removeEventListener(Event.ENTER_FRAME, playEpilogueIfExist);
epilogues.images.gotoAndPlay(2);
};
}
public function unregisterPrologue(_arg1:String):Boolean{
if (prologuesRegistry[_arg1] != null){
prologuesRegistry[_arg1] = null;
delete prologuesRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Prologue isn't registered.", "Game");
return (false);
}
public function isPrevEpisode():Boolean{
if ((currentEpisodeIndex - 1) < 0){
return (false);
};
if (episodesOrder[(currentEpisodeIndex - 1)]){
return (true);
};
return (false);
}
public function hidePrologue():void{
prologues.visible = false;
if (prologues.images){
prologues.images.gotoAndStop(1);
};
}
private function playEpilogue():void{
if (((epilogues.images) && (epilogues.images.ready))){
epilogues.images.gotoAndPlay(2);
} else {
addEventListener(Event.ENTER_FRAME, playEpilogueIfExist);
};
}
private function playPrologueIfExist(_arg1:Event):void{
if (((prologues.images) && (prologues.images.ready))){
_arg1.target.removeEventListener(Event.ENTER_FRAME, playPrologueIfExist);
prologues.images.gotoAndPlay(2);
};
}
public function unregisterEpilogue(_arg1:String):Boolean{
if (epiloguesRegistry[_arg1] != null){
epiloguesRegistry[_arg1] = null;
delete epiloguesRegistry[_arg1];
return (true);
};
Tracer.report("[X]", "Epilogue isn't registered.", "Game");
return (false);
}
private function startCurrentEpisodeIfExist(_arg1:Event):void{
var _local2:Episode;
if (story.numChildren > 0){
_local2 = (story.getChildAt(0) as Episode);
if (((_local2) && ((_local2.state == "READY")))){
_arg1.target.removeEventListener(Event.ENTER_FRAME, startCurrentEpisodeIfExist);
currentEpisode = _local2;
currentEpisode.start();
};
};
}
public function getEpisodeName(_arg1:uint=0):String{
if (_arg1 > 0){
if (episodesOrder[_arg1]){
return (episodesOrder[_arg1]);
};
} else {
if (((currentEpisode) && (currentEpisodeIndex))){
return (episodesOrder[currentEpisodeIndex]);
};
};
Tracer.report("[X]", "Wrong episode's index.", "Game");
return ("");
}
public static function showYouAreHistoryWindow():void{
var _local1:*;
closeActiveWindow();
_local1 = new WindowYouAreHistory();
_local1.x = ((Game.inst.stage.stageWidth - _local1.width) / 2);
_local1.y = 100;
Game.inst.addChild(_local1);
Game.activeWindow = _local1;
}
public static function showFinalWindow():void{
var _local1:*;
closeActiveWindow();
_local1 = new WindowFinal();
_local1.x = ((Game.inst.stage.stageWidth - _local1.width) / 2);
_local1.y = 50;
Game.inst.addChild(_local1);
Game.activeWindow = _local1;
}
public static function closeActiveWindow():void{
if (Game.activeWindow){
Game.activeWindow.close();
};
}
public static function showInstructionsWindow():void{
var _local1:*;
closeActiveWindow();
_local1 = new WindowInstructions();
_local1.x = ((Game.inst.stage.stageWidth - _local1.width) / 2);
_local1.y = ((Game.inst.stage.stageHeight - _local1.height) / 2);
Game.inst.addChild(_local1);
Game.activeWindow = _local1;
}
public static function showNextLevelWindow():void{
var _local1:*;
closeActiveWindow();
_local1 = new WindowNextLevel();
_local1.x = ((Game.inst.stage.stageWidth - _local1.width) / 2);
_local1.y = 100;
Game.inst.addChild(_local1);
Game.activeWindow = _local1;
}
}
}//package
Section 175
//GameMusic (GameMusic)
package {
import flash.media.*;
public dynamic class GameMusic extends Sound {
}
}//package
Section 176
//Inventory (Inventory)
package {
import flash.events.*;
public class Inventory extends EventDispatcher {
private var items:Object;
private var episode:Episode;
public function Inventory(_arg1:Episode){
this.episode = _arg1;
items = new Object();
}
public function hasNotMoreOf(_arg1:uint, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
var _local5:uint;
if (_arg1 == 0){
return (true);
};
if (_arg1 <= _arg2.length){
_local3 = _arg2.length;
_local4 = 0;
_local5 = 0;
while (_local5 < _local3) {
if (items[_arg2[_local5]]){
_local4++;
};
_local5++;
};
if (_local4 <= _arg1){
return (true);
};
return (false);
//unresolved jump
};
return (true);
}
public function notHasItem(_arg1:String):Boolean{
if (items[_arg1]){
return (false);
};
return (true);
}
public function hasNotLessOf(_arg1:uint, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
var _local5:uint;
if (_arg1 == 0){
return (true);
};
if (_arg1 <= _arg2.length){
_local3 = _arg2.length;
_local4 = 0;
_local5 = 0;
while (_local5 < _local3) {
if (items[_arg2[_local5]]){
_local4++;
};
_local5++;
};
if (_local4 >= _arg1){
return (true);
};
return (false);
//unresolved jump
};
return (false);
}
public function hasNumberOf(_arg1:uint, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
var _local5:uint;
if (_arg1 <= _arg2.length){
_local3 = _arg2.length;
_local4 = 0;
_local5 = 0;
while (_local5 < _local3) {
if (items[_arg2[_local5]]){
_local4++;
};
_local5++;
};
if (_local4 == _arg1){
return (true);
};
return (false);
//unresolved jump
};
return (false);
}
public function addItem(_arg1:String):Boolean{
if (episode.isItem(_arg1)){
if (!items[_arg1]){
items[_arg1] = episode.callItem(_arg1);
Tracer.report("[i]", (("Item '" + _arg1) + "' added."), "Inventory");
return (true);
};
Tracer.report("[X]", "Item already added.", "Inventory");
} else {
Tracer.report("[X]", "Item isn't registered.", "Inventory");
};
return (false);
}
public function notHasAll(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (items[_arg1[_local3]]){
return (false);
};
_local3++;
};
return (true);
}
public function kill():void{
var _local1:*;
for (_local1 in items) {
items[_local1].kill();
items[_local1] = undefined;
delete items[_local1];
};
items = undefined;
episode = undefined;
}
public function makeItem(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local4 = _arg2.length;
_local3 = 0;
while (_local3 < _local4) {
if (!items[_arg2[_local3]]){
return (false);
};
_local3++;
};
if (addItem(_arg1)){
_local3 = 0;
while (_local3 < _local4) {
removeItem(_arg2[_local3]);
_local3++;
};
showItemWindow(_arg1, "You made ");
Tracer.report("[i]", "WindowItem: makeItem().", "Inventory");
return (true);
};
return (false);
}
public function getAny(_arg1:Array):Item{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (items[_arg1[_local3]]){
return (items[_arg1[_local3]]);
};
_local3++;
};
return (null);
}
public function listItems():void{
var _local1:uint;
var _local2:*;
trace("[S] LIST: inventory items:");
_local1 = 0;
for (_local2 in items) {
trace((((" - " + _local2) + " = ") + items[_local2]));
_local1++;
};
trace((" Total number: " + _local1));
}
public function hasItem(_arg1:String):Boolean{
if (items[_arg1]){
return (true);
};
return (false);
}
public function hasAll(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (!items[_arg1[_local3]]){
return (false);
};
_local3++;
};
return (true);
}
public function findItem(_arg1:String):Item{
if (items[_arg1]){
return (items[_arg1]);
};
return (null);
}
private function showItemWindow(_arg1:String, _arg2:String=null):void{
var _local3:Item;
var _local4:*;
var _local5:String;
var _local6:*;
var _local7:*;
var _local8:Number;
_local3 = items[_arg1];
if (Game.activeWindow){
Game.activeWindow.close();
};
_local4 = new WindowItem();
_local5 = _local3.title;
if (_arg2){
};
_local6 = _local3.icon;
_local7 = new (_local6);
if ((((_local7.width > _local4.itemIcon_mc.width)) || ((_local7.height > _local4.itemIcon_mc.height)))){
if (_local7.width >= _local7.height){
_local8 = (_local7.width / _local4.itemIcon_mc.width);
} else {
_local8 = (_local7.height / _local4.itemIcon_mc.height);
};
_local7.width = (_local7.width / _local8);
_local7.height = (_local7.height / _local8);
};
_local7.x = ((_local4.itemIcon_mc.width - _local7.width) / 2);
_local7.y = ((_local4.itemIcon_mc.height - _local7.height) / 2);
_local4.itemIcon_mc.addChild(_local7);
_local4.x = ((Game.inst.stage.stageWidth - _local4.width) / 2);
_local4.y = ((Game.inst.stage.stageHeight - _local4.height) / 2);
Game.inst.addChild(_local4);
Game.activeWindow = _local4;
}
public function hasAny(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (items[_arg1[_local3]]){
return (true);
};
_local3++;
};
return (false);
}
public function removeItem(_arg1:String):Boolean{
if (items[_arg1]){
items[_arg1] = null;
delete items[_arg1];
Tracer.report("[i]", (("Item '" + _arg1) + "' removed."), "Inventory");
return (true);
};
Tracer.report("[X]", "There is no such item.", "Inventory");
return (false);
}
public function takeItem(_arg1:String):Boolean{
if (addItem(_arg1)){
showItemWindow(_arg1);
Tracer.report("[i]", "WindowItem: takeItem().", "Inventory");
return (true);
};
return (false);
}
public function notHasAny(_arg1:Array):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (!items[_arg1[_local3]]){
return (true);
};
_local3++;
};
return (false);
}
}
}//package
Section 177
//Item (Item)
package {
public class Item {
public var name:String;
public var title:String;
public var icon;
public var description:String;
public function Item(_arg1:String, _arg2=null, _arg3:String=null, _arg4:String=null){
this.name = _arg1;
this.icon = _arg2;
this.title = _arg3;
this.description = _arg4;
}
public function kill():void{
name = undefined;
icon = undefined;
title = undefined;
description = undefined;
}
}
}//package
Section 178
//Item_Acorn (Item_Acorn)
package {
import flash.display.*;
public dynamic class Item_Acorn extends MovieClip {
}
}//package
Section 179
//Item_Bait_anim (Item_Bait_anim)
package {
import flash.display.*;
public dynamic class Item_Bait_anim extends MovieClip {
public function Item_Bait_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 180
//Item_Berry (Item_Berry)
package {
import flash.display.*;
public dynamic class Item_Berry extends MovieClip {
}
}//package
Section 181
//Item_Bone (Item_Bone)
package {
import flash.display.*;
public dynamic class Item_Bone extends MovieClip {
}
}//package
Section 182
//Item_Bridge (Item_Bridge)
package {
import flash.display.*;
public dynamic class Item_Bridge extends MovieClip {
}
}//package
Section 183
//Item_Bridge_anim (Item_Bridge_anim)
package {
import flash.display.*;
public dynamic class Item_Bridge_anim extends MovieClip {
public function Item_Bridge_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 184
//Item_Bridle_anim (Item_Bridle_anim)
package {
import flash.display.*;
public dynamic class Item_Bridle_anim extends MovieClip {
public function Item_Bridle_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 185
//Item_Brushwood (Item_Brushwood)
package {
import flash.display.*;
public dynamic class Item_Brushwood extends MovieClip {
}
}//package
Section 186
//Item_Counterfoil (Item_Counterfoil)
package {
import flash.display.*;
public dynamic class Item_Counterfoil extends MovieClip {
}
}//package
Section 187
//Item_Dummy (Item_Dummy)
package {
import flash.display.*;
public dynamic class Item_Dummy extends MovieClip {
}
}//package
Section 188
//Item_Dummy_anim (Item_Dummy_anim)
package {
import flash.display.*;
public dynamic class Item_Dummy_anim extends MovieClip {
public function Item_Dummy_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 189
//Item_Egg (Item_Egg)
package {
import flash.display.*;
public dynamic class Item_Egg extends MovieClip {
public var egg1:MovieClip;
}
}//package
Section 190
//Item_Glass (Item_Glass)
package {
import flash.display.*;
public dynamic class Item_Glass extends MovieClip {
}
}//package
Section 191
//Item_Knot (Item_Knot)
package {
import flash.display.*;
public dynamic class Item_Knot extends MovieClip {
}
}//package
Section 192
//Item_Leaf (Item_Leaf)
package {
import flash.display.*;
public dynamic class Item_Leaf extends MovieClip {
}
}//package
Section 193
//Item_Lens (Item_Lens)
package {
import flash.display.*;
public dynamic class Item_Lens extends MovieClip {
}
}//package
Section 194
//Item_Lens_anim (Item_Lens_anim)
package {
import flash.display.*;
public dynamic class Item_Lens_anim extends MovieClip {
public function Item_Lens_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 195
//Item_Parachute (Item_Parachute)
package {
import flash.display.*;
public dynamic class Item_Parachute extends MovieClip {
}
}//package
Section 196
//Item_Parachute_anim (Item_Parachute_anim)
package {
import flash.display.*;
public dynamic class Item_Parachute_anim extends MovieClip {
public function Item_Parachute_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 197
//Item_Paraglider (Item_Paraglider)
package {
import flash.display.*;
public dynamic class Item_Paraglider extends MovieClip {
}
}//package
Section 198
//Item_Paraglider_anim (Item_Paraglider_anim)
package {
import flash.display.*;
public dynamic class Item_Paraglider_anim extends MovieClip {
public function Item_Paraglider_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 199
//Item_Petal (Item_Petal)
package {
import flash.display.*;
public dynamic class Item_Petal extends MovieClip {
}
}//package
Section 200
//Item_Pin (Item_Pin)
package {
import flash.display.*;
public dynamic class Item_Pin extends MovieClip {
}
}//package
Section 201
//Item_Pitch (Item_Pitch)
package {
import flash.display.*;
public dynamic class Item_Pitch extends MovieClip {
}
}//package
Section 202
//Item_Plant (Item_Plant)
package {
import flash.display.*;
public dynamic class Item_Plant extends MovieClip {
}
}//package
Section 203
//Item_Roof (Item_Roof)
package {
import flash.display.*;
public dynamic class Item_Roof extends MovieClip {
}
}//package
Section 204
//Item_Roof_anim (Item_Roof_anim)
package {
import flash.display.*;
public dynamic class Item_Roof_anim extends MovieClip {
public function Item_Roof_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 205
//Item_Rope (Item_Rope)
package {
import flash.display.*;
public dynamic class Item_Rope extends MovieClip {
}
}//package
Section 206
//Item_Seed (Item_Seed)
package {
import flash.display.*;
public dynamic class Item_Seed extends MovieClip {
}
}//package
Section 207
//Item_Seed2 (Item_Seed2)
package {
import flash.display.*;
public dynamic class Item_Seed2 extends MovieClip {
}
}//package
Section 208
//Item_Stamen (Item_Stamen)
package {
import flash.display.*;
public dynamic class Item_Stamen extends MovieClip {
}
}//package
Section 209
//Item_StickLong (Item_StickLong)
package {
import flash.display.*;
public dynamic class Item_StickLong extends MovieClip {
}
}//package
Section 210
//Item_Stone (Item_Stone)
package {
import flash.display.*;
public dynamic class Item_Stone extends MovieClip {
}
}//package
Section 211
//Item_Tendril (Item_Tendril)
package {
import flash.display.*;
public dynamic class Item_Tendril extends MovieClip {
}
}//package
Section 212
//Item_Thread (Item_Thread)
package {
import flash.display.*;
public dynamic class Item_Thread extends MovieClip {
}
}//package
Section 213
//Item_Tool01 (Item_Tool01)
package {
import flash.display.*;
public dynamic class Item_Tool01 extends MovieClip {
}
}//package
Section 214
//Item_Tool01_anim (Item_Tool01_anim)
package {
import flash.display.*;
public dynamic class Item_Tool01_anim extends MovieClip {
public function Item_Tool01_anim(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
Console.currentEpisode.externalCall();
}
}
}//package
Section 215
//Item_WDrop (Item_WDrop)
package {
import flash.display.*;
public dynamic class Item_WDrop extends MovieClip {
}
}//package
Section 216
//Item_Web (Item_Web)
package {
import flash.display.*;
public dynamic class Item_Web extends MovieClip {
}
}//package
Section 217
//MusicPlayer (MusicPlayer)
package {
import flash.events.*;
import flash.media.*;
public class MusicPlayer {
private var channel:SoundChannel;
private var playing:Boolean;// = false
var musicvol:Number;// = 0.1
private var sound:Sound;
private var mute:Boolean;// = false
public function MusicPlayer(){
musicvol = 0.1;
mute = false;
playing = false;
super();
init();
}
public function musicON(){
channel.soundTransform = new SoundTransform(musicvol);
mute = false;
}
public function musicOFF(){
channel.soundTransform = new SoundTransform(0);
mute = true;
}
private function init(){
}
public function playMusic(_arg1:Sound){
if (!sound){
sound = _arg1;
};
channel = sound.play();
if (!mute){
channel.soundTransform = new SoundTransform(musicvol);
};
channel.addEventListener(Event.SOUND_COMPLETE, _restart);
playing = true;
}
private function _restart(_arg1:Event):void{
if (mute){
channel = sound.play();
channel.soundTransform = new SoundTransform(0);
} else {
channel = sound.play();
channel.soundTransform = new SoundTransform(musicvol);
};
channel.addEventListener(Event.SOUND_COMPLETE, _restart);
playing = true;
}
public function stopMusic(){
channel.stop();
channel.removeEventListener(Event.SOUND_COMPLETE, _restart);
playing = false;
}
public function get isPlaying():Boolean{
return (playing);
}
}
}//package
Section 218
//ScrollBarH (ScrollBarH)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollBarH {
private const SPEED:Number = 8;
private var _mask:Sprite;
private var _track:Sprite;
private var _cont:Sprite;
private var _btnR:Sprite;
private var _thumb:Sprite;
private var _btnL:Sprite;
private var moveDir:String;// = "none"
public function ScrollBarH(_arg1:Sprite, _arg2:Sprite, _arg3:Sprite, _arg4:Sprite, _arg5:Sprite=null, _arg6:Sprite=null){
moveDir = "none";
super();
_cont = _arg1;
_mask = _arg2;
_track = _arg3;
_thumb = _arg4;
_btnL = _arg5;
_btnR = _arg6;
init();
}
private function resizeThumb():void{
var _local1:Number;
if (_cont.width > 0){
_local1 = (_cont.width / _mask.width);
if (_local1 >= 1){
_thumb.width = (_track.width / _local1);
} else {
_thumb.width = _track.width;
};
} else {
_thumb.width = _track.width;
};
}
private function moveThumb(_arg1, _arg2):void{
switch (_arg1){
case "left":
if ((_thumb.x - _arg2) >= _track.x){
_thumb.x = (_thumb.x - _arg2);
} else {
_thumb.x = _track.x;
};
break;
case "right":
if ((_thumb.x + _arg2) <= ((_track.x + _track.width) - _thumb.width)){
_thumb.x = (_thumb.x + _arg2);
} else {
_thumb.x = ((_track.x + _track.width) - _thumb.width);
};
break;
};
}
private function placeThumb(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = _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 dragThumb(_arg1:MouseEvent):void{
_thumb.startDrag(false, new Rectangle(_track.x, _track.y, (_track.width - _thumb.width), 0));
}
private function init():void{
_cont.mask = _mask;
resizeThumb();
_thumb.addEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
_thumb.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
_thumb.addEventListener(Event.ENTER_FRAME, moveCont);
_thumb.stage.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
_track.addEventListener(MouseEvent.CLICK, placeThumb);
_track.addEventListener(Event.ENTER_FRAME, shiftThumb);
if (_btnL){
_btnL.addEventListener(MouseEvent.MOUSE_DOWN, startMoveLeft);
_btnL.addEventListener(MouseEvent.MOUSE_UP, stopMoveLeft);
_btnL.addEventListener(MouseEvent.CLICK, stepLeft);
};
if (_btnR){
_btnR.addEventListener(MouseEvent.MOUSE_DOWN, startMoveRight);
_btnR.addEventListener(MouseEvent.MOUSE_UP, stopMoveRight);
_btnR.addEventListener(MouseEvent.CLICK, stepRight);
};
_track.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
}
private function stopMoveLeft(_arg1:MouseEvent):void{
moveDir = "none";
}
private function stepLeft(_arg1:MouseEvent):void{
moveThumb("left", SPEED);
}
private function scrollThumb(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
moveThumb("left", SPEED);
};
if (_arg1.delta < 0){
moveThumb("right", SPEED);
};
}
private function moveCont(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
resizeThumb();
_local2 = (_cont.width / _track.width);
_local3 = ((_track.x - _thumb.x) * _local2);
_cont.x = _local3;
}
private function dropThumb(_arg1:MouseEvent):void{
_thumb.stopDrag();
}
private function stopMoveRight(_arg1:MouseEvent):void{
moveDir = "none";
}
private function startMoveRight(_arg1:MouseEvent):void{
moveDir = "right";
}
private function stepRight(_arg1:MouseEvent):void{
moveThumb("right", SPEED);
}
private function shiftThumb(_arg1:Event):void{
moveThumb(moveDir, SPEED);
}
private function startMoveLeft(_arg1:MouseEvent):void{
moveDir = "left";
}
}
}//package
Section 219
//ScrollBarV (ScrollBarV)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollBarV {
private const SPEED:Number = 8;
private var _mask:Sprite;
private var _track:Sprite;
private var _cont:Sprite;
private var _btnD:Sprite;
private var _thumb:Sprite;
private var _btnU:Sprite;
private var moveDir:String;// = "none"
public function ScrollBarV(_arg1:Sprite, _arg2:Sprite, _arg3:Sprite, _arg4:Sprite, _arg5:Sprite=null, _arg6:Sprite=null){
moveDir = "none";
super();
_cont = _arg1;
_mask = _arg2;
_track = _arg3;
_thumb = _arg4;
_btnU = _arg5;
_btnD = _arg6;
init();
}
private function resizeThumb():void{
var _local1:Number;
if (_cont.height > 0){
_local1 = (_cont.height / _mask.height);
if (_local1 >= 1){
_thumb.height = (_track.height / _local1);
} else {
_thumb.height = _track.height;
};
} else {
_thumb.height = _track.height;
};
}
private function stopMoveDown(_arg1:MouseEvent):void{
moveDir = "none";
}
private function moveThumb(_arg1, _arg2):void{
switch (_arg1){
case "up":
if ((_thumb.y - _arg2) >= _track.y){
_thumb.y = (_thumb.y - _arg2);
} else {
_thumb.y = _track.y;
};
break;
case "down":
if ((_thumb.y + _arg2) <= ((_track.y + _track.height) - _thumb.height)){
_thumb.y = (_thumb.y + _arg2);
} else {
_thumb.y = ((_track.y + _track.height) - _thumb.height);
};
break;
};
}
private function dragThumb(_arg1:MouseEvent):void{
_thumb.startDrag(false, new Rectangle(_track.x, _track.y, 0, (_track.height - _thumb.height)));
}
private function init():void{
_cont.mask = _mask;
resizeThumb();
_thumb.addEventListener(MouseEvent.MOUSE_DOWN, dragThumb);
_thumb.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
_thumb.addEventListener(Event.ENTER_FRAME, moveCont);
_thumb.stage.addEventListener(MouseEvent.MOUSE_UP, dropThumb);
_track.addEventListener(MouseEvent.CLICK, placeThumb);
_track.addEventListener(Event.ENTER_FRAME, shiftThumb);
if (_btnU){
_btnU.addEventListener(MouseEvent.MOUSE_DOWN, startMoveUp);
_btnU.addEventListener(MouseEvent.MOUSE_UP, stopMoveUp);
_btnU.addEventListener(MouseEvent.CLICK, stepUp);
};
if (_btnD){
_btnD.addEventListener(MouseEvent.MOUSE_DOWN, startMoveDown);
_btnD.addEventListener(MouseEvent.MOUSE_UP, stopMoveDown);
_btnD.addEventListener(MouseEvent.CLICK, stepDown);
};
_track.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
_mask.parent.addEventListener(MouseEvent.MOUSE_WHEEL, scrollThumb);
}
private function startMoveDown(_arg1:MouseEvent):void{
moveDir = "down";
}
private function placeThumb(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = _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 scrollThumb(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
moveThumb("up", SPEED);
};
if (_arg1.delta < 0){
moveThumb("down", SPEED);
};
}
private function moveCont(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
resizeThumb();
_local2 = (_cont.height / _track.height);
_local3 = ((_track.y - _thumb.y) * _local2);
_cont.y = _local3;
}
private function startMoveUp(_arg1:MouseEvent):void{
moveDir = "up";
}
private function stepUp(_arg1:MouseEvent):void{
moveThumb("up", SPEED);
}
private function dropThumb(_arg1:MouseEvent):void{
_thumb.stopDrag();
}
private function shiftThumb(_arg1:Event):void{
moveThumb(moveDir, SPEED);
}
private function stepDown(_arg1:MouseEvent):void{
moveThumb("down", SPEED);
}
private function stopMoveUp(_arg1:MouseEvent):void{
moveDir = "none";
}
}
}//package
Section 220
//Tracer (Tracer)
package {
public class Tracer {
public static var showName:Boolean = true;
public static var showTime:Boolean = false;
private static var filters:Object = new Object();
public static var showType:Boolean = true;
public static var subfilters:Object = new Object();
public static function report(_arg1:String, _arg2:String, _arg3=null, _arg4:String=null):void{
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:Date;
var _local9:*;
var _local10:*;
var _local11:*;
_arg1 = resolveType(_arg1);
_local5 = resolveName(_arg1);
if (Tracer.showName){
_local5 = (" " + _local5);
} else {
_local5 = "";
};
_local6 = "";
if (Tracer.showTime){
_local8 = new Date();
_local9 = _local8.hours;
if (_local9 < 10){
_local9 = ("0" + _local9);
};
_local10 = _local8.minutes;
if (_local10 < 10){
_local10 = ("0" + _local10);
};
_local11 = _local8.seconds;
if (_local11 < 10){
_local11 = ("0" + _local11);
};
_local6 = ((((((" (" + _local9) + ":") + _local10) + ":") + _local11) + ")");
};
_local7 = "";
if (((_arg4) && (!((_arg4 == ""))))){
_local7 = (("<" + _arg4) + "> ");
};
if (!Tracer.filters[_local5]){
if (_arg3){
if (!Tracer.subfilters[_arg3.toString()]){
trace((((((((_arg1 + _local5) + _local6) + " : [") + _arg3) + "] : ") + _local7) + _arg2));
};
} else {
trace((((((_arg1 + _local5) + _local6) + " : ") + _local7) + _arg2));
};
};
}
private static function resolveType(_arg1:String):String{
switch (_arg1){
case "i":
return ("[i]");
case "[i]":
return ("[i]");
case "info":
return ("[i]");
case "INFO":
return ("[i]");
case "Info":
return ("[i]");
case "X":
return ("[X]");
case "[X]":
return ("[X]");
case "error":
return ("[X]");
case "ERROR":
return ("[X]");
case "Error":
return ("[X]");
case "!":
return ("[!]");
case "[!]":
return ("[!]");
case "warning":
return ("[!]");
case "WARNING":
return ("[!]");
case "Warning":
return ("[!]");
case "*":
return ("[*]");
case "[*]":
return ("[*]");
case "notice":
return ("[*]");
case "NOTICE":
return ("[*]");
case "Notice":
return ("[*]");
case "$":
return ("[$]");
case "[$]":
return ("[$]");
case "system":
return ("[$]");
case "SYSTEM":
return ("[$]");
case "System":
return ("[$]");
};
return ("[.]");
}
public static function filtrate(_arg1):void{
var _local2:String;
var _local3:uint;
var _local4:uint;
if ((_arg1 is String)){
if (!Tracer.filters){
Tracer.filters = new Object();
};
if (_arg1 == "*"){
Tracer.filters["INFO"] = true;
Tracer.filters["ERROR"] = true;
Tracer.filters["WARNING"] = true;
Tracer.filters["NOTICE"] = true;
Tracer.filters["SYSTEM"] = true;
Tracer.filters["OTHER"] = true;
} else {
_local2 = resolveName(_arg1);
Tracer.filters[_local2] = true;
};
return;
};
if ((_arg1 is Array)){
if (!Tracer.filters){
Tracer.filters = new Object();
};
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if ((_arg1[_local4] is String)){
_local2 = resolveName(_arg1[_local4]);
Tracer.filters[_local2] = true;
};
_local4++;
};
};
}
private static function resolveName(_arg1:String):String{
switch (resolveType(_arg1)){
case "[i]":
return ("INFO");
case "[X]":
return ("ERROR");
case "[!]":
return ("WARNING");
case "[*]":
return ("NOTICE");
case "[$]":
return ("SYSTEM");
case "[.]":
return ("OTHER");
};
return ("OTHER");
}
public static function infiltrate(_arg1):void{
var _local2:String;
var _local3:uint;
var _local4:uint;
if ((_arg1 is String)){
if (!Tracer.filters){
Tracer.filters = new Object();
};
if (_arg1 == "*"){
Tracer.filters["INFO"] = false;
Tracer.filters["ERROR"] = false;
Tracer.filters["WARNING"] = false;
Tracer.filters["NOTICE"] = false;
Tracer.filters["SYSTEM"] = false;
Tracer.filters["OTHER"] = false;
} else {
_local2 = resolveName(_arg1);
Tracer.filters[_local2] = false;
};
return;
};
if ((_arg1 is Array)){
if (!Tracer.filters){
Tracer.filters = new Object();
};
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if ((_arg1[_local4] is String)){
_local2 = resolveName(_arg1[_local4]);
Tracer.filters[_local2] = false;
};
_local4++;
};
};
}
}
}//package
Section 221
//Utils (Utils)
package {
import flash.display.*;
import flash.system.*;
public class Utils {
public static function disposeDisplayObject(_arg1:Sprite):void{
var _local2:String;
var _local3:uint;
var _local4:uint;
var _local5:*;
_local2 = "";
if (_arg1["name"]){
_local2 = ((" (" + _arg1["name"]) + ")");
};
trace((("[%] PROCESSING: " + _arg1) + _local2));
_local3 = _arg1.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1.getChildAt(0);
if ((_local5 is Sprite)){
if ((_local5 is MovieClip)){
_local5.stop();
};
disposeDisplayObject(_local5);
};
if ((_local5 is Graphics)){
_local5.clear();
_arg1.removeChild(_local5);
};
if ((_local5 is Bitmap)){
_local5.dispose();
_arg1.removeChild(_local5);
};
if ((_local5 is Shape)){
_local5.graphics.clear();
_arg1.removeChild(_local5);
};
_local4++;
};
_arg1.parent.removeChild(_arg1);
}
public static function getTotalMemory():Number{
return (Number(((System.totalMemory / 0x0400) / 0x0400)));
}
}
}//package
Section 222
//Wasp (Wasp)
package {
import flash.display.*;
public dynamic class Wasp extends MovieClip {
}
}//package
Section 223
//WaterDrop (WaterDrop)
package {
import flash.display.*;
public dynamic class WaterDrop extends MovieClip {
public function WaterDrop(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 224
//Waypoint (Waypoint)
package {
import flash.display.*;
public class Waypoint extends Sprite {
private var episode:Sprite;
public var funct:Function;
public var scale:Number;
private var sign:Sprite;
public function Waypoint(_arg1:String, _arg2:Sprite, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Function=null){
this.name = _arg1;
this.episode = _arg2;
this.x = _arg3;
this.y = _arg4;
this.funct = _arg6;
this.scale = _arg5;
}
public function show(_arg1:Sprite=null):void{
if (_arg1){
this.sign = _arg1;
} else {
_arg1 = new Sprite();
_arg1.graphics.lineStyle(1, 0, 1);
_arg1.graphics.beginFill(0xFF00, 1);
_arg1.graphics.drawRect(0, 0, 32, 32);
_arg1.graphics.endFill();
};
if ((episode as Sprite)){
addChild(_arg1);
episode.addChild(this);
} else {
trace("[X] Parent isn't DisplayObject.");
};
}
public function hide():void{
if (((episode) && (episode.getChildByName(name)))){
removeChild(sign);
episode.removeChild(episode.getChildByName(name));
} else {
trace("[X] Waypoint not shown.");
};
}
public function kill():void{
hide();
episode = undefined;
sign = undefined;
funct = undefined;
scale = undefined;
}
}
}//package
Section 225
//Window (Window)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class Window extends MovieClip {
public var time_tf:TextField;
public var pict:MovieClip;
public var mgBtn:MovieClip;
public var nextBtn:MovieClip;
public var preloader:MovieClip;
public var itemIcon_mc:MovieClip;
public var playBtn:MovieClip;
private var lifeTimer:Timer;
public var retryBtn:MovieClip;
public var mmBtn:MovieClip;
public function Window(){
lifeTimer = new Timer(3000, 1);
lifeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, closeSelf);
}
private function closeSelf(_arg1:TimerEvent):void{
close();
}
public function startLifeTimer():void{
lifeTimer.start();
}
public function stopLifeTimer():void{
lifeTimer.stop();
}
public function close():void{
if (parent != null){
Game.activeWindow = null;
if (lifeTimer.running){
lifeTimer.stop();
};
var _local1 = parent;
_local1["removeChild"](this);
};
}
}
}//package
Section 226
//WindowFinal (WindowFinal)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WindowFinal extends Window {
public function WindowFinal(){
addFrameScript(0, frame1);
}
function frame1(){
if (Game.inst){
time_tf.text = ("Time: " + Console.formatTime(Game.inst.totalTime, false));
};
}
}
}//package
Section 227
//WindowInstructions (WindowInstructions)
package {
public dynamic class WindowInstructions extends Window {
public function WindowInstructions(){
addFrameScript(0, frame1);
}
function frame1(){
playBtn.gotoAndStop(1);
}
}
}//package
Section 228
//WindowItem (WindowItem)
package {
public dynamic class WindowItem extends Window {
public function WindowItem(){
addFrameScript(0, frame1);
}
function frame1(){
startLifeTimer();
}
}
}//package
Section 229
//WindowNextLevel (WindowNextLevel)
package {
public dynamic class WindowNextLevel extends Window {
public function WindowNextLevel(){
addFrameScript(0, frame1);
}
function frame1(){
nextBtn.gotoAndStop(1);
mmBtn.gotoAndStop(1);
mgBtn.gotoAndStop(1);
pict.gotoAndStop(Console.getEpisodeIndex());
}
}
}//package
Section 230
//WindowYouAreHistory (WindowYouAreHistory)
package {
public dynamic class WindowYouAreHistory extends Window {
public function WindowYouAreHistory(){
addFrameScript(0, frame1);
}
function frame1(){
retryBtn.gotoAndStop(1);
mmBtn.gotoAndStop(1);
mgBtn.gotoAndStop(1);
}
}
}//package