Section 1
//CreekwoodForestApp (code.CreekwoodForestApp)
package code {
import sfb.audio.*;
import flash.events.*;
import sfb.application.saves.*;
import flash.display.*;
import flash.utils.*;
import sfb.tools.*;
import sfb.application.preloader.*;
import sfb.application.*;
import flash.ui.*;
public class CreekwoodForestApp extends Game {
private var timeOutID:uint;
public var challengesScore:int;// = 100000000
public var playMain_btn:SimpleButton;
public var mainScore:int;// = 0
public var playChallenges_btn:SimpleButton;
public var instructions_mc:MovieClip;
public var speedScore:int;// = 100000000
public var agLinkTitle_btn:SimpleButton;
public var musicStarted:Boolean;
public var gameMode:String;
public var pmgLinkLoad_btn:SimpleButton;
public var transition_mc:MovieClip;
public var play_btn:SimpleButton;
public var agLinkLoad_btn:SimpleButton;
public var sfbLinkTitle_btn:SimpleButton;
public var game_mc:CreekwoodForestGame;
public var cursor_mc:MovieClip;
public var evanLinkTitle_btn:SimpleButton;
public var pmgLinkTitle_btn:SimpleButton;
public var sfbLogo_mc:MovieClip;
public var preloaderBar_mc:MovieClip;
public var evanLinkLoad_btn:SimpleButton;
private var sfxManager:SFXManager;
public var save:CreekwoodForestGameSave;
public var playSpeed_btn:SimpleButton;
public var agLogo_mc:MovieClip;
public var sfbLinkLoad_btn:SimpleButton;
private var musicManager:MusicManager;
public static const CHALLENGES:String = "challenges";
public static const MAIN:String = "main";
public static const SPEED:String = "speed";
public static var app:CreekwoodForestApp;
public function CreekwoodForestApp(){
mainScore = 0;
challengesScore = 100000000;
speedScore = 100000000;
super();
this.stop();
CreekwoodForestApp.app = this;
this.preloader = new MovieClipPreloader(this.preloaderBar_mc);
this.preload();
this.addFrameScript(9, this.onTitle);
this.addFrameScript(19, this.onMenu);
this.addFrameScript(29, this.onGame);
this.musicManager = MusicManager.getInstance();
this.sfxManager = SFXManager.getInstance();
this.linkToAG(this.agLogo_mc);
this.linkToAG(this.pmgLinkLoad_btn);
this.linkToAG(this.agLinkLoad_btn);
this.linkToSFB(this.sfbLogo_mc);
this.linkToSFB(this.sfbLinkLoad_btn);
this.linkTo(this.evanLinkLoad_btn, "http://www.thisisnotalabel.com/");
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, this.moveCursor);
this.cursor_mc.mouseChildren = (this.cursor_mc.mouseEnabled = false);
Mouse.hide();
this.transition_mc.addEventListener(Event.CHANGE, this.onTransitionChange);
}
public function onMainGameSuccess(_arg1:Event):void{
this.sfxManager.playSFX("win");
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("success");
this.cursor_mc.gotoAndStop(1);
this.timeOutID = setTimeout(this.nextMainGame, 2000);
}
override protected function preloadComplete(_arg1:Event):void{
this.gotoTitle();
}
public function selectMainGame(_arg1:Event):void{
this.gameMode = MAIN;
this.gotoGame();
}
public function onGame():void{
this.instructions_mc.gotoAndStop(this.gameMode);
this.game_mc.cursor_mc = this.cursor_mc;
this.timeOutID = setTimeout(onGameEvents, 50);
}
public function moveCursor(_arg1:MouseEvent):void{
this.cursor_mc.x = this.mouseX;
this.cursor_mc.y = this.mouseY;
Mouse.hide();
_arg1.updateAfterEvent();
}
public function setupMainGameScore():void{
this.instructions_mc.menu_btn.addEventListener(MouseEvent.CLICK, this.onBackToMenu);
this.instructions_mc.restart_btn.addEventListener(MouseEvent.CLICK, this.onRestart);
this.instructions_mc.score_txt.text = String(this.game_mc.score);
if (this.game_mc.score > this.mainScore){
this.mainScore = this.game_mc.score;
this.save.updateFromObject(this);
this.saveSystem.save(this.save.encode());
};
this.instructions_mc.bestScore_txt.text = String(this.mainScore);
if (this.game_mc.score > 11){
this.instructions_mc.rank_mc.gotoAndStop(5);
} else {
if (this.game_mc.score > 9){
this.instructions_mc.rank_mc.gotoAndStop(4);
} else {
if (this.game_mc.score > 7){
this.instructions_mc.rank_mc.gotoAndStop(3);
} else {
if (this.game_mc.score > 5){
this.instructions_mc.rank_mc.gotoAndStop(2);
};
};
};
};
}
public function selectChallenges(_arg1:Event):void{
this.gameMode = CHALLENGES;
this.gotoGame();
}
public function onMainGameFail(_arg1:Event):void{
this.sfxManager.playSFX("lose");
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("fail");
this.cursor_mc.gotoAndStop(1);
this.timeOutID = setTimeout(this.nextMainGame, 2000);
}
public function startChallenges():void{
if (this.instructions_mc.parent){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.game_mc.startChallenges();
}
public function nextChallenge():void{
this.game_mc.currentChallenge++;
this.instructions_mc.gotoAndStop((18 + (this.game_mc.currentChallenge * 2)));
this.timeOutID = setTimeout(this.startNextChallenge, 2000);
}
public function selectSpeed(_arg1:Event):void{
this.gameMode = SPEED;
this.gotoGame();
}
public function gotoTitle(_arg1:Event=null):void{
this.gotoAndStop(10);
}
public function onGameEvents():void{
this.instructions_mc.next_btn.addEventListener(MouseEvent.CLICK, this.onNext);
this.instructions_mc.menu_btn.addEventListener(MouseEvent.CLICK, this.onBackToMenu);
this.instructions_mc.restart_btn.addEventListener(MouseEvent.CLICK, this.onRestart);
}
public function onSpeedGameFinish(_arg1:Event):void{
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("speedScore");
this.timeOutID = setTimeout(this.setupSpeedGameScore, 150);
this.cursor_mc.gotoAndStop(1);
}
public function onChallengesFinish(_arg1:Event):void{
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("challengesScore");
this.timeOutID = setTimeout(this.setupChallengesScore, 150);
this.cursor_mc.gotoAndStop(1);
}
public function onRestart(_arg1:Event):void{
clearTimeout(this.timeOutID);
this.game_mc.emptyGrid();
if (((this.instructions_mc) && (this.instructions_mc.parent))){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.gotoAndStop(31);
this.removeChild(this.game_mc);
this.gotoAndStop(30);
}
public function setupSpeedGameScore():void{
this.instructions_mc.menu_btn.addEventListener(MouseEvent.CLICK, this.onBackToMenu);
this.instructions_mc.restart_btn.addEventListener(MouseEvent.CLICK, this.onRestart);
this.instructions_mc.score_txt.text = TimeConversion.milliToSecs(this.game_mc.time, 2, 3);
if (this.game_mc.time < this.speedScore){
this.speedScore = this.game_mc.time;
this.save.updateFromObject(this);
this.saveSystem.save(this.save.encode());
};
this.instructions_mc.bestScore_txt.text = TimeConversion.milliToSecs(this.speedScore, 2, 3);
if (this.game_mc.time < 50000){
this.instructions_mc.rank_mc.gotoAndStop(5);
} else {
if (this.game_mc.time < 70000){
this.instructions_mc.rank_mc.gotoAndStop(4);
} else {
if (this.game_mc.time < 90000){
this.instructions_mc.rank_mc.gotoAndStop(3);
} else {
if (this.game_mc.time < 110000){
this.instructions_mc.rank_mc.gotoAndStop(2);
};
};
};
};
}
public function onChallengesSuccess(_arg1:Event):void{
this.sfxManager.playSFX("win");
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop((19 + (this.game_mc.currentChallenge * 2)));
this.timeOutID = setTimeout(this.nextChallenge, 2000);
this.cursor_mc.gotoAndStop(1);
}
public function gotoMenu(_arg1:Event=null):void{
this.gotoAndStop(20);
}
public function onTransitionChange(_arg1:Event):void{
if (((this.instructions_mc) && (this.instructions_mc.parent))){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
switch (this.currentFrame){
case 20:
this.gotoAndStop(30);
break;
case 30:
this.gotoAndStop(10);
break;
};
}
public function nextMainGame():void{
if (this.instructions_mc.parent){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.game_mc.newGrid();
}
public function onChallengesFail(_arg1:Event):void{
this.sfxManager.playSFX("lose");
this.game_mc.time = (this.game_mc.time + (10000 * this.game_mc.score));
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("fail");
this.timeOutID = setTimeout(this.nextChallenge, 2000);
this.cursor_mc.gotoAndStop(1);
}
public function startNextChallenge():void{
if (this.instructions_mc.parent){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.game_mc.nextChallenge();
}
public function onNext(_arg1:Event):void{
switch (this.instructions_mc.currentFrame){
case 1:
this.instructions_mc.gotoAndStop(2);
break;
case 2:
this.instructions_mc.gotoAndStop(3);
break;
case 3:
this.instructions_mc.gotoAndStop(4);
break;
case 4:
if (this.instructions_mc.parent){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.game_mc.startMainGame();
this.game_mc.addEventListener("success", this.onMainGameSuccess);
this.game_mc.addEventListener("fail", this.onMainGameFail);
this.game_mc.addEventListener("finish", this.onMainGameFinish);
break;
case 17:
this.instructions_mc.gotoAndStop(18);
this.timeOutID = setTimeout(this.startChallenges, 2000);
this.game_mc.addEventListener("success", this.onChallengesSuccess);
this.game_mc.addEventListener("fail", this.onChallengesFail);
this.game_mc.addEventListener("finish", this.onChallengesFinish);
break;
case 36:
if (this.instructions_mc.parent){
this.instructions_mc.parent.removeChild(this.instructions_mc);
};
this.game_mc.startSpeedGame();
this.game_mc.addEventListener("success", this.onSpeedGameFinish);
this.game_mc.addEventListener("fail", this.onSpeedGameFail);
break;
};
}
public function onMainGameFinish(_arg1:Event):void{
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("mainScore");
this.timeOutID = setTimeout(this.setupMainGameScore, 150);
this.cursor_mc.gotoAndStop(1);
}
public function onBackToMenu(_arg1:Event):void{
this.transition_mc.gotoAndPlay(2);
clearTimeout(this.timeOutID);
}
public function onTitle():void{
this.cursor_mc.gotoAndStop(1);
this.linkToAG(this.pmgLinkTitle_btn);
this.linkToAG(this.agLinkTitle_btn);
this.linkToSFB(this.sfbLinkTitle_btn);
this.linkTo(this.evanLinkTitle_btn, "http://www.thisisnotalabel.com/");
this.play_btn.addEventListener(MouseEvent.CLICK, this.gotoMenu);
if (!this.musicStarted){
this.musicStarted = true;
this.saveSystem = new SaveSystem("creekwood");
this.save = new CreekwoodForestGameSave();
this.save.decode(this.saveSystem.load());
this.save.updateToObject(this);
this.saveSystem.save(this.save.encode());
this.musicManager = MusicManager.getInstance();
this.sfxManager = SFXManager.getInstance();
this.musicManager.addMusic(Music, "music");
this.musicManager.playMusic("music", 40000000, 0.7);
this.sfxManager.addSFX(WinSound, "win");
this.sfxManager.addSFX(LoseSound, "lose");
};
}
public function setupChallengesScore():void{
this.instructions_mc.menu_btn.addEventListener(MouseEvent.CLICK, this.onBackToMenu);
this.instructions_mc.restart_btn.addEventListener(MouseEvent.CLICK, this.onRestart);
this.instructions_mc.score_txt.text = TimeConversion.milliToMinsSecs(this.game_mc.time, 2, 2);
if (this.game_mc.time < this.challengesScore){
this.challengesScore = this.game_mc.time;
this.save.updateFromObject(this);
this.saveSystem.save(this.save.encode());
};
this.instructions_mc.bestScore_txt.text = TimeConversion.milliToMinsSecs(this.challengesScore, 2, 2);
if (this.game_mc.time < 60000){
this.instructions_mc.rank_mc.gotoAndStop(5);
} else {
if (this.game_mc.time < 90000){
this.instructions_mc.rank_mc.gotoAndStop(4);
} else {
if (this.game_mc.time < 120000){
this.instructions_mc.rank_mc.gotoAndStop(3);
} else {
if (this.game_mc.time < 150000){
this.instructions_mc.rank_mc.gotoAndStop(2);
};
};
};
};
}
public function onMenu():void{
this.playMain_btn.addEventListener(MouseEvent.CLICK, this.selectMainGame);
this.playChallenges_btn.addEventListener(MouseEvent.CLICK, this.selectChallenges);
this.playSpeed_btn.addEventListener(MouseEvent.CLICK, this.selectSpeed);
}
public function onSpeedGameFail(_arg1:Event):void{
this.game_mc.time = 1000000;
this.addChildAt(this.instructions_mc, (this.numChildren - 2));
this.instructions_mc.gotoAndStop("speedScore");
this.timeOutID = setTimeout(this.setupSpeedGameScore, 150);
this.cursor_mc.gotoAndStop(1);
}
public function gotoGame(_arg1:Event=null):void{
this.transition_mc.gotoAndPlay(2);
}
}
}//package code
Section 2
//CreekwoodForestGame (code.CreekwoodForestGame)
package code {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import sfb.tools.*;
import flash.text.*;
public class CreekwoodForestGame extends MovieClip {
private const gridSize:uint = 8;
private const directionChoices:Array;
private var scoreCount:int;
public var block60:MovieClip;
public var block61:MovieClip;
public var block62:MovieClip;
public var block63:MovieClip;
public var block64:MovieClip;
public var block65:MovieClip;
public var block66:MovieClip;
public var challengesComplete:uint;
private var gridData:Array;
public var block67:MovieClip;
private var fruit:Array;
public var block70:MovieClip;
public var block71:MovieClip;
public var block72:MovieClip;
public var block73:MovieClip;
public var block75:MovieClip;
public var block76:MovieClip;
public var block77:MovieClip;
public var block74:MovieClip;
private var timeCount:int;
private var fish:Array;
private var bugs:Array;
private var lastTime:uint;
private var squirrels:Array;
public var startTarget:MovieClip;
private var challengesOrder:Array;
public var currentChallenge:int;
public var cursor_mc:MovieClip;
private var snakes:Array;
public var score_txt:TextField;
private var loc:Point;
public var block00:MovieClip;
public var block01:MovieClip;
public var block02:MovieClip;
public var block03:MovieClip;
public var block05:MovieClip;
public var block06:MovieClip;
public var block07:MovieClip;
public var block04:MovieClip;
private var pathLength:uint;
public var block11:MovieClip;
public var block12:MovieClip;
public var block13:MovieClip;
public var block14:MovieClip;
public var block15:MovieClip;
public var block16:MovieClip;
public var block10:MovieClip;
private var plants:Array;
public var block17:MovieClip;
private var frogs:Array;
public var block20:MovieClip;
public var block23:MovieClip;
public var block24:MovieClip;
public var block25:MovieClip;
public var block26:MovieClip;
public var block27:MovieClip;
public var block22:MovieClip;
public var block21:MovieClip;
public var block30:MovieClip;
public var block32:MovieClip;
public var block33:MovieClip;
public var block35:MovieClip;
public var block36:MovieClip;
public var block37:MovieClip;
public var block31:MovieClip;
public var block34:MovieClip;
public var arrow_mc:MovieClip;
public var block40:MovieClip;
public var block41:MovieClip;
public var block43:MovieClip;
public var block44:MovieClip;
public var block45:MovieClip;
public var block46:MovieClip;
public var block47:MovieClip;
public var block42:MovieClip;
public var block50:MovieClip;
public var block51:MovieClip;
public var block53:MovieClip;
public var block54:MovieClip;
public var block55:MovieClip;
public var block56:MovieClip;
public var block57:MovieClip;
private var hedgehogs:Array;
public var block52:MovieClip;
private var winged:Array;
public var flower_mc:MovieClip;
public var time_txt:TextField;
public function CreekwoodForestGame(){
directionChoices = [new Point(0, -1), new Point(0, 1), new Point(-1, 0), new Point(1, 0)];
super();
this.arrow_mc = this.flower_mc.flower_mc.arrow_mc;
this.hedgehogs = [block16, block17, block55];
this.snakes = [block36, block46, block71, block72];
this.frogs = [block13, block35, block66, block75];
this.squirrels = [block12, block26, block62, block77];
this.fruit = [block45, block50, block51, block60, block70, block73];
this.fish = [block14, block33, block34, block42, block43, block44, block53];
this.winged = [block01, block03, block15, block20, block23, block32, block52, block61, block63];
this.bugs = [block03, block04, block06, block15, block23, block25, block30, block32, block41, block57, block61, block63, block64, block65];
this.plants = [block00, block04, block05, block06, block07, block10, block11, block21, block22, block24, block27, block31, block37, block47, block54, block56, block57, block67, block74, block76];
this.challengesOrder = [hedgehogs, snakes, frogs, squirrels, fruit, fish, winged, bugs, plants];
}
public function emptyGrid():void{
var _local1:uint;
var _local2:uint;
this.gridData = [];
_local1 = 0;
while (_local1 < this.gridSize) {
this.gridData[_local1] = [];
_local2 = 0;
while (_local2 < this.gridSize) {
this.gridData[_local1][_local2] = new MoveData("empty");
this.getBlock(_local1, _local2).hit_mc.addEventListener(MouseEvent.CLICK, this.wrongMove);
this.getBlock(_local1, _local2).gotoAndStop(1);
_local2++;
};
_local1++;
};
if (((this.startTarget) && (this.startTarget.parent))){
this.startTarget.parent.removeChild(this.startTarget);
};
}
public function generateGrid():void{
var _local1:uint;
var _local2:uint;
var _local3:Point;
var _local4:uint;
var _local5:Point;
this.emptyGrid();
_local1 = Math.floor((Math.random() * this.gridSize));
_local2 = Math.floor((Math.random() * this.gridSize));
_local3 = new Point(_local1, _local2);
this.gridData[_local3.x][_local3.y] = new MoveData("end");
_local4 = 0;
while (_local4 < this.pathLength) {
_local5 = this.pickRandomDirection(_local3.x, _local3.y);
_local3 = _local3.add(_local5);
this.gridData[_local3.x][_local3.y] = new MoveData(this.getDirection(_local5), new Point(-(_local5.x), -(_local5.y)));
_local4++;
};
this.loc = _local3.clone();
this.showDirection(this.gridData[_local3.x][_local3.y]);
if (!this.startTarget){
this.startTarget = new StartTarget();
};
this.nextBlock();
this.startTarget.x = (33.4 + (63.6 * _local3.x));
this.startTarget.y = (106.9 + (66.5 * _local3.y));
this.addChild(this.startTarget);
this.startTarget.alpha = 0.5;
this.getBlock(_local3.x, _local3.y).hit_mc.removeEventListener(MouseEvent.CLICK, this.wrongMove);
}
public function startChallenges():void{
this.currentChallenge = 0;
this.time = 0;
this.challengesComplete = 0;
this.nextChallenge();
}
public function startSpeedGame():void{
this.time = 0;
this.pathLength = 40;
this.score = (this.pathLength + 1);
this.newGrid();
}
public function get score():int{
return (this.scoreCount);
}
public function nextChallenge():void{
var _local1:Array;
var _local2:uint;
this.addEventListener(Event.ENTER_FRAME, this.updateTime);
this.lastTime = getTimer();
this.emptyGrid();
_local1 = this.challengesOrder[this.currentChallenge];
this.score = _local1.length;
_local2 = 0;
while (_local2 < this.score) {
_local1[_local2].hit_mc.removeEventListener(MouseEvent.CLICK, this.wrongMove);
_local1[_local2].hit_mc.addEventListener(MouseEvent.CLICK, this.foundItem);
_local2++;
};
}
private function getDirection(_arg1:Point):String{
if (_arg1.y == 0){
if (_arg1.x > 0){
return ("left");
};
return ("right");
//unresolved jump
};
if (_arg1.y > 0){
return ("up");
};
return ("down");
}
public function get time():int{
return (this.timeCount);
}
private function getBlock(_arg1:int=-1, _arg2:int=-1):MovieClip{
if ((((_arg1 == -1)) && ((_arg2 == -1)))){
return (this[(("block" + String(loc.x)) + String(loc.y))]);
};
return (this[(("block" + String(_arg1)) + String(_arg2))]);
}
private function showDirection(_arg1:MoveData):void{
this.arrow_mc.gotoAndStop((_arg1.type + _arg1.move.length));
this.cursor_mc.gotoAndStop((_arg1.type + _arg1.move.length));
}
public function newGrid():void{
this.addEventListener(Event.ENTER_FRAME, this.updateTime);
this.lastTime = getTimer();
try {
this.generateGrid();
} catch(e:Error) {
this.newGrid();
};
}
public function updateTime(_arg1:Event):void{
switch (CreekwoodForestApp.app.gameMode){
case CreekwoodForestApp.MAIN:
this.time = (this.time - (getTimer() - this.lastTime));
if (this.time <= 0){
this.time = 0;
this.dispatchEvent(new Event("finish"));
this.removeEventListener(Event.ENTER_FRAME, this.updateTime);
};
break;
case CreekwoodForestApp.CHALLENGES:
case CreekwoodForestApp.SPEED:
this.time = (this.time + (getTimer() - this.lastTime));
break;
};
this.lastTime = getTimer();
}
public function set score(_arg1:int):void{
this.scoreCount = _arg1;
this.score_txt.text = String(this.scoreCount);
while (this.score_txt.text.length < 4) {
this.score_txt.text = ("0" + this.score_txt.text);
};
}
private function wrongMove(_arg1:Event):void{
if (this.currentChallenge >= 8){
this.dispatchEvent(new Event("finish"));
} else {
this.dispatchEvent(new Event("fail"));
};
this.removeEventListener(Event.ENTER_FRAME, this.updateTime);
}
private function nextBlock(_arg1:Event=null):void{
var _local2:MoveData;
_local2 = this.gridData[loc.x][loc.y];
if (_local2.type != "end"){
if (this.startTarget.parent){
this.startTarget.parent.removeChild(this.startTarget);
};
this.getBlock().hit_mc.removeEventListener(MouseEvent.CLICK, this.nextBlock);
this.getBlock().gotoAndPlay(2);
this.loc = this.loc.add(_local2.move);
this.showDirection(_local2);
this.getBlock().hit_mc.removeEventListener(MouseEvent.CLICK, this.wrongMove);
this.getBlock().hit_mc.addEventListener(MouseEvent.CLICK, this.nextBlock);
if (CreekwoodForestApp.app.gameMode == CreekwoodForestApp.CHALLENGES){
this.score--;
} else {
if (CreekwoodForestApp.app.gameMode == CreekwoodForestApp.SPEED){
this.score--;
};
};
} else {
if (CreekwoodForestApp.app.gameMode == CreekwoodForestApp.MAIN){
this.score++;
} else {
this.score--;
};
this.dispatchEvent(new Event("success"));
this.removeEventListener(Event.ENTER_FRAME, this.updateTime);
};
}
private function pickRandomDirection(_arg1:uint, _arg2:uint, _arg3:uint=1, _arg4:uint=3):Point{
var _local5:uint;
var _local6:Point;
var _local7:Point;
_local5 = (Math.floor((Math.random() * ((_arg4 - _arg3) + 1))) + _arg3);
_local6 = this.directionChoices[Math.floor((Math.random() * 4))].clone();
_local6.normalize(_local5);
_local7 = _local6.add(new Point(_arg1, _arg2));
if ((((((((((_local7.x < 0)) || ((_local7.x >= this.gridSize)))) || ((_local7.y < 0)))) || ((_local7.y >= this.gridSize)))) || (!((this.gridData[_local7.x][_local7.y].type == "empty"))))){
return (pickRandomDirection(_arg1, _arg2, _arg3, _arg4));
};
return (_local6);
}
public function set time(_arg1:int):void{
this.timeCount = _arg1;
switch (CreekwoodForestApp.app.gameMode){
case CreekwoodForestApp.MAIN:
case CreekwoodForestApp.CHALLENGES:
this.time_txt.text = TimeConversion.milliToMinsSecs(this.timeCount, 0, 2);
break;
case CreekwoodForestApp.SPEED:
this.time_txt.text = TimeConversion.milliToSecs(this.timeCount, 2, 3);
break;
};
}
public function foundItem(_arg1:Event):void{
this.score--;
MovieClip(DisplayObject(_arg1.target).parent).gotoAndPlay(2);
DisplayObject(_arg1.target).removeEventListener(MouseEvent.CLICK, this.foundItem);
if (this.score <= 0){
this.challengesComplete++;
if (this.currentChallenge >= 8){
this.dispatchEvent(new Event("finish"));
} else {
this.dispatchEvent(new Event("success"));
};
this.removeEventListener(Event.ENTER_FRAME, this.updateTime);
};
}
public function startMainGame(){
this.time = 120000;
this.pathLength = 10;
this.score = 0;
this.newGrid();
}
}
}//package code
import flash.geom.*;
class MoveData {
public var move:Point;
public var type:String;
private function MoveData(_arg1:String, _arg2:Point=null){
this.type = _arg1;
this.move = _arg2;
}
}
Section 3
//CreekwoodForestGameSave (code.CreekwoodForestGameSave)
package code {
import sfb.application.saves.*;
public class CreekwoodForestGameSave extends GameSave {
public var challengesScore:int;
public var speedScore:int;
public var mainScore:int;
public function CreekwoodForestGameSave(){
vars = ["mainScore", "challengesScore", "speedScore"];
this.updateFromObject(CreekwoodForestApp.app);
this.title = "Creekwood Forest";
this.description = "Colourful woodland skill/puzzle game!";
this.link = "http://www.armorgames.com";
this.colourBorder = 7833677;
this.colourBackground = 9750413;
this.colourText = 0xFFFFFF;
this.image1.draw(new SaveImage1());
this.image1.draw(new SaveImage2());
}
}
}//package code
Section 4
//A1_91 (CreekwoodForest_fla.A1_91)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A1_91 extends MovieClip {
public var hit_mc:MovieClip;
public function A1_91(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 5
//A2_87 (CreekwoodForest_fla.A2_87)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A2_87 extends MovieClip {
public var hit_mc:MovieClip;
public function A2_87(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 6
//A3_165 (CreekwoodForest_fla.A3_165)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A3_165 extends MovieClip {
public var hit_mc:MovieClip;
public function A3_165(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 7
//A4_183 (CreekwoodForest_fla.A4_183)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A4_183 extends MovieClip {
public var hit_mc:MovieClip;
public function A4_183(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 8
//A5_289 (CreekwoodForest_fla.A5_289)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A5_289 extends MovieClip {
public var hit_mc:MovieClip;
public function A5_289(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 9
//A6_212 (CreekwoodForest_fla.A6_212)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A6_212 extends MovieClip {
public var hit_mc:MovieClip;
public function A6_212(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 10
//A7_208 (CreekwoodForest_fla.A7_208)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A7_208 extends MovieClip {
public var hit_mc:MovieClip;
public function A7_208(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
stop();
}
}
}//package CreekwoodForest_fla
Section 11
//A8_255 (CreekwoodForest_fla.A8_255)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class A8_255 extends MovieClip {
public var hit_mc:MovieClip;
public function A8_255(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 12
//B1_97 (CreekwoodForest_fla.B1_97)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B1_97 extends MovieClip {
public var hit_mc:MovieClip;
public function B1_97(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 13
//B2_144 (CreekwoodForest_fla.B2_144)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B2_144 extends MovieClip {
public var hit_mc:MovieClip;
public function B2_144(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 14
//B3_129 (CreekwoodForest_fla.B3_129)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B3_129 extends MovieClip {
public var hit_mc:MovieClip;
public function B3_129(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 15
//B4_264 (CreekwoodForest_fla.B4_264)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B4_264 extends MovieClip {
public var hit_mc:MovieClip;
public function B4_264(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 16
//B5_272 (CreekwoodForest_fla.B5_272)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B5_272 extends MovieClip {
public var hit_mc:MovieClip;
public function B5_272(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 17
//B6_206 (CreekwoodForest_fla.B6_206)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B6_206 extends MovieClip {
public var hit_mc:MovieClip;
public function B6_206(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 18
//B7_280 (CreekwoodForest_fla.B7_280)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B7_280 extends MovieClip {
public var hit_mc:MovieClip;
public function B7_280(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 19
//B8_82 (CreekwoodForest_fla.B8_82)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class B8_82 extends MovieClip {
public var hit_mc:MovieClip;
public function B8_82(){
addFrameScript(0, frame1, 13, frame14);
}
function frame14(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 20
//C1_98 (CreekwoodForest_fla.C1_98)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C1_98 extends MovieClip {
public var hit_mc:MovieClip;
public function C1_98(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 21
//C2_150 (CreekwoodForest_fla.C2_150)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C2_150 extends MovieClip {
public var hit_mc:MovieClip;
public function C2_150(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 22
//C3_145 (CreekwoodForest_fla.C3_145)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C3_145 extends MovieClip {
public var hit_mc:MovieClip;
public function C3_145(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 23
//C4_185 (CreekwoodForest_fla.C4_185)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C4_185 extends MovieClip {
public var hit_mc:MovieClip;
public function C4_185(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 24
//C5_189 (CreekwoodForest_fla.C5_189)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C5_189 extends MovieClip {
public var hit_mc:MovieClip;
public function C5_189(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
stop();
}
}
}//package CreekwoodForest_fla
Section 25
//C6_293 (CreekwoodForest_fla.C6_293)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C6_293 extends MovieClip {
public var hit_mc:MovieClip;
public function C6_293(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 26
//C7_288 (CreekwoodForest_fla.C7_288)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C7_288 extends MovieClip {
public var hit_mc:MovieClip;
public function C7_288(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 27
//C8_256 (CreekwoodForest_fla.C8_256)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class C8_256 extends MovieClip {
public var hit_mc:MovieClip;
public function C8_256(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 28
//D1_108 (CreekwoodForest_fla.D1_108)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D1_108 extends MovieClip {
public var hit_mc:MovieClip;
public function D1_108(){
addFrameScript(0, frame1, 17, frame18);
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 29
//D2_157 (CreekwoodForest_fla.D2_157)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D2_157 extends MovieClip {
public var hit_mc:MovieClip;
public function D2_157(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 30
//D3_151 (CreekwoodForest_fla.D3_151)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D3_151 extends MovieClip {
public var hit_mc:MovieClip;
public function D3_151(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 31
//D4_265 (CreekwoodForest_fla.D4_265)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D4_265 extends MovieClip {
public var hit_mc:MovieClip;
public function D4_265(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 32
//D5_273 (CreekwoodForest_fla.D5_273)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D5_273 extends MovieClip {
public var hit_mc:MovieClip;
public function D5_273(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 33
//D6_220 (CreekwoodForest_fla.D6_220)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D6_220 extends MovieClip {
public var hit_mc:MovieClip;
public function D6_220(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 34
//D7_215 (CreekwoodForest_fla.D7_215)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D7_215 extends MovieClip {
public var hit_mc:MovieClip;
public function D7_215(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package CreekwoodForest_fla
Section 35
//D8_257 (CreekwoodForest_fla.D8_257)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class D8_257 extends MovieClip {
public var hit_mc:MovieClip;
public function D8_257(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package CreekwoodForest_fla
Section 36
//E1_112 (CreekwoodForest_fla.E1_112)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E1_112 extends MovieClip {
public var hit_mc:MovieClip;
public function E1_112(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 37
//E2_158 (CreekwoodForest_fla.E2_158)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E2_158 extends MovieClip {
public var hit_mc:MovieClip;
public function E2_158(){
addFrameScript(0, frame1, 17, frame18);
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 38
//E3_259 (CreekwoodForest_fla.E3_259)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E3_259 extends MovieClip {
public var hit_mc:MovieClip;
public function E3_259(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 39
//E4_269 (CreekwoodForest_fla.E4_269)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E4_269 extends MovieClip {
public var hit_mc:MovieClip;
public function E4_269(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package CreekwoodForest_fla
Section 40
//E5_274 (CreekwoodForest_fla.E5_274)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E5_274 extends MovieClip {
public var hit_mc:MovieClip;
public function E5_274(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 41
//E6_235 (CreekwoodForest_fla.E6_235)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E6_235 extends MovieClip {
public var hit_mc:MovieClip;
public function E6_235(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package CreekwoodForest_fla
Section 42
//E7_232 (CreekwoodForest_fla.E7_232)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E7_232 extends MovieClip {
public var hit_mc:MovieClip;
public function E7_232(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 43
//E8_258 (CreekwoodForest_fla.E8_258)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class E8_258 extends MovieClip {
public var hit_mc:MovieClip;
public function E8_258(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 44
//F1_114 (CreekwoodForest_fla.F1_114)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F1_114 extends MovieClip {
public var hit_mc:MovieClip;
public function F1_114(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 45
//F2_159 (CreekwoodForest_fla.F2_159)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F2_159 extends MovieClip {
public var hit_mc:MovieClip;
public function F2_159(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 46
//F3_119 (CreekwoodForest_fla.F3_119)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F3_119 extends MovieClip {
public var hit_mc:MovieClip;
public function F3_119(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 47
//F4_271 (CreekwoodForest_fla.F4_271)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F4_271 extends MovieClip {
public var hit_mc:MovieClip;
public function F4_271(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package CreekwoodForest_fla
Section 48
//F5_201 (CreekwoodForest_fla.F5_201)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F5_201 extends MovieClip {
public var hit_mc:MovieClip;
public function F5_201(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package CreekwoodForest_fla
Section 49
//F6_236 (CreekwoodForest_fla.F6_236)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F6_236 extends MovieClip {
public var hit_mc:MovieClip;
public function F6_236(){
addFrameScript(0, frame1, 13, frame14);
}
function frame14(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 50
//F7_241 (CreekwoodForest_fla.F7_241)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F7_241 extends MovieClip {
public var hit_mc:MovieClip;
public function F7_241(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package CreekwoodForest_fla
Section 51
//F8_246 (CreekwoodForest_fla.F8_246)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class F8_246 extends MovieClip {
public var hit_mc:MovieClip;
public function F8_246(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 52
//G1_127 (CreekwoodForest_fla.G1_127)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G1_127 extends MovieClip {
public var hit_mc:MovieClip;
public function G1_127(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 53
//G2_121 (CreekwoodForest_fla.G2_121)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G2_121 extends MovieClip {
public var hit_mc:MovieClip;
public function G2_121(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 54
//G3_262 (CreekwoodForest_fla.G3_262)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G3_262 extends MovieClip {
public var hit_mc:MovieClip;
public function G3_262(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 55
//G4_172 (CreekwoodForest_fla.G4_172)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G4_172 extends MovieClip {
public var hit_mc:MovieClip;
public function G4_172(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 56
//G5_275 (CreekwoodForest_fla.G5_275)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G5_275 extends MovieClip {
public var hit_mc:MovieClip;
public function G5_275(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 57
//G6_278 (CreekwoodForest_fla.G6_278)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G6_278 extends MovieClip {
public var hit_mc:MovieClip;
public function G6_278(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 58
//G7_239 (CreekwoodForest_fla.G7_239)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G7_239 extends MovieClip {
public var hit_mc:MovieClip;
public function G7_239(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 59
//G8_252 (CreekwoodForest_fla.G8_252)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class G8_252 extends MovieClip {
public var hit_mc:MovieClip;
public function G8_252(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package CreekwoodForest_fla
Section 60
//H1_128 (CreekwoodForest_fla.H1_128)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H1_128 extends MovieClip {
public var hit_mc:MovieClip;
public function H1_128(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 61
//H2_160 (CreekwoodForest_fla.H2_160)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H2_160 extends MovieClip {
public var hit_mc:MovieClip;
public function H2_160(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 62
//H3_178 (CreekwoodForest_fla.H3_178)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H3_178 extends MovieClip {
public var hit_mc:MovieClip;
public function H3_178(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 63
//H4_186 (CreekwoodForest_fla.H4_186)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H4_186 extends MovieClip {
public var hit_mc:MovieClip;
public function H4_186(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 64
//H5_205 (CreekwoodForest_fla.H5_205)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H5_205 extends MovieClip {
public var hit_mc:MovieClip;
public function H5_205(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
stop();
}
}
}//package CreekwoodForest_fla
Section 65
//H6_237 (CreekwoodForest_fla.H6_237)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H6_237 extends MovieClip {
public var hit_mc:MovieClip;
public function H6_237(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 66
//H7_254 (CreekwoodForest_fla.H7_254)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H7_254 extends MovieClip {
public var hit_mc:MovieClip;
public function H7_254(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 67
//H8_253 (CreekwoodForest_fla.H8_253)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class H8_253 extends MovieClip {
public var hit_mc:MovieClip;
public function H8_253(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package CreekwoodForest_fla
Section 68
//loadingbar_14 (CreekwoodForest_fla.loadingbar_14)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class loadingbar_14 extends MovieClip {
public function loadingbar_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 69
//PreloadClip_36 (CreekwoodForest_fla.PreloadClip_36)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class PreloadClip_36 extends MovieClip {
public function PreloadClip_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 70
//Symbol1DFEGDGFGDG_327 (CreekwoodForest_fla.Symbol1DFEGDGFGDG_327)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class Symbol1DFEGDGFGDG_327 extends MovieClip {
public function Symbol1DFEGDGFGDG_327(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 71
//Symbol221_295 (CreekwoodForest_fla.Symbol221_295)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class Symbol221_295 extends MovieClip {
public var flower_mc:MovieClip;
}
}//package CreekwoodForest_fla
Section 72
//Symbol222_300 (CreekwoodForest_fla.Symbol222_300)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class Symbol222_300 extends MovieClip {
public var arrow_mc:MovieClip;
}
}//package CreekwoodForest_fla
Section 73
//Symbol237_309 (CreekwoodForest_fla.Symbol237_309)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class Symbol237_309 extends MovieClip {
public function Symbol237_309(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 74
//Symbol242_32 (CreekwoodForest_fla.Symbol242_32)
package CreekwoodForest_fla {
import flash.display.*;
public dynamic class Symbol242_32 extends MovieClip {
public function Symbol242_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 75
//Symbol243_319 (CreekwoodForest_fla.Symbol243_319)
package CreekwoodForest_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol243_319 extends MovieClip {
public var next_btn:SimpleButton;
public var restart_btn:SimpleButton;
public var score_txt:TextField;
public var menu_btn:SimpleButton;
public var rank_mc:MovieClip;
public var bestScore_txt:TextField;
public function Symbol243_319(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CreekwoodForest_fla
Section 76
//TransitionClip_29 (CreekwoodForest_fla.TransitionClip_29)
package CreekwoodForest_fla {
import flash.events.*;
import flash.display.*;
public dynamic class TransitionClip_29 extends MovieClip {
public function TransitionClip_29(){
addFrameScript(0, frame1, 40, frame41);
}
function frame1(){
stop();
}
function frame41(){
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}//package CreekwoodForest_fla
Section 77
//MovieClipPreloader (sfb.application.preloader.MovieClipPreloader)
package sfb.application.preloader {
import flash.events.*;
import flash.display.*;
public class MovieClipPreloader extends Preloader {
protected var target:MovieClip;
protected var totalFrames:uint;
public function MovieClipPreloader(_arg1:MovieClip){
super(_arg1.root.loaderInfo);
this.target = _arg1;
this.target.gotoAndStop(1);
this.totalFrames = this.target.totalFrames;
}
override protected function checkProgress(_arg1:Event):void{
var _local2:uint;
_local2 = Math.ceil((this.progress * this.totalFrames));
this.target.gotoAndStop(_local2);
if (this.progress >= 1){
this.dispatchEvent(new Event(Event.COMPLETE));
};
}
}
}//package sfb.application.preloader
Section 78
//Preloader (sfb.application.preloader.Preloader)
package sfb.application.preloader {
import flash.events.*;
import flash.display.*;
public class Preloader extends EventDispatcher {
protected var loaderInfo:LoaderInfo;
public function Preloader(_arg1:LoaderInfo){
this.loaderInfo = _arg1;
}
public function start():void{
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, this.checkProgress);
}
protected function checkProgress(_arg1:Event):void{
if (this.progress >= 1){
this.dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get progress():Number{
return ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal));
}
}
}//package sfb.application.preloader
Section 79
//EncodedGameSave (sfb.application.saves.EncodedGameSave)
package sfb.application.saves {
import flash.utils.*;
public class EncodedGameSave {
public var colourBorder:uint;
public var colourBackground:uint;
public var data:Object;
public var image1:ByteArray;
public var image2:ByteArray;
public var title:String;
public var colourText:uint;
public var link:String;
public var description:String;
public function EncodedGameSave(){
this.data = {};
}
}
}//package sfb.application.saves
Section 80
//GameSave (sfb.application.saves.GameSave)
package sfb.application.saves {
import flash.display.*;
import flash.geom.*;
public class GameSave {
public var colourBorder:uint;
public var colourText:uint;
public var colourBackground:uint;
public var title:String;
public var image1:BitmapData;
public var link:String;
public var vars:Array;
public var description:String;
public var image2:BitmapData;
public static const imageSize:Rectangle = new Rectangle(0, 0, 80, 50);
public function GameSave(){
this.image1 = new BitmapData(GameSave.imageSize.width, GameSave.imageSize.height);
this.image2 = new BitmapData(GameSave.imageSize.width, GameSave.imageSize.height);
}
public function updateToObject(_arg1:Object):void{
var _local2:String;
for (_local2 in this.vars) {
_arg1[this.vars[_local2]] = this[this.vars[_local2]];
};
}
public function encode():EncodedGameSave{
var _local1:EncodedGameSave;
_local1 = new EncodedGameSave();
_local1.title = this.title;
_local1.description = this.description;
_local1.link = this.link;
_local1.colourBorder = this.colourBorder;
_local1.colourBackground = this.colourBackground;
_local1.colourText = this.colourText;
_local1.image1 = this.image1.getPixels(GameSave.imageSize);
_local1.image2 = this.image2.getPixels(GameSave.imageSize);
this.updateToObject(_local1.data);
return (_local1);
}
public function updateFromObject(_arg1:Object):void{
var _local2:String;
for (_local2 in this.vars) {
this[this.vars[_local2]] = _arg1[this.vars[_local2]];
};
}
public function decode(_arg1:EncodedGameSave):void{
if (_arg1 != null){
this.title = _arg1.title;
this.description = _arg1.description;
this.link = _arg1.link;
this.colourBorder = _arg1.colourBorder;
this.colourBackground = _arg1.colourBackground;
this.colourText = _arg1.colourText;
_arg1.image1.position = 0;
_arg1.image2.position = 0;
this.image1.setPixels(GameSave.imageSize, _arg1.image1);
this.image2.setPixels(GameSave.imageSize, _arg1.image2);
this.updateFromObject(_arg1.data);
};
}
}
}//package sfb.application.saves
Section 81
//SaveSystem (sfb.application.saves.SaveSystem)
package sfb.application.saves {
import flash.events.*;
import flash.net.*;
public class SaveSystem extends EventDispatcher {
private var sharedObject:SharedObject;
private var saveLocation:String;
private var gameName:String;
public function SaveSystem(_arg1:String){
this.saveLocation = "sfbsavegamesystem";
registerClassAlias("sfb.application.saves.EncodedGameSave", EncodedGameSave);
this.gameName = _arg1;
this.sharedObject = SharedObject.getLocal(this.saveLocation, "/");
if (!this.sharedObject.data[_arg1]){
this.sharedObject.data[_arg1] = {};
};
}
public function save(_arg1:EncodedGameSave):void{
var save = _arg1;
this.sharedObject.data[gameName].save = save;
try {
this.sharedObject.flush(5000);
} catch(e:Error) {
};
}
public function load():EncodedGameSave{
return ((this.sharedObject.data[gameName].save as EncodedGameSave));
}
}
}//package sfb.application.saves
Section 82
//Application (sfb.application.Application)
package sfb.application {
import flash.events.*;
import sfb.application.saves.*;
import flash.display.*;
import flash.utils.*;
import sfb.events.*;
import flash.net.*;
import sfb.application.preloader.*;
import flash.ui.*;
public class Application extends MovieClip {
protected var sfbLink:ContextMenuItem;
protected var lowQuality:ContextMenuItem;
public var saveSystem:SaveSystem;
protected var pmgLink:ContextMenuItem;
public var rightClickMenu:ContextMenu;
protected var agLink:ContextMenuItem;
public var preloader:Preloader;
protected var links:Dictionary;
protected var mediumQuality:ContextMenuItem;
protected var qualityIndicator:String;// = " <<<"
protected var highQuality:ContextMenuItem;
public static var application:Application;
public function Application(){
qualityIndicator = " <<<";
super();
this.stop();
Application.application = this;
this.createRightClickMenu();
this.links = new Dictionary(true);
}
public function linkToAB(_arg1:InteractiveObject):void{
_arg1.addEventListener(MouseEvent.CLICK, this.browseToAB);
}
protected function preload():void{
if (this.preloader){
this.preloader.addEventListener(Event.COMPLETE, this.preloadComplete);
this.preloader.start();
};
}
public function qualityToLow(_arg1:Event=null):void{
this.stage.quality = StageQuality.LOW;
this.highQuality.caption = this.removeQualityIndicator(this.highQuality.caption);
this.mediumQuality.caption = this.removeQualityIndicator(this.mediumQuality.caption);
this.lowQuality.caption = this.removeQualityIndicator(this.lowQuality.caption);
this.lowQuality.caption = (this.lowQuality.caption + this.qualityIndicator);
this.dispatchEvent(new ApplicationEvent(ApplicationEvent.QUALITY_CHANGE));
}
public function linkTo(_arg1:InteractiveObject, _arg2:String):void{
this.links[_arg1] = _arg2;
_arg1.addEventListener(MouseEvent.CLICK, this.browseToLink);
}
public function browseToNG(_arg1:Event=null):void{
navigateToURL(new URLRequest("http://www.newgrounds.com/"), "_blank");
}
public function linkToSFB(_arg1:InteractiveObject):void{
_arg1.addEventListener(MouseEvent.CLICK, this.browseToSFB);
}
public function browseToLink(_arg1:Event=null):void{
navigateToURL(new URLRequest(this.links[_arg1.target]), "_blank");
}
protected function preloadComplete(_arg1:Event):void{
}
protected function removeQualityIndicator(_arg1:String):String{
if (_arg1.substr((_arg1.length - this.qualityIndicator.length)) == this.qualityIndicator){
return (_arg1.substring(0, (_arg1.length - this.qualityIndicator.length)));
};
return (_arg1);
}
public function linkToAG(_arg1:InteractiveObject):void{
_arg1.addEventListener(MouseEvent.CLICK, this.browseToAG);
}
public function browseToSFB(_arg1:Event=null):void{
navigateToURL(new URLRequest("http://www.superflashbros.net/"), "_blank");
}
public function browseToAB(_arg1:Event=null):void{
navigateToURL(new URLRequest("http://www.armorblog.com/"), "_blank");
}
public function browseToAG(_arg1:Event=null):void{
navigateToURL(new URLRequest("http://www.armorgames.com/"), "_blank");
}
public function linkToNG(_arg1:InteractiveObject):void{
_arg1.addEventListener(MouseEvent.CLICK, this.browseToNG);
}
protected function createRightClickMenu():void{
this.rightClickMenu = new ContextMenu();
this.rightClickMenu.hideBuiltInItems();
this.highQuality = new ContextMenuItem("Quality: High");
this.highQuality.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.qualityToHigh);
this.mediumQuality = new ContextMenuItem("Quality: Medium");
this.mediumQuality.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.qualityToMedium);
this.lowQuality = new ContextMenuItem("Quality: Low");
this.lowQuality.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.qualityToLow);
this.sfbLink = new ContextMenuItem("SuperFlashBros.net", true);
this.sfbLink.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.browseToSFB);
this.agLink = new ContextMenuItem("ArmorGames.com");
this.agLink.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.browseToAG);
this.pmgLink = new ContextMenuItem("Play More Games!");
this.pmgLink.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.browseToAG);
this.rightClickMenu.customItems.push(this.highQuality);
this.rightClickMenu.customItems.push(this.mediumQuality);
this.rightClickMenu.customItems.push(this.lowQuality);
this.rightClickMenu.customItems.push(this.sfbLink);
this.rightClickMenu.customItems.push(this.agLink);
this.rightClickMenu.customItems.push(this.pmgLink);
this.contextMenu = rightClickMenu;
this.qualityToHigh();
}
public function qualityToHigh(_arg1:Event=null):void{
this.stage.quality = StageQuality.HIGH;
this.highQuality.caption = this.removeQualityIndicator(this.highQuality.caption);
this.mediumQuality.caption = this.removeQualityIndicator(this.mediumQuality.caption);
this.lowQuality.caption = this.removeQualityIndicator(this.lowQuality.caption);
this.highQuality.caption = (this.highQuality.caption + this.qualityIndicator);
this.dispatchEvent(new ApplicationEvent(ApplicationEvent.QUALITY_CHANGE));
}
public function qualityToMedium(_arg1:Event=null):void{
this.stage.quality = StageQuality.MEDIUM;
this.highQuality.caption = this.removeQualityIndicator(this.highQuality.caption);
this.mediumQuality.caption = this.removeQualityIndicator(this.mediumQuality.caption);
this.lowQuality.caption = this.removeQualityIndicator(this.lowQuality.caption);
this.mediumQuality.caption = (this.mediumQuality.caption + this.qualityIndicator);
this.dispatchEvent(new ApplicationEvent(ApplicationEvent.QUALITY_CHANGE));
}
}
}//package sfb.application
Section 83
//Game (sfb.application.Game)
package sfb.application {
public class Game extends Application {
protected var flashkeys:Array;
public var currentGame:uint;
protected var SU0249s:Array;
public var score:Number;
public static var game:Game;
public function Game(){
Game.game = this;
}
public function get SU0249():String{
return (this.SU0249s[this.currentGame]);
}
public function get flashkey():String{
return (this.flashkeys[this.currentGame]);
}
}
}//package sfb.application
Section 84
//MusicManager (sfb.audio.MusicManager)
package sfb.audio {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class MusicManager {
private var setVolume:Number;
private var musicChannel:SoundChannel;
private var isMuted:Boolean;
private var oldMusicChannel:SoundChannel;
private var fadeTimer:Timer;
private var volSpeed:Number;
private var oldVolSpeed:Number;
private var music_array:Array;
private static var INSTANCE:MusicManager;
public function MusicManager(){
this.music_array = [];
this.fadeTimer = new Timer(20);
this.fadeTimer.addEventListener(TimerEvent.TIMER, this.fadeInOut);
this.setVolume = 1;
}
public function stopMusic():void{
this.fadeTimer.stop();
if (this.oldMusicChannel){
this.oldMusicChannel.stop();
this.oldMusicChannel = null;
};
if (this.musicChannel){
this.musicChannel.stop();
this.musicChannel = null;
};
}
public function addMusic(_arg1:Class, _arg2:String):void{
this.music_array[_arg2] = new (_arg1);
}
private function fadeInOut(_arg1:TimerEvent):void{
var _local2:SoundTransform;
var _local3:SoundTransform;
if (this.oldMusicChannel){
_local2 = this.oldMusicChannel.soundTransform;
_local2.volume = (_local2.volume - oldVolSpeed);
this.oldMusicChannel.soundTransform = _local2;
if (_local2.volume < 0.05){
this.oldMusicChannel.stop();
};
};
if (this.musicChannel){
_local3 = this.musicChannel.soundTransform;
_local3.volume = (_local3.volume + volSpeed);
this.musicChannel.soundTransform = _local3;
};
}
public function playMusic(_arg1:String, _arg2:int=40000000, _arg3:Number=1, _arg4:Number=0, _arg5:int=0):void{
var _local6:Number;
if (this.music_array[_arg1]){
this.setVolume = _arg3;
_local6 = _arg3;
if (this.oldMusicChannel){
this.oldMusicChannel.stop();
};
if (_arg5 != 0){
if (this.musicChannel){
this.oldMusicChannel = this.musicChannel;
this.oldVolSpeed = (this.oldMusicChannel.soundTransform.volume / (_arg5 / 20));
};
this.volSpeed = (_arg3 / (_arg5 / 20));
_local6 = 0;
this.fadeTimer.repeatCount = Math.round((_arg5 / 20));
this.fadeTimer.reset();
this.fadeTimer.start();
} else {
if (this.musicChannel){
this.musicChannel.stop();
};
};
this.musicChannel = Sound(this.music_array[_arg1]).play(0, _arg2, new SoundTransform(_local6, _arg4));
};
}
public function mute():void{
var _local1:SoundTransform;
var _local2:SoundTransform;
this.fadeTimer.stop();
this.isMuted = true;
if (this.oldMusicChannel){
_local1 = this.oldMusicChannel.soundTransform;
_local1.volume = 0;
this.oldMusicChannel.soundTransform = _local1;
};
if (this.musicChannel){
_local2 = this.musicChannel.soundTransform;
_local2.volume = 0;
this.musicChannel.soundTransform = _local2;
};
}
public function get muted():Boolean{
return (this.isMuted);
}
public function unmute():void{
var _local1:SoundTransform;
this.isMuted = false;
if (this.musicChannel){
_local1 = this.musicChannel.soundTransform;
_local1.volume = this.setVolume;
this.musicChannel.soundTransform = _local1;
};
}
public static function getInstance():MusicManager{
if (INSTANCE){
return (INSTANCE);
};
INSTANCE = new (MusicManager);
return (INSTANCE);
}
}
}//package sfb.audio
Section 85
//SFXManager (sfb.audio.SFXManager)
package sfb.audio {
import flash.events.*;
import flash.media.*;
public class SFXManager {
private var sfxChannel_array:Array;
private var sfx_array:Array;
private static var INSTANCE:SFXManager;
public function SFXManager(){
this.sfx_array = [];
this.sfxChannel_array = [];
}
public function stopSFX(_arg1:String):void{
if (this.sfxChannel_array[_arg1]){
SoundChannel(this.sfxChannel_array[_arg1]).stop();
this.sfxChannel_array[_arg1] = null;
};
}
public function addSFX(_arg1:Class, _arg2:String):void{
this.sfx_array[_arg2] = new (_arg1);
}
public function stopAllSFX():void{
var _local1:String;
for (_local1 in this.sfxChannel_array) {
if (this.sfxChannel_array[_local1]){
this.stopSFX(_local1);
};
};
}
private function completeListener(_arg1:Event):void{
var _local2:String;
for (_local2 in this.sfxChannel_array) {
if (this.sfxChannel_array[_local2] == _arg1.target){
this.stopSFX(_local2);
};
};
}
public function playSFX(_arg1:String, _arg2:int=0, _arg3:Number=1, _arg4:Number=0, _arg5:Boolean=false, _arg6:uint=0):void{
if (((this.sfx_array[_arg1]) && (((!(_arg5)) || (!(this.sfxChannel_array[_arg1])))))){
this.sfxChannel_array[_arg1] = Sound(this.sfx_array[_arg1]).play(_arg6, _arg2, new SoundTransform(_arg3, _arg4));
this.sfxChannel_array[_arg1].addEventListener(Event.SOUND_COMPLETE, this.completeListener);
};
}
public function isSFXPlaying(_arg1:String):Boolean{
if (this.sfxChannel_array[_arg1]){
return (true);
};
return (false);
}
public static function getInstance():SFXManager{
if (INSTANCE){
return (INSTANCE);
};
INSTANCE = new (SFXManager);
return (INSTANCE);
}
}
}//package sfb.audio
Section 86
//ApplicationEvent (sfb.events.ApplicationEvent)
package sfb.events {
import flash.events.*;
public class ApplicationEvent extends Event {
public static const QUALITY_CHANGE:String = "appQualityChange";
public function ApplicationEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package sfb.events
Section 87
//TimeConversion (sfb.tools.TimeConversion)
package sfb.tools {
public class TimeConversion {
public static function milliToSecs(_arg1:uint, _arg2:int=2, _arg3:uint=3):String{
var _local4:Boolean;
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:String;
var _local10:Number;
var _local11:uint;
var _local12:String;
var _local13:uint;
_local4 = false;
_local5 = (_arg1 / 1000);
_local6 = Math.floor(_local5);
_local7 = (_arg1 - (1000 * _local6));
_local8 = String(_local6);
while (_local8.length < _arg3) {
_local8 = ("0" + _local8);
};
if (_local8.length > _arg3){
_local8 = "";
_local4 = true;
while (_local8.length < _arg3) {
_local8 = ("9" + _local8);
};
};
_local9 = _local8;
if (_arg2 > 0){
_local9 = (_local9 + ".");
_local10 = Math.pow(10, _arg2);
_local11 = ((1000 * Math.round(((_local7 * _local10) / 1000))) / _local10);
_local12 = String(_local11);
while (_local12.length < 4) {
_local12 = ("0" + _local12);
};
_local12 = _local12.substr(0, _arg2);
if (_local4){
_local13 = 0;
while (_local13 < _arg2) {
_local9 = (_local9 + "9");
_local13++;
};
} else {
_local9 = (_local9 + _local12);
};
};
return (_local9);
}
public static function milliToMinsSecs(_arg1:uint, _arg2:int=2, _arg3:uint=3):String{
var _local4:Boolean;
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:Number;
var _local9:uint;
var _local10:uint;
var _local11:String;
var _local12:String;
var _local13:String;
var _local14:Number;
var _local15:uint;
var _local16:String;
var _local17:uint;
_local4 = false;
_local5 = (_arg1 / 1000);
_local6 = Math.floor(_local5);
_local7 = (_arg1 - (1000 * _local6));
_local8 = (_local6 / 60);
_local9 = Math.floor(_local8);
_local10 = (_local6 - (60 * _local9));
_local11 = String(_local9);
while (_local11.length < _arg3) {
_local11 = ("0" + _local11);
};
if (_local11.length > _arg3){
_local11 = "";
_local4 = true;
while (_local11.length < _arg3) {
_local11 = ("9" + _local11);
};
};
_local12 = String(_local10);
while (_local12.length < 2) {
_local12 = ("0" + _local12);
};
if (_local4){
_local12 = "59";
};
_local13 = ((_local11 + ":") + _local12);
if (_arg2 > 0){
_local13 = (_local13 + ".");
_local14 = Math.pow(10, _arg2);
_local15 = ((1000 * Math.round(((_local7 * _local14) / 1000))) / _local14);
_local16 = String(_local15);
while (_local16.length < 4) {
_local16 = ("0" + _local16);
};
_local16 = _local16.substr(0, _arg2);
if (_local4){
_local17 = 0;
while (_local17 < _arg2) {
_local13 = (_local13 + "9");
_local17++;
};
} else {
_local13 = (_local13 + _local16);
};
};
return (_local13);
}
}
}//package sfb.tools
Section 88
//LoseSound (LoseSound)
package {
import flash.media.*;
public dynamic class LoseSound extends Sound {
}
}//package
Section 89
//Music (Music)
package {
import flash.media.*;
public dynamic class Music extends Sound {
}
}//package
Section 90
//SaveImage1 (SaveImage1)
package {
import flash.display.*;
public dynamic class SaveImage1 extends MovieClip {
}
}//package
Section 91
//SaveImage2 (SaveImage2)
package {
import flash.display.*;
public dynamic class SaveImage2 extends MovieClip {
}
}//package
Section 92
//StartTarget (StartTarget)
package {
import flash.display.*;
public dynamic class StartTarget extends MovieClip {
}
}//package
Section 93
//WinSound (WinSound)
package {
import flash.media.*;
public dynamic class WinSound extends Sound {
}
}//package