Section 1
//bushLineForeground (bushLineForeground)
package {
import flash.display.*;
public dynamic class bushLineForeground extends MovieClip {
}
}//package
Section 2
//bushLineMidground (bushLineMidground)
package {
import flash.display.*;
public dynamic class bushLineMidground extends MovieClip {
}
}//package
Section 3
//controlPanel (controlPanel)
package {
import flash.display.*;
import flash.text.*;
public dynamic class controlPanel extends MovieClip {
public var cpPoints:TextField;
}
}//package
Section 4
//gameMask (gameMask)
package {
import flash.display.*;
public dynamic class gameMask extends MovieClip {
}
}//package
Section 5
//GypsyMC (GypsyMC)
package {
import flash.display.*;
public dynamic class GypsyMC extends MovieClip {
public var girl_part1:MovieClip;
public var girl_part2:MovieClip;
public var girl_part4:MovieClip;
public var girl_part5:MovieClip;
public var girl_part3:MovieClip;
public var girlNude:MovieClip;
public var girl_part6:MovieClip;
}
}//package
Section 6
//gypsyStamp (gypsyStamp)
package {
import flash.display.*;
public dynamic class gypsyStamp extends MovieClip {
}
}//package
Section 7
//origSplash (origSplash)
package {
import flash.display.*;
public dynamic class origSplash extends MovieClip {
}
}//package
Section 8
//soundEnter (soundEnter)
package {
import flash.media.*;
public dynamic class soundEnter extends Sound {
}
}//package
Section 9
//soundMove (soundMove)
package {
import flash.media.*;
public dynamic class soundMove extends Sound {
}
}//package
Section 10
//soundOoh (soundOoh)
package {
import flash.media.*;
public dynamic class soundOoh extends Sound {
}
}//package
Section 11
//soundSplash (soundSplash)
package {
import flash.media.*;
public dynamic class soundSplash extends Sound {
}
}//package
Section 12
//treeLineBackground (treeLineBackground)
package {
import flash.display.*;
public dynamic class treeLineBackground extends MovieClip {
}
}//package
Section 13
//waterBall (waterBall)
package {
import flash.display.*;
public dynamic class waterBall extends MovieClip {
}
}//package
Section 14
//waterballMain (waterballMain)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.filters.*;
public class waterballMain extends MovieClip {
private var girlLevel_1:MovieClip;
private var stampX;// = 10
private var stampY;// = 10
private var viewDY:int;// = 0
private var bushLine:MovieClip;
private var Mask:MovieClip;
private var Ball:MovieClip;
private var sndSplash:soundSplash;
private var playerScore:Number;// = 0
private var targetArray:Array;
private var sndOoh:soundOoh;
private var midLine:MovieClip;
private var numberOfGirlsAvailable:int;// = 2
private var girlLevel_2:MovieClip;
private var maxGirlsOnField:int;// = 3
private var Stamp_Array:Array;
private var treeMask:MovieClip;
private var treeLine:MovieClip;
private var mainPanel:MovieClip;
private var sndMove:soundMove;
private var targetZone:MovieClip;
private var sndEnter:soundEnter;
private var viewDX:int;// = 0
public function waterballMain(){
var _local1:*;
playerScore = 0;
stampX = 10;
stampY = 10;
Stamp_Array = new Array();
numberOfGirlsAvailable = 2;
maxGirlsOnField = 3;
targetArray = new Array();
sndOoh = new soundOoh();
sndMove = new soundMove();
sndEnter = new soundEnter();
sndSplash = new soundSplash();
viewDX = 0;
viewDY = 0;
super();
setupGameBoard();
setupGirl();
this.addEventListener(MouseEvent.MOUSE_MOVE, trackScenery);
_local1 = new Timer(10);
_local1.addEventListener(TimerEvent.TIMER, moveScenery);
_local1.start();
}
private function trackScenery(_arg1:MouseEvent){
if ((((treeMask.mouseX < 30)) && ((treeMask.mouseX > -30)))){
viewDX = 0;
} else {
if (treeMask.mouseX > 80){
viewDX = -8;
} else {
if (treeMask.mouseX > 30){
viewDX = -2;
} else {
if (treeMask.mouseX < -80){
viewDX = 8;
} else {
if (treeMask.mouseX < -30){
viewDX = 2;
};
};
};
};
};
if ((((treeMask.mouseY < 30)) && ((treeMask.mouseY > -30)))){
viewDY = 0;
} else {
if (treeMask.mouseY > 80){
viewDY = -8;
} else {
if (treeMask.mouseY > 30){
viewDY = -2;
} else {
if (treeMask.mouseY < -80){
viewDY = 8;
} else {
if (treeMask.mouseY < -30){
viewDY = 2;
};
};
};
};
};
}
private function setupGameBoard(){
girlLevel_1 = new MovieClip();
girlLevel_1.x = 0;
girlLevel_1.y = 200;
girlLevel_2 = new MovieClip();
girlLevel_2.x = 0;
girlLevel_2.y = 100;
treeLine = new treeLineBackground();
treeLine.x = 0;
treeLine.y = -50;
midLine = new bushLineMidground();
midLine.x = 0;
midLine.y = -50;
bushLine = new bushLineForeground();
bushLine.x = 0;
bushLine.y = 300;
treeMask = new gameMask();
treeMask.x = 335;
treeMask.y = 150;
bushLine.mask = treeMask;
midLine.mask = treeMask;
treeLine.mask = treeMask;
girlLevel_1.mask = treeMask;
girlLevel_2.mask = treeMask;
mainPanel = new controlPanel();
mainPanel.x = 0;
mainPanel.y = 300;
this.addChild(treeLine);
this.addChild(girlLevel_2);
this.addChild(midLine);
this.addChild(girlLevel_1);
this.addChild(bushLine);
this.addChild(treeMask);
this.addChild(mainPanel);
}
private function checkForHit(_arg1:TimerEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
for (_local2 in targetArray) {
if (((targetArray[_local2].girl_part6.hitTestPoint(Ball.ballX, Ball.ballY)) && ((targetArray[_local2].dead == false)))){
targetArray[_local2].removeEventListener(MouseEvent.CLICK, throwBall);
_local3 = new waterSplash();
_local3.x = Ball.x;
_local3.y = Ball.y;
_local3.cacheAsBitmap = true;
_local3.scaleX = (targetArray[_local2].scaleX + 0.1);
_local3.scaleY = (targetArray[_local2].scaleY + 0.1);
if ((((Mask == null)) || (!(Mask)))){
targetArray[_local2].girl_part6.mask = _local3;
targetArray[_local2].filters = null;
targetArray[_local2].parent.addChild(_local3);
};
_local4 = Math.abs((targetArray[_local2].mouseX - (targetArray[_local2].girl_part6.x + (targetArray[_local2].girl_part6.width / 2))));
_local5 = Math.abs((targetArray[_local2].mouseY - (targetArray[_local2].girl_part6.y + (targetArray[_local2].girl_part6.height / 2))));
_local6 = Math.floor(Math.sqrt(((_local4 ^ (2 + _local5)) ^ 2)));
_local7 = ((20 - _local6) * 10);
updateScore(_local7);
switch (targetArray[_local2].Stamp){
case "Gypsy":
_local8 = new gypsyStamp();
break;
case "Vixen":
_local8 = new vixenStamp();
break;
};
_local8.x = stampX;
_local8.y = stampY;
stampX = (stampX + (_local8.width + 5));
mainPanel.addChild(_local8);
Stamp_Array.push(_local8);
targetArray[_local2].escapeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, escapedTarget);
targetArray[_local2].escapeTimer.stop();
targetArray[_local2].dead = true;
targetArray[_local2].Mask = _local3;
Mask = _local3;
sndSplash.play();
_local9 = new Timer(10, 100);
_local9.addEventListener(TimerEvent.TIMER_COMPLETE, removeTargets);
_local9.start();
};
};
Ball.parent.removeChild(Ball);
}
private function updateScore(_arg1:Number){
playerScore = (playerScore + _arg1);
mainPanel.cpPoints.text = playerScore.toString();
}
private function escapedTarget(_arg1:TimerEvent){
var _local2:*;
for (_local2 in targetArray) {
if (targetArray[_local2].escapeTimer.running == false){
if (targetArray[_local2].Zone == "girlLevel_1"){
targetArray[_local2].x = (Math.floor((Math.random() * 3600)) - 1400);
} else {
targetArray[_local2].x = (Math.floor((Math.random() * 2600)) - 1000);
};
targetArray[_local2].filters = null;
targetArray[_local2].escapeTimer = new Timer((5000 + Math.floor((Math.random() * 3000))), 1);
targetArray[_local2].escapeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, blurEscape);
targetArray[_local2].escapeTimer.start();
sndMove.play();
updateScore(-50);
};
};
}
private function ballInMotion(_arg1:TimerEvent){
Ball.scaleX = (Ball.scaleX * 0.8);
Ball.scaleY = (Ball.scaleY * 0.8);
}
private function moveScenery(_arg1:TimerEvent){
if (treeLine.x > 1400){
treeLine.x = 1400;
viewDX = 0;
} else {
if (treeLine.x < -800){
treeLine.x = -800;
viewDX = 0;
};
};
if (bushLine.x > 2800){
bushLine.x = 2800;
} else {
if (bushLine.x < -1600){
bushLine.x = -1600;
};
};
if (midLine.x > 2100){
midLine.x = 2100;
} else {
if (midLine.x < -1200){
midLine.x = -1200;
};
};
if (girlLevel_1.x > 2450){
girlLevel_1.x = 2450;
} else {
if (girlLevel_1.x < -1400){
girlLevel_1.x = -1400;
};
};
if (girlLevel_2.x > 1750){
girlLevel_2.x = 1750;
} else {
if (girlLevel_2.x < -1000){
girlLevel_2.x = -1000;
} else {
if (viewDX != 0){
treeLine.x = (treeLine.x + viewDX);
midLine.x = (midLine.x + (1.5 * viewDX));
bushLine.x = (bushLine.x + (2 * viewDX));
girlLevel_1.x = (girlLevel_1.x + (1.75 * viewDX));
girlLevel_2.x = (girlLevel_2.x + (1.25 * viewDX));
};
};
};
if (treeLine.y > ((treeLine.height / 2) - 50)){
treeLine.y = ((treeLine.height / 2) - 50);
bushLine.y = 0xFF;
viewDY = 0;
} else {
if (treeLine.y < 50){
treeLine.y = 50;
bushLine.y = 50;
midLine.y = 50;
girlLevel_1.y = 50;
girlLevel_2.y = 50;
viewDY = 0;
} else {
if (viewDY != 0){
treeLine.y = (treeLine.y + (0.8 * viewDY));
girlLevel_2.y = (girlLevel_2.y + (0.75 * viewDY));
midLine.y = (midLine.y + (0.7 * viewDY));
girlLevel_1.y = (girlLevel_1.y + (0.65 * viewDY));
bushLine.y = (bushLine.y + (0.6 * viewDY));
};
};
};
}
private function blurEscape(_arg1:TimerEvent){
var _local2:*;
var _local3:BlurFilter;
var _local4:Array;
for (_local2 in targetArray) {
if (targetArray[_local2].escapeTimer.running == false){
_local3 = new BlurFilter();
_local3.blurX = 10;
_local3.blurY = 10;
_local3.quality = 1;
_local4 = new Array(_local3);
targetArray[_local2].filters = _local4;
targetArray[_local2].escapeTimer = new Timer(10, 10);
targetArray[_local2].escapeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, escapedTarget);
targetArray[_local2].escapeTimer.start();
};
};
}
private function setupGirl(){
var _local1:*;
var _local2:*;
var _local3:*;
if (targetArray.length < maxGirlsOnField){
_local1 = Math.floor((Math.random() * numberOfGirlsAvailable));
_local2 = (Math.floor((Math.random() * 2)) + 1);
switch (_local1){
case 0:
_local3 = new GypsyMC();
_local3.Stamp = "Gypsy";
break;
case 1:
_local3 = new VixenMC();
_local3.Stamp = "Vixen";
break;
default:
_local3 = new GypsyMC();
_local3.Stamp = "Gypsy";
break;
};
_local3.dead = false;
_local3.girl_part1.visible = false;
_local3.girl_part2.visible = false;
_local3.girl_part3.visible = false;
_local3.girl_part4.visible = false;
_local3.girl_part5.visible = true;
_local3.girl_part6.visible = true;
_local3.girl_part6.cacheAsBitmap = true;
if (_local2 == 1){
_local3.x = (Math.floor((Math.random() * 3600)) - 1400);
_local3.y = -100;
_local3.scaleX = (_local3.scaleY = 0.6);
girlLevel_1.addChild(_local3);
} else {
_local3.x = (Math.floor((Math.random() * 2600)) - 1000);
_local3.y = 0;
_local3.scaleX = (_local3.scaleY = 0.4);
girlLevel_2.addChild(_local3);
};
targetArray.push(_local3);
_local3.escapeTimer = new Timer((5000 + Math.floor((Math.random() * 3000))), 1);
_local3.escapeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, blurEscape);
_local3.escapeTimer.start();
sndEnter.play();
targetZone = _local3.parent;
stage.addEventListener(MouseEvent.CLICK, throwBall);
};
}
private function waitForGirl(_arg1:TimerEvent){
setupGirl();
}
private function removeTargets(_arg1:TimerEvent){
var _local2:*;
var _local3:*;
for (_local2 in targetArray) {
if (targetArray[_local2].dead == true){
Mask.parent.removeChild(Mask);
Mask = null;
targetArray[_local2].parent.removeChild(targetArray[_local2]);
targetArray.splice(_local2, 1);
sndOoh.play();
_local3 = new Timer(10, (50 + Math.floor((Math.random() * 25))));
_local3.addEventListener(TimerEvent.TIMER_COMPLETE, waitForGirl);
_local3.start();
};
};
}
private function throwBall(_arg1:MouseEvent){
var _local2:*;
trace(_arg1);
trace(((("X: " + targetZone.mouseX) + " Y: ") + targetZone.mouseY));
_local2 = new waterBall();
_local2.x = targetZone.mouseX;
_local2.y = targetZone.mouseY;
_local2.ballX = _arg1.stageX;
_local2.ballY = _arg1.stageY;
targetZone.addChild(_local2);
Ball = _local2;
_local2.timer = new Timer(10, 50);
_local2.timer.addEventListener(TimerEvent.TIMER, ballInMotion);
_local2.timer.addEventListener(TimerEvent.TIMER_COMPLETE, checkForHit);
_local2.timer.start();
}
}
}//package
Section 15
//waterSplash (waterSplash)
package {
import flash.display.*;
public dynamic class waterSplash extends MovieClip {
}
}//package
Section 16
//VixenMC (VixenMC)
package {
import flash.display.*;
public dynamic class VixenMC extends MovieClip {
public var girl_part1:vixSocks;
public var girl_part2:MovieClip;
public var girl_part4:MovieClip;
public var girl_part5:MovieClip;
public var girl_part3:MovieClip;
public var girl_part6:MovieClip;
}
}//package
Section 17
//vixenStamp (vixenStamp)
package {
import flash.display.*;
public dynamic class vixenStamp extends MovieClip {
}
}//package
Section 18
//vixSocks (vixSocks)
package {
import flash.display.*;
public dynamic class vixSocks extends MovieClip {
}
}//package