Section 1
//Fish (fishfactory.Fish)
package fishfactory {
import flash.display.*;
import fishfactory.*;
class Fish extends FishSound {
protected var interestDistanceDefault:Number;
protected var _personalSpaceStep:Number;
var leftMaxX:Number;
protected var _numID:uint;
protected var _fightDistance:uint;
protected var _fishWeight:Number;
protected var _attentionCntLimit:Number;
var targetDisplayObject:Object;
protected var _personalSpace:Number;
var directionX:Number;
var rangeX:Number;
var fishGlowOn:Boolean;
var viewAngleX:Number;
var speedX:Number;
var clipX:Number;
var clipY:Number;
var clipZ:Number;
protected var _zFactor:Number;
protected var fishMoney:FishMoney;
protected var _moneyWorth:Number;
protected var _spaceAchieved:Boolean;
protected var _attentionCnt:Number;
protected var _fishKind:String;
protected var _stalkSpeed:Number;
protected var _defaultZ:Number;
protected var _defaultX:Number;
protected var _interestDistance:Number;
var rightMaxX:Number;
protected var _atDefaultLoc:Boolean;
function Fish(_arg1:IModel, _arg2:IController){
super(_arg1, _arg2);
_interestDistance = interestDistanceDefault;
_personalSpace = interestDistanceDefault;
_attentionCnt = 0;
nibbleCnt = 0;
_spaceAchieved = false;
fishGlowOn = false;
rangeX = 500;
_fishWeight = 10;
speedX = 2;
_stalkSpeed = 2;
interestDistanceDefault = 35;
_personalSpaceStep = 10;
_attentionCntLimit = 60;
_nibbleCntEat = 20;
_nibbleCntOnHookEat = 60;
_fightDistance = 2000;
fishMoney = new FishMoney();
}
public function get fishKind():String{
return (_fishKind);
}
function set attentionCntLimit(_arg1:Number){
_attentionCntLimit = _arg1;
}
public function get fightDistance():uint{
return (_fightDistance);
}
public function get targetObject():MovieClip{
return (_targetObject);
}
public function get defaultX():Number{
return (_defaultX);
}
function get nibbleCntEat():Number{
return (_nibbleCntEat);
}
public function get defaultZ():Number{
return (_defaultZ);
}
function get interestDistanceStart():Number{
return (interestDistanceDefault);
}
public function set defaultX(_arg1:Number){
_defaultX = _arg1;
}
public function set numID(_arg1:uint){
_numID = _arg1;
}
function set interestDistance(_arg1:Number){
_interestDistance = _arg1;
}
public function set defaultZ(_arg1:Number){
_defaultZ = _arg1;
}
function get personalSpaceStep():Number{
return (_personalSpaceStep);
}
public function get targetObjectIndex():Number{
return (targetDisplayObject.getChildIndex(targetObject));
}
function get personalSpace():Number{
return (_personalSpace);
}
function resetInterestDistance():void{
_interestDistance = interestDistanceDefault;
}
function set spaceAchieved(_arg1:Boolean){
_spaceAchieved = _arg1;
}
function cleanUp():void{
targetDisplayObject.removeChild(_targetObject);
stopSFX();
}
function set zFactor(_arg1:Number):void{
_zFactor = _arg1;
}
function set attentionCnt(_arg1:Number){
_attentionCnt = _arg1;
}
public function get fishWeight():Number{
return (_fishWeight);
}
function get nibbleCntOnHookEat():Number{
return (_nibbleCntOnHookEat);
}
function init(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
_moneyWorth = fishMoney.getMoney(_fishKind);
viewAngleX = 0;
_defaultX = _arg2;
_defaultZ = _arg4;
leftMaxX = (_defaultX - rangeX);
rightMaxX = (_defaultX + rangeX);
_atDefaultLoc = true;
if (Math.floor((Math.random() * 2)) == 1){
directionX = -1;
} else {
directionX = 1;
};
clipX = (_defaultX + (Math.floor((Math.random() * rangeX)) * directionX));
clipY = _arg3;
clipZ = _arg4;
targetDisplayObject = _arg1;
_targetObject = new FishRobotMC();
_targetObject.zPosition = _arg4;
_targetObject.mcFishAll.gotoAndStop(_fishKind);
_targetObject.cacheAsBitmap = true;
targetDisplayObject.addChild(_targetObject);
}
function get attentionCntLimit():Number{
return (_attentionCntLimit);
}
public function get numID():uint{
return (_numID);
}
function get interestDistance():Number{
return (_interestDistance);
}
function set personalSpace(_arg1:Number){
_personalSpace = _arg1;
}
function get spaceAchieved():Boolean{
return (_spaceAchieved);
}
function get attentionCnt():Number{
return (_attentionCnt);
}
function set xPosition(_arg1:Number){
clipX = _arg1;
}
function resetPersonalSpace():void{
_personalSpace = interestDistanceDefault;
}
function set atDefaultLoc(_arg1:Boolean){
_atDefaultLoc = _arg1;
}
public function set zPosition(_arg1:Number){
clipZ = _arg1;
}
public function get moneyWorth():Number{
return (_moneyWorth);
}
function drawFish():void{
}
function get xPosition():Number{
return (clipX);
}
public function get zPosition():Number{
return (clipZ);
}
function get atDefaultLoc():Boolean{
return (_atDefaultLoc);
}
function get stalkSpeed():Number{
return (_stalkSpeed);
}
function expandInterestDistance():void{
_interestDistance = (interestDistanceDefault + (_personalSpaceStep * 2));
}
}
}//package fishfactory
Section 2
//FishAI (fishfactory.FishAI)
package fishfactory {
import flash.display.*;
import flash.events.*;
import fishfactory.*;
import utils.*;
class FishAI {
private var controller:FishController;
private var model:IModel;
private var tackle:MovieClip;
private var threeDConv:ThreeDConversion;
function FishAI(_arg1:IModel, _arg2:FishController, _arg3:MovieClip){
model = _arg1;
controller = _arg2;
tackle = _arg3;
threeDConv = new ThreeDConversion();
}
function fishPace(_arg1:Fish):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
controller.fishGlowOff(_arg1.targetObject);
_arg1.stopSFX();
resetFish(_arg1);
resetFishAttention(_arg1);
if (!_arg1.atDefaultLoc){
_local2 = (_arg1.defaultX - _arg1.xPosition);
_local3 = (_arg1.defaultZ - _arg1.zPosition);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local5 = threeDConv.threeDScale(_arg1.zPosition, model.zoomZ, model.viewDistance);
_local4 = (_local4 * _local5);
if (_local4 <= ((_arg1.speedX * 2) * _local5)){
_arg1.atDefaultLoc = true;
};
if (_arg1.defaultX > _arg1.xPosition){
_arg1.directionX = -1;
} else {
_arg1.directionX = 1;
};
_local6 = Math.atan2(_local3, _local2);
_arg1.xPosition = (_arg1.xPosition + (Math.cos(_local6) * _arg1.speedX));
_arg1.zPosition = (_arg1.zPosition + (Math.sin(_local6) * _arg1.speedX));
} else {
_arg1.xPosition = (_arg1.xPosition - (_arg1.speedX * _arg1.directionX));
if ((((_arg1.xPosition < _arg1.leftMaxX)) || ((_arg1.xPosition < model.fishLeftMaxX)))){
_arg1.directionX = -1;
} else {
if ((((_arg1.xPosition > _arg1.rightMaxX)) || ((_arg1.xPosition > model.fishRightMaxX)))){
_arg1.directionX = 1;
};
};
};
controller.update3dObject(_arg1.targetObject, _arg1.xPosition, _arg1.clipY, _arg1.zPosition, _arg1.viewAngleX, _arg1.directionX);
}
private function fishAteWorm(_arg1:Fish):void{
_arg1.playSFX("fish gulp");
_arg1.targetObject.removeEventListener(Event.COMPLETE, controller.fishBiteDown);
_arg1.targetObject.gotoAndPlay("open");
model.wormOnHook = false;
model.wormCnt--;
model.bobberBob = false;
controller.fishNibbling = null;
controller.fishGlowOff(_arg1.targetObject);
_arg1.nibbleCnt = 0;
}
private function resetFish(_arg1:Fish):void{
_arg1.nibbleCnt = 0;
if (controller.fishNibbling == _arg1){
controller.fishNibbling = null;
model.bobberBob = false;
_arg1.targetObject.gotoAndStop("close");
};
}
private function resetFishAttention(_arg1:Fish):void{
_arg1.spaceAchieved = false;
_arg1.resetPersonalSpace();
_arg1.resetInterestDistance();
}
private function moveFishToTackle(_arg1:Fish, _arg2:Number, _arg3:Number):void{
var _local4:Number;
_arg1.atDefaultLoc = false;
if ((((tackle.x < _arg1.targetObject.x)) && ((_arg1.directionX == -1)))){
_arg1.directionX = 1;
} else {
if ((((tackle.x > _arg1.targetObject.x)) && ((_arg1.directionX == 1)))){
_arg1.directionX = -1;
};
};
_arg1.attentionCnt = 0;
_arg1.xPosition = (_arg1.xPosition + (Math.cos(_arg2) * _arg3));
_local4 = (_arg1.zPosition + (Math.sin(_arg2) * _arg3));
if (_local4 > 210){
_arg1.zPosition = _local4;
};
_arg1.playSFX("fish stalking");
controller.update3dObject(_arg1.targetObject, _arg1.xPosition, _arg1.clipY, _arg1.zPosition, _arg1.viewAngleX, _arg1.directionX);
}
function fishStalking(_arg1:Fish, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean):void{
_arg1.zFactor = _arg4;
if (_arg1.personalSpace == _arg1.interestDistanceStart){
_arg1.personalSpace = (_arg1.personalSpace - _arg1.personalSpaceStep);
};
_arg1.expandInterestDistance();
if (controller.fishNibbling == _arg1){
_arg1.stopSFX();
_arg1.targetObject.zPosition = (tackle.zPosition - 1);
if (model.fishOnHook == null){
if (_arg1.nibbleCnt == 0){
model.bobberBob = true;
_arg1.startNibbleTimer();
};
if (_arg5){
model.bobberBob = false;
model.fishOnHook = _arg1;
_arg1.targetObject.visible = false;
_arg1.nibbleCnt = 0;
} else {
if (_arg1.nibbleCnt == _arg1.nibbleCntEat){
fishAteWorm(_arg1);
};
};
};
if ((((_arg1.nibbleCnt == _arg1.nibbleCntOnHookEat)) && ((model.fishOnHook == _arg1)))){
model.fishOnHook = null;
_arg1.targetObject.visible = true;
fishAteWorm(_arg1);
_arg1.stopNibbleTimer();
};
} else {
if ((((_arg3 <= (_arg1.stalkSpeed * _arg4))) && ((_arg1.personalSpace == 0)))){
_arg1.nibbleCnt = 0;
moveFishToTackle(_arg1, _arg2, _arg1.stalkSpeed);
controller.fishNibbling = _arg1;
_arg1.targetObject.gotoAndPlay("open");
_arg1.targetObject.addEventListener(Event.COMPLETE, controller.fishBiteDown);
controller.changeFishGlow(_arg1.targetObject, 0xFFFF00, 2.5);
resetFishAttention(_arg1);
} else {
if (_arg1.personalSpace == 0){
moveFishToTackle(_arg1, _arg2, _arg1.stalkSpeed);
} else {
if ((((model.fishOnHook == null)) && ((controller.fishNibbling == null)))){
if (((!(_arg1.spaceAchieved)) && ((_arg1.attentionCnt < _arg1.attentionCntLimit)))){
if ((_arg3 - (_arg1.stalkSpeed + (1 * _arg4))) > (_arg1.personalSpace * _arg4)){
moveFishToTackle(_arg1, _arg2, _arg1.stalkSpeed);
} else {
if ((_arg3 + (_arg1.stalkSpeed - (1 * _arg4))) < (_arg1.personalSpace * _arg4)){
moveFishToTackle(_arg1, _arg2, (_arg1.stalkSpeed * -1));
} else {
_arg1.spaceAchieved = true;
controller.changeFishGlow(_arg1.targetObject, 0xFF00, 3);
};
};
};
if (((_arg5) && (_arg1.spaceAchieved))){
_arg1.personalSpace = (_arg1.personalSpace - _arg1.personalSpaceStep);
if (_arg1.personalSpace < 0){
_arg1.personalSpace = 0;
};
_arg1.spaceAchieved = false;
controller.changeFishGlow(_arg1.targetObject, 0xFF0000, 3);
};
resetFish(_arg1);
if (_arg5){
_arg1.attentionCnt = 0;
} else {
if (((!(_arg5)) && (_arg1.spaceAchieved))){
_arg1.attentionCnt++;
if (_arg1.attentionCnt == 1){
_arg1.playSFX("fish waiting");
};
};
};
if (_arg1.attentionCnt >= _arg1.attentionCntLimit){
fishPace(_arg1);
};
} else {
fishPace(_arg1);
};
};
};
};
if (_arg3 <= (_arg1.personalSpace * _arg4)){
};
}
}
}//package fishfactory
Section 3
//FishBigMouthBass (fishfactory.FishBigMouthBass)
package fishfactory {
class FishBigMouthBass extends Fish {
function FishBigMouthBass(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "big mouth bass";
_fishWeight = (10 + Math.floor((Math.random() * 6)));
rangeX = (rangeX - 300);
speedX = (speedX + 2);
_stalkSpeed = (_stalkSpeed + 0);
interestDistanceDefault = (interestDistanceDefault + 10);
_personalSpaceStep = (_personalSpaceStep + 20);
_attentionCntLimit = (_attentionCntLimit + 20);
_nibbleCntEat = (_nibbleCntEat + 30);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 30);
_fightDistance = (_fightDistance - 1000);
}
}
}//package fishfactory
Section 4
//FishCat (fishfactory.FishCat)
package fishfactory {
class FishCat extends Fish {
function FishCat(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "catfish";
_fishWeight = (3 + Math.floor((Math.random() * 4)));
rangeX = (rangeX - 400);
speedX = (speedX - 1);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault + 0);
_personalSpaceStep = (_personalSpaceStep - 3);
_attentionCntLimit = (_attentionCntLimit + 0);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 10);
_fightDistance = (_fightDistance + 500);
}
}
}//package fishfactory
Section 5
//FishClown (fishfactory.FishClown)
package fishfactory {
class FishClown extends Fish {
function FishClown(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "clown fish";
_fishWeight = (8 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 100);
speedX = (speedX + 1);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault - 10);
_personalSpaceStep = (_personalSpaceStep - 5);
_attentionCntLimit = (_attentionCntLimit - 10);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 10);
_fightDistance = (_fightDistance + 1000);
}
}
}//package fishfactory
Section 6
//FishCod (fishfactory.FishCod)
package fishfactory {
class FishCod extends Fish {
function FishCod(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "big mouth cod";
_fishWeight = (30 + Math.floor((Math.random() * 4)));
rangeX = (rangeX - 200);
speedX = (speedX + 3);
_stalkSpeed = (_stalkSpeed + 0);
interestDistanceDefault = (interestDistanceDefault - 5);
_personalSpaceStep = (_personalSpaceStep + 0);
_attentionCntLimit = (_attentionCntLimit - 30);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 5);
_fightDistance = (_fightDistance + 1700);
}
}
}//package fishfactory
Section 7
//FishController (fishfactory.FishController)
package fishfactory {
import flash.display.*;
import flash.events.*;
import fishfactory.*;
import flash.geom.*;
import flash.filters.*;
import utils.*;
class FishController extends Sprite {
var _fishNibbling:Fish;
private var pauseGame:Boolean;
private var model:IModel;
private var tackleOldZPosition:Number;
private var fishAI:FishAI;
private var centerY:Number;
private var threeDConv:ThreeDConversion;
private var centerX:Number;
private var viewDistance:Number;
private var nibbleCnt:Number;
private var tackle:MovieClip;
private var fishArray:Array;
private var viewAngleY:Number;
private var zoomZ:Number;
private var movieClipObject:MovieClip;
function FishController(_arg1:IModel){
fishArray = new Array();
model = _arg1;
viewAngleY = model.viewAngleY;
centerX = model.centerX;
centerY = model.centerY;
zoomZ = model.zoomZ;
viewDistance = model.viewDistance;
}
function removeFish(_arg1:Object):void{
_arg1.targetObject.removeEventListener(Event.COMPLETE, fishBiteDown);
fishArray = model.fishObjArray;
fishArray.splice(fishArray.indexOf(_arg1), 1);
model.fishObjArray = fishArray;
_fishNibbling = null;
model.bobberBob = false;
if (fishArray.length == 0){
movieClipObject.removeEventListener(Event.ENTER_FRAME, fishEnterFrame);
};
}
function fishGlowOff(_arg1:MovieClip):void{
if (_arg1.fishGlowOn){
_arg1.filters = [];
_arg1.fishGlowOn = false;
};
}
function get fishNibbling():Fish{
return (_fishNibbling);
}
function fishGlow(_arg1:MovieClip):void{
var _local2:BitmapFilter;
var _local3:Array;
if (!_arg1.fishGlowOn){
_local2 = getBitmapFilterGlow(0xFF0000, 1.5);
_local3 = new Array();
_local3.push(_local2);
_arg1.filters = _local3;
_arg1.fishGlowOn = true;
};
}
function fishBiteDown(_arg1:Event):void{
_arg1.currentTarget.removeEventListener(Event.COMPLETE, fishBiteDown);
if (_fishNibbling.targetObject == _arg1.currentTarget){
_fishNibbling.targetObject.gotoAndPlay("nibble");
};
}
function init(_arg1:MovieClip, _arg2:MovieClip):void{
model.addEventListener(Event.CHANGE, updateModel);
pauseGame = model.pauseGame;
movieClipObject = _arg1;
tackle = _arg2;
threeDConv = new ThreeDConversion();
fishAI = new FishAI(model, this, _arg2);
}
private function getBitmapFilterGlow(_arg1:Number, _arg2:Number):BitmapFilter{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Number;
_local3 = _arg1;
_local4 = 25;
_local5 = 25;
_local6 = 1;
_local7 = _arg2;
_local8 = false;
_local9 = false;
_local10 = BitmapFilterQuality.HIGH;
return (new GlowFilter(_local3, _local6, _local4, _local5, _local7, _local10, _local8, _local9));
}
function set fishNibbling(_arg1:Fish):void{
var _local2:Number;
if ((((_arg1 == null)) && (!((_fishNibbling == null))))){
_local2 = 0;
while (_local2 < fishArray.length) {
fishArray[_local2].gotoAndStop("close");
_local2++;
};
};
_fishNibbling = _arg1;
}
function addFish(_arg1:Object):void{
fishArray = model.fishObjArray;
fishArray.push(_arg1);
_arg1.xPosition = (_arg1.xPosition - ((_arg1.speedX + Math.floor((Math.random() * 30))) * _arg1.directionX));
model.fishObjArray = fishArray;
if (fishArray.length == 1){
movieClipObject.addEventListener(Event.ENTER_FRAME, fishEnterFrame);
};
}
function cleanUp():void{
var _local1:Number;
movieClipObject.removeEventListener(Event.ENTER_FRAME, fishEnterFrame);
model.removeEventListener(Event.CHANGE, updateModel);
_local1 = 0;
while (_local1 < fishArray.length) {
fishArray[_local1].cleanUp();
delete fishArray[_local1];
_local1++;
};
fishArray.length = 0;
model.fishObjArray = fishArray;
_fishNibbling = null;
model.bobberBob = false;
}
function updateModel(_arg1:Event):void{
if (model.whatChanged == "pauseGame"){
pauseGame = model.pauseGame;
};
}
private function upDateFish():void{
var _local1:Boolean;
var _local2:Number;
var _local3:*;
var _local4:Point;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local1 = true;
if (tackleOldZPosition == tackle.zPosition){
_local1 = false;
};
tackleOldZPosition = tackle.zPosition;
_local2 = 0;
while (_local2 < fishArray.length) {
_local3 = fishArray[_local2];
_local4 = new Point(_local3.targetObject.mcFishAll.mcFishMouth.x, _local3.targetObject.mcFishAll.mcFishMouth.y);
_local5 = _local3.targetObject.mcFishAll.localToGlobal(_local4);
_local6 = (tackle.x - _local5.x);
_local7 = (tackle.zPosition - _local3.zPosition);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
_local9 = threeDConv.threeDScale(_local3.clipZ, zoomZ, viewDistance);
_local8 = (_local8 * _local9);
_local10 = (_local3.interestDistance * _local9);
if ((((((_local8 <= _local10)) && (model.tackelLanded))) && (model.wormOnHook))){
if ((((model.fishOnHook == null)) || ((model.fishOnHook == _local3)))){
_local11 = Math.atan2(_local7, _local6);
fishGlow(_local3.targetObject);
fishAI.fishStalking(_local3, _local11, _local8, _local9, _local1);
} else {
fishAI.fishPace(_local3);
};
} else {
fishAI.fishPace(_local3);
};
_local2++;
};
}
private function fishEnterFrame(_arg1:Event):void{
if (!pauseGame){
upDateFish();
};
}
function changeFishGlow(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var _local4:BitmapFilter;
var _local5:Array;
_arg1.filters = [];
_local4 = getBitmapFilterGlow(_arg2, _arg3);
_local5 = new Array();
_local5.push(_local4);
_arg1.filters = _local5;
_arg1.fishGlowOn = true;
}
function update3dObject(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:*;
_arg1.zPosition = _arg4;
_local7 = threeDConv.threeDPoint(_arg2, _arg3, _arg4, _arg5, viewAngleY, centerX, centerY, zoomZ, viewDistance);
_arg1.scaleX = threeDConv.threeDScale(_arg4, zoomZ, viewDistance);
_arg1.scaleX = (_arg1.scaleX * _arg6);
_arg1.scaleY = threeDConv.threeDScale(_arg4, zoomZ, viewDistance);
_arg1.x = (_local7.thisX - 0);
_arg1.y = (_local7.thisY - ((viewAngleY * threeDConv.threeDScale(0, zoomZ, viewDistance)) / 100));
}
}
}//package fishfactory
Section 8
//FishCreator (fishfactory.FishCreator)
package fishfactory {
import flash.display.*;
public class FishCreator {
private var thisDisplayObject:MovieClip;
private var model:IModel;
private var fishController:FishController;
private var controller:IController;
public static const FISHCOD:uint = 9;
public static const FISHCLOWN:uint = 13;
public static const FISHSALMON:uint = 1;
public static const FISHTROUT:uint = 3;
public static const FISHWORMEATER:uint = 4;
public static const FISHMINNOW:uint = 7;
public static const FISHCAT:uint = 11;
public static const FISHFLOUNDER:uint = 10;
public static const FISHTIKI:uint = 14;
public static const FISHMULLET:uint = 6;
public static const FISHPIRATE:uint = 15;
public static const FISHMUTANT:uint = 12;
public static const FISHHILLBILLY:uint = 5;
public static const FISHGROUPER:uint = 8;
public static const FISHBIGMOUTHBASS:uint = 2;
public function FishCreator(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:MovieClip){
model = _arg1;
controller = _arg2;
thisDisplayObject = _arg3;
fishController = new FishController(model);
fishController.init(thisDisplayObject, _arg4);
}
public function cleanUp():void{
fishController.cleanUp();
}
public function removeFish(_arg1:Object):void{
fishController.removeFish(_arg1);
}
public function addFish(_arg1:uint, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Fish;
_local5 = this.createFish(_arg1);
_local5.init(thisDisplayObject, _arg2, _arg3, _arg4);
_local5.numID = _arg1;
fishController.addFish(_local5);
}
private function createFish(_arg1:uint):Fish{
if (_arg1 == FISHSALMON){
return (new FishSalmon(model, controller));
};
if (_arg1 == FISHBIGMOUTHBASS){
return (new FishBigMouthBass(model, controller));
};
if (_arg1 == FISHTROUT){
return (new FishTrout(model, controller));
};
if (_arg1 == FISHWORMEATER){
return (new FishWormEater(model, controller));
};
if (_arg1 == FISHHILLBILLY){
return (new FishHillBilly(model, controller));
};
if (_arg1 == FISHMULLET){
return (new FishMullet(model, controller));
};
if (_arg1 == FISHMINNOW){
return (new FishMinnow(model, controller));
};
if (_arg1 == FISHGROUPER){
return (new FishGrouper(model, controller));
};
if (_arg1 == FISHCOD){
return (new FishCod(model, controller));
};
if (_arg1 == FISHFLOUNDER){
return (new FishFlounder(model, controller));
};
if (_arg1 == FISHCAT){
return (new FishCat(model, controller));
};
if (_arg1 == FISHMUTANT){
return (new FishMutant(model, controller));
};
if (_arg1 == FISHCLOWN){
return (new FishClown(model, controller));
};
if (_arg1 == FISHTIKI){
return (new FishTiki(model, controller));
};
if (_arg1 == FISHPIRATE){
return (new FishPirate(model, controller));
};
throw (new Error("Invalid kind of fish specified"));
}
}
}//package fishfactory
Section 9
//FishFlounder (fishfactory.FishFlounder)
package fishfactory {
class FishFlounder extends Fish {
function FishFlounder(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "flounder";
_fishWeight = (6 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 350);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault - 5);
_personalSpaceStep = (_personalSpaceStep - 5);
_attentionCntLimit = (_attentionCntLimit - 10);
_nibbleCntEat = (_nibbleCntEat + 0);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 10);
_fightDistance = (_fightDistance + 500);
}
}
}//package fishfactory
Section 10
//FishGrouper (fishfactory.FishGrouper)
package fishfactory {
class FishGrouper extends Fish {
function FishGrouper(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "grouper";
_fishWeight = (50 + Math.floor((Math.random() * 11)));
rangeX = (rangeX - 300);
speedX = (speedX + 2);
_stalkSpeed = (_stalkSpeed + 1);
interestDistanceDefault = (interestDistanceDefault - 5);
_personalSpaceStep = (_personalSpaceStep + 5);
_attentionCntLimit = (_attentionCntLimit - 5);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 0);
_fightDistance = (_fightDistance + 2000);
}
}
}//package fishfactory
Section 11
//FishHillBilly (fishfactory.FishHillBilly)
package fishfactory {
class FishHillBilly extends Fish {
function FishHillBilly(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "hillbilly fish";
_fishWeight = (7 + Math.floor((Math.random() * 4)));
rangeX = (rangeX + 100);
speedX = (speedX - 1);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault - 10);
_personalSpaceStep = (_personalSpaceStep - 5);
_attentionCntLimit = (_attentionCntLimit - 35);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 10);
_fightDistance = (_fightDistance + 1000);
}
}
}//package fishfactory
Section 12
//FishMinnow (fishfactory.FishMinnow)
package fishfactory {
class FishMinnow extends Fish {
function FishMinnow(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "spotted minnow";
_fishWeight = (1 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 200);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed + 5);
interestDistanceDefault = (interestDistanceDefault + 25);
_personalSpaceStep = (_personalSpaceStep + 50);
_attentionCntLimit = (_attentionCntLimit + 10);
_nibbleCntEat = (_nibbleCntEat - 13);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 30);
_fightDistance = (_fightDistance + 700);
}
}
}//package fishfactory
Section 13
//FishMoney (fishfactory.FishMoney)
package fishfactory {
public class FishMoney {
private var baseMoney:int;
public function FishMoney():void{
baseMoney = 200;
}
public function getMoney(_arg1:String):int{
var _local2:int;
_local2 = baseMoney;
if (_arg1 == "bastard worm eater"){
_local2 = (_local2 - 150);
} else {
if (_arg1 == "rainbow trout"){
_local2 = (_local2 + 0);
} else {
if (_arg1 == "tiki fish"){
_local2 = (_local2 + 250);
} else {
if (_arg1 == "salmon"){
_local2 = (_local2 + 50);
} else {
if (_arg1 == "pirate fish"){
_local2 = (_local2 + 200);
} else {
if (_arg1 == "mutant fish"){
_local2 = (_local2 - 220);
} else {
if (_arg1 == "mullet"){
_local2 = (_local2 + 50);
} else {
if (_arg1 == "spotted minnow"){
_local2 = (_local2 - 100);
} else {
if (_arg1 == "hillbilly fish"){
_local2 = (_local2 + 150);
} else {
if (_arg1 == "grouper"){
_local2 = (_local2 + 100);
} else {
if (_arg1 == "flounder"){
_local2 = (_local2 + 100);
} else {
if (_arg1 == "big mouth cod"){
_local2 = (_local2 + 150);
} else {
if (_arg1 == "clown fish"){
_local2 = (_local2 + 200);
} else {
if (_arg1 == "catfish"){
_local2 = (_local2 + 100);
} else {
if (_arg1 == "big mouth bass"){
_local2 = (_local2 - 100);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
return (_local2);
}
}
}//package fishfactory
Section 14
//FishMullet (fishfactory.FishMullet)
package fishfactory {
class FishMullet extends Fish {
function FishMullet(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "mullet";
_fishWeight = (7 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 400);
speedX = (speedX + 3);
_stalkSpeed = (_stalkSpeed + 0);
interestDistanceDefault = (interestDistanceDefault + 0);
_personalSpaceStep = (_personalSpaceStep + 5);
_attentionCntLimit = (_attentionCntLimit - 10);
_nibbleCntEat = (_nibbleCntEat + 0);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 0);
_fightDistance = (_fightDistance + 0);
}
}
}//package fishfactory
Section 15
//FishMutant (fishfactory.FishMutant)
package fishfactory {
import flash.events.*;
import fishfactory.*;
class FishMutant extends Fish {
function FishMutant(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "mutant fish";
_fishWeight = (2 + Math.floor((Math.random() * 7)));
rangeX = (rangeX + 100);
speedX = (speedX + 3);
_stalkSpeed = (_stalkSpeed + 6);
interestDistanceDefault = (interestDistanceDefault + 25);
_personalSpaceStep = (_personalSpaceStep + 50);
_attentionCntLimit = (_attentionCntLimit + 10);
_nibbleCntEat = (_nibbleCntEat + 30);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 30);
_fightDistance = (_fightDistance - 1998);
}
override function init(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Number):void{
super.init(_arg1, _arg2, _arg3, _arg4);
_targetObject.mcFishAll.addEventListener(Event.COMPLETE, initMutant);
}
private function initMutant(_arg1:Event):void{
_targetObject.mcFishAll.removeEventListener(Event.COMPLETE, initMutant);
_targetObject.mcFishAll.mcFish.mcGlow.gotoAndPlay((Math.floor((Math.random() * 53)) + 2));
}
}
}//package fishfactory
Section 16
//FishPirate (fishfactory.FishPirate)
package fishfactory {
class FishPirate extends Fish {
function FishPirate(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "pirate fish";
_fishWeight = (10 + Math.floor((Math.random() * 4)));
rangeX = (rangeX - 200);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault - 10);
_personalSpaceStep = (_personalSpaceStep - 5);
_attentionCntLimit = (_attentionCntLimit + 0);
_nibbleCntEat = (_nibbleCntEat - 5);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 10);
_fightDistance = (_fightDistance + 500);
}
}
}//package fishfactory
Section 17
//FishSalmon (fishfactory.FishSalmon)
package fishfactory {
class FishSalmon extends Fish {
function FishSalmon(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "salmon";
_fishWeight = (30 + Math.floor((Math.random() * 11)));
rangeX = (rangeX - 400);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed + 1);
interestDistanceDefault = (interestDistanceDefault + 0);
_personalSpaceStep = (_personalSpaceStep + 0);
_attentionCntLimit = (_attentionCntLimit + 0);
_nibbleCntEat = (_nibbleCntEat + 0);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 0);
_fightDistance = (_fightDistance + 0);
}
}
}//package fishfactory
Section 18
//FishSound (fishfactory.FishSound)
package fishfactory {
import fishfactory.*;
import flash.media.*;
import utils.*;
class FishSound extends FishTimer {
protected var channel:SoundChannel;
protected var _targetObject:FishRobotMC;
protected var fishStalkingSFX;
protected var soundFX:Object;
protected var fishWaitingSFX;
protected var soundFXLoaded:Boolean;
protected var fishGulpSFX:Sound;
protected var soundFXPlaying:String;
function FishSound(_arg1:IModel, _arg2:IController){
super(_arg1, _arg2);
soundFXLoaded = false;
soundFXPlaying = "none";
channel = new SoundChannel();
}
function stopSFX():void{
if (soundFXPlaying != "none"){
if (soundFXLoaded){
channel.stop();
soundFXPlaying = "none";
} else {
loadSFX();
};
};
}
function playSFX(_arg1:String, _arg2:Number=1, _arg3:Number=0):void{
var _local4:SoundPanVol;
if (soundFXPlaying != _arg1){
if (soundFXLoaded){
stopSFX();
if (_arg1 == "fish gulp"){
channel = fishGulpSFX.play();
soundFXPlaying = "none";
} else {
if (_arg1 == "fish stalking"){
channel = fishStalkingSFX.play(0, 1000);
} else {
if (_arg1 == "fish waiting"){
channel = fishWaitingSFX.play(0, 1000);
};
};
soundFXPlaying = _arg1;
};
_local4 = new SoundPanVol(channel, 1, _arg3, _targetObject.x, model.movieWidth);
} else {
loadSFX();
};
};
}
protected function loadSFX():void{
if (controller.soundFX != null){
soundFX = controller.soundFX;
fishStalkingSFX = soundFX.getSFX("fish stalking");
fishWaitingSFX = soundFX.getSFX("fish waiting");
fishGulpSFX = soundFX.getSFX("fish gulp");
soundFXLoaded = true;
};
}
}
}//package fishfactory
Section 19
//FishTiki (fishfactory.FishTiki)
package fishfactory {
class FishTiki extends Fish {
function FishTiki(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "tiki fish";
_fishWeight = (8 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 450);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed - 1);
interestDistanceDefault = (interestDistanceDefault - 15);
_personalSpaceStep = (_personalSpaceStep - 8);
_attentionCntLimit = (_attentionCntLimit - 30);
_nibbleCntEat = (_nibbleCntEat - 10);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 30);
_fightDistance = (_fightDistance + 1000);
}
}
}//package fishfactory
Section 20
//FishTimer (fishfactory.FishTimer)
package fishfactory {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
class FishTimer extends MovieClip {
protected var _nibbleCntEat:Number;
protected var model:IModel;
protected var thisTimer:Timer;
protected var _nibbleCntOnHookEat:Number;
protected var controller:IController;
var nibbleCnt:Number;
function FishTimer(_arg1:IModel, _arg2:IController){
model = _arg1;
controller = _arg2;
thisTimer = new Timer(32, 0);
}
function stopNibbleTimer():void{
thisTimer.removeEventListener(TimerEvent.TIMER, nibbleFrame);
thisTimer.stop();
nibbleCnt = 0;
}
private function nibbleFrame(_arg1:TimerEvent):void{
if (nibbleCnt > (_nibbleCntEat + _nibbleCntOnHookEat)){
stopNibbleTimer();
} else {
nibbleCnt++;
};
}
function startNibbleTimer():void{
nibbleCnt = 0;
thisTimer.addEventListener(TimerEvent.TIMER, nibbleFrame);
thisTimer.start();
}
}
}//package fishfactory
Section 21
//FishTrout (fishfactory.FishTrout)
package fishfactory {
class FishTrout extends Fish {
function FishTrout(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "rainbow trout";
_fishWeight = (2 + Math.floor((Math.random() * 7)));
rangeX = (rangeX + 0);
speedX = (speedX + 0);
_stalkSpeed = (_stalkSpeed + 0);
interestDistanceDefault = (interestDistanceDefault + 10);
_personalSpaceStep = (_personalSpaceStep + 5);
_attentionCntLimit = (_attentionCntLimit + 0);
_nibbleCntEat = (_nibbleCntEat + 0);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat + 0);
_fightDistance = (_fightDistance + 0);
}
}
}//package fishfactory
Section 22
//FishWormEater (fishfactory.FishWormEater)
package fishfactory {
class FishWormEater extends Fish {
function FishWormEater(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_fishKind = "bastard worm eater";
_fishWeight = (3 + Math.floor((Math.random() * 3)));
rangeX = (rangeX - 200);
speedX = (speedX + 4);
_stalkSpeed = (_stalkSpeed + 3);
interestDistanceDefault = (interestDistanceDefault + 15);
_personalSpaceStep = (_personalSpaceStep + 30);
_attentionCntLimit = (_attentionCntLimit + 0);
_nibbleCntEat = (_nibbleCntEat - 10);
_nibbleCntOnHookEat = (_nibbleCntOnHookEat - 20);
_fightDistance = (_fightDistance + 800);
}
}
}//package fishfactory
Section 23
//bigmouthbassmc_45 (fishingchampion_fla.bigmouthbassmc_45)
package fishingchampion_fla {
import flash.display.*;
public dynamic class bigmouthbassmc_45 extends MovieClip {
public function bigmouthbassmc_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 24
//bigmouthcod_52 (fishingchampion_fla.bigmouthcod_52)
package fishingchampion_fla {
import flash.display.*;
public dynamic class bigmouthcod_52 extends MovieClip {
public function bigmouthcod_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 25
//bobberall_22 (fishingchampion_fla.bobberall_22)
package fishingchampion_fla {
import flash.display.*;
public dynamic class bobberall_22 extends MovieClip {
public function bobberall_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 26
//BonusFishMC_42 (fishingchampion_fla.BonusFishMC_42)
package fishingchampion_fla {
import flash.display.*;
public dynamic class BonusFishMC_42 extends MovieClip {
public var mcRandomFish:MovieClip;
}
}//package fishingchampion_fla
Section 27
//bonusx2_112 (fishingchampion_fla.bonusx2_112)
package fishingchampion_fla {
import flash.display.*;
public dynamic class bonusx2_112 extends MovieClip {
public function bonusx2_112(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 28
//catfish_54 (fishingchampion_fla.catfish_54)
package fishingchampion_fla {
import flash.display.*;
public dynamic class catfish_54 extends MovieClip {
public function catfish_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 29
//clown_57 (fishingchampion_fla.clown_57)
package fishingchampion_fla {
import flash.display.*;
public dynamic class clown_57 extends MovieClip {
public function clown_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 30
//drk_88 (fishingchampion_fla.drk_88)
package fishingchampion_fla {
import flash.display.*;
public dynamic class drk_88 extends MovieClip {
public var btLogo:SimpleButton;
}
}//package fishingchampion_fla
Section 31
//FishAll_78 (fishingchampion_fla.FishAll_78)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FishAll_78 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public function FishAll_78(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 32
//FishBonusSlotSpin_43 (fishingchampion_fla.FishBonusSlotSpin_43)
package fishingchampion_fla {
import flash.display.*;
public dynamic class FishBonusSlotSpin_43 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
}
}//package fishingchampion_fla
Section 33
//fishingholes_33 (fishingchampion_fla.fishingholes_33)
package fishingchampion_fla {
import flash.display.*;
public dynamic class fishingholes_33 extends MovieClip {
public function fishingholes_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 34
//fishingrods_74 (fishingchampion_fla.fishingrods_74)
package fishingchampion_fla {
import flash.display.*;
public dynamic class fishingrods_74 extends MovieClip {
public var pointMC:MovieClip;
public function fishingrods_74(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 35
//FloatyBall_83 (fishingchampion_fla.FloatyBall_83)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FloatyBall_83 extends MovieClip {
public function FloatyBall_83(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 9, frame10);
}
function frame10(){
stop();
}
function frame7(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 36
//FloatyMonster_82 (fishingchampion_fla.FloatyMonster_82)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FloatyMonster_82 extends MovieClip {
public function FloatyMonster_82(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 9, frame10);
}
function frame10(){
stop();
}
function frame7(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 37
//FloatyPrize_80 (fishingchampion_fla.FloatyPrize_80)
package fishingchampion_fla {
import flash.display.*;
public dynamic class FloatyPrize_80 extends MovieClip {
public var mcBobber:MovieClip;
public function FloatyPrize_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 38
//FloatyRubberDucky_81 (fishingchampion_fla.FloatyRubberDucky_81)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FloatyRubberDucky_81 extends MovieClip {
public function FloatyRubberDucky_81(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12);
}
function frame12(){
stop();
}
function frame7(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 39
//FloatyTube_85 (fishingchampion_fla.FloatyTube_85)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FloatyTube_85 extends MovieClip {
public function FloatyTube_85(){
addFrameScript(0, frame1, 1, frame2, 4, frame5, 7, frame8);
}
function frame1(){
stop();
}
function frame5(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame8(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 40
//FloatyTurtle_84 (fishingchampion_fla.FloatyTurtle_84)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
public dynamic class FloatyTurtle_84 extends MovieClip {
public function FloatyTurtle_84(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 9, frame10);
}
function frame10(){
stop();
}
function frame7(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package fishingchampion_fla
Section 41
//flounder_53 (fishingchampion_fla.flounder_53)
package fishingchampion_fla {
import flash.display.*;
public dynamic class flounder_53 extends MovieClip {
public function flounder_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 42
//grouperfish_51 (fishingchampion_fla.grouperfish_51)
package fishingchampion_fla {
import flash.display.*;
public dynamic class grouperfish_51 extends MovieClip {
public function grouperfish_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 43
//hillbillyfish_48 (fishingchampion_fla.hillbillyfish_48)
package fishingchampion_fla {
import flash.display.*;
public dynamic class hillbillyfish_48 extends MovieClip {
public function hillbillyfish_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 44
//HUDmc_35 (fishingchampion_fla.HUDmc_35)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUDmc_35 extends MovieClip {
public var mcTotalMoney:MovieClip;
public var btInstructions:SimpleButton;
public var txWormCnt:TextField;
public var mcSpeaker:MovieClip;
public var btFishList:SimpleButton;
public var btBobber:MovieClip;
public var btMap:SimpleButton;
public var mcMoney:MovieClip;
public function HUDmc_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 45
//instructionsmc_6 (fishingchampion_fla.instructionsmc_6)
package fishingchampion_fla {
import flash.display.*;
public dynamic class instructionsmc_6 extends MovieClip {
public var mcFish:MovieClip;
public var mcPointBent:MovieClip;
public var pointMC:MovieClip;
public var btBack:SimpleButton;
public var mcBars:MovieClip;
public var mcFishMouth:MovieClip;
public var btNext:SimpleButton;
public var btPlay:SimpleButton;
public var mcPowerLevel:MovieClip;
public var btFish:SimpleButton;
public var mcHook:HookMC;
public var mcBobber:MovieClip;
public function instructionsmc_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 46
//listbassmc_119 (fishingchampion_fla.listbassmc_119)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listbassmc_119 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 47
//listbastardmc_121 (fishingchampion_fla.listbastardmc_121)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listbastardmc_121 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 48
//listcatfishmc_116 (fishingchampion_fla.listcatfishmc_116)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listcatfishmc_116 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 49
//listclownmc_125 (fishingchampion_fla.listclownmc_125)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listclownmc_125 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 50
//listcodmc_127 (fishingchampion_fla.listcodmc_127)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listcodmc_127 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 51
//listfloundermc_123 (fishingchampion_fla.listfloundermc_123)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listfloundermc_123 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 52
//listGroupermc_122 (fishingchampion_fla.listGroupermc_122)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listGroupermc_122 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 53
//listhillmc_120 (fishingchampion_fla.listhillmc_120)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listhillmc_120 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 54
//listminnowmc_126 (fishingchampion_fla.listminnowmc_126)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listminnowmc_126 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 55
//listMulletmc_128 (fishingchampion_fla.listMulletmc_128)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listMulletmc_128 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 56
//listMutantmc_129 (fishingchampion_fla.listMutantmc_129)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listMutantmc_129 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 57
//listpiratemc_124 (fishingchampion_fla.listpiratemc_124)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listpiratemc_124 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 58
//listsalmonmc_117 (fishingchampion_fla.listsalmonmc_117)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listsalmonmc_117 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 59
//listTikimc_130 (fishingchampion_fla.listTikimc_130)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listTikimc_130 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 60
//listtroutmc_118 (fishingchampion_fla.listtroutmc_118)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class listtroutmc_118 extends MovieClip {
public var mcFish:MovieClip;
public var mcFishMouth:MovieClip;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 61
//MainTimeline (fishingchampion_fla.MainTimeline)
package fishingchampion_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.text.*;
import flash.utils.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var mcBonus:MovieClip;
public var mcMessagesDisObj:MovieClip;
public var btLogo:MovieClip;
public var btStart:SimpleButton;
public var mcUnderWaterDisObj:MovieClip;
public var mcWaterSurface:MovieClip;
public var mcInstructions:MovieClip;
public var mcAboveWaterDisObj:MovieClip;
public var mcPreloader:MovieClip;
public var mcHUD:MovieClip;
public var mcIntroScreen:MovieClip;
public var view:CompositeView;
public var model:IModel;
public var fmt:TextFormat;
public var controller:IController;
public var mcFishingHoles:MovieClip;
public function MainTimeline(){
addFrameScript(1, frame2, 4, frame5, 7, frame8, 8, frame9);
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
mcPreloader.mcBarMask.scaleX = _local4;
mcPreloader.mcBar.scaleX = _local4;
mcPreloader.txLoadingBlack.text = (("Loading... " + Math.round((_local4 * 100))) + "%");
mcPreloader.txLoadingBlack.setTextFormat(fmt);
mcPreloader.txLoadingWhite.text = (("Loading... " + Math.round((_local4 * 100))) + "%");
mcPreloader.txLoadingWhite.setTextFormat(fmt);
}
public function onComplete(_arg1:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
mcPreloader.mcBarMask.scaleX = 1;
mcPreloader.mcBar.scaleX = 1;
mcPreloader.txLoadingBlack.text = "Loading... 100%";
mcPreloader.txLoadingBlack.setTextFormat(fmt);
mcPreloader.txLoadingWhite.text = "Loading... 100%";
mcPreloader.txLoadingWhite.setTextFormat(fmt);
}
function frame8(){
view.init();
stop();
}
function frame9(){
mcInstructions.visible = false;
stop();
}
function frame5(){
mcInstructions.btPlay.visible = false;
mcInstructions.btFish.visible = false;
model = new Model();
controller = new Controller(model);
view = new RootView(model, controller, this);
btStart.addEventListener(MouseEvent.MOUSE_UP, playInstructions);
play();
}
function frame2(){
fmt = new TextFormat();
fmt.letterSpacing = 4;
mcPreloader.txLoadingBlack.setTextFormat(fmt);
mcPreloader.txLoadingWhite.setTextFormat(fmt);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
public function playInstructions(_arg1:MouseEvent):void{
btStart.removeEventListener(MouseEvent.MOUSE_UP, playInstructions);
mcIntroScreen.visible = false;
btLogo.visible = false;
btStart.visible = false;
}
}
}//package fishingchampion_fla
Section 62
//minnow_50 (fishingchampion_fla.minnow_50)
package fishingchampion_fla {
import flash.display.*;
public dynamic class minnow_50 extends MovieClip {
public function minnow_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 63
//moneyscoremc_7 (fishingchampion_fla.moneyscoremc_7)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class moneyscoremc_7 extends MovieClip {
public var txMoneyMinus:TextField;
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 64
//mulletfish_49 (fishingchampion_fla.mulletfish_49)
package fishingchampion_fla {
import flash.display.*;
public dynamic class mulletfish_49 extends MovieClip {
public function mulletfish_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 65
//mutant_55 (fishingchampion_fla.mutant_55)
package fishingchampion_fla {
import flash.display.*;
public dynamic class mutant_55 extends MovieClip {
public var mcGlow:MovieClip;
public function mutant_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 66
//mutantfishglow_56 (fishingchampion_fla.mutantfishglow_56)
package fishingchampion_fla {
import flash.display.*;
public dynamic class mutantfishglow_56 extends MovieClip {
public function mutantfishglow_56(){
addFrameScript(0, frame1, 55, frame56);
}
function frame1(){
stop();
}
function frame56(){
gotoAndPlay("play");
}
}
}//package fishingchampion_fla
Section 67
//OpenIntroMC_5 (fishingchampion_fla.OpenIntroMC_5)
package fishingchampion_fla {
import flash.display.*;
public dynamic class OpenIntroMC_5 extends MovieClip {
public function OpenIntroMC_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 68
//pirate_59 (fishingchampion_fla.pirate_59)
package fishingchampion_fla {
import flash.display.*;
public dynamic class pirate_59 extends MovieClip {
public function pirate_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 69
//preloadermain_1 (fishingchampion_fla.preloadermain_1)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class preloadermain_1 extends MovieClip {
public var mcBarMask:MovieClip;
public var mcBar:MovieClip;
public var txLoadingBlack:TextField;
public var txLoadingWhite:TextField;
public function preloadermain_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 70
//salmonmc_44 (fishingchampion_fla.salmonmc_44)
package fishingchampion_fla {
import flash.display.*;
public dynamic class salmonmc_44 extends MovieClip {
public function salmonmc_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 71
//sound_39 (fishingchampion_fla.sound_39)
package fishingchampion_fla {
import flash.display.*;
public dynamic class sound_39 extends MovieClip {
public var btPlayMusic:SimpleButton;
public var btPauseMusic:SimpleButton;
public function sound_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 72
//targetlinesgraph_29 (fishingchampion_fla.targetlinesgraph_29)
package fishingchampion_fla {
import flash.display.*;
public dynamic class targetlinesgraph_29 extends MovieClip {
public var mcBarsRaw:MovieClip;
}
}//package fishingchampion_fla
Section 73
//tiki_58 (fishingchampion_fla.tiki_58)
package fishingchampion_fla {
import flash.display.*;
public dynamic class tiki_58 extends MovieClip {
public function tiki_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 74
//totalmoneyscoremc_13 (fishingchampion_fla.totalmoneyscoremc_13)
package fishingchampion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class totalmoneyscoremc_13 extends MovieClip {
public var txMoney:TextField;
}
}//package fishingchampion_fla
Section 75
//troutmc_46 (fishingchampion_fla.troutmc_46)
package fishingchampion_fla {
import flash.display.*;
public dynamic class troutmc_46 extends MovieClip {
public function troutmc_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 76
//wormeatermc_47 (fishingchampion_fla.wormeatermc_47)
package fishingchampion_fla {
import flash.display.*;
public dynamic class wormeatermc_47 extends MovieClip {
public function wormeatermc_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fishingchampion_fla
Section 77
//FVAlerts (fishingview.FVAlerts)
package fishingview {
import flash.display.*;
import flash.events.*;
import fl.motion.*;
public class FVAlerts {
private var fishCaughtMess:FishCaughtMessageMC;
private var controller:IController;
private var reelIn:ReelInMC;
private var color:Color;
private var fishAteWormMess:FishAteWormMessMC;
private var rootView:FVRootView;
private var model:IModel;
private var noMoreWorms:NoMoreWormsMC;
private var fishOnMess:FishOnMessageMC;
public function FVAlerts(_arg1:IModel, _arg2:IController, _arg3:FVRootView){
model = _arg1;
controller = _arg2;
rootView = _arg3;
fishCaughtMess = new FishCaughtMessageMC();
fishCaughtMess.x = 100;
fishCaughtMess.y = 64;
fishAteWormMess = new FishAteWormMessMC();
fishAteWormMess.x = 400;
fishAteWormMess.y = 80;
fishOnMess = new FishOnMessageMC();
fishOnMess.x = 16;
fishOnMess.y = 16;
noMoreWorms = new NoMoreWormsMC();
noMoreWorms.x = 400;
noMoreWorms.y = 80;
reelIn = new ReelInMC();
reelIn.x = 400;
reelIn.y = 80;
color = new Color();
color.tintColor = 0xFF3300;
}
function alertMessages(_arg1:String):void{
var _local2:FishRobotMC;
var _local3:String;
controller.removeDisplayObjectChilds(rootView.messageDisObj);
if (_arg1 == "fish caught"){
model.pauseBonus = true;
rootView.stopSFX("reel whine");
if (model.fishOnHook.moneyWorth < 1){
_local3 = "fish caught boo";
} else {
_local3 = "fish caught";
};
if (model.bonusFish != model.fishOnHook.numID){
rootView.playSFX(_local3, 1, 0);
fishCaughtMess.mcBonusX2.visible = false;
} else {
rootView.playSFX(_local3, 0.8, 0);
fishCaughtMess.mcBonusX2.visible = true;
fishCaughtMess.mcBonusX2.gotoAndPlay("play");
rootView.playSFX("ka-ching", 1, 0);
};
applyTint(0);
rootView.targetStage.addChild(fishCaughtMess);
_local2 = new FishRobotMC();
_local2.mcFishAll.gotoAndStop(model.fishOnHook.targetObject.mcFishAll.currentFrame);
fishCaughtMess.txFishName.text = (((model.fishOnHook.fishKind + " ") + model.fishOnHook.fishWeight) + " lb");
if (model.fishOnHook.moneyWorth < 0){
fishCaughtMess.txMoney.text = (" " + model.fishOnHook.moneyWorth);
fishCaughtMess.txMoneyMinus.text = "-";
} else {
fishCaughtMess.txMoney.text = model.fishOnHook.moneyWorth;
fishCaughtMess.txMoneyMinus.text = "";
};
fishCaughtMess.btFish.addEventListener(MouseEvent.MOUSE_UP, removeFishCaughtMess);
fishCaughtMess.mcFishHolder.addChild(_local2);
} else {
if (_arg1 == "fish ate worm"){
rootView.messageDisObj.addChildAt(fishAteWormMess, 0);
} else {
if (_arg1 == "fish on"){
rootView.messageDisObj.addChildAt(fishOnMess, 0);
} else {
if (_arg1 == "no worms"){
rootView.messageDisObj.addChildAt(noMoreWorms, 0);
} else {
if (_arg1 == "reel in for worm"){
rootView.messageDisObj.addChildAt(reelIn, 0);
} else {
if (_arg1 == "clear"){
};
};
};
};
};
};
}
function applyTint(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > 1){
_arg1 = 1;
};
};
color.tintMultiplier = _arg1;
fishOnMess.mcBars.mcBarsRaw.transform.colorTransform = color;
}
function removeAlertMessages(_arg1:String):void{
if (_arg1 == "fish caught"){
removeFishCaughtMess();
} else {
controller.removeDisplayObjectChilds(rootView.messageDisObj);
};
}
private function removeFishCaughtMess(_arg1:Event=null):void{
fishCaughtMess.btFish.removeEventListener(MouseEvent.MOUSE_UP, removeFishCaughtMess);
fishCaughtMess.mcFishHolder.removeChildAt(0);
if (model.levelCompleted){
fishCaughtMess.gotoAndStop("level cleared");
rootView.playSFX("fishing hole cheer", 1, 0);
fishCaughtMess.addEventListener(Event.COMPLETE, initLevelCleared);
} else {
model.fishOnHook = null;
rootView.targetStage.removeChild(fishCaughtMess);
rootView.sinkHookOn = false;
model.pauseBonus = false;
rootView.removeFishingEvents();
rootView.resetRodForCasting();
rootView.initTackle();
};
}
private function initLevelCleared(_arg1:Event):void{
var _local2:Number;
fishCaughtMess.removeEventListener(Event.COMPLETE, initLevelCleared);
rootView.levelUnlockedGo(fishCaughtMess.btGo);
fishCaughtMess.txLevelName.text = model.currentLevelName;
fishCaughtMess.txWormCnt.text = model.wormCnt.toString();
fishCaughtMess.txWormBonusAmount.text = "100";
_local2 = (100 * model.wormCnt);
fishCaughtMess.txWormBonusTotal.text = _local2.toString();
model.moneyTotal = (model.moneyTotal + _local2);
fishCaughtMess.mcMoney.txMoney.text = model.moneyFish.toString();
model.moneyTotal = (model.moneyTotal + model.moneyFish);
fishCaughtMess.mcTotalMoney.txMoney.text = model.moneyTotal.toString();
}
}
}//package fishingview
Section 78
//FVDrawFishLine (fishingview.FVDrawFishLine)
package fishingview {
import flash.display.*;
import flash.geom.*;
public class FVDrawFishLine {
private var model:IModel;
private var controller:IController;
private var rootView:FVRootView;
public function FVDrawFishLine(_arg1:IModel, _arg2:IController, _arg3:FVRootView){
model = _arg1;
controller = _arg2;
rootView = _arg3;
}
function drawFishingLine():void{
var _local1:String;
var _local2:Point;
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (rootView.sinkHookOn){
if (rootView.bobber.x < (rootView.rod.x - 50)){
rootView.rod.mcRods.gotoAndStop("bent left");
} else {
if (rootView.bobber.x > (rootView.rod.x + 50)){
rootView.rod.mcRods.gotoAndStop("bent right");
} else {
rootView.rod.mcRods.gotoAndStop("straight");
};
};
};
rootView.bobberUnderWater.x = rootView.bobber.x;
rootView.bobberUnderWater.y = rootView.bobber.y;
rootView.bobberUnderWater.scaleX = rootView.bobber.scaleX;
rootView.bobberUnderWater.scaleY = rootView.bobber.scaleY;
rootView.bobberUnderWater.zPosition = rootView.bobber.zPosition;
rootView.leaderLineShapeHolder.zPosition = rootView.hook.zPosition;
if (!model.tackelLanded){
_local1 = "arc";
} else {
if (!rootView.reelingIn){
_local1 = "sag";
} else {
_local1 = "straight";
};
};
_local2 = new Point(rootView.bobber.pointMC.x, rootView.bobber.pointMC.y);
_local3 = rootView.bobber.localToGlobal(_local2);
_local4 = _local3.x;
_local5 = _local3.y;
_local2 = new Point(rootView.rod.mcRods.pointMC.x, rootView.rod.mcRods.pointMC.y);
_local3 = rootView.rod.mcRods.localToGlobal(_local2);
_local6 = _local3.x;
_local7 = _local3.y;
controller.drawFishingLine(_local1, rootView.fishingLineShape, _local4, _local5, _local6, _local7, rootView.tackelThreeD);
_local2 = new Point(rootView.bobber.point2MC.x, rootView.bobber.point2MC.y);
_local3 = rootView.bobber.localToGlobal(_local2);
_local4 = _local3.x;
_local5 = _local3.y;
_local6 = rootView.hook.x;
_local7 = rootView.hook.y;
controller.drawFishingLine("straight", rootView.leaderLineShape, _local4, _local5, _local6, _local7, rootView.tackelThreeD);
}
}
}//package fishingview
Section 79
//FVReelIn (fishingview.FVReelIn)
package fishingview {
import flash.display.*;
import flash.events.*;
public class FVReelIn {
var rodXLast:Number;
var reelInDown:Boolean;
private var model:IModel;
private var tugMoved:String;
private var controller:IController;
private var rootView:FVRootView;
public function FVReelIn(_arg1:IModel, _arg2:IController, _arg3:FVRootView){
model = _arg1;
controller = _arg2;
rootView = _arg3;
tugMoved = "none";
}
function rodMoved(_arg1:Number):void{
var _local2:Number;
_local2 = rootView.bobber.x;
if (((!(reelInDown)) && (!(model.bobberBob)))){
if (_arg1 < (_local2 - 25)){
if (_arg1 < (rodXLast - 25)){
reelEnterFrame(true, (rodXLast - _arg1));
tugMoved = "left";
} else {
rootView.reelingIn = false;
};
} else {
if (_arg1 > (_local2 + 25)){
if (_arg1 > (rodXLast + 25)){
reelEnterFrame(true, (_arg1 - rodXLast));
tugMoved = "right";
} else {
rootView.reelingIn = false;
};
} else {
rootView.reelingIn = false;
};
};
};
rodXLast = _arg1;
}
private function tackleUp(_arg1:Event):void{
rootView.stopSFX("reeling in");
rootView.rod.removeEventListener(Event.COMPLETE, tackleUp);
rootView.castingMeter.visible = true;
rootView.resetRodForCasting();
}
private function initTackleUp(_arg1:Event):void{
rootView.rod.removeEventListener(Event.COMPLETE, initTackleUp);
if (model.wormCnt > 0){
rootView.rod.mcHook.gotoAndStop("on");
} else {
rootView.rod.mcHook.gotoAndStop("off");
};
rootView.rod.mcBobber.gotoAndStop(model.currentBobber);
rootView.rod.addEventListener(Event.COMPLETE, tackleUp);
}
function reelEnterFrame(_arg1:Boolean=false, _arg2:Number=0):void{
if (!_arg1){
rootView.rod.play();
};
rootView.stackAboveWaterZ();
if (rootView.sinkHookOn){
} else {
if (((((!(rootView.reelingIn)) && (model.tackelLanded))) && (!(_arg1)))){
rootView.bobber.gotoAndStop("wake");
};
if (_arg1){
rootView.tackelThreeD.tugObject(rootView.rod.x, rootView.rod.zPosition, (_arg2 / 2.5));
} else {
rootView.tackelThreeD.pullObject(rootView.rod.x, rootView.rod.zPosition, model.pullSpeed);
};
if ((((((rootView.bobber.zPosition <= 170)) && (rootView.reelingIn))) && (model.tackelLanded))){
rootView.tackleReelsUp();
rootView.rod.gotoAndPlay("tackle");
rootView.rod.addEventListener(Event.COMPLETE, initTackleUp);
} else {
rootView.reelingIn = true;
};
};
rootView.drawFishingLine();
}
}
}//package fishingview
Section 80
//FVRootView (fishingview.FVRootView)
package fishingview {
import flash.display.*;
import flash.events.*;
import fishfactory.*;
import fishlevels.*;
import floatytoys.*;
public class FVRootView extends MovieClip {
private var reelInView:FVReelIn;
var fishingLineShapeHolder:MovieClip;
private var sinkOldX:Number;
private var sinkOldY:Number;
private var zStackCnt:uint;
var messageDisObj:MovieClip;
var tackelThreeD:ThrowThreeD;
private var drawFishLineView:FVDrawFishLine;
var fishFight:FishFightMC;
var bobberBob:Boolean;
var fishingLineShape:Shape;
private var rootView:ViewFishing;
private var floatyFactory:FloatyCreator;
private var bobberShadow:ShadowMC;
var bobber:BobberMC;
var reelingIn:Boolean;
var sinkHookOn:Boolean;
private var bobberDefaultIndex:uint;
var castingMeter:PowerMeterMC;
var pauseGame:Boolean;
var leaderLineShape:Shape;
private var castPower:Number;
private var updateView:FVUpDates;
var hook:HookMC;
private var model:IModel;
private var bobberDefaultIndexSet:Boolean;
var bobberUnderWater:BobberMC;
private var underWaterDisObj:MovieClip;
private var fishFactory:FishCreator;
private var controller:IController;
private var sinkDistance:Number;
var aboveWaterDisObj:MovieClip;
var rod:RodMC;
private var bobberShadowFront:ShadowMC;
var leaderLineShapeHolder:MovieClip;
private var alertsView:FVAlerts;
var targetStage:MovieClip;
public function FVRootView(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:ViewFishing){
model = _arg1;
controller = _arg2;
targetStage = _arg3;
rootView = _arg4;
}
private function reelInDown(_arg1:MouseEvent):void{
if (!pauseGame){
if (sinkHookOn){
sinkHookReset();
stopSFX("reel whine");
};
playSFX("reeling in", 1, 0);
reelInView.reelInDown = true;
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
rod.addEventListener(Event.ENTER_FRAME, reelEnterFrame);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
rod.addEventListener(MouseEvent.MOUSE_UP, reelInUp);
};
}
function removeFishingEvents():void{
bobber.removeEventListener(Event.ENTER_FRAME, drawFishingLine);
tackelThreeD.removeEventListener(Event.COMPLETE, tackelThreeDComplete);
tackelThreeD.removeEventListener(Event.CHANGE, tackelThreeDUpdate);
targetStage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMovedCasting);
targetStage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoved);
rod.removeEventListener(Event.ENTER_FRAME, stackAboveWaterZ);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
rod.removeEventListener(MouseEvent.MOUSE_UP, reelInUp);
rod.removeEventListener(Event.ENTER_FRAME, reelEnterFrame);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
rod.removeEventListener(Event.ENTER_FRAME, castPowerEnterFrame);
rod.removeEventListener(MouseEvent.MOUSE_UP, rodUp);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
}
public function nextLevel():void{
model.currentLevel++;
cleanUp();
}
function sinkHook(){
sinkHookReset();
sinkHookOn = true;
}
private function initLevel():void{
var _local1:FishLevelCreator;
model.moneyFishReset();
model.levelCompleted = false;
fishFactory = new FishCreator(model, controller, underWaterDisObj, bobber);
_local1 = new FishLevelCreator(fishFactory, model);
targetStage.mcFishingHoles.gotoAndStop(model.currentLevel);
targetStage.mcWaterSurface.gotoAndStop(model.currentLevel);
_local1.buildLevel();
underWaterDisObj.addEventListener(Event.ENTER_FRAME, stackUnderWaterZ);
alertMessages("clear");
}
function tackleReelsUp():void{
if (model.wormCnt > 0){
alertMessages("clear");
} else {
alertMessages("no worms");
};
rod.removeEventListener(Event.ENTER_FRAME, reelEnterFrame);
initTackle();
fishingLineShapeHolder.visible = false;
targetStage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoved);
targetStage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMovedCasting);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
rod.removeEventListener(MouseEvent.MOUSE_UP, reelInUp);
bobber.gotoAndStop("off");
bobber.mcBobber.gotoAndStop(model.currentBobber);
bobberUnderWater.mcBobber.gotoAndStop(model.currentBobber);
reelingIn = false;
model.tackelLanded = false;
}
function stackAboveWaterZ(_arg1:Event=null):void{
if (bobber.zPosition > rod.zPosition){
fishingLineShapeHolder.zPosition = (rod.zPosition + 1);
};
controller.stackZAxis(aboveWaterDisObj);
}
private function sinkHookReset(){
sinkOldX = rod.x;
sinkOldY = rod.y;
sinkDistance = 0;
}
function updateBobberStyle(_arg1:Event):void{
_arg1.currentTarget.removeEventListener(Event.COMPLETE, updateBobberStyle);
_arg1.currentTarget.mcBobber.gotoAndStop(model.currentBobber);
}
function removeAlertMessages(_arg1:String):void{
alertsView.removeAlertMessages(_arg1);
updateView.currentMessage = "none";
}
function playSFX(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4=null):void{
controller.soundFXPlayer.playSFX(_arg1, _arg2, _arg3, _arg4);
}
private function resetThreeD():void{
targetStage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMovedCasting);
targetStage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved);
setCastPower();
aboveWaterDisObj.addChild(leaderLineShapeHolder);
aboveWaterDisObj.addChild(hook);
bobberShadow.gotoAndStop("shadow");
tackelThreeD.resetObject(castPower, (rod.x - (aboveWaterDisObj.stage.stageWidth / 2)));
bobberDefaultIndexSet = false;
model.tackelLanded = false;
model.wormOnHook = true;
controller.stackZAxis(aboveWaterDisObj);
drawFishingLine();
bobber.mcBobber.gotoAndStop(model.currentBobber);
bobberUnderWater.mcBobber.gotoAndStop(model.currentBobber);
}
private function rodUp(_arg1:MouseEvent):void{
if (!pauseGame){
rod.removeEventListener(Event.ENTER_FRAME, castPowerEnterFrame);
stopSFX("power meter");
rod.removeEventListener(MouseEvent.MOUSE_UP, rodUp);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
alertMessages("clear");
resetThreeD();
throwThreeD();
};
}
private function cleanUp():void{
model.pauseBonus = true;
underWaterDisObj.removeEventListener(Event.ENTER_FRAME, stackUnderWaterZ);
removeFishingEvents();
floatyFactory.cleanUp();
fishFactory.cleanUp();
alertMessages("clear");
controller.removeDisplayObjectChilds(underWaterDisObj);
controller.removeDisplayObjectChilds(aboveWaterDisObj);
rootView.nextLevel();
}
public function update(_arg1:Event=null):void{
}
private function setCastPower():void{
castPower = ((castingMeter.mcPowerLevel.scaleY / 0.1) - 1);
if (castPower > 9){
castPower = 9;
} else {
if (castPower < 0){
castPower = 0;
};
};
}
function alertMessages(_arg1:String):void{
alertsView.alertMessages(_arg1);
updateView.currentMessage = _arg1;
}
function drawFishingLineEnterFrame(_arg1:String):void{
if (_arg1 == "add"){
bobber.addEventListener(Event.ENTER_FRAME, drawFishingLine);
} else {
if (_arg1 == "remove"){
bobber.removeEventListener(Event.ENTER_FRAME, drawFishingLine);
};
};
}
private function throwThreeD():void{
playSFX("reel whine", 1, 0);
if (model.wormOnHook){
hook.gotoAndStop("on");
} else {
hook.gotoAndStop("off");
};
rod.gotoAndStop(1);
bobberShadow.visible = true;
fishingLineShapeHolder.visible = true;
bobberShadowFront.visible = true;
tackelThreeD.addEventListener(Event.COMPLETE, tackelThreeDComplete);
model.tackelLanded = false;
setCastPower();
bobber.gotoAndStop("on");
bobber.addEventListener(Event.COMPLETE, updateBobberStyle);
bobberUnderWater.gotoAndStop("on");
bobberUnderWater.addEventListener(Event.COMPLETE, updateBobberStyle);
tackelThreeD.addEventListener(Event.CHANGE, tackelThreeDUpdate);
tackelThreeD.throwObject();
rod.addEventListener(Event.ENTER_FRAME, stackAboveWaterZ);
rod.addEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
}
private function initMouseEvents():void{
resetRodForCasting();
rod.gotoAndStop("tackle up");
rod.mcBobber.gotoAndStop(model.currentBobber);
}
function initTackle():void{
floatyFactory.addFloaty();
hook.y = (targetStage.stage.stageHeight + hook.height);
fishingLineShapeHolder.zPosition = 81;
bobberShadow.y = (targetStage.stage.stageHeight + bobberShadow.height);
bobberShadowFront.y = (targetStage.stage.stageHeight + bobberShadow.height);
bobber.y = (targetStage.stage.stageHeight + bobber.height);
bobber.x = (targetStage.stage.stageWidth / 2);
bobber.mcBobber.gotoAndStop(model.currentBobber);
bobberUnderWater.mcBobber.gotoAndStop(model.currentBobber);
bobber.zPosition = 0;
bobberUnderWater.y = (targetStage.stage.stageHeight + bobber.height);
bobberUnderWater.x = (targetStage.stage.stageWidth / 2);
bobberUnderWater.zPosition = bobber.zPosition;
controller.stackZAxis(aboveWaterDisObj);
}
private function rodDown(_arg1:MouseEvent):void{
var _local2:FloatyCreator;
if (!pauseGame){
_local2 = new FloatyCreator(model, controller, aboveWaterDisObj, bobber);
_local2.addFloaty();
controller.stackZAxis(aboveWaterDisObj);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
rod.addEventListener(MouseEvent.MOUSE_UP, rodUp);
controller.castingMeterMaxed = false;
castingMeter.visible = true;
rod.addEventListener(Event.ENTER_FRAME, castPowerEnterFrame);
playSFX("power meter", (castingMeter.mcPowerLevel.scaleY / 100), 0.5);
};
}
private function mouseMoved(_arg1:MouseEvent):void{
if (!pauseGame){
if (((!(bobberBob)) && (model.tackelLanded))){
reelInView.rodMoved(rod.x);
};
if (sinkHookOn){
fishIsOn();
};
rod.x = _arg1.stageX;
rod.y = _arg1.stageY;
drawFishingLine();
};
}
private function nextLevelGo(_arg1:MouseEvent):void{
_arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, nextLevelGo);
model.fishOnHook = null;
targetStage.removeChild(_arg1.currentTarget.parent);
nextLevel();
}
private function castPowerEnterFrame(_arg1:Event):void{
controller.castPowerEnterFrame(castingMeter.mcPowerLevel);
controller.soundFXPlayer.sfxSoundTransform("power meter", (castingMeter.mcPowerLevel.scaleY + 0.3), 0.5);
}
private function fishCaught(){
var _local1:MovieClip;
stopSFX("fish fight splash");
model.wormCnt = (model.wormCnt - 1);
removeFishingEvents();
resetRodForCasting();
rod.gotoAndStop("tackle up");
rod.visible = false;
_local1 = model.fishOnHook.targetObject;
if (model.bonusFish == model.fishOnHook.numID){
model.moneyFish = (model.moneyFish + (model.fishOnHook.moneyWorth * 2));
} else {
model.moneyFish = (model.moneyFish + model.fishOnHook.moneyWorth);
};
if (model.moneyFish >= model.moneyForLevel){
model.levelCompleted = true;
};
alertMessages("fish caught");
fishFight.x = -500;
fishFactory.removeFish(model.fishOnHook);
reelInUp();
stopSFX("reel whine");
}
private function reelEnterFrame(_arg1:Event):void{
if (!pauseGame){
reelInView.reelEnterFrame();
};
}
function stopSFX(_arg1:String):void{
controller.soundFXPlayer.stopSFX(_arg1);
}
function fishIsOn():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (sinkOldX - rod.x);
_local2 = (sinkOldY - rod.y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 >= 0){
sinkDistance = (sinkDistance + _local3);
};
alertsView.applyTint((sinkDistance / model.fishOnHook.fightDistance));
if (sinkDistance >= model.fishOnHook.fightDistance){
fishCaught();
} else {
sinkOldX = rod.x;
sinkOldY = rod.y;
};
}
function resetRodForCasting():void{
reelInView.reelInDown = false;
bobberUnderWater.visible = false;
if (model.currentLevel > model.levelMax){
nextLevel();
} else {
if (model.wormCnt == 0){
rod.mcHook.gotoAndStop("off");
alertMessages("no worms");
};
rod.removeEventListener(Event.ENTER_FRAME, reelEnterFrame);
initTackle();
rod.visible = true;
castingMeter.visible = true;
fishingLineShapeHolder.visible = false;
targetStage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoved);
targetStage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMovedCasting);
rod.removeEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
rod.removeEventListener(MouseEvent.MOUSE_UP, reelInUp);
rod.addEventListener(MouseEvent.MOUSE_DOWN, rodDown);
};
}
private function mouseMovedCasting(_arg1:MouseEvent):void{
if (!pauseGame){
rod.x = _arg1.stageX;
rod.y = _arg1.stageY;
};
}
private function stackUnderWaterZ(_arg1:Event):void{
controller.stackZAxis(underWaterDisObj);
}
private function putHookUnderWater():void{
underWaterDisObj.addChild(leaderLineShapeHolder);
underWaterDisObj.addChild(hook);
bobber.gotoAndStop("off");
bobber.addEventListener(Event.COMPLETE, updateBobberStyle);
bobberUnderWater.mcBobber.gotoAndStop(model.currentBobber);
tackelThreeD.pullObject(rod.x, rod.zPosition, 0);
drawFishingLine();
}
function mouseMovedAddEvent():void{
targetStage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved);
}
function drawFishingLine(_arg1:Event=null):void{
drawFishLineView.drawFishingLine();
}
public function initView():void{
bobberBob = model.bobberBob;
sinkHookOn = false;
zStackCnt = 0;
aboveWaterDisObj = targetStage.mcAboveWaterDisObj;
underWaterDisObj = targetStage.mcUnderWaterDisObj;
messageDisObj = targetStage.mcMessagesDisObj;
fishFight = new FishFightMC();
fishFight.name = "fishFight";
hook = new HookMC();
leaderLineShape = new Shape();
leaderLineShapeHolder = new MovieClip();
leaderLineShapeHolder.addChild(leaderLineShape);
fishingLineShape = new Shape();
fishingLineShapeHolder = new MovieClip();
fishingLineShapeHolder.addChild(fishingLineShape);
bobberShadow = new ShadowMC();
bobberShadowFront = new ShadowMC();
bobberShadowFront.gotoAndStop("front");
bobber = new BobberMC();
bobberUnderWater = new BobberMC();
floatyFactory = new FloatyCreator(model, controller, aboveWaterDisObj, bobber);
floatyFactory.addFloaty();
rod = new RodMC();
rod.buttonMode = true;
rod.gotoAndStop(1);
rod.x = -300;
rod.y = -300;
rod.zPosition = 80;
castingMeter = new PowerMeterMC();
castingMeter.x = 741;
castingMeter.y = 354;
castingMeter.zPosition = (rod.zPosition + 1);
bobberDefaultIndex = underWaterDisObj.numChildren;
underWaterDisObj.addChild(bobberUnderWater);
aboveWaterDisObj.addChild(leaderLineShapeHolder);
aboveWaterDisObj.addChild(hook);
aboveWaterDisObj.addChild(bobber);
aboveWaterDisObj.addChild(bobberShadow);
aboveWaterDisObj.addChild(bobberShadowFront);
aboveWaterDisObj.addChild(fishingLineShapeHolder);
aboveWaterDisObj.addChild(castingMeter);
aboveWaterDisObj.addChild(rod);
pauseGame = model.pauseGame;
tackelThreeD = new ThrowThreeD(model, controller, bobber, bobberShadow, bobberShadowFront, hook);
updateView = new FVUpDates(model, controller, this);
drawFishLineView = new FVDrawFishLine(model, controller, this);
reelInView = new FVReelIn(model, controller, this);
alertsView = new FVAlerts(model, controller, this);
model.tackelLanded = true;
initTackle();
initLevel();
initMouseEvents();
}
private function tackelThreeDComplete(_arg1:Event):void{
stopSFX("reel whine");
playSFX("bobber land splash", (((tackelThreeD.zFactor * 80) / 100) - 0.08), 0, bobber.x);
bobberUnderWater.visible = true;
reelInView.rodXLast = rod.x;
rod.removeEventListener(Event.ENTER_FRAME, stackAboveWaterZ);
tackelThreeD.removeEventListener(Event.COMPLETE, tackelThreeDComplete);
model.tackelLanded = true;
rod.removeEventListener(MouseEvent.MOUSE_DOWN, rodDown);
castingMeter.visible = false;
castingMeter.mcPowerLevel.scaleY = 0.01;
castingMeter.mcFish.y = (castingMeter.mcPowerLevel.y - 10);
bobberShadow.visible = false;
bobberShadowFront.visible = false;
putHookUnderWater();
}
public function levelUnlockedGo(_arg1):void{
_arg1.addEventListener(MouseEvent.MOUSE_UP, nextLevelGo);
}
public function updateModel(_arg1:Event=null):void{
updateView.updateModel();
}
function reelInUp(_arg1:MouseEvent=null):void{
if (!pauseGame){
reelInView.reelInDown = false;
rod.removeEventListener(MouseEvent.MOUSE_UP, reelInUp);
rod.removeEventListener(Event.ENTER_FRAME, reelEnterFrame);
rod.addEventListener(MouseEvent.MOUSE_DOWN, reelInDown);
if (((((reelingIn) && (model.tackelLanded))) && ((model.fishOnHook == null)))){
bobber.gotoAndStop("off");
};
reelingIn = false;
rod.stop();
drawFishingLine();
if (sinkHookOn){
sinkHookReset();
playSFX("reel whine", 1, 0);
};
stopSFX("reeling in");
};
}
private function tackelThreeDUpdate(_arg1:Event):void{
drawFishingLine();
}
}
}//package fishingview
Section 81
//FVUpDates (fishingview.FVUpDates)
package fishingview {
import flash.display.*;
import flash.events.*;
public class FVUpDates {
private var controller:IController;
private var model:IModel;
var currentMessage:String;
private var rootView:FVRootView;
public function FVUpDates(_arg1:IModel, _arg2:IController, _arg3:FVRootView){
model = _arg1;
controller = _arg2;
rootView = _arg3;
currentMessage = null;
}
function updateModel():void{
var _local1:MovieClip;
if (model.whatChanged == "fishOnHook"){
if (model.fishOnHook != null){
rootView.alertMessages("fish on");
currentMessage = "fish on";
_local1 = model.fishOnHook.targetObject;
rootView.fishFight.scaleX = _local1.scaleX;
rootView.fishFight.scaleY = _local1.scaleY;
rootView.fishFight.x = _local1.x;
rootView.fishFight.y = _local1.y;
rootView.aboveWaterDisObj.addChild(rootView.fishFight);
rootView.fishFight.gotoAndPlay(1);
rootView.fishFight.zPosition = (rootView.fishingLineShapeHolder.zPosition + 0.01);
rootView.playSFX("fish fight splash", 1, 0, rootView.fishFight.x);
controller.stackZAxis(rootView.aboveWaterDisObj);
rootView.bobber.gotoAndPlay("fightloop");
rootView.bobber.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.bobberUnderWater.gotoAndPlay("fightloop");
rootView.bobberUnderWater.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.hook.gotoAndStop("hide");
rootView.drawFishingLineEnterFrame("add");
rootView.sinkHook();
} else {
rootView.removeFishingEvents();
rootView.mouseMovedAddEvent();
rootView.reelInUp();
rootView.stopSFX("fish fight splash");
rootView.stopSFX("reel whine");
rootView.aboveWaterDisObj.removeChild(rootView.fishFight);
rootView.sinkHookOn = false;
rootView.removeAlertMessages("fish ate worm");
currentMessage = null;
rootView.bobber.gotoAndStop("off");
rootView.bobber.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.bobberUnderWater.gotoAndStop("on");
rootView.bobberUnderWater.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.rod.mcRods.gotoAndStop("straight");
rootView.drawFishingLine();
rootView.drawFishingLineEnterFrame("remove");
};
} else {
if (model.whatChanged == "wormOnHook"){
if (model.wormOnHook){
rootView.hook.gotoAndStop("on");
rootView.removeAlertMessages("fish ate worm");
currentMessage = "none";
} else {
rootView.hook.gotoAndStop("off");
rootView.alertMessages("fish ate worm");
rootView.rod.gotoAndStop(1);
currentMessage = "fish ate worm";
};
} else {
if (model.whatChanged == "bobberBob"){
if (model.bobberBob){
rootView.alertMessages("fish on");
rootView.bobber.addEventListener(Event.INIT, bobberSFX);
rootView.bobber.gotoAndPlay("bob");
rootView.bobber.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.bobberUnderWater.gotoAndPlay("underBob");
rootView.bobberUnderWater.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.drawFishingLineEnterFrame("add");
rootView.bobberBob = model.bobberBob;
} else {
if (!model.bobberBob){
rootView.bobber.removeEventListener(Event.INIT, bobberSFX);
rootView.bobber.gotoAndStop("off");
rootView.bobber.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.bobberUnderWater.gotoAndStop("on");
rootView.bobberUnderWater.addEventListener(Event.COMPLETE, rootView.updateBobberStyle);
rootView.drawFishingLineEnterFrame("remove");
rootView.drawFishingLine();
rootView.bobberBob = model.bobberBob;
};
};
} else {
if (model.whatChanged == "pauseGame"){
rootView.pauseGame = model.pauseGame;
} else {
if (model.whatChanged == "wormCnt"){
if ((((model.wormCnt == 1)) && (!(model.wormOnHook)))){
if (currentMessage != "fish ate worm"){
rootView.alertMessages("reel in for worm");
currentMessage = "reel in for worm";
};
};
} else {
if (model.whatChanged == "currentBobber"){
rootView.bobber.mcBobber.gotoAndStop(model.currentBobber);
rootView.bobberUnderWater.mcBobber.gotoAndStop(model.currentBobber);
rootView.rod.mcBobber.gotoAndStop(model.currentBobber);
};
};
};
};
};
};
}
protected function bobberSFX(_arg1:Event):void{
rootView.playSFX("bobber bobbing", 1, 0, rootView.bobber.x);
}
}
}//package fishingview
Section 82
//FishLevel (fishlevels.FishLevel)
package fishlevels {
import flash.display.*;
public class FishLevel extends MovieClip {
protected const thisFishY:Number = 22;
var model:IModel;
public function FishLevel(_arg1:IModel){
model = _arg1;
if (model.currentLevel == 1){
model.wormCnt = 12;
model.moneyForLevel = 1000;
} else {
if (model.currentLevel == 2){
model.wormCnt = 10;
model.moneyForLevel = 1300;
} else {
if (model.currentLevel == 3){
model.wormCnt = 8;
model.moneyForLevel = 1707;
} else {
if (model.currentLevel == 4){
model.wormCnt = 6;
model.moneyForLevel = 2000;
} else {
if (model.currentLevel == 5){
model.wormCnt = 3;
model.moneyForLevel = 2400;
} else {
if (model.currentLevel == 6){
model.wormCnt = 1;
model.moneyForLevel = 2800;
};
};
};
};
};
};
model.scoreMin = (((((800 + 1200) + 1800) + 2000) + 2200) + 2400);
}
}
}//package fishlevels
Section 83
//FishLevelClown (fishlevels.FishLevelClown)
package fishlevels {
import fishfactory.*;
public class FishLevelClown extends FishLevel {
public function FishLevelClown(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHCOD);
_local3.push(FishCreator.FISHMINNOW);
_local3.push(FishCreator.FISHFLOUNDER);
_local3.push(FishCreator.FISHWORMEATER);
_local3.push(FishCreator.FISHCLOWN);
_local3.push(FishCreator.FISHGROUPER);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHCLOWN, 100, thisFishY, 575);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 555);
_arg1.addFish(FishCreator.FISHWORMEATER, -200, thisFishY, 550);
_arg1.addFish(FishCreator.FISHMINNOW, 400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHGROUPER, 300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHFLOUNDER, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHGROUPER, -200, thisFishY, 450);
_arg1.addFish(FishCreator.FISHCOD, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHWORMEATER, -120, thisFishY, 417);
_arg1.addFish(FishCreator.FISHWORMEATER, -450, thisFishY, 410);
_arg1.addFish(FishCreator.FISHCOD, 400, thisFishY, 405);
_arg1.addFish(FishCreator.FISHFLOUNDER, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHCLOWN, 350, thisFishY, 390);
_arg1.addFish(FishCreator.FISHGROUPER, -350, thisFishY, 370);
_arg1.addFish(FishCreator.FISHCLOWN, -400, thisFishY, 375);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHFLOUNDER, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHCLOWN, 0, thisFishY, 285);
_arg1.addFish(FishCreator.FISHWORMEATER, -20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHWORMEATER, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHCOD, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 84
//FishLevelCreator (fishlevels.FishLevelCreator)
package fishlevels {
import fishfactory.*;
public class FishLevelCreator {
private var model:IModel;
private var fishFactory:FishCreator;
public static const LEVELONE:uint = 1;
public static const LEVELTWO:uint = 2;
public static const LEVELFOUR:uint = 4;
public static const LEVELFIVE:uint = 5;
public static const LEVELTHREE:uint = 3;
public static const LEVELSIX:uint = 6;
public function FishLevelCreator(_arg1:FishCreator, _arg2:IModel){
fishFactory = _arg1;
model = _arg2;
}
public function buildLevel():void{
var _local1:FishLevel;
_local1 = this.createLevel(model.currentLevel);
}
private function createLevel(_arg1:uint):FishLevel{
if (_arg1 == LEVELONE){
return (new FishLevelOld(fishFactory, model));
};
if (_arg1 == LEVELTWO){
return (new FishLevelSwamp(fishFactory, model));
};
if (_arg1 == LEVELTHREE){
return (new FishLevelPirate(fishFactory, model));
};
if (_arg1 == LEVELFOUR){
return (new FishLevelClown(fishFactory, model));
};
if (_arg1 == LEVELFIVE){
return (new FishLevelDump(fishFactory, model));
};
if (_arg1 == LEVELSIX){
return (new FishLevelTiki(fishFactory, model));
};
throw (new Error("Invalid kind of fish level specified"));
}
}
}//package fishlevels
Section 85
//FishLevelDump (fishlevels.FishLevelDump)
package fishlevels {
import fishfactory.*;
public class FishLevelDump extends FishLevel {
public function FishLevelDump(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHCOD);
_local3.push(FishCreator.FISHMINNOW);
_local3.push(FishCreator.FISHFLOUNDER);
_local3.push(FishCreator.FISHWORMEATER);
_local3.push(FishCreator.FISHMUTANT);
_local3.push(FishCreator.FISHMULLET);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHMUTANT, 100, thisFishY, 575);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 555);
_arg1.addFish(FishCreator.FISHCOD, -200, thisFishY, 550);
_arg1.addFish(FishCreator.FISHMINNOW, 400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHMULLET, 300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHFLOUNDER, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHMULLET, -200, thisFishY, 450);
_arg1.addFish(FishCreator.FISHCOD, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHWORMEATER, -120, thisFishY, 417);
_arg1.addFish(FishCreator.FISHWORMEATER, -450, thisFishY, 410);
_arg1.addFish(FishCreator.FISHCOD, 400, thisFishY, 405);
_arg1.addFish(FishCreator.FISHFLOUNDER, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHMUTANT, 350, thisFishY, 390);
_arg1.addFish(FishCreator.FISHMULLET, -350, thisFishY, 370);
_arg1.addFish(FishCreator.FISHMUTANT, -400, thisFishY, 375);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHFLOUNDER, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHMUTANT, 0, thisFishY, 285);
_arg1.addFish(FishCreator.FISHWORMEATER, -20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHMULLET, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHCOD, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 86
//FishLevelOld (fishlevels.FishLevelOld)
package fishlevels {
import fishfactory.*;
public class FishLevelOld extends FishLevel {
public function FishLevelOld(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHBIGMOUTHBASS);
_local3.push(FishCreator.FISHSALMON);
_local3.push(FishCreator.FISHTROUT);
_local3.push(FishCreator.FISHCAT);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 200, thisFishY, 600);
_arg1.addFish(FishCreator.FISHSALMON, 400, thisFishY, 575);
_arg1.addFish(FishCreator.FISHCAT, -200, thisFishY, 550);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, -400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHTROUT, -300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHCAT, -150, thisFishY, 450);
_arg1.addFish(FishCreator.FISHSALMON, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, -120, thisFishY, 405);
_arg1.addFish(FishCreator.FISHTROUT, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHCAT, 400, thisFishY, 390);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, -250, thisFishY, 380);
_arg1.addFish(FishCreator.FISHSALMON, 150, thisFishY, 360);
_arg1.addFish(FishCreator.FISHCAT, -400, thisFishY, 350);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHSALMON, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 200, thisFishY, 290);
_arg1.addFish(FishCreator.FISHTROUT, 20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHCAT, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHTROUT, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 87
//FishLevelPirate (fishlevels.FishLevelPirate)
package fishlevels {
import fishfactory.*;
public class FishLevelPirate extends FishLevel {
public function FishLevelPirate(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHBIGMOUTHBASS);
_local3.push(FishCreator.FISHSALMON);
_local3.push(FishCreator.FISHFLOUNDER);
_local3.push(FishCreator.FISHWORMEATER);
_local3.push(FishCreator.FISHPIRATE);
_local3.push(FishCreator.FISHGROUPER);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHPIRATE, 100, thisFishY, 575);
_arg1.addFish(FishCreator.FISHWORMEATER, 0, thisFishY, 555);
_arg1.addFish(FishCreator.FISHWORMEATER, -200, thisFishY, 550);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHGROUPER, -300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHFLOUNDER, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHGROUPER, -200, thisFishY, 450);
_arg1.addFish(FishCreator.FISHSALMON, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHWORMEATER, -120, thisFishY, 417);
_arg1.addFish(FishCreator.FISHWORMEATER, -450, thisFishY, 410);
_arg1.addFish(FishCreator.FISHSALMON, 400, thisFishY, 405);
_arg1.addFish(FishCreator.FISHFLOUNDER, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHPIRATE, 350, thisFishY, 390);
_arg1.addFish(FishCreator.FISHGROUPER, -350, thisFishY, 370);
_arg1.addFish(FishCreator.FISHPIRATE, -400, thisFishY, 375);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHFLOUNDER, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHPIRATE, 0, thisFishY, 285);
_arg1.addFish(FishCreator.FISHWORMEATER, -20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHWORMEATER, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHGROUPER, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 88
//FishLevelSwamp (fishlevels.FishLevelSwamp)
package fishlevels {
import fishfactory.*;
public class FishLevelSwamp extends FishLevel {
public function FishLevelSwamp(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHBIGMOUTHBASS);
_local3.push(FishCreator.FISHSALMON);
_local3.push(FishCreator.FISHTROUT);
_local3.push(FishCreator.FISHWORMEATER);
_local3.push(FishCreator.FISHHILLBILLY);
_local3.push(FishCreator.FISHCAT);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHHILLBILLY, 400, thisFishY, 575);
_arg1.addFish(FishCreator.FISHWORMEATER, 0, thisFishY, 550);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHTROUT, -300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHCAT, -150, thisFishY, 450);
_arg1.addFish(FishCreator.FISHSALMON, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHWORMEATER, -120, thisFishY, 415);
_arg1.addFish(FishCreator.FISHCAT, -450, thisFishY, 407);
_arg1.addFish(FishCreator.FISHTROUT, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHHILLBILLY, 350, thisFishY, 390);
_arg1.addFish(FishCreator.FISHCAT, 150, thisFishY, 370);
_arg1.addFish(FishCreator.FISHHILLBILLY, -400, thisFishY, 375);
_arg1.addFish(FishCreator.FISHBIGMOUTHBASS, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHSALMON, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHHILLBILLY, 0, thisFishY, 285);
_arg1.addFish(FishCreator.FISHCAT, 20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHWORMEATER, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHTROUT, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 89
//FishLevelTiki (fishlevels.FishLevelTiki)
package fishlevels {
import fishfactory.*;
public class FishLevelTiki extends FishLevel {
public function FishLevelTiki(_arg1:FishCreator, _arg2:IModel){
var _local3:Array;
super(_arg2);
_local3 = new Array();
_local3.push(FishCreator.FISHCOD);
_local3.push(FishCreator.FISHMINNOW);
_local3.push(FishCreator.FISHMUTANT);
_local3.push(FishCreator.FISHWORMEATER);
_local3.push(FishCreator.FISHTIKI);
_local3.push(FishCreator.FISHMULLET);
model.bonusFishArray = _local3;
_arg1.addFish(FishCreator.FISHTIKI, 100, thisFishY, 575);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 555);
_arg1.addFish(FishCreator.FISHCOD, -200, thisFishY, 550);
_arg1.addFish(FishCreator.FISHMINNOW, 400, thisFishY, 525);
_arg1.addFish(FishCreator.FISHMULLET, 300, thisFishY, 500);
_arg1.addFish(FishCreator.FISHMUTANT, 400, thisFishY, 475);
_arg1.addFish(FishCreator.FISHMULLET, -200, thisFishY, 450);
_arg1.addFish(FishCreator.FISHCOD, -400, thisFishY, 425);
_arg1.addFish(FishCreator.FISHWORMEATER, -120, thisFishY, 417);
_arg1.addFish(FishCreator.FISHWORMEATER, -450, thisFishY, 410);
_arg1.addFish(FishCreator.FISHCOD, 400, thisFishY, 405);
_arg1.addFish(FishCreator.FISHMUTANT, 200, thisFishY, 400);
_arg1.addFish(FishCreator.FISHTIKI, 350, thisFishY, 390);
_arg1.addFish(FishCreator.FISHMULLET, -350, thisFishY, 370);
_arg1.addFish(FishCreator.FISHTIKI, -400, thisFishY, 375);
_arg1.addFish(FishCreator.FISHMINNOW, 0, thisFishY, 325);
_arg1.addFish(FishCreator.FISHMUTANT, -150, thisFishY, 300);
_arg1.addFish(FishCreator.FISHTIKI, 0, thisFishY, 285);
_arg1.addFish(FishCreator.FISHWORMEATER, -20, thisFishY, 275);
_arg1.addFish(FishCreator.FISHMULLET, 300, thisFishY, 250);
_arg1.addFish(FishCreator.FISHCOD, -100, thisFishY, 225);
}
}
}//package fishlevels
Section 90
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
_tintColor = 0;
_tintMultiplier = 0;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setTint(_arg1:uint, _arg2:Number):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
private function deriveTintColor():uint{
var _local1:Number;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local1 = (1 / this.tintMultiplier);
_local2 = Math.round((this.redOffset * _local1));
_local3 = Math.round((this.greenOffset * _local1));
_local4 = Math.round((this.blueOffset * _local1));
_local5 = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
_local2 = (1 - Math.abs(_arg1));
_local3 = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
private function parseXML(_arg1:XML=null):Color{
var _local2:XML;
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
_local2 = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
_local4 = (1 - _arg3);
_local5 = ((_arg1 >> 24) & 0xFF);
_local6 = ((_arg1 >> 16) & 0xFF);
_local7 = ((_arg1 >> 8) & 0xFF);
_local8 = (_arg1 & 0xFF);
_local9 = ((_arg2 >> 24) & 0xFF);
_local10 = ((_arg2 >> 16) & 0xFF);
_local11 = ((_arg2 >> 8) & 0xFF);
_local12 = (_arg2 & 0xFF);
_local13 = ((_local5 * _local4) + (_local9 * _arg3));
_local14 = ((_local6 * _local4) + (_local10 * _arg3));
_local15 = ((_local7 * _local4) + (_local11 * _arg3));
_local16 = ((_local8 * _local4) + (_local12 * _arg3));
_local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number;
var _local5:ColorTransform;
_local4 = (1 - _arg3);
_local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 91
//FloatyBall (floatytoys.FloatyBall)
package floatytoys {
class FloatyBall extends FloatyToy {
function FloatyBall(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_floatyKind = "ball";
}
}
}//package floatytoys
Section 92
//FloatyController (floatytoys.FloatyController)
package floatytoys {
import flash.display.*;
import flash.events.*;
import utils.*;
import floatytoys.*;
import flash.utils.*;
class FloatyController extends MovieClip {
private var viewAngleY:Number;
private var model:IModel;
private var thisTimer:Timer;
private var centerY:Number;
private var threeDConv:ThreeDConversion;
private var centerX:Number;
private var controller:IController;
private var viewDistance:Number;
private var floatyArray:Array;
private var tackle:MovieClip;
private var floatyPopping:FloatyToy;
private var zoomZ:Number;
private var movieClipObject:MovieClip;
function FloatyController(_arg1:IModel, _arg2:IController){
floatyArray = new Array();
model = _arg1;
controller = _arg2;
viewAngleY = model.viewAngleY;
centerX = model.centerX;
centerY = model.centerY;
zoomZ = model.zoomZ;
viewDistance = model.viewDistance;
floatyPopping = null;
thisTimer = new Timer(3000, 1);
}
private function update3dObject(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:*;
_arg1.zPosition = _arg4;
_local6 = threeDConv.threeDPoint(_arg2, _arg3, _arg4, _arg5, viewAngleY, centerX, centerY, zoomZ, viewDistance);
_arg1.scaleX = threeDConv.threeDScale(_arg4, zoomZ, viewDistance);
_arg1.scaleY = threeDConv.threeDScale(_arg4, zoomZ, viewDistance);
_arg1.x = (_local6.thisX - 0);
_arg1.y = (_local6.thisY - ((viewAngleY * threeDConv.threeDScale(0, zoomZ, viewDistance)) / 100));
}
function init(_arg1:MovieClip, _arg2:MovieClip):void{
movieClipObject = _arg1;
tackle = _arg2;
threeDConv = new ThreeDConversion();
}
private function popFinished(_arg1:Event):void{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:uint;
var _local6:uint;
_arg1.currentTarget.removeEventListener(Event.COMPLETE, popFinished);
_local2 = model.bobberSelectArray;
_local3 = new Array();
_local4 = 0;
while (_local4 < _local2.length) {
if (!_local2[_local4].unlocked){
_local3.push(_local2[_local4]);
};
_local4++;
};
if ((((_local3.length > 0)) && ((model.wormCnt > 0)))){
_local5 = NumberUtilities.random(0, 4);
} else {
_local5 = 1;
};
if (_local5 == 0){
_local6 = Math.floor((Math.random() * _local3.length));
model.unlockBobber((_local3[_local6].bobberNum - 1));
floatyPopping.targetObject.mcPrize.mcBobber.gotoAndStop(_local3[_local6].bobberNum);
controller.soundFXPlayer.playSFX("bobber award", 1, 0, _arg1.currentTarget.parent.x);
} else {
if (_local5 > 0){
model.wormCnt++;
floatyPopping.targetObject.mcPrize.gotoAndStop("worm");
};
};
floatyPopping.targetObject.mcPrize.visible = true;
thisTimer.addEventListener(TimerEvent.TIMER_COMPLETE, prizeFinished);
thisTimer.start();
}
function removeFloaty(_arg1:FloatyToy):void{
floatyArray = model.floatyObjArray;
floatyArray.splice(floatyArray.indexOf(_arg1), 1);
model.floatyObjArray = floatyArray;
movieClipObject.removeChild(_arg1.targetObject);
if (floatyArray.length == 0){
movieClipObject.removeEventListener(Event.ENTER_FRAME, floatyEnterFrame);
};
}
function addFloaty(_arg1:FloatyToy):void{
var _local2:Number;
var _local3:Number;
_local2 = 700;
_local3 = ((Math.random() * _local2) - (_local2 / 2));
update3dObject(_arg1.targetObject, _local3, 0, _arg1.zPosition, 0);
floatyArray = model.floatyObjArray;
floatyArray.push(_arg1);
model.floatyObjArray = floatyArray;
if (floatyArray.length == 1){
movieClipObject.addEventListener(Event.ENTER_FRAME, floatyEnterFrame);
};
}
private function prizeFinished(_arg1:Event):void{
thisTimer.stop();
thisTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, prizeFinished);
removeFloaty(floatyPopping);
floatyPopping = null;
}
function cleanUp():void{
var _local1:Number;
movieClipObject.removeEventListener(Event.ENTER_FRAME, floatyEnterFrame);
_local1 = 0;
while (_local1 < floatyArray.length) {
floatyArray[_local1].cleanUp();
_local1++;
};
floatyArray.length = 0;
model.floatyObjArray = floatyArray;
}
private function upDateFloaty():void{
var _local1:uint;
if (floatyPopping == null){
_local1 = 0;
while (_local1 < floatyArray.length) {
if (floatyArray[_local1].targetObject.hitTestObject(tackle)){
if (((((floatyArray[_local1].targetObject.zPosition + 10) > tackle.zPosition)) && (((floatyArray[_local1].targetObject.zPosition - 10) < tackle.zPosition)))){
floatyPopping = floatyArray[_local1];
floatyArray[_local1].targetObject.mcFloaty.addEventListener(Event.COMPLETE, popFinished);
floatyArray[_local1].targetObject.mcFloaty.gotoAndPlay("play");
controller.soundFXPlayer.playSFX("floaty pop", 1, 0, floatyArray[_local1].targetObject.x);
break;
};
};
_local1++;
};
};
}
private function floatyEnterFrame(_arg1:Event):void{
if (floatyPopping == null){
upDateFloaty();
};
}
}
}//package floatytoys
Section 93
//FloatyCreator (floatytoys.FloatyCreator)
package floatytoys {
import flash.display.*;
public class FloatyCreator {
private var thisDisplayObject:MovieClip;
private var model:IModel;
private var floatyController:FloatyController;
private var controller:IController;
private static const FLOATYTUBE:uint = 4;
private static const FLOATYAMOUNT:uint = 5;
private static const FLOATYDUCK:uint = 0;
private static const FLOATYTURTLE:uint = 3;
private static const FLOATYBALL:uint = 2;
private static const FLOATYMONSTER:uint = 1;
public function FloatyCreator(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:MovieClip){
model = _arg1;
controller = _arg2;
thisDisplayObject = _arg3;
floatyController = new FloatyController(model, controller);
floatyController.init(thisDisplayObject, _arg4);
}
private function createFloaty(_arg1:uint):FloatyToy{
if (_arg1 == FLOATYDUCK){
return (new FloatyDuck(model, controller));
};
if (_arg1 == FLOATYMONSTER){
return (new FloatyMonster(model, controller));
};
if (_arg1 == FLOATYBALL){
return (new FloatyBall(model, controller));
};
if (_arg1 == FLOATYTURTLE){
return (new FloatyTurtle(model, controller));
};
if (_arg1 == FLOATYTUBE){
return (new FloatyTube(model, controller));
};
throw (new Error("Invalid kind of floaty specified"));
}
public function cleanUp():void{
floatyController.cleanUp();
}
private function removeFloaty():void{
var _local1:uint;
_local1 = 0;
while (_local1 < model.floatyObjArray.length) {
floatyController.removeFloaty(model.floatyObjArray[_local1]);
_local1++;
};
}
public function addFloaty():void{
var _local1:uint;
var _local2:FloatyToy;
if (model.floatyObjArray.length == 0){
removeFloaty();
_local1 = Math.floor((Math.random() * FLOATYAMOUNT));
_local2 = this.createFloaty(_local1);
_local2.init(thisDisplayObject);
floatyController.addFloaty(_local2);
};
}
}
}//package floatytoys
Section 94
//FloatyDuck (floatytoys.FloatyDuck)
package floatytoys {
class FloatyDuck extends FloatyToy {
function FloatyDuck(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_floatyKind = "duck";
}
}
}//package floatytoys
Section 95
//FloatyMonster (floatytoys.FloatyMonster)
package floatytoys {
class FloatyMonster extends FloatyToy {
function FloatyMonster(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_floatyKind = "monster";
}
}
}//package floatytoys
Section 96
//FloatyToy (floatytoys.FloatyToy)
package floatytoys {
import flash.display.*;
import floatytoys.*;
class FloatyToy extends MovieClip {
var clipX:Number;
var clipY:Number;
var leftMaxX:Number;
protected var _targetObject:FloatyRobotMC;
var clipZ:Number;
private var model:IModel;
protected var _zPosition:Number;// = 520
protected var _floatyKind:String;
var targetDisplayObject:Object;
var rightMaxX:Number;
private var controller:IController;
var viewAngleX:Number;
function FloatyToy(_arg1:IModel, _arg2:IController){
_zPosition = 520;
super();
model = _arg1;
controller = _arg2;
}
function init(_arg1:Object):void{
viewAngleX = 0;
targetDisplayObject = _arg1;
_targetObject = new FloatyRobotMC();
_targetObject.gotoAndStop(_floatyKind);
_targetObject.mcPrize.visible = false;
targetDisplayObject.addChild(_targetObject);
}
public function get targetObject():MovieClip{
return (_targetObject);
}
public function get zPosition():Number{
return (_zPosition);
}
function cleanUp():void{
targetDisplayObject.removeChild(_targetObject);
}
}
}//package floatytoys
Section 97
//FloatyTube (floatytoys.FloatyTube)
package floatytoys {
class FloatyTube extends FloatyToy {
function FloatyTube(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_floatyKind = "tube";
}
}
}//package floatytoys
Section 98
//FloatyTurtle (floatytoys.FloatyTurtle)
package floatytoys {
class FloatyTurtle extends FloatyToy {
function FloatyTurtle(_arg1:IModel, _arg2:IController):void{
super(_arg1, _arg2);
_floatyKind = "turtle";
}
}
}//package floatytoys
Section 99
//Music (musicfactory.Music)
package musicfactory {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import utils.*;
import musicfactory.*;
import flash.net.*;
class Music extends MovieClip {
protected var channel:SoundChannel;
protected var music;
private var model:IModel;
protected var linkageString:String;
protected var musicPlaying:Boolean;
protected var targetDisplayObject:Object;
protected var _musicLoaded:Boolean;
protected var externalFile:String;
protected static const FILEPATH:String = "fishingchampion_sound/music/";
function Music(_arg1:IModel){
channel = new SoundChannel();
super();
model = _arg1;
_musicLoaded = false;
musicPlaying = false;
}
private function loarderLoaded(_arg1:Event):void{
var _local2:Class;
_arg1.currentTarget.removeEventListener(Event.INIT, loarderLoaded);
_local2 = (_arg1.currentTarget.applicationDomain.getDefinition(linkageString) as Class);
music = new (_local2);
_musicLoaded = true;
dispatchEvent(new Event(Event.COMPLETE));
}
function init(_arg1:Object):void{
var _local2:Loader;
targetDisplayObject = _arg1;
_local2 = new Loader();
targetDisplayObject.addChild(_local2);
_local2.contentLoaderInfo.addEventListener(Event.INIT, loarderLoaded);
_local2.load(new URLRequest((FILEPATH + externalFile)));
}
function setSoundTransform(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
var _local4:SoundPanVol;
if (_arg3 != null){
_local4 = new SoundPanVol(channel, _arg1, _arg2, _arg3, model.movieWidth);
} else {
_local4 = new SoundPanVol(channel, _arg1, _arg2);
};
}
function stopMusic():void{
if (((_musicLoaded) && (musicPlaying))){
channel.stop();
musicPlaying = false;
};
}
function playMusic():void{
if (((_musicLoaded) && (!(musicPlaying)))){
channel = music.play(0, 1000);
setSoundTransform(model.musicVolume);
musicPlaying = true;
};
}
protected function buildMusicClass(_arg1:Object):void{
}
function get musicLoaded():Boolean{
return (_musicLoaded);
}
}
}//package musicfactory
Section 100
//MusicCreator (musicfactory.MusicCreator)
package musicfactory {
import flash.display.*;
import flash.events.*;
import flash.errors.*;
public class MusicCreator extends EventDispatcher {
protected var _muteMusic:Boolean;
protected var firstSetMusicToLoad:uint;// = 2
protected var thisDisplayObject:MovieClip;
protected var model:IModel;
protected var currentMusicLoading:uint;
protected var currentMusic:uint;
protected var musicArray:Array;
protected static const FISHINGHOLEPIRATE:uint = 4;
protected static const FISHINGHOLETIKI:uint = 7;
protected static const INSTRUCTIONS:uint = 0;
protected static const MUSICTOTALNUM:uint = 8;
protected static const THEME:uint = 1;
protected static const FISHINGHOLECLOWN:uint = 5;
protected static const FISHINGHOLESWAMP:uint = 3;
protected static const FISHINGHOLEOLD:uint = 2;
protected static const FISHINGHOLEDUMP:uint = 6;
public function MusicCreator(_arg1:IModel, _arg2:MovieClip){
firstSetMusicToLoad = 2;
super();
model = _arg1;
thisDisplayObject = _arg2;
currentMusicLoading = 0;
musicArray = new Array();
loadMusicArray();
}
protected function loadNextMusic():void{
if (currentMusicLoading < firstSetMusicToLoad){
musicArray[currentMusicLoading].addEventListener(Event.COMPLETE, loadMusicComplete);
musicArray[currentMusicLoading].init(thisDisplayObject);
} else {
if (firstSetMusicToLoad < MUSICTOTALNUM){
firstSetMusicToLoad = MUSICTOTALNUM;
dispatchEvent(new Event(Event.COMPLETE));
};
};
}
protected function loadMusicArray():void{
var _local1:uint;
var _local2:Music;
_local1 = 0;
while (musicArray.length < MUSICTOTALNUM) {
_local2 = this.createMusic(_local1);
musicArray.push(_local2);
_local1++;
};
}
protected function createMusic(_arg1:uint):Music{
if (_arg1 == INSTRUCTIONS){
return (new MusicInstructions(model));
};
if (_arg1 == THEME){
return (new MusicTheme(model));
};
if (_arg1 == FISHINGHOLEOLD){
return (new MusicFishingHoleOld(model));
};
if (_arg1 == FISHINGHOLESWAMP){
return (new MusicFishingHoleSwamp(model));
};
if (_arg1 == FISHINGHOLEPIRATE){
return (new MusicFishingHolePirate(model));
};
if (_arg1 == FISHINGHOLECLOWN){
return (new MusicFishingHoleClown(model));
};
if (_arg1 == FISHINGHOLEDUMP){
return (new MusicFishingHoleDump(model));
};
if (_arg1 == FISHINGHOLETIKI){
return (new MusicFishingHoleTiki(model));
};
throw (new Error("Invalid kind of Music specified"));
}
public function loadMusic():void{
loadNextMusic();
}
protected function loadMusicComplete(_arg1:Event):void{
_arg1.currentTarget.removeEventListener(Event.COMPLETE, loadMusicComplete);
if (currentMusicLoading == currentMusic){
playMusic();
};
currentMusicLoading++;
loadNextMusic();
}
protected function playMusic():void{
throw (new IllegalOperationError("add playMusic not supported"));
}
}
}//package musicfactory
Section 101
//MusicFishingHoleClown (musicfactory.MusicFishingHoleClown)
package musicfactory {
import utils.*;
class MusicFishingHoleClown extends Music {
function MusicFishingHoleClown(_arg1:IModel):void{
var _local2:Number;
super(_arg1);
_local2 = NumberUtilities.random(0, 1);
if (_local2 == 0){
externalFile = "fishholemusic_clown.swf";
} else {
externalFile = "fishholemusic_clown2.swf";
};
linkageString = "FishHoleMusicClownMC";
}
}
}//package musicfactory
Section 102
//MusicFishingHoleDump (musicfactory.MusicFishingHoleDump)
package musicfactory {
class MusicFishingHoleDump extends Music {
function MusicFishingHoleDump(_arg1:IModel):void{
super(_arg1);
externalFile = "fishholemusic_dump.swf";
linkageString = "FishHoleMusicDumpMC";
}
}
}//package musicfactory
Section 103
//MusicFishingHoleOld (musicfactory.MusicFishingHoleOld)
package musicfactory {
class MusicFishingHoleOld extends Music {
function MusicFishingHoleOld(_arg1:IModel):void{
super(_arg1);
externalFile = "fishholemusic_old.swf";
linkageString = "FishHoleMusicOldMC";
}
}
}//package musicfactory
Section 104
//MusicFishingHolePirate (musicfactory.MusicFishingHolePirate)
package musicfactory {
class MusicFishingHolePirate extends Music {
function MusicFishingHolePirate(_arg1:IModel):void{
super(_arg1);
externalFile = "fishholemusic_pirate.swf";
linkageString = "FishHoleMusicPirateMC";
}
}
}//package musicfactory
Section 105
//MusicFishingHoleSwamp (musicfactory.MusicFishingHoleSwamp)
package musicfactory {
class MusicFishingHoleSwamp extends Music {
function MusicFishingHoleSwamp(_arg1:IModel):void{
super(_arg1);
externalFile = "fishholemusic_swamp.swf";
linkageString = "FishHoleMusicSwampMC";
}
}
}//package musicfactory
Section 106
//MusicFishingHoleTiki (musicfactory.MusicFishingHoleTiki)
package musicfactory {
class MusicFishingHoleTiki extends Music {
function MusicFishingHoleTiki(_arg1:IModel):void{
super(_arg1);
externalFile = "fishholemusic_tiki.swf";
linkageString = "FishHoleMusicTikiMC";
}
}
}//package musicfactory
Section 107
//MusicInstructions (musicfactory.MusicInstructions)
package musicfactory {
class MusicInstructions extends Music {
function MusicInstructions(_arg1:IModel):void{
super(_arg1);
externalFile = "thememusic_instructions.swf";
linkageString = "ThemeMusicInstructionsMC";
}
}
}//package musicfactory
Section 108
//MusicPlayer (musicfactory.MusicPlayer)
package musicfactory {
import flash.display.*;
public class MusicPlayer extends MusicCreator {
public function MusicPlayer(_arg1:IModel, _arg2:MovieClip){
super(_arg1, _arg2);
_muteMusic = false;
}
public function set muteMusic(_arg1:Boolean):void{
_muteMusic = _arg1;
}
public function get muteMusic():Boolean{
return (_muteMusic);
}
public function stopMusic():void{
if (musicArray[currentMusic].musicLoaded){
musicArray[currentMusic].stopMusic();
};
}
public function setSoundTransform(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
if (musicArray[currentMusic].musicLoaded){
musicArray[currentMusic].setSoundTransform(_arg1, _arg2, _arg3);
};
}
public function playThemeMusic(_arg1:String):void{
stopMusic();
if (_arg1 == "instructions"){
currentMusic = INSTRUCTIONS;
} else {
if (_arg1 == "theme"){
currentMusic = THEME;
} else {
throw (new Error("Invalid kind of Theme Music specified"));
};
};
playMusic();
}
public function playFishHoleMusic():void{
var _local1:uint;
stopMusic();
_local1 = model.currentLevel;
if (_local1 == 1){
currentMusic = FISHINGHOLEOLD;
} else {
if (_local1 == 2){
currentMusic = FISHINGHOLESWAMP;
} else {
if (_local1 == 3){
currentMusic = FISHINGHOLEPIRATE;
} else {
if (_local1 == 4){
currentMusic = FISHINGHOLECLOWN;
} else {
if (_local1 == 5){
currentMusic = FISHINGHOLEDUMP;
} else {
if (_local1 == 6){
currentMusic = FISHINGHOLETIKI;
};
};
};
};
};
};
playMusic();
}
override protected function playMusic():void{
if (((musicArray[currentMusic].musicLoaded) && (!(_muteMusic)))){
musicArray[currentMusic].playMusic();
};
}
}
}//package musicfactory
Section 109
//MusicTheme (musicfactory.MusicTheme)
package musicfactory {
class MusicTheme extends Music {
function MusicTheme(_arg1:IModel):void{
super(_arg1);
externalFile = "thememusic_theme.swf";
linkageString = "ThemeMusicThemeMC";
}
}
}//package musicfactory
Section 110
//SoundFX (sfxfactory.SoundFX)
package sfxfactory {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import sfxfactory.*;
import utils.*;
import flash.net.*;
class SoundFX extends MovieClip {
protected var volumeDefault:Number;
protected var channel:SoundChannel;
protected var model:IModel;
protected var linkageString:String;
protected var panDefault:Number;
protected var _sfxLoaded:Boolean;
protected var soundFXLinkage:SoundFXLinkage;
protected var targetDisplayObject:Object;
protected var soundFXLinkageString:String;
protected var sfx;
protected var sfxPlaying:Boolean;
protected var externalFile:String;
protected static const FILEPATH:String = "fishingchampion_sound/sfx/";
function SoundFX(_arg1:IModel, _arg2:SoundFXLinkage):void{
channel = new SoundChannel();
super();
model = _arg1;
volumeDefault = 1;
panDefault = 0;
soundFXLinkage = _arg2;
_sfxLoaded = false;
sfxPlaying = false;
}
function init(_arg1:Object):void{
var _local2:Loader;
targetDisplayObject = _arg1;
_local2 = new Loader();
targetDisplayObject.addChild(_local2);
_local2.contentLoaderInfo.addEventListener(Event.INIT, fileLoaded);
_local2.load(new URLRequest((FILEPATH + externalFile)));
}
function stopSFX():void{
if (((_sfxLoaded) && (sfxPlaying))){
channel.stop();
sfxPlaying = false;
};
}
function setSoundTransform(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
var _local4:SoundPanVol;
if (_arg3 != null){
_local4 = new SoundPanVol(channel, _arg1, _arg2, _arg3, model.movieWidth);
} else {
_local4 = new SoundPanVol(channel, _arg1, _arg2);
};
}
protected function playSFXPassed(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
sfxPlaying = true;
setSoundTransform(_arg1, _arg2, _arg3);
channel = sfx.play(0, 1000);
setSoundTransform(_arg1, _arg2, _arg3);
}
protected function fileLoaded(_arg1:Event):void{
var _local2:Class;
_arg1.currentTarget.removeEventListener(Event.INIT, fileLoaded);
if (soundFXLinkageString != "none"){
soundFXLinkage.setLinkage(soundFXLinkageString, (_arg1.currentTarget.applicationDomain.getDefinition(linkageString) as Class));
};
_local2 = (_arg1.currentTarget.applicationDomain.getDefinition(linkageString) as Class);
sfx = new (_local2);
_sfxLoaded = true;
dispatchEvent(new Event(Event.COMPLETE));
}
function playSFX(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
if (((_sfxLoaded) && (!(sfxPlaying)))){
playSFXPassed(_arg1, _arg2, _arg3);
};
}
protected function buildSFXClass(_arg1:Object):void{
}
function get sfxLoaded():Boolean{
return (_sfxLoaded);
}
}
}//package sfxfactory
Section 111
//SoundFXBobberAward (sfxfactory.SoundFXBobberAward)
package sfxfactory {
import sfxfactory.*;
class SoundFXBobberAward extends SoundFXMP3 {
function SoundFXBobberAward(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Bobber_Award.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 112
//SoundFXBobberBobbing (sfxfactory.SoundFXBobberBobbing)
package sfxfactory {
import sfxfactory.*;
class SoundFXBobberBobbing extends SoundFXMP3 {
function SoundFXBobberBobbing(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Bobber_Bobbing.mp3";
soundFXLinkageString = "bobberBobbing";
}
}
}//package sfxfactory
Section 113
//SoundFXBobberLandSplash (sfxfactory.SoundFXBobberLandSplash)
package sfxfactory {
import sfxfactory.*;
class SoundFXBobberLandSplash extends SoundFXMP3 {
function SoundFXBobberLandSplash(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Bobber_Land_Splash.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 114
//SoundFXBonusFlutter (sfxfactory.SoundFXBonusFlutter)
package sfxfactory {
import sfxfactory.*;
class SoundFXBonusFlutter extends SoundFX {
function SoundFXBonusFlutter(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_bonusflutter.swf";
linkageString = "SFXBonusFlutterMC";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 115
//SoundFXBonusKaChing (sfxfactory.SoundFXBonusKaChing)
package sfxfactory {
import sfxfactory.*;
class SoundFXBonusKaChing extends SoundFXMP3 {
function SoundFXBonusKaChing(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Bonus_Fish_Ka-ching.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 116
//SoundFXBonusSelectedDing (sfxfactory.SoundFXBonusSelectedDing)
package sfxfactory {
import sfxfactory.*;
class SoundFXBonusSelectedDing extends SoundFXMP3 {
function SoundFXBonusSelectedDing(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Bonus_Fish_Selected.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 117
//SoundFXCreator (sfxfactory.SoundFXCreator)
package sfxfactory {
import flash.display.*;
import flash.events.*;
public class SoundFXCreator extends EventDispatcher {
protected var currentSFXLoading:uint;
protected var sfxArray:Array;
protected var controller:IController;
protected var thisDisplayObject:MovieClip;
protected var soundFXLinkage:SoundFXLinkage;
protected var model:IModel;
protected static const BOBBERAWARD:uint = 12;
protected static const SFXAMOUNT:uint = 17;
protected static const BONUSFLUTTERING:uint = 0;
protected static const BOBBERLANDSPLASH:uint = 4;
protected static const REELINGIN:uint = 6;
protected static const FISHCAUGHTBOO:uint = 16;
protected static const BONUSKACHING:uint = 14;
protected static const FISHGULP:uint = 10;
protected static const FISHINGHOLECHEER:uint = 15;
protected static const FISHWAITING:uint = 8;
protected static const BOBBERBOBBING:uint = 9;
protected static const FISHCAUGHTAPPLAUSE:uint = 13;
protected static const BONUSSELECTEDDING:uint = 1;
protected static const FISHFIGHTSPLASHING:uint = 11;
protected static const POWERMETER:uint = 2;
protected static const FLOATYPOP:uint = 5;
protected static const REELWHINE:uint = 3;
protected static const FISHSTALKING:uint = 7;
public function SoundFXCreator(_arg1:IModel, _arg2:IController, _arg3:MovieClip){
model = _arg1;
controller = _arg2;
currentSFXLoading = 0;
soundFXLinkage = new SoundFXLinkage(model, controller);
thisDisplayObject = _arg3;
sfxArray = new Array();
loadSFXArray();
}
protected function loadNextSFX():void{
if (currentSFXLoading < SFXAMOUNT){
sfxArray[currentSFXLoading].addEventListener(Event.COMPLETE, loadSFXComplete);
sfxArray[currentSFXLoading].init(thisDisplayObject);
} else {
dispatchEvent(new Event(Event.COMPLETE));
};
}
protected function loadSFXArray():void{
var _local1:uint;
var _local2:SoundFX;
_local1 = 0;
while (sfxArray.length < SFXAMOUNT) {
_local2 = this.createSFX(_local1);
sfxArray.push(_local2);
_local1++;
};
}
protected function loadSFXComplete(_arg1:Event):void{
_arg1.currentTarget.removeEventListener(Event.COMPLETE, loadSFXComplete);
currentSFXLoading++;
loadNextSFX();
}
protected function createSFX(_arg1:uint):SoundFX{
if (_arg1 == REELINGIN){
return (new SoundFXReelingIn(model, soundFXLinkage));
};
if (_arg1 == FISHFIGHTSPLASHING){
return (new SoundFXFishFight(model, soundFXLinkage));
};
if (_arg1 == FISHSTALKING){
return (new SoundFXFishStalk(model, soundFXLinkage));
};
if (_arg1 == FISHWAITING){
return (new SoundFXFishWaiting(model, soundFXLinkage));
};
if (_arg1 == BOBBERLANDSPLASH){
return (new SoundFXBobberLandSplash(model, soundFXLinkage));
};
if (_arg1 == BOBBERBOBBING){
return (new SoundFXBobberBobbing(model, soundFXLinkage));
};
if (_arg1 == REELWHINE){
return (new SoundFXReelPulledWhine(model, soundFXLinkage));
};
if (_arg1 == FISHGULP){
return (new SoundFXFishGulp(model, soundFXLinkage));
};
if (_arg1 == FLOATYPOP){
return (new SoundFXFloatyPop(model, soundFXLinkage));
};
if (_arg1 == BONUSKACHING){
return (new SoundFXBonusKaChing(model, soundFXLinkage));
};
if (_arg1 == BONUSFLUTTERING){
return (new SoundFXBonusFlutter(model, soundFXLinkage));
};
if (_arg1 == BONUSSELECTEDDING){
return (new SoundFXBonusSelectedDing(model, soundFXLinkage));
};
if (_arg1 == BOBBERAWARD){
return (new SoundFXBobberAward(model, soundFXLinkage));
};
if (_arg1 == FISHCAUGHTAPPLAUSE){
return (new SoundFXFishCaughtApplause(model, soundFXLinkage));
};
if (_arg1 == FISHINGHOLECHEER){
return (new SoundFXFishingHoleCheer(model, soundFXLinkage));
};
if (_arg1 == POWERMETER){
return (new SoundFXPowerMeterEngine(model, soundFXLinkage));
};
if (_arg1 == FISHCAUGHTBOO){
return (new SoundFXFishCaughtBoos(model, soundFXLinkage));
};
throw (new Error("Invalid kind of SFX specified"));
}
public function loadSFX():void{
loadNextSFX();
}
}
}//package sfxfactory
Section 118
//SoundFXFishCaughtApplause (sfxfactory.SoundFXFishCaughtApplause)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishCaughtApplause extends SoundFXMP3 {
function SoundFXFishCaughtApplause(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Fish_Caught_Applause.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 119
//SoundFXFishCaughtBoos (sfxfactory.SoundFXFishCaughtBoos)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishCaughtBoos extends SoundFXMP3 {
function SoundFXFishCaughtBoos(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Fish_Caught_Boos.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 120
//SoundFXFishFight (sfxfactory.SoundFXFishFight)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishFight extends SoundFX {
function SoundFXFishFight(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_fishfightloop.swf";
linkageString = "SFXFishFightLoopMC";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 121
//SoundFXFishGulp (sfxfactory.SoundFXFishGulp)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishGulp extends SoundFXMP3 {
function SoundFXFishGulp(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Fish_Ate_Worm_Gulp.mp3";
soundFXLinkageString = "fishGulp";
}
}
}//package sfxfactory
Section 122
//SoundFXFishingHoleCheer (sfxfactory.SoundFXFishingHoleCheer)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishingHoleCheer extends SoundFXMP3 {
function SoundFXFishingHoleCheer(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Fishing_Hole_Completed_Cheer.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 123
//SoundFXFishStalk (sfxfactory.SoundFXFishStalk)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishStalk extends SoundFX {
function SoundFXFishStalk(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_fishstalks.swf";
linkageString = "SFXFishingStalkingMC";
soundFXLinkageString = "fishStalkingLinkage";
}
}
}//package sfxfactory
Section 124
//SoundFXFishWaiting (sfxfactory.SoundFXFishWaiting)
package sfxfactory {
import sfxfactory.*;
class SoundFXFishWaiting extends SoundFX {
function SoundFXFishWaiting(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_fishwaiting.swf";
linkageString = "SFXFishingWaitingMC";
soundFXLinkageString = "fishWaitingLinkage";
}
}
}//package sfxfactory
Section 125
//SoundFXFloatyPop (sfxfactory.SoundFXFloatyPop)
package sfxfactory {
import sfxfactory.*;
class SoundFXFloatyPop extends SoundFXMP3 {
function SoundFXFloatyPop(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "Foaty_Pop.mp3";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 126
//SoundFXLinkage (sfxfactory.SoundFXLinkage)
package sfxfactory {
import flash.media.*;
public class SoundFXLinkage {
private var powerMeterEngine:Class;
private var model:IModel;
private var fishStalkingLinkage:Class;
private var fishWaitingLinkage:Class;
private var fishGulp:Sound;
private var soundTotal:uint;// = 4
private var bobberBobbing:Sound;
private var controller:IController;
private var soundSetCnt:uint;// = 0
public function SoundFXLinkage(_arg1:IModel, _arg2){
soundTotal = 4;
soundSetCnt = 0;
super();
model = _arg1;
controller = _arg2;
}
function setLinkage(_arg1:String, _arg2):void{
this[_arg1] = _arg2;
soundSetCnt++;
if (soundSetCnt >= soundTotal){
controller.soundFX = this;
};
}
public function getSFX(_arg1:String){
if (_arg1 == "fish stalking"){
return (new fishStalkingLinkage());
};
if (_arg1 == "fish waiting"){
return (new fishWaitingLinkage());
};
if (_arg1 == "bobber bobbing"){
return (bobberBobbing);
};
if (_arg1 == "fish gulp"){
return (fishGulp);
};
if (_arg1 == "power meter"){
return (powerMeterEngine);
};
throw (new Error("Invalid kind of SFX specified"));
}
}
}//package sfxfactory
Section 127
//SoundFXMP3 (sfxfactory.SoundFXMP3)
package sfxfactory {
import flash.events.*;
import flash.media.*;
import sfxfactory.*;
import flash.net.*;
class SoundFXMP3 extends SoundFX {
function SoundFXMP3(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
}
override function init(_arg1:Object):void{
sfx = new Sound();
sfx.load(new URLRequest((FILEPATH + externalFile)));
sfx.addEventListener(ProgressEvent.PROGRESS, progressHandler);
}
protected function sfxFinished(_arg1:Event):void{
channel.removeEventListener(Event.SOUND_COMPLETE, sfxFinished);
sfxPlaying = false;
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = (_arg1.bytesLoaded / _arg1.bytesTotal);
if (_arg1.bytesLoaded >= _arg1.bytesTotal){
sfx.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
fileLoaded(_arg1);
};
}
override protected function playSFXPassed(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
sfxPlaying = false;
channel.addEventListener(Event.SOUND_COMPLETE, sfxFinished);
setSoundTransform(_arg1, _arg2, _arg3);
channel = sfx.play();
setSoundTransform(_arg1, _arg2, _arg3);
}
override protected function fileLoaded(_arg1:Event):void{
if (soundFXLinkageString != "none"){
soundFXLinkage.setLinkage(soundFXLinkageString, sfx);
};
_sfxLoaded = true;
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package sfxfactory
Section 128
//SoundFXPlayer (sfxfactory.SoundFXPlayer)
package sfxfactory {
import flash.display.*;
public class SoundFXPlayer extends SoundFXCreator {
public function SoundFXPlayer(_arg1:IModel, _arg2:IController, _arg3:MovieClip){
super(_arg1, _arg2, _arg3);
}
public function setSoundTransform(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4=null):void{
var _local5:uint;
_local5 = pickSFX(_arg1);
if (sfxArray[_local5].sfxLoaded){
sfxArray[_local5].setSoundTransform(_arg2, _arg3, _arg4);
};
}
public function stopSFX(_arg1:String):void{
var _local2:uint;
_local2 = pickSFX(_arg1);
if (sfxArray[_local2].sfxLoaded){
sfxArray[_local2].stopSFX();
};
}
private function pickSFX(_arg1:String):uint{
var _local2:uint;
if (_arg1 == "reeling in"){
_local2 = REELINGIN;
} else {
if (_arg1 == "fish fight splash"){
_local2 = FISHFIGHTSPLASHING;
} else {
if (_arg1 == "bobber land splash"){
_local2 = BOBBERLANDSPLASH;
} else {
if (_arg1 == "bobber bobbing"){
_local2 = BOBBERBOBBING;
} else {
if (_arg1 == "reel whine"){
_local2 = REELWHINE;
} else {
if (_arg1 == "fish gulp"){
_local2 = FISHGULP;
} else {
if (_arg1 == "floaty pop"){
_local2 = FLOATYPOP;
} else {
if (_arg1 == "ka-ching"){
_local2 = BONUSKACHING;
} else {
if (_arg1 == "bonus fluttering"){
_local2 = BONUSFLUTTERING;
} else {
if (_arg1 == "bonus selected"){
_local2 = BONUSSELECTEDDING;
} else {
if (_arg1 == "bobber award"){
_local2 = BOBBERAWARD;
} else {
if (_arg1 == "fish caught"){
_local2 = FISHCAUGHTAPPLAUSE;
} else {
if (_arg1 == "fishing hole cheer"){
_local2 = FISHINGHOLECHEER;
} else {
if (_arg1 == "power meter"){
_local2 = POWERMETER;
} else {
if (_arg1 == "fish caught boo"){
_local2 = FISHCAUGHTBOO;
} else {
throw (new Error("Invalid kind of SFX specified"));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
return (_local2);
}
public function playSFX(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4=null):void{
var _local5:uint;
_local5 = pickSFX(_arg1);
if (sfxArray[_local5].sfxLoaded){
sfxArray[_local5].playSFX(_arg2, _arg3, _arg4);
};
}
}
}//package sfxfactory
Section 129
//SoundFXPowerMeterEngine (sfxfactory.SoundFXPowerMeterEngine)
package sfxfactory {
import sfxfactory.*;
class SoundFXPowerMeterEngine extends SoundFX {
function SoundFXPowerMeterEngine(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_powermeterengine.swf";
linkageString = "SFXPowerMeterEngineMC";
soundFXLinkageString = "powerMeterEngine";
}
}
}//package sfxfactory
Section 130
//SoundFXReelingIn (sfxfactory.SoundFXReelingIn)
package sfxfactory {
import sfxfactory.*;
class SoundFXReelingIn extends SoundFX {
function SoundFXReelingIn(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_fishingpolereelingin.swf";
linkageString = "SFXFishingPoleReelingInMC";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 131
//SoundFXReelPulledWhine (sfxfactory.SoundFXReelPulledWhine)
package sfxfactory {
import sfxfactory.*;
class SoundFXReelPulledWhine extends SoundFX {
function SoundFXReelPulledWhine(_arg1:IModel, _arg2:SoundFXLinkage):void{
super(_arg1, _arg2);
externalFile = "sfx_reelpulledwhine.swf";
linkageString = "SFXReelPulledWhineMC";
soundFXLinkageString = "none";
}
}
}//package sfxfactory
Section 132
//NumberUtilities (utils.NumberUtilities)
package utils {
public class NumberUtilities {
private static var _aUniqueIDs:Array;
public static function random(_arg1:Number, _arg2:Number=0, _arg3:Number=1):Number{
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
_local4 = ((_arg2 - _arg1) + (1 * _arg3));
_local5 = (Math.random() * _local4);
_local5 = (_local5 + _arg1);
return (floor(_local5, _arg3));
}
public static function ceil(_arg1:Number, _arg2:Number=1):Number{
return ((Math.ceil((_arg1 / _arg2)) * _arg2));
}
public static function getUnique():Number{
var _local1:Date;
var _local2:Number;
if (_aUniqueIDs == null){
_aUniqueIDs = new Array();
};
_local1 = new Date();
_local2 = _local1.getTime();
while (!(isUnique(_local2))) {
_local2 = (_local2 + NumberUtilities.random(_local1.getTime(), (2 * _local1.getTime())));
};
_aUniqueIDs.push(_local2);
return (_local2);
}
private static function isUnique(_arg1:Number):Boolean{
var _local2:Number;
_local2 = 0;
while (_local2 < _aUniqueIDs.length) {
if (_aUniqueIDs[_local2] == _arg1){
return (false);
};
_local2++;
};
return (true);
}
public static function floor(_arg1:Number, _arg2:Number=1):Number{
return ((Math.floor((_arg1 / _arg2)) * _arg2));
}
public static function round(_arg1:Number, _arg2:Number=1):Number{
return ((Math.round((_arg1 / _arg2)) * _arg2));
}
}
}//package utils
Section 133
//ScrollBarY (utils.ScrollBarY)
package utils {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollBarY extends EventDispatcher {
private var target;
private var viewAreaHeight:Number;
private var scrollRectangle:Rectangle;
private var _power:Number;// = 1
private var scrollIncrement:Number;
private var scrollLimit:Number;
private var scrub:MovieClip;
private var targetDefaultY:Number;
public function ScrollBarY(_arg1:MovieClip, _arg2:Number=0, _arg3=null, _arg4=null, _arg5=null){
_power = 1;
super();
scrub = _arg1.mcScrub;
if (_arg5 != null){
scrollRectangle = _arg5;
} else {
scrollRectangle = new Rectangle(0, 0, 0, (_arg1.mcBar.height - scrub.height));
};
viewAreaHeight = _arg2;
target = _arg3;
if ((((_arg4 == null)) && (!((target == null))))){
targetDefaultY = target.y;
} else {
if (target != null){
targetDefaultY = _arg4;
};
};
updateScrub();
scrub.addEventListener(MouseEvent.MOUSE_DOWN, scrubClicked);
scrub.buttonMode = true;
}
public function get power():Number{
return (_power);
}
private function mouseRollOut(_arg1:MouseEvent):void{
if (!_arg1.buttonDown){
scrubReleased(_arg1);
};
}
private function scrubReleased(_arg1:MouseEvent=null):void{
scrub.stopDrag();
scrollTarget();
scrub.removeEventListener(Event.ENTER_FRAME, thisEnterFrame);
scrub.removeEventListener(MouseEvent.MOUSE_UP, scrubReleased);
scrub.removeEventListener(MouseEvent.MOUSE_OUT, mouseRollOut);
}
public function updateScrub():void{
if (target != null){
scrollLimit = (viewAreaHeight - target.height);
if (scrollLimit > 0){
scrollLimit = 0;
};
scrollIncrement = (scrollLimit / scrollRectangle.height);
if (scrollLimit == 0){
scrub.y = 0;
target.y = targetDefaultY;
scrub.parent.visible = false;
} else {
scrub.parent.visible = true;
scrub.y = ((target.y - targetDefaultY) / scrollIncrement);
};
};
if (scrub.y < 0){
scrub.y = 0;
scrollTarget();
} else {
if (scrub.y > scrollRectangle.height){
scrub.y = scrollRectangle.height;
scrollTarget();
};
};
scrubReleased();
}
public function set power(_arg1:Number):void{
_power = _arg1;
scrub.y = (scrollRectangle.height - (scrollRectangle.height * _power));
}
private function scrubClicked(_arg1:MouseEvent):void{
scrub.startDrag(false, scrollRectangle);
scrub.addEventListener(Event.ENTER_FRAME, thisEnterFrame);
scrub.addEventListener(MouseEvent.MOUSE_UP, scrubReleased);
scrub.addEventListener(MouseEvent.MOUSE_OUT, mouseRollOut);
}
private function thisEnterFrame(_arg1:Event):void{
scrollTarget();
}
public function cleanUp():void{
scrub.removeEventListener(Event.ENTER_FRAME, thisEnterFrame);
scrub.removeEventListener(MouseEvent.MOUSE_UP, scrubReleased);
scrub.removeEventListener(MouseEvent.MOUSE_OUT, mouseRollOut);
}
private function scrollTarget():void{
_power = ((scrollRectangle.height - scrub.y) / scrollRectangle.height);
if (target != null){
target.y = ((scrub.y * scrollIncrement) + targetDefaultY);
};
dispatchEvent(new Event(Event.CHANGE));
}
}
}//package utils
Section 134
//SoundPanVol (utils.SoundPanVol)
package utils {
import flash.media.*;
public class SoundPanVol {
public function SoundPanVol(_arg1:SoundChannel, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):void{
var _local6:SoundTransform;
var _local7:Number;
var _local8:Number;
super();
_local6 = new SoundTransform();
if (_arg2 <= 1){
_local6.volume = _arg2;
} else {
_local6.volume = 1;
};
_local7 = _arg3;
if (_arg5 > 0){
_local8 = (_arg5 / 2);
_local7 = ((_arg4 - _local8) / _local8);
};
_local6.pan = _local7;
_arg1.soundTransform = _local6;
}
}
}//package utils
Section 135
//ThreeDConversion (utils.ThreeDConversion)
package utils {
public class ThreeDConversion {
public function threeDPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):Object{
var _local10:*;
var _local11:*;
var _local12:*;
_local10 = ((((_arg1 + _arg4) * threeDScale(_arg3, _arg8, _arg9)) / 1) + _arg6);
_local11 = ((((_arg2 + _arg5) * threeDScale(_arg3, _arg8, _arg9)) / 1) + _arg7);
_local12 = {thisX:_local10, thisY:_local11};
return (_local12);
}
public function threeDScale(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:*;
_local4 = ((_arg2 * 1) / (_arg3 + _arg1));
return (_local4);
}
}
}//package utils
Section 136
//BobberMC (BobberMC)
package {
import flash.display.*;
import flash.events.*;
public dynamic class BobberMC extends MovieClip {
public var pointMC:MovieClip;
public var mcBobberHeight:MovieClip;
public var point2MC:MovieClip;
public var mcBobber:MovieClip;
public function BobberMC(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 9, frame10, 14, frame15, 15, frame16, 26, frame27, 27, frame28, 32, frame33);
}
function frame10(){
dispatchEvent(new Event(Event.INIT));
}
function frame3(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame15(){
gotoAndPlay("bob");
}
function frame16(){
dispatchEvent(new Event(Event.COMPLETE));
play();
}
function frame1(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame4(){
dispatchEvent(new Event(Event.INIT));
play();
}
function frame2(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame27(){
gotoAndPlay("underBob");
}
function frame28(){
dispatchEvent(new Event(Event.COMPLETE));
play();
}
function frame33(){
gotoAndPlay("fightloop");
}
}
}//package
Section 137
//BobberSelectorMC (BobberSelectorMC)
package {
import flash.display.*;
public dynamic class BobberSelectorMC extends MovieClip {
public var mcBobber3:MovieClip;
public var mcBobber4:MovieClip;
public var mcBobber5:MovieClip;
public var mcBobber8:MovieClip;
public var mcBobber1:MovieClip;
public var mcBobber7:MovieClip;
public var mcBobber2:MovieClip;
public var mcBobber6:MovieClip;
public var btRollOut:SimpleButton;
public function BobberSelectorMC(){
addFrameScript(59, frame60, 60, frame61);
}
function frame61(){
prevFrame();
}
function frame60(){
stop();
}
}
}//package
Section 138
//ComponentView (ComponentView)
package {
import flash.display.*;
import flash.events.*;
import flash.errors.*;
public class ComponentView extends Sprite {
protected var model:IModel;
protected var controller:IController;
public function ComponentView(_arg1:IModel, _arg2:IController=null){
this.model = _arg1;
this.controller = _arg2;
}
public function removeView(_arg1:ComponentView):void{
throw (new IllegalOperationError("remove operation not supported"));
}
public function remove(_arg1:ComponentView):void{
throw (new IllegalOperationError("remove operation not supported"));
}
public function update(_arg1:Event=null):void{
}
public function updateModel(_arg1:Event):void{
}
public function addView(_arg1:ComponentView):void{
throw (new IllegalOperationError("add operation not supported"));
}
}
}//package
Section 139
//CompositeView (CompositeView)
package {
import flash.events.*;
import flash.errors.*;
public class CompositeView extends ComponentView {
private var aChildren:Array;
public function CompositeView(_arg1:IModel, _arg2:IController=null){
super(_arg1, _arg2);
this.aChildren = new Array();
}
public function init():void{
throw (new IllegalOperationError("init operation not supported"));
}
override public function removeView(_arg1:ComponentView):void{
aChildren.splice(aChildren.indexOf(_arg1), 1);
}
override public function update(_arg1:Event=null):void{
var _local2:ComponentView;
for each (_local2 in aChildren) {
_local2.update(_arg1);
};
}
override public function updateModel(_arg1:Event):void{
var _local2:ComponentView;
for each (_local2 in aChildren) {
_local2.updateModel(_arg1);
};
}
override public function addView(_arg1:ComponentView):void{
aChildren.push(_arg1);
}
}
}//package
Section 140
//Controller (Controller)
package {
import flash.display.*;
import flash.events.*;
public class Controller implements IController {
private var _castingMeterMaxed:Boolean;
private var _soundFX:Object;
private var _soundFXPlayer:Object;
private var model:IModel;
public function Controller(_arg1:IModel){
model = _arg1;
_soundFX = null;
}
public function destroy():void{
}
public function set soundFXPlayer(_arg1:Object){
_soundFXPlayer = _arg1;
}
public function set soundFX(_arg1:Object):void{
_soundFX = _arg1;
}
public function stackZAxis(_arg1:MovieClip):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Array;
var _local5:Number;
var _local6:*;
var _local7:*;
_local2 = false;
_local3 = _arg1.numChildren;
_local4 = new Array();
_local5 = 0;
while (_local5 < _local3) {
_local6 = _arg1.getChildAt(_local5);
if ((_local5 + 1) < _local3){
_local7 = _arg1.getChildAt((_local5 + 1));
if (_local6.zPosition < _local7.zPosition){
_local2 = true;
};
};
_local4.push(_local6);
_local5++;
};
if (_local2){
_local4.sort(sortOnZ);
_local5 = 0;
while (_local5 < _local4.length) {
_arg1.addChildAt(_local4[_local5], 0);
_local5++;
};
};
}
public function drawFishingLine(_arg1:String, _arg2:Object, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:ThrowThreeD):void{
_arg2.graphics.clear();
_arg2.graphics.lineStyle(1, 0);
_arg2.graphics.moveTo(_arg3, _arg4);
if (_arg1 == "arc"){
_arg2.graphics.curveTo(_arg5, (_arg6 - ((_arg7.speedZ * 100) / _arg7.initSpeedZ)), _arg5, _arg6);
} else {
if (_arg1 == "sag"){
_arg2.graphics.curveTo(_arg3, (_arg4 + 25), _arg5, _arg6);
} else {
if (_arg1 == "straight"){
_arg2.graphics.lineTo(_arg5, _arg6);
};
};
};
}
public function get castingMeterMaxed():Boolean{
return (_castingMeterMaxed);
}
public function get soundFX():Object{
return (_soundFX);
}
public function castPowerEnterFrame(_arg1):void{
if (!_castingMeterMaxed){
_arg1.scaleY = (_arg1.scaleY + 0.03);
} else {
if (_castingMeterMaxed){
_arg1.scaleY = (_arg1.scaleY - 0.03);
};
};
if (_arg1.scaleY >= 1){
_arg1.scaleY = 1;
_castingMeterMaxed = true;
} else {
if (_arg1.scaleY <= 0.01){
_arg1.scaleY = 0.01;
_castingMeterMaxed = false;
};
};
_arg1.parent.mcFish.y = (_arg1.y - _arg1.height);
}
private function sortOnZ(_arg1:MovieClip, _arg2:MovieClip):Number{
var _local3:Number;
var _local4:Number;
_local3 = _arg1.zPosition;
_local4 = _arg2.zPosition;
if (_local3 > _local4){
return (1);
};
if (_local3 < _local4){
return (-1);
};
return (0);
}
public function get soundFXPlayer():Object{
return (_soundFXPlayer);
}
public function removeDisplayObjectChilds(_arg1:MovieClip):void{
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
}
public function set castingMeterMaxed(_arg1:Boolean){
_castingMeterMaxed = _arg1;
}
}
}//package
Section 141
//FishAteWormMessMC (FishAteWormMessMC)
package {
import flash.display.*;
public dynamic class FishAteWormMessMC extends MovieClip {
}
}//package
Section 142
//FishCaughtMessageMC (FishCaughtMessageMC)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class FishCaughtMessageMC extends MovieClip {
public var txLevelName:TextField;
public var mcTotalMoney:MovieClip;
public var txWormCnt:TextField;
public var txMoneyMinus:TextField;
public var txWormBonusAmount:TextField;
public var mcFishHolder:MovieClip;
public var txWormBonusTotal:TextField;
public var txFishName:TextField;
public var txMoney:TextField;
public var mcBonusX2:MovieClip;
public var btFish:SimpleButton;
public var mcMoney:MovieClip;
public var btGo:SimpleButton;
public function FishCaughtMessageMC(){
addFrameScript(0, frame1, 1, frame2);
}
function frame2(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame1(){
stop();
}
}
}//package
Section 143
//FishFightMC (FishFightMC)
package {
import flash.display.*;
public dynamic class FishFightMC extends MovieClip {
}
}//package
Section 144
//FishListMC (FishListMC)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class FishListMC extends MovieClip {
public var mcGrouper:MovieClip;
public var mcHill:MovieClip;
public var mcCod:MovieClip;
public var mcMullet:MovieClip;
public var mcTrout:MovieClip;
public var mcTiki:MovieClip;
public var mcClown:MovieClip;
public var mcBass:MovieClip;
public var txLevel:TextField;
public var mcCat:MovieClip;
public var mcPirate:MovieClip;
public var mcMinnow:MovieClip;
public var txMoney:TextField;
public var mcFlounder:MovieClip;
public var mcMutant:MovieClip;
public var btGo:SimpleButton;
public var mcSalmon:MovieClip;
public var mcBastard:MovieClip;
public function FishListMC(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame6(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame1(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame4(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame5(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame2(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 145
//FishOnMessageMC (FishOnMessageMC)
package {
import flash.display.*;
public dynamic class FishOnMessageMC extends MovieClip {
public var mcBars:MovieClip;
}
}//package
Section 146
//FishRobotMC (FishRobotMC)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.text.*;
import flash.utils.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FishRobotMC extends MovieClip {
public var mcFishAll:MovieClip;
public function FishRobotMC(){
addFrameScript(0, frame1, 3, frame4, 4, frame5, 9, frame10, 10, frame11, 17, frame18);
}
function frame10(){
gotoAndPlay("close");
}
function frame18(){
gotoAndPlay("nibble");
}
function frame1(){
mcFishAll.mcFish.gotoAndStop("mouth close");
}
function frame4(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame5(){
mcFishAll.mcFish.gotoAndStop("mouth open");
play();
}
function frame11(){
mcFishAll.mcFish.gotoAndStop("mouth close");
play();
}
}
}//package
Section 147
//FloatyRobotMC (FloatyRobotMC)
package {
import flash.display.*;
public dynamic class FloatyRobotMC extends MovieClip {
public var mcPrize:MovieClip;
public var mcFloaty:MovieClip;
public function FloatyRobotMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 148
//GameOverMC (GameOverMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GameOverMC extends MovieClip {
public var mcFishMeter:PowerMeterMC;
public var txScore:TextField;
public var mcSign:MovieClip;
public var btReplay:SimpleButton;
}
}//package
Section 149
//HookMC (HookMC)
package {
import flash.display.*;
public dynamic class HookMC extends MovieClip {
public function HookMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 150
//IController (IController)
package {
import flash.display.*;
public interface IController {
function get soundFX():Object;
function set soundFX(_arg1:Object):void;
function set soundFXPlayer(_arg1:Object);
function get soundFXPlayer():Object;
function drawFishingLine(_arg1:String, _arg2:Object, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:ThrowThreeD):void;
function stackZAxis(_arg1:MovieClip):void;
function removeDisplayObjectChilds(_arg1:MovieClip):void;
function set castingMeterMaxed(_arg1:Boolean);
function castPowerEnterFrame(_arg1):void;
function destroy():void;
function get castingMeterMaxed():Boolean;
}
}//package
Section 151
//IModel (IModel)
package {
import flash.events.*;
public interface IModel extends IEventDispatcher {
function get bonusFishArray():Array;
function set bonusFishArray(_arg1:Array):void;
function get pauseGame():Boolean;
function get pullSpeed():Number;
function get currentLevel():Number;
function set pauseGame(_arg1:Boolean):void;
function set pauseBonus(_arg1:Boolean):void;
function get currentBobber():uint;
function get wormOnHook():Boolean;
function set currentLevel(_arg1:Number):void;
function get bonusFish():uint;
function get fishOnHook():Object;
function get moneyForLevel():uint;
function unlockBobber(_arg1:uint):void;
function get musicVolume():Number;
function get fishObjArray():Array;
function get bobberBob():Boolean;
function get bobberSelectArray():Array;
function get centerY():Number;
function set currentBobber(_arg1:uint):void;
function get levelCompleted():Boolean;
function set wormOnHook(_arg1:Boolean):void;
function get fishLeftMaxX():Number;
function set wormCnt(_arg1:Number):void;
function set bonusFish(_arg1:uint):void;
function get centerX():Number;
function set fishOnHook(_arg1:Object):void;
function set bobberBob(_arg1:Boolean):void;
function get moneyFish():Number;
function get viewDistance():Number;
function set fishObjArray(_arg1:Array):void;
function set musicMute(_arg1:Boolean):void;
function get currentLevelName():String;
function set musicVolume(_arg1:Number):void;
function get fishRightMaxX():Number;
function set moneyForLevel(_arg1:uint):void;
function set scoreMin(_arg1:uint):void;
function set moneyTotal(_arg1:Number):void;
function get pauseBonus():Boolean;
function set tackelLanded(_arg1:Boolean):void;
function set levelCompleted(_arg1:Boolean):void;
function get levelMax():uint;
function get fishAmount():uint;
function get wormCnt():Number;
function get whatChanged():String;
function get musicMute():Boolean;
function get floatyObjArray():Array;
function get scoreMin():uint;
function get moneyTotal():Number;
function get tackelLanded():Boolean;
function get zoomZ():Number;
function set floatyObjArray(_arg1:Array):void;
function set moneyFish(_arg1:Number):void;
function get viewAngleY():Number;
function get movieWidth():uint;
function moneyFishReset():void;
function set musicType(_arg1:String):void;
function get musicType():String;
}
}//package
Section 152
//MapMC (MapMC)
package {
import flash.display.*;
import flash.events.*;
public dynamic class MapMC extends MovieClip {
public var btFish:SimpleButton;
public var btSkip:SimpleButton;
public function MapMC(){
addFrameScript(0, frame1, 1, frame2, 371, frame372, 372, frame373, 635, frame636, 636, frame637, 817, frame818, 949, frame950, 1106, frame1107, 1303, frame1304);
}
function frame950(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame1107(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame1304(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame637(){
play();
}
function frame636(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame372(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame373(){
play();
}
function frame818(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 153
//Model (Model)
package {
import flash.events.*;
public class Model extends EventDispatcher implements IModel {
private var _moneyTotal:Number;
private var _wormCnt:Number;
private var _bobberBob:Boolean;
private var _moneyForLevel:uint;
private var _bobberSelectArray:Array;
private var _wormOnHook:Boolean;
private var _levelCompleted:Boolean;
private var _musicMute:Boolean;
private var _currentLevel:Number;
private var _pauseBonus:Boolean;
private var _floatyObjArray:Array;
private var _musicType:String;
private var _pauseGame:Boolean;
private var _whatChanged:String;
private var _currentBobber:uint;
private var _bonusFish:uint;
private var _bonusFishArray:Array;
private var _moneyFish:Number;
private var _scoreMin:uint;
private var _fishOnHook:Object;
private var _tackelLanded:Boolean;
private var _musicVolume:Number;
private var _soundFX:Object;
private var _fishObjArray:Array;
private static const _fishRightMaxX:Number = 800;
private static const _fishLeftMaxX:Number = -800;
private static const _pullSpeed:uint = 4;
private static const _centerX:Number = 400;
private static const _centerY:Number = 950;
private static const _zoomZ:Number = 200;
private static const _viewAngleY:Number = 450;
private static const _levelMax:uint = 6;
private static const _movieWidth:uint = 800;
private static const _fishAmount:uint = 15;
private static const _viewDistance:Number = 1;
public function Model(){
_tackelLanded = true;
_bobberBob = false;
_wormOnHook = true;
_fishObjArray = new Array();
_floatyObjArray = new Array();
_wormCnt = 3;
_moneyFish = 0;
_moneyTotal = 0;
_pauseGame = true;
_pauseBonus = false;
_currentLevel = 1;
_levelCompleted = false;
_musicType = "none";
_musicMute = false;
initBobberSelect();
}
public function get pullSpeed():Number{
return (_pullSpeed);
}
public function set bonusFishArray(_arg1:Array):void{
_bonusFishArray = _arg1;
}
public function get pauseGame():Boolean{
return (_pauseGame);
}
private function dispatchUpDate(_arg1:String){
_whatChanged = _arg1;
dispatchEvent(new Event(Event.CHANGE));
}
public function get musicType():String{
return (_musicType);
}
public function set pauseGame(_arg1:Boolean):void{
if (_arg1 != _pauseGame){
_pauseGame = _arg1;
dispatchUpDate("pauseGame");
};
}
public function set currentLevel(_arg1:Number):void{
_currentLevel = _arg1;
dispatchUpDate("currentLevel");
}
public function get fishOnHook():Object{
return (_fishOnHook);
}
public function get moneyForLevel():uint{
return (_moneyForLevel);
}
public function get bonusFish():uint{
return (_bonusFish);
}
public function unlockBobber(_arg1:uint):void{
_bobberSelectArray[_arg1].unlocked = true;
}
public function set currentBobber(_arg1:uint):void{
_currentBobber = _arg1;
dispatchUpDate("currentBobber");
}
public function get levelCompleted():Boolean{
return (_levelCompleted);
}
public function get fishObjArray():Array{
return (_fishObjArray);
}
public function set wormOnHook(_arg1:Boolean):void{
if (((_arg1) && ((_wormCnt > 0)))){
if (_arg1 != _wormOnHook){
_wormOnHook = true;
dispatchUpDate("wormOnHook");
};
} else {
if (!_arg1){
if (_arg1 != _wormOnHook){
_wormOnHook = false;
dispatchUpDate("wormOnHook");
};
};
};
}
public function set bonusFish(_arg1:uint):void{
_bonusFish = _arg1;
dispatchUpDate("bonusFish");
}
public function set fishOnHook(_arg1:Object):void{
if (_arg1 != _fishOnHook){
_fishOnHook = _arg1;
dispatchUpDate("fishOnHook");
};
}
public function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
dispatchUpDate("musicVolume");
}
public function set fishObjArray(_arg1:Array):void{
_fishObjArray = _arg1;
}
public function set levelCompleted(_arg1:Boolean):void{
if (_arg1 != _levelCompleted){
_levelCompleted = _arg1;
};
}
public function get levelMax():uint{
return (_levelMax);
}
public function get whatChanged():String{
return (_whatChanged);
}
public function get moneyFish():Number{
return (_moneyFish);
}
public function get wormCnt():Number{
return (_wormCnt);
}
public function get scoreMin():uint{
return (_scoreMin);
}
public function set moneyForLevel(_arg1:uint):void{
_moneyForLevel = _arg1;
}
public function get moneyTotal():Number{
return (_moneyTotal);
}
public function get floatyObjArray():Array{
return (_floatyObjArray);
}
public function set moneyFish(_arg1:Number):void{
_moneyFish = _arg1;
dispatchUpDate("moneyFish");
}
public function get fishRightMaxX():Number{
return (_fishRightMaxX);
}
public function get movieWidth():uint{
return (_movieWidth);
}
public function get bonusFishArray():Array{
return (_bonusFishArray);
}
public function get currentLevel():Number{
return (_currentLevel);
}
public function set pauseBonus(_arg1:Boolean):void{
if (_arg1 != _pauseBonus){
_pauseBonus = _arg1;
dispatchUpDate("pauseBonus");
};
}
public function get currentBobber():uint{
return (_currentBobber);
}
private function initBobberSelect():void{
var _local1:uint;
var _local2:Object;
_bobberSelectArray = new Array();
_local1 = 1;
while (_local1 <= 8) {
_local2 = new Object();
_local2.bobberNum = _local1;
_local2.unlocked = false;
_bobberSelectArray.push(_local2);
_local1++;
};
_currentBobber = 1;
_bobberSelectArray[(_currentBobber - 1)].unlocked = true;
}
public function get bobberBob():Boolean{
return (_bobberBob);
}
public function get wormOnHook():Boolean{
return (_wormOnHook);
}
public function get musicVolume():Number{
return (_musicVolume);
}
public function get bobberSelectArray():Array{
return (_bobberSelectArray);
}
public function set bobberBob(_arg1:Boolean):void{
if (_arg1 != _bobberBob){
_bobberBob = _arg1;
dispatchUpDate("bobberBob");
};
}
public function get centerY():Number{
return (_centerY);
}
public function set wormCnt(_arg1:Number):void{
_wormCnt = _arg1;
if (_wormCnt < 0){
_wormCnt = 0;
};
if (_wormCnt == 0){
wormOnHook = false;
};
dispatchUpDate("wormCnt");
}
public function get centerX():Number{
return (_centerX);
}
public function get fishLeftMaxX():Number{
return (_fishLeftMaxX);
}
public function get currentLevelName():String{
var _local1:String;
_local1 = "unknown name!";
if (_currentLevel == 1){
_local1 = "The Old Fishing Hole";
} else {
if (_currentLevel == 2){
_local1 = "Moonshine Swamp";
} else {
if (_currentLevel == 3){
_local1 = "Dead Pirate Cove";
} else {
if (_currentLevel == 4){
_local1 = "Clownfish Bay";
} else {
if (_currentLevel == 5){
_local1 = "Town Dump";
} else {
if (_currentLevel == 6){
_local1 = "Tiki Lagoon";
};
};
};
};
};
};
return (_local1);
}
public function set musicMute(_arg1:Boolean):void{
if (_arg1 != _musicMute){
_musicMute = _arg1;
dispatchUpDate("musicMute");
};
}
public function get viewDistance():Number{
return (_viewDistance);
}
public function set moneyTotal(_arg1:Number):void{
_moneyTotal = _arg1;
dispatchUpDate("moneyTotal");
}
public function get pauseBonus():Boolean{
return (_pauseBonus);
}
public function set tackelLanded(_arg1:Boolean):void{
_tackelLanded = _arg1;
}
public function set floatyObjArray(_arg1:Array):void{
_floatyObjArray = _arg1;
}
public function set scoreMin(_arg1:uint):void{
_scoreMin = _arg1;
}
public function get fishAmount():uint{
return (_fishAmount);
}
public function get musicMute():Boolean{
return (_musicMute);
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function get tackelLanded():Boolean{
return (_tackelLanded);
}
public function get zoomZ():Number{
return (_zoomZ);
}
public function get viewAngleY():Number{
return (_viewAngleY);
}
public function moneyFishReset():void{
_moneyFish = 0;
dispatchUpDate("moneyFish");
}
public function set musicType(_arg1:String):void{
_musicType = _arg1;
}
}
}//package
Section 154
//NoMoreWormsMC (NoMoreWormsMC)
package {
import flash.display.*;
public dynamic class NoMoreWormsMC extends MovieClip {
}
}//package
Section 155
//PopUpInstructionsMC (PopUpInstructionsMC)
package {
import flash.display.*;
import flash.events.*;
public dynamic class PopUpInstructionsMC extends MovieClip {
public var mcFishHolder:MovieClip;
public var btFish:SimpleButton;
public function PopUpInstructionsMC(){
addFrameScript(0, frame1);
}
function frame1(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 156
//PowerMeterMC (PowerMeterMC)
package {
import flash.display.*;
public dynamic class PowerMeterMC extends MovieClip {
public var mcFish:MovieClip;
public var mcPowerLevel:MovieClip;
}
}//package
Section 157
//ReelInMC (ReelInMC)
package {
import flash.display.*;
public dynamic class ReelInMC extends MovieClip {
}
}//package
Section 158
//RodMC (RodMC)
package {
import flash.display.*;
import flash.events.*;
public dynamic class RodMC extends MovieClip {
public var mcPointBent:MovieClip;
public var mcRods:MovieClip;
public var mcHook:HookMC;
public var mcBobber:MovieClip;
public function RodMC(){
addFrameScript(7, frame8, 8, frame9, 44, frame45);
}
function frame8(){
gotoAndPlay("reel in");
}
function frame9(){
dispatchEvent(new Event(Event.COMPLETE));
play();
}
function frame45(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 159
//RootView (RootView)
package {
import flash.display.*;
import flash.events.*;
public class RootView extends CompositeView {
private var viewHUD:ViewHUD;
private var viewFishing:ViewFishing;
private var viewVolume:ViewVolume;
private var viewSound:ViewSound;
private var viewMap:ViewMap;
private var viewBonus:ViewBonus;
private var viewBobberSelect:ViewBobberSelect;
private var viewFishList:ViewFishList;
private var targetStage:MovieClip;
private var viewInstructions:ViewInstructions;
public function RootView(_arg1:IModel, _arg2:IController, _arg3:MovieClip){
super(_arg1, _arg2);
model.addEventListener(Event.CHANGE, updateModel);
targetStage = _arg3;
viewInstructions = new ViewInstructions(model, controller, targetStage, this);
addView(viewInstructions);
viewInstructions.initView();
}
public function openVolumeSlider():void{
addView(viewVolume);
viewVolume.initView();
}
override public function init():void{
viewSound = new ViewSound(model, controller, targetStage, this);
addView(viewSound);
viewSound.initView();
viewMap = new ViewMap(model, controller, targetStage, this);
viewFishing = new ViewFishing(model, controller, targetStage, this);
viewHUD = new ViewHUD(model, controller, targetStage, this);
viewBonus = new ViewBonus(model, controller, targetStage, this);
viewFishList = new ViewFishList(model, controller, targetStage, this);
viewBobberSelect = new ViewBobberSelect(model, controller, targetStage, this);
viewVolume = new ViewVolume(model, controller, targetStage, this);
viewInstructions.gameReady();
}
public function openInstructions():void{
addView(viewInstructions);
viewInstructions.openInstructions();
}
public function playThemeMusic(_arg1:String):void{
viewSound.playThemeMusic(_arg1);
}
public function loadFishHole():void{
var _local1:ViewPopUpInstructions;
model.pauseGame = true;
model.pauseBonus = false;
addView(viewFishing);
viewFishing.initView();
addView(viewHUD);
viewHUD.initView();
addView(viewBonus);
viewBonus.initView();
if (model.currentLevel == 1){
_local1 = new ViewPopUpInstructions(model, controller, targetStage, this);
addView(_local1);
};
addView(viewFishList);
viewFishList.initView();
}
public function nextLevel():void{
viewHUD.cleanUp();
viewBonus.cleanUp();
playGame();
}
public function playGame(_arg1:uint=0):void{
var _local2:ViewGameOver;
playThemeMusic("theme");
if (model.currentLevel > model.levelMax){
_local2 = new ViewGameOver(model, controller, targetStage, this);
addView(_local2);
_local2.initView();
} else {
addView(viewMap);
viewMap.initView(_arg1);
};
}
public function nextLevelTest():void{
viewFishing.nextLevelTest();
}
public function openFishList():void{
addView(viewFishList);
viewFishList.initView();
}
public function openMap():void{
addView(viewMap);
viewMap.openMap();
}
public function openBobberSelect():void{
addView(viewBobberSelect);
viewBobberSelect.initView();
}
public function deleteView(_arg1:ComponentView):void{
removeView(_arg1);
}
public function playFishHoleMusic():void{
viewSound.playFishHoleMusic();
}
}
}//package
Section 160
//ShadowMC (ShadowMC)
package {
import flash.display.*;
public dynamic class ShadowMC extends MovieClip {
public function ShadowMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 161
//ThrowThreeD (ThrowThreeD)
package {
import flash.display.*;
import flash.events.*;
import utils.*;
public class ThrowThreeD extends EventDispatcher {
private var pullSpeed:Number;
private var clipX:Number;
private var clipY:Number;
private var clipZ:Number;
private var count:Number;
private var targetObjectShadowFront:MovieClip;
private var controller:IController;
private var centerXDefault:Number;
public var initSpeedZ:Number;
private var centerY:Number;
private var model:IModel;
private var centerX:Number;
private var targetObject:MovieClip;
private var viewDistance:Number;
private var hook:MovieClip;
private var throwPower:Number;
private var fishFightClipX:Number;
private var gravity:Number;
private var zoomZ:Number;
public var zFactor:Number;
private var viewAngleX:Number;
private var viewAngleY:Number;
private var targetObjectShadow:MovieClip;
private var speedY:Number;
public var speedZ:Number;
public function ThrowThreeD(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:MovieClip, _arg5:MovieClip, _arg6:MovieClip){
model = _arg1;
controller = _arg2;
targetObject = _arg3;
targetObjectShadow = _arg4;
targetObjectShadowFront = _arg5;
hook = _arg6;
throwPower = 9;
pullSpeed = 5;
zoomZ = _arg1.zoomZ;
viewAngleX = 0;
viewAngleY = _arg1.viewAngleY;
viewDistance = _arg1.viewDistance;
centerXDefault = _arg1.centerX;
centerX = centerXDefault;
centerY = _arg1.centerY;
clipX = 0;
clipY = 0;
clipZ = 0;
zFactor = 1;
}
private function updateObjects():void{
update3dObject(targetObject, clipX, clipY, clipZ);
targetObject.zPosition = clipZ;
update3dObject(targetObjectShadow, clipX, 15, clipZ, "shadow");
targetObjectShadow.zPosition = (clipZ + 0.01);
update3dObject(targetObjectShadowFront, clipX, 15, clipZ, "shadow");
targetObjectShadowFront.zPosition = (clipZ - 0.01);
update3dObject(hook, clipX, clipY, clipZ, "hook");
if (clipZ < 20){
targetObject.visible = false;
hook.visible = false;
} else {
targetObject.visible = true;
hook.visible = true;
};
if (speedZ <= 0){
hook.zPosition = (clipZ + 0.02);
} else {
hook.zPosition = (clipZ - 0.02);
};
dispatchEvent(new Event(Event.CHANGE));
}
private function throwEnterFrame(_arg1:Event):void{
if (!model.pauseGame){
count++;
clipZ = roundNum((clipZ + speedZ));
clipY = roundNum((clipY + ((speedY + (gravity * count)) + 4)));
if (clipY >= 0){
controller.soundFXPlayer.playSFX("bobber land splash", (zFactor - 0.08), 0, targetObject.x);
speedY = ((0 - (speedY + (gravity * count))) + 25);
clipY = (clipY + roundNum((2 * speedY)));
if (clipY > 0){
clipY = 0;
};
speedZ = (speedZ * 0.5);
count = 0;
};
speedZ = (speedZ * 0.99);
if (speedZ < 0){
speedZ = 0;
};
updateObjects();
if (clipY >= 0){
throwComplete();
};
};
}
private function init(_arg1, _arg2):void{
clipX = 0;
clipY = -400;
clipZ = 0;
centerX = centerXDefault;
viewAngleX = _arg2;
update3dObject(targetObject, clipX, clipY, clipZ);
speedY = -30;
throwPower = _arg1;
initSpeedZ = (4 + (1.11 * throwPower));
speedZ = initSpeedZ;
gravity = 1.5;
count = 0;
updateObjects();
}
public function fishFight():void{
if (clipX < fishFightClipX){
clipX = (clipX + 20);
} else {
clipX = (clipX - 20);
};
updateObjects();
}
private function roundNum(_arg1:Number):Number{
return ((Math.round((_arg1 * 100)) / 100));
}
public function throwObject():void{
targetObject.addEventListener(Event.ENTER_FRAME, throwEnterFrame);
}
public function fishFightInit():void{
fishFightClipX = clipX;
clipX = (clipX - 20);
}
private function throwComplete():void{
speedZ = 0;
targetObject.removeEventListener(Event.ENTER_FRAME, throwEnterFrame);
updateObjects();
dispatchEvent(new Event(Event.COMPLETE));
}
public function tugObject(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:*;
var _local5:*;
var _local6:*;
pullSpeed = _arg3;
_local4 = (targetObject.x - _arg1);
_local5 = (clipZ - _arg2);
_local6 = Math.atan2(_local5, _local4);
clipX = roundNum((clipX - (Math.cos(_local6) * pullSpeed)));
clipZ = (clipZ - 0.1);
updateObjects();
}
public function resetObject(_arg1:Number, _arg2:Number):void{
targetObject.removeEventListener(Event.ENTER_FRAME, throwEnterFrame);
init(_arg1, _arg2);
}
private function update3dObject(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5=null):void{
var _local6:ThreeDConversion;
var _local7:*;
_local6 = new ThreeDConversion();
_local7 = _local6.threeDPoint(_arg2, _arg3, _arg4, viewAngleX, viewAngleY, centerX, centerY, zoomZ, viewDistance);
if (_arg5 == "shadow"){
_arg1.scaleX = _local6.threeDScale((_arg4 + (clipY * -1)), zoomZ, viewDistance);
_arg1.scaleY = _local6.threeDScale((_arg4 + (clipY * -1)), zoomZ, viewDistance);
} else {
_arg1.scaleX = _local6.threeDScale(_arg4, zoomZ, viewDistance);
if (_arg5 == "hook"){
if (speedZ > 0){
_arg1.scaleY = (_local6.threeDScale(_arg4, zoomZ, viewDistance) - (speedZ / 14));
} else {
zFactor = _local6.threeDScale(_arg4, zoomZ, viewDistance);
_arg1.scaleY = zFactor;
};
} else {
_arg1.scaleY = _local6.threeDScale(_arg4, zoomZ, viewDistance);
};
};
_arg1.x = (_local7.thisX - 0);
if (_arg5 == "hook"){
_arg1.y = ((((_local7.thisY - ((viewAngleY * _local6.threeDScale(0, zoomZ, viewDistance)) / 100)) + (targetObject.mcBobberHeight.height * _local6.threeDScale(_arg4, zoomZ, viewDistance))) + (15 * _local6.threeDScale(_arg4, zoomZ, viewDistance))) - (speedZ * 1.25));
} else {
_arg1.y = (_local7.thisY - ((viewAngleY * _local6.threeDScale(0, zoomZ, viewDistance)) / 100));
};
}
public function pullObject(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:*;
var _local5:*;
var _local6:*;
pullSpeed = _arg3;
_local4 = (targetObject.x - _arg1);
_local5 = (clipZ - _arg2);
_local6 = Math.atan2(_local5, _local4);
clipX = roundNum((clipX - (Math.cos(_local6) * (pullSpeed * 5))));
clipZ = roundNum((clipZ - (Math.sin(_local6) * pullSpeed)));
updateObjects();
}
}
}//package
Section 162
//ViewBobberSelect (ViewBobberSelect)
package {
import flash.display.*;
import flash.events.*;
import fl.motion.*;
public class ViewBobberSelect extends ComponentView {
private var rootView:RootView;
private var bobberSelector:BobberSelectorMC;
private var targetStage:MovieClip;
public function ViewBobberSelect(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function selectRollOut(_arg1:MouseEvent):void{
thisCleanUp();
}
private function thisCleanUp():void{
var _local1:uint;
bobberSelector.btRollOut.removeEventListener(MouseEvent.MOUSE_OVER, selectRollOut);
_local1 = 1;
while (_local1 <= 8) {
bobberSelector[("mcBobber" + _local1)].removeEventListener(MouseEvent.MOUSE_UP, selectBobber);
bobberSelector[("mcBobber" + _local1)].removeEventListener(MouseEvent.MOUSE_UP, selectBobberLocked);
_local1++;
};
targetStage.removeChild(bobberSelector);
rootView.deleteView(this);
}
private function selectBobberLocked(_arg1:MouseEvent):void{
bobberSelector.gotoAndPlay("locked");
}
override public function update(_arg1:Event=null):void{
}
private function setUpBobberButtons():void{
var _local1:Array;
var _local2:Color;
var _local3:uint;
var _local4:MovieClip;
_local1 = model.bobberSelectArray;
_local2 = new Color();
_local2.brightness = -0.7;
_local3 = 1;
while (_local3 <= _local1.length) {
_local4 = bobberSelector[("mcBobber" + _local3)];
_local4.bobberNum = _local1[(_local3 - 1)].bobberNum;
_local4.gotoAndStop(_local3);
if (_local1[(_local3 - 1)].unlocked){
_local4.buttonMode = true;
_local4.addEventListener(MouseEvent.MOUSE_UP, selectBobber);
} else {
_local4.transform.colorTransform = _local2;
_local4.addEventListener(MouseEvent.MOUSE_UP, selectBobberLocked);
};
_local3++;
};
}
public function initView():void{
bobberSelector = new BobberSelectorMC();
bobberSelector.x = 386.4;
bobberSelector.y = 445.5;
targetStage.addChild(bobberSelector);
initMouseEvents();
}
private function selectBobber(_arg1:MouseEvent):void{
bobberSelector.gotoAndStop("click sound");
model.currentBobber = _arg1.currentTarget.bobberNum;
}
override public function updateModel(_arg1:Event):void{
}
private function initMouseEvents():void{
bobberSelector.btRollOut.addEventListener(MouseEvent.MOUSE_OVER, selectRollOut);
setUpBobberButtons();
}
}
}//package
Section 163
//ViewBonus (ViewBonus)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
public class ViewBonus extends ComponentView {
private var lastFish:uint;
private var targetObject:MovieClip;
private var thisTimer:Timer;
private var currentFunction:String;
private var rootView:RootView;
private var randomFish:MovieClip;
private var fishArray:Array;
private var targetStage:MovieClip;
public function ViewBonus(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function initEvents():void{
var _local1:BlurFilter;
currentFunction = "mixFish";
_local1 = new BlurFilter();
_local1.blurX = 5;
_local1.blurY = 5;
_local1.quality = BitmapFilterQuality.HIGH;
randomFish.filters = [_local1];
randomFish.scaleX = 0.75;
randomFish.scaleY = 0.5;
model.bonusFish = 0;
randomFish.gotoAndPlay(1);
if (((!(model.pauseGame)) && (!(model.pauseBonus)))){
controller.soundFXPlayer.playSFX("bonus fluttering", 0.5, 0.2);
};
thisTimer = new Timer(2000, 1);
thisTimer.start();
thisTimer.addEventListener(TimerEvent.TIMER_COMPLETE, selectFish);
}
private function selectFish(_arg1:Event=null):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Number;
var _local11:GlowFilter;
var _local12:DropShadowFilter;
var _local13:uint;
currentFunction = "selectFish";
thisTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, selectFish);
_local2 = false;
while (!(_local2)) {
_local13 = Math.floor((Math.random() * fishArray.length));
if (fishArray[_local13] != lastFish){
_local2 = true;
};
};
model.bonusFish = fishArray[_local13];
lastFish = fishArray[_local13];
randomFish.gotoAndStop(fishArray[_local13]);
controller.soundFXPlayer.stopSFX("bonus fluttering");
if (((!(model.pauseGame)) && (!(model.pauseBonus)))){
controller.soundFXPlayer.playSFX("bonus selected", 0.8, 0.1);
};
randomFish.filters = [];
_local3 = 0xFFFF;
_local4 = 11;
_local5 = 11;
_local6 = 1;
_local7 = 2;
_local8 = false;
_local9 = false;
_local10 = BitmapFilterQuality.HIGH;
_local11 = new GlowFilter(_local3, _local6, _local4, _local5, _local7, _local10, _local8, _local9);
_local12 = new DropShadowFilter();
_local12.distance = 5;
_local12.angle = 45;
randomFish.filters = [_local11, _local12];
randomFish.scaleX = 1;
randomFish.scaleY = 1;
if (!model.pauseBonus){
thisTimer = new Timer(30000, 1);
thisTimer.addEventListener(TimerEvent.TIMER_COMPLETE, mixFish);
thisTimer.start();
};
fishArray.splice(_local13, 1);
if (fishArray.length == 0){
initFishArray();
};
}
private function initFishArray():void{
var _local1:uint;
fishArray.length = 0;
_local1 = 0;
while (_local1 < model.bonusFishArray.length) {
fishArray.push(model.bonusFishArray[_local1]);
_local1++;
};
}
override public function update(_arg1:Event=null):void{
}
public function cleanUp():void{
controller.soundFXPlayer.stopSFX("bonus fluttering");
controller.soundFXPlayer.stopSFX("bonus selected");
thisTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, mixFish);
thisTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, selectFish);
thisTimer.stop();
rootView.deleteView(this);
}
private function mixFish(_arg1:Event=null):void{
thisTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, mixFish);
if (!model.pauseBonus){
initEvents();
};
}
public function initView():void{
targetObject = targetStage.mcBonus;
fishArray = new Array();
initFishArray();
randomFish = targetObject.mcRandomFish;
lastFish = 0;
initEvents();
}
override public function updateModel(_arg1:Event):void{
if (model.whatChanged == "fishOnHook"){
if (model.fishOnHook != null){
if (currentFunction == "mixFish"){
selectFish();
};
thisTimer.stop();
} else {
mixFish();
};
} else {
if (model.whatChanged == "pauseGame"){
if (model.pauseGame){
thisTimer.stop();
controller.soundFXPlayer.stopSFX("bonus fluttering");
controller.soundFXPlayer.stopSFX("bonus selected");
} else {
if (currentFunction == "selectFish"){
} else {
if (currentFunction == "mixFish"){
controller.soundFXPlayer.playSFX("bonus fluttering", 0.5, 0.2);
};
};
thisTimer.start();
};
} else {
if (model.whatChanged == "pauseBonus"){
if (model.pauseBonus){
thisTimer.stop();
controller.soundFXPlayer.stopSFX("bonus fluttering");
controller.soundFXPlayer.stopSFX("bonus selected");
} else {
mixFish();
};
};
};
};
}
}
}//package
Section 164
//ViewFishing (ViewFishing)
package {
import flash.display.*;
import fishingview.*;
import flash.events.*;
public class ViewFishing extends ComponentView {
private var fishingView:FVRootView;
private var rootView:RootView;
public function ViewFishing(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
rootView = _arg4;
fishingView = new FVRootView(_arg1, _arg2, _arg3, this);
}
public function nextLevel():void{
rootView.nextLevel();
thisCleanUp();
}
private function thisCleanUp():void{
rootView.deleteView(this);
}
public function nextLevelTest():void{
fishingView.nextLevel();
}
override public function update(_arg1:Event=null):void{
fishingView.update();
}
public function initView():void{
fishingView.initView();
}
override public function updateModel(_arg1:Event):void{
fishingView.updateModel();
}
}
}//package
Section 165
//ViewFishList (ViewFishList)
package {
import flash.display.*;
import flash.events.*;
import fishfactory.*;
public class ViewFishList extends ComponentView {
private var fishList:FishListMC;
private var rootView:RootView;
private var targetStage:MovieClip;
public function ViewFishList(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function goFish(_arg1:MouseEvent):void{
if (model.musicType == "theme"){
rootView.playFishHoleMusic();
};
model.pauseGame = false;
thisCleanUp();
}
private function thisCleanUp():void{
fishList.btGo.removeEventListener(MouseEvent.MOUSE_DOWN, goFish);
targetStage.removeChild(fishList);
rootView.deleteView(this);
}
private function initMoney(_arg1:Event):void{
var _local2:FishMoney;
fishList.removeEventListener(Event.COMPLETE, initMoney);
fishList.txLevel.text = model.currentLevel.toString();
fishList.txMoney.text = model.moneyForLevel.toString();
_local2 = new FishMoney();
if (model.currentLevel == 1){
fishList.mcSalmon.txMoney.text = _local2.getMoney("salmon");
fishList.mcCat.txMoney.text = _local2.getMoney("catfish");
fishList.mcBass.txMoney.text = _local2.getMoney("big mouth bass");
fishList.mcTrout.txMoney.text = _local2.getMoney("rainbow trout");
} else {
if (model.currentLevel == 2){
fishList.mcSalmon.txMoney.text = _local2.getMoney("salmon");
fishList.mcCat.txMoney.text = _local2.getMoney("catfish");
fishList.mcBass.txMoney.text = _local2.getMoney("big mouth bass");
fishList.mcTrout.txMoney.text = _local2.getMoney("rainbow trout");
fishList.mcHill.txMoney.text = _local2.getMoney("hillbilly fish");
fishList.mcBastard.txMoney.text = _local2.getMoney("bastard worm eater");
} else {
if (model.currentLevel == 3){
fishList.mcSalmon.txMoney.text = _local2.getMoney("salmon");
fishList.mcFlounder.txMoney.text = _local2.getMoney("flounder");
fishList.mcBass.txMoney.text = _local2.getMoney("big mouth bass");
fishList.mcPirate.txMoney.text = _local2.getMoney("pirate fish");
fishList.mcGrouper.txMoney.text = _local2.getMoney("grouper");
fishList.mcBastard.txMoney.text = _local2.getMoney("bastard worm eater");
} else {
if (model.currentLevel == 4){
fishList.mcCod.txMoney.text = _local2.getMoney("big mouth cod");
fishList.mcFlounder.txMoney.text = _local2.getMoney("flounder");
fishList.mcMinnow.txMoney.text = _local2.getMoney("spotted minnow");
fishList.mcClown.txMoney.text = _local2.getMoney("clown fish");
fishList.mcGrouper.txMoney.text = _local2.getMoney("grouper");
fishList.mcBastard.txMoney.text = _local2.getMoney("bastard worm eater");
} else {
if (model.currentLevel == 5){
fishList.mcCod.txMoney.text = _local2.getMoney("big mouth cod");
fishList.mcFlounder.txMoney.text = _local2.getMoney("flounder");
fishList.mcMinnow.txMoney.text = _local2.getMoney("spotted minnow");
fishList.mcMutant.txMoney.text = _local2.getMoney("mutant fish");
fishList.mcMullet.txMoney.text = _local2.getMoney("mullet");
fishList.mcBastard.txMoney.text = _local2.getMoney("bastard worm eater");
} else {
if (model.currentLevel == 6){
fishList.mcCod.txMoney.text = _local2.getMoney("big mouth cod");
fishList.mcTiki.txMoney.text = _local2.getMoney("tiki fish");
fishList.mcMinnow.txMoney.text = _local2.getMoney("spotted minnow");
fishList.mcMutant.txMoney.text = _local2.getMoney("mutant fish");
fishList.mcMullet.txMoney.text = _local2.getMoney("mullet");
fishList.mcBastard.txMoney.text = _local2.getMoney("bastard worm eater");
};
};
};
};
};
};
}
override public function update(_arg1:Event=null):void{
}
public function initView():void{
fishList = new FishListMC();
fishList.x = 5;
fishList.y = 6;
fishList.gotoAndStop(model.currentLevel);
targetStage.addChild(fishList);
fishList.addEventListener(Event.COMPLETE, initMoney);
initMouseEvents();
}
override public function updateModel(_arg1:Event):void{
}
private function initMouseEvents():void{
fishList.btGo.addEventListener(MouseEvent.MOUSE_DOWN, goFish);
}
}
}//package
Section 166
//ViewGameOver (ViewGameOver)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class ViewGameOver extends ComponentView {
private var gameOver:GameOverMC;
private var rootView:RootView;
private var targetStage:MovieClip;
public function ViewGameOver(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function openDorkBots(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
gameOver.mcSign.btLogo.removeEventListener(MouseEvent.MOUSE_UP, openDorkBots);
_local2 = "http://www.dorkbots.com/games/fishingchampion/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3);
}
private function thisCleanUp():void{
gameOver.mcSign.btLogo.removeEventListener(MouseEvent.MOUSE_UP, openDorkBots);
gameOver.btReplay.removeEventListener(MouseEvent.MOUSE_UP, replay);
targetStage.removeChild(gameOver);
rootView.deleteView(this);
}
override public function update(_arg1:Event=null):void{
}
public function initView():void{
var _local1:uint;
var _local2:uint;
var _local3:int;
rootView.playThemeMusic("theme");
gameOver = new GameOverMC();
gameOver.txScore.text = model.moneyTotal.toString();
_local1 = (model.scoreMin + 4000);
_local2 = (_local1 - model.scoreMin);
_local3 = (model.moneyTotal - model.scoreMin);
if (_local3 < 0){
_local3 = 0;
} else {
if (_local3 > _local1){
_local3 = _local1;
};
};
gameOver.mcFishMeter.mcPowerLevel.scaleY = ((_local3 / _local2) * 1);
gameOver.mcFishMeter.mcFish.y = (gameOver.mcFishMeter.mcPowerLevel.y - gameOver.mcFishMeter.mcPowerLevel.height);
targetStage.addChild(gameOver);
controller.soundFXPlayer.playSFX("fishing hole cheer", 1, 0);
gameOver.mcSign.btLogo.addEventListener(MouseEvent.MOUSE_UP, openDorkBots);
gameOver.btReplay.addEventListener(MouseEvent.MOUSE_UP, replay);
}
override public function updateModel(_arg1:Event):void{
}
private function replay(_arg1:MouseEvent):void{
gameOver.btReplay.removeEventListener(MouseEvent.MOUSE_UP, replay);
model.currentLevel = 1;
rootView.playGame();
thisCleanUp();
}
}
}//package
Section 167
//ViewHUD (ViewHUD)
package {
import flash.display.*;
import flash.events.*;
public class ViewHUD extends ComponentView {
private var moneyCounter:Object;
private var targetObject:MovieClip;
private var wormCounter:Object;
private var rootView:RootView;
private var targetStage:MovieClip;
private var moneyTotalCounter:Object;
public function ViewHUD(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function openInstructions(_arg1:MouseEvent):void{
rootView.openInstructions();
model.pauseGame = true;
}
private function openBobberMenu(_arg1:MouseEvent):void{
rootView.openBobberSelect();
}
private function musicVolumeSlider(_arg1:MouseEvent):void{
rootView.openVolumeSlider();
}
private function nextFishingHole(_arg1:MouseEvent):void{
rootView.nextLevelTest();
}
private function openFishList(_arg1:MouseEvent):void{
rootView.openFishList();
model.pauseGame = true;
}
private function openMap(_arg1:MouseEvent):void{
rootView.openMap();
model.pauseGame = true;
}
override public function update(_arg1:Event=null):void{
}
public function cleanUp():void{
targetObject.btFishList.removeEventListener(MouseEvent.MOUSE_UP, openFishList);
targetObject.btMap.removeEventListener(MouseEvent.MOUSE_UP, openMap);
targetObject.btInstructions.removeEventListener(MouseEvent.MOUSE_UP, openInstructions);
rootView.deleteView(this);
}
public function initView():void{
targetObject = targetStage.mcHUD;
wormCounter = targetObject.txWormCnt;
wormCounter.text = model.wormCnt;
moneyCounter = targetObject.mcMoney.txMoney;
moneyCounter.text = model.moneyFish;
moneyTotalCounter = targetObject.mcTotalMoney.txMoney;
moneyTotalCounter.text = model.moneyTotal;
targetObject.btBobber.gotoAndStop(model.currentBobber);
initMouseEvents();
}
override public function updateModel(_arg1:Event):void{
if (model.whatChanged == "wormCnt"){
wormCounter.text = model.wormCnt;
} else {
if (model.whatChanged == "moneyFish"){
moneyCounter.text = model.moneyFish;
if (model.moneyFish < 0){
targetObject.mcMoney.txMoneyMinus.text = "-";
} else {
targetObject.mcMoney.txMoneyMinus.text = "";
};
} else {
if (model.whatChanged == "moneyTotal"){
moneyTotalCounter.text = model.moneyTotal;
} else {
if (model.whatChanged == "currentBobber"){
targetObject.btBobber.gotoAndStop(model.currentBobber);
} else {
if (model.whatChanged == "musicMute"){
if (model.musicMute){
targetObject.mcSpeaker.gotoAndStop("play music");
} else {
targetObject.mcSpeaker.gotoAndStop("stop music");
};
};
};
};
};
};
}
private function initMouseEvents():void{
targetObject.btFishList.addEventListener(MouseEvent.MOUSE_UP, openFishList);
targetObject.btMap.addEventListener(MouseEvent.MOUSE_UP, openMap);
targetObject.btInstructions.addEventListener(MouseEvent.MOUSE_UP, openInstructions);
targetObject.btBobber.addEventListener(MouseEvent.MOUSE_OVER, openBobberMenu);
if (model.musicMute){
targetObject.mcSpeaker.gotoAndStop("play music");
} else {
targetObject.mcSpeaker.gotoAndStop("stop music");
};
targetObject.mcSpeaker.addEventListener(MouseEvent.MOUSE_OVER, musicVolumeSlider);
}
}
}//package
Section 168
//ViewInstructions (ViewInstructions)
package {
import flash.display.*;
import flash.events.*;
public class ViewInstructions extends ComponentView {
private var rootView:RootView;
private var instructions:MovieClip;
private var targetStage:MovieClip;
public function ViewInstructions(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
instructions = targetStage.mcInstructions;
}
private function initNavButtons(){
instructions.btBack.visible = false;
instructions.btNext.visible = true;
instructions.btBack.addEventListener(MouseEvent.MOUSE_UP, backButt);
instructions.btNext.addEventListener(MouseEvent.MOUSE_UP, nextButt);
}
public function openInstructions():void{
instructions.gotoAndStop(1);
rootView.playThemeMusic("instructions");
instructions.btPlay.visible = false;
instructions.btFish.visible = true;
instructions.visible = true;
initMouseEventsClose();
initNavButtons();
}
private function playGame(_arg1:MouseEvent):void{
rootView.playGame(instructions.currentFrame);
thisCleanUp();
}
private function backButt(_arg1:MouseEvent):void{
instructions.prevFrame();
if (instructions.currentLabel == "start"){
instructions.btBack.visible = false;
};
if (instructions.currentLabel != "end"){
instructions.btNext.visible = true;
};
}
private function nextButt(_arg1:MouseEvent):void{
instructions.nextFrame();
if (instructions.currentLabel == "end"){
instructions.btNext.visible = false;
};
if (instructions.currentLabel != "start"){
instructions.btBack.visible = true;
};
}
private function thisCleanUp():void{
instructions.btPlay.removeEventListener(MouseEvent.MOUSE_UP, playGame);
instructions.btPlay.removeEventListener(MouseEvent.MOUSE_UP, thisClose);
instructions.btBack.removeEventListener(MouseEvent.MOUSE_UP, backButt);
instructions.btNext.removeEventListener(MouseEvent.MOUSE_UP, nextButt);
instructions.visible = false;
rootView.deleteView(this);
}
private function initMouseEventsClose():void{
instructions.btFish.addEventListener(MouseEvent.MOUSE_UP, thisClose);
}
override public function update(_arg1:Event=null):void{
}
public function gameReady():void{
instructions.btPlay.visible = true;
initMouseEvents();
}
public function initView():void{
instructions.btFish.visible = false;
instructions.btPlay.visible = false;
instructions.visible = true;
initNavButtons();
}
override public function updateModel(_arg1:Event):void{
}
private function initMouseEvents():void{
instructions.btPlay.addEventListener(MouseEvent.MOUSE_UP, playGame);
}
private function thisClose(_arg1:MouseEvent):void{
rootView.playFishHoleMusic();
model.pauseGame = false;
thisCleanUp();
}
}
}//package
Section 169
//ViewMap (ViewMap)
package {
import flash.display.*;
import flash.events.*;
public class ViewMap extends ComponentView {
private var map:MapMC;
private var rootView:RootView;
private var targetStage:MovieClip;
public function ViewMap(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function skipIntro(_arg1:MouseEvent):void{
map.btSkip.removeEventListener(MouseEvent.MOUSE_UP, skipIntro);
map.gotoAndPlay("skip intro");
}
private function initEvents():void{
map.addEventListener(Event.COMPLETE, loadFishingHole);
if (model.currentLevel == 1){
map.btSkip.addEventListener(MouseEvent.MOUSE_UP, skipIntro, false, 0, true);
};
}
private function thisCleanUp():void{
targetStage.removeChild(map);
rootView.deleteView(this);
}
private function loadFishingHole(_arg1:Event):void{
map.removeEventListener(Event.COMPLETE, loadFishingHole);
rootView.loadFishHole();
thisCleanUp();
}
private function initMouseEventsClose():void{
map.btFish.addEventListener(MouseEvent.MOUSE_UP, thisClose);
}
public function openMap():void{
var _local1:uint;
rootView.playThemeMusic("theme");
map = new MapMC();
_local1 = model.currentLevel;
if (_local1 == 1){
map.gotoAndStop("level 1");
} else {
if (_local1 == 2){
map.gotoAndStop("level 2");
} else {
if (_local1 == 3){
map.gotoAndStop("level 3");
} else {
if (_local1 == 4){
map.gotoAndStop("level 4");
} else {
if (_local1 == 5){
map.gotoAndStop("level 5");
} else {
if (_local1 == 6){
map.gotoAndStop("level 6");
} else {
throw (new Error("Invalid Map Level"));
};
};
};
};
};
};
targetStage.addChild(map);
initMouseEventsClose();
}
override public function update(_arg1:Event=null):void{
}
public function initView(_arg1:uint=0):void{
var _local2:uint;
rootView.playThemeMusic("theme");
map = new MapMC();
map.btFish.visible = false;
_local2 = model.currentLevel;
if (_local2 == 1){
map.gotoAndPlay("level 1 intro");
} else {
if (_local2 == 2){
map.gotoAndPlay("level 2 intro");
} else {
if (_local2 == 3){
map.gotoAndPlay("level 3 intro");
} else {
if (_local2 == 4){
map.gotoAndPlay("level 4 intro");
} else {
if (_local2 == 5){
map.gotoAndPlay("level 5 intro");
} else {
if (_local2 == 6){
map.gotoAndPlay("level 6 intro");
} else {
throw (new Error("Invalid Map Level"));
};
};
};
};
};
};
targetStage.addChild(map);
initEvents();
}
override public function updateModel(_arg1:Event):void{
}
private function thisClose(_arg1:MouseEvent):void{
rootView.playFishHoleMusic();
map.btFish.removeEventListener(MouseEvent.MOUSE_UP, thisClose);
model.pauseGame = false;
thisCleanUp();
}
}
}//package
Section 170
//ViewPopUpInstructions (ViewPopUpInstructions)
package {
import flash.display.*;
import flash.events.*;
public class ViewPopUpInstructions extends ComponentView {
private var rootView:RootView;
private var instructions:PopUpInstructionsMC;
private var targetStage:MovieClip;
public function ViewPopUpInstructions(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
initView();
}
private function fish(_arg1:MouseEvent):void{
instructions.btFish.removeEventListener(MouseEvent.MOUSE_UP, fish);
thisCleanUp();
}
private function thisCleanUp():void{
instructions.btFish.removeEventListener(MouseEvent.MOUSE_UP, fish);
targetStage.removeChild(instructions);
rootView.deleteView(this);
}
override public function update(_arg1:Event=null):void{
}
public function initView():void{
instructions = new PopUpInstructionsMC();
instructions.x = 100;
instructions.y = 64;
instructions.btFish.addEventListener(MouseEvent.MOUSE_UP, fish);
targetStage.addChild(instructions);
}
override public function updateModel(_arg1:Event):void{
}
}
}//package
Section 171
//ViewSound (ViewSound)
package {
import flash.display.*;
import flash.events.*;
import sfxfactory.*;
import musicfactory.*;
public class ViewSound extends ComponentView {
private var musicFactory:MusicPlayer;
private var rootView:RootView;
private var sfxPlayer:SoundFXPlayer;
private var targetStage:MovieClip;
public function ViewSound(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
controller.soundFXPlayer = this;
}
public function sfxSoundTransform(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4=null):void{
sfxPlayer.setSoundTransform(_arg1, _arg2, _arg3, _arg4);
}
public function stopSFX(_arg1:String):void{
sfxPlayer.stopSFX(_arg1);
}
public function setSoundTransform(_arg1:Number=1, _arg2:Number=0, _arg3=null):void{
musicFactory.setSoundTransform(_arg1, _arg2, _arg3);
}
public function playThemeMusic(_arg1:String):void{
model.musicType = "theme";
musicFactory.playThemeMusic(_arg1);
}
public function playSFX(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4=null):void{
sfxPlayer.playSFX(_arg1, _arg2, _arg3, _arg4);
}
private function musicFirstSetLoaded(_arg1:Event):void{
musicFactory.removeEventListener(Event.COMPLETE, musicFirstSetLoaded);
sfxPlayer.addEventListener(Event.COMPLETE, sfxLoaded);
sfxPlayer.loadSFX();
}
override public function update(_arg1:Event=null):void{
}
public function cleanUp():void{
rootView.deleteView(this);
}
public function initView():void{
musicFactory = new MusicPlayer(model, targetStage);
sfxPlayer = new SoundFXPlayer(model, controller, targetStage);
musicFactory.addEventListener(Event.COMPLETE, musicFirstSetLoaded);
musicFactory.loadMusic();
model.musicVolume = 0.5;
}
override public function updateModel(_arg1:Event):void{
if (model.whatChanged == "musicMute"){
if (model.musicMute == true){
musicFactory.muteMusic = true;
musicFactory.stopMusic();
} else {
musicFactory.muteMusic = false;
if (model.musicType == "fishinghole"){
musicFactory.playFishHoleMusic();
};
};
} else {
if (model.whatChanged == "musicVolume"){
setSoundTransform(model.musicVolume);
};
};
}
private function sfxLoaded(_arg1:Event):void{
sfxPlayer.removeEventListener(Event.COMPLETE, sfxLoaded);
musicFactory.loadMusic();
}
public function playFishHoleMusic():void{
model.musicType = "fishinghole";
musicFactory.playFishHoleMusic();
}
}
}//package
Section 172
//ViewVolume (ViewVolume)
package {
import flash.display.*;
import flash.events.*;
import utils.*;
public class ViewVolume extends ComponentView {
private var scroller:ScrollBarY;
private var rootView:RootView;
private var volumeSlider:VolumeSliderMC;
private var targetStage:MovieClip;
public function ViewVolume(_arg1:IModel, _arg2:IController, _arg3:MovieClip, _arg4:RootView){
super(_arg1, _arg2);
targetStage = _arg3;
rootView = _arg4;
}
private function thisRollOut(_arg1:MouseEvent):void{
thisCleanUp();
}
private function thisCleanUp():void{
scroller.cleanUp();
volumeSlider.btRollOut.removeEventListener(MouseEvent.MOUSE_OVER, thisRollOut);
volumeSlider.mcSpeaker.removeEventListener(MouseEvent.MOUSE_UP, musicPlay);
volumeSlider.mcSpeaker.removeEventListener(MouseEvent.MOUSE_UP, musicStop);
scroller.removeEventListener(Event.CHANGE, scrollUpDatePower);
targetStage.removeChild(volumeSlider);
rootView.deleteView(this);
}
private function scrollUpDatePower(_arg1:Event):void{
if (scroller.power <= 0.002){
model.musicVolume = 0;
} else {
model.musicVolume = scroller.power;
};
}
private function musicStop(_arg1:MouseEvent=null):void{
model.musicMute = true;
scroller.power = 0;
volumeSlider.mcSpeaker.removeEventListener(MouseEvent.MOUSE_UP, musicStop);
volumeSlider.mcSpeaker.gotoAndStop("play music");
volumeSlider.mcSpeaker.addEventListener(MouseEvent.MOUSE_UP, musicPlay);
}
override public function update(_arg1:Event=null):void{
}
public function initView():void{
volumeSlider = new VolumeSliderMC();
volumeSlider.x = 32.3;
volumeSlider.y = 459;
targetStage.addChild(volumeSlider);
scroller = new ScrollBarY(volumeSlider);
scroller.addEventListener(Event.CHANGE, scrollUpDatePower);
if (model.musicMute){
scroller.power = 0;
} else {
scroller.power = model.musicVolume;
};
initMouseEvents();
}
override public function updateModel(_arg1:Event):void{
}
private function initMouseEvents():void{
volumeSlider.btRollOut.addEventListener(MouseEvent.MOUSE_OVER, thisRollOut);
if (model.musicMute){
volumeSlider.mcSpeaker.gotoAndStop("play music");
volumeSlider.mcSpeaker.addEventListener(MouseEvent.MOUSE_UP, musicPlay);
} else {
volumeSlider.mcSpeaker.gotoAndStop("stop music");
volumeSlider.mcSpeaker.addEventListener(MouseEvent.MOUSE_UP, musicStop);
};
}
private function musicPlay(_arg1:MouseEvent=null):void{
model.musicMute = false;
if (model.musicVolume == 0){
model.musicVolume = 0.3;
};
scroller.power = model.musicVolume;
volumeSlider.mcSpeaker.removeEventListener(MouseEvent.MOUSE_UP, musicPlay);
volumeSlider.mcSpeaker.gotoAndStop("stop music");
volumeSlider.mcSpeaker.addEventListener(MouseEvent.MOUSE_UP, musicStop);
}
}
}//package
Section 173
//VolumeSliderMC (VolumeSliderMC)
package {
import flash.display.*;
public dynamic class VolumeSliderMC extends MovieClip {
public var mcScrub:MovieClip;
public var mcSpeaker:MovieClip;
public var mcBar:MovieClip;
public var btRollOut:SimpleButton;
}
}//package