Section 1
//Animation_1 (PussyTracker_rev3_fla.Animation_1)
package PussyTracker_rev3_fla {
import flash.display.*;
public dynamic class Animation_1 extends MovieClip {
public function Animation_1(){
addFrameScript(242, frame243);
}
function frame243(){
stop();
}
}
}//package PussyTracker_rev3_fla
Section 2
//MainVideo_47 (PussyTracker_rev3_fla.MainVideo_47)
package PussyTracker_rev3_fla {
import flash.display.*;
public dynamic class MainVideo_47 extends MovieClip {
public function MainVideo_47(){
addFrameScript(461, frame462, 924, frame925, 1355, frame1356, 1690, frame1691, 2265, frame2266);
}
function frame1356(){
gotoAndPlay("Part3");
}
function frame462(){
gotoAndPlay(1);
}
function frame925(){
gotoAndPlay("Part2");
}
function frame2266(){
trace("at the end");
stop();
}
function frame1691(){
gotoAndPlay("Part4");
}
}
}//package PussyTracker_rev3_fla
Section 3
//textcopy_3 (PussyTracker_rev3_fla.textcopy_3)
package PussyTracker_rev3_fla {
import flash.display.*;
public dynamic class textcopy_3 extends MovieClip {
public function textcopy_3(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package PussyTracker_rev3_fla
Section 4
//water1copy2_34 (PussyTracker_rev3_fla.water1copy2_34)
package PussyTracker_rev3_fla {
import flash.display.*;
public dynamic class water1copy2_34 extends MovieClip {
public function water1copy2_34(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package PussyTracker_rev3_fla
Section 5
//ChaseItem (ChaseItem)
package {
import flash.display.*;
public class ChaseItem extends MovieClip {
public var friction:Number;
public var size:Number;
public var yPos:Number;
public var ySpeed:Number;
public var acc:Number;
public var maxDistance:Number;
public var xSpeed:Number;
public var xPos:Number;
public function ChaseItem(){
acc = 0.2;
xSpeed = 0;
ySpeed = 0;
friction = 0.992;
size = 30;
setSize();
maxDistance = 10;
xPos = 0;
yPos = 0;
}
public function onTarget():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = getTargetXDistance();
_local2 = getTargetYDistance();
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 < size){
return (true);
};
return (false);
}
private function setSize(){
this.width = (size * 2);
this.height = (size * 2);
}
private function getTargetXDistance():Number{
return ((-(xPos) + this.parent.mouseX));
}
private function getTargetYDistance():Number{
return ((-(yPos) + this.parent.mouseY));
}
public function newLevel(){
size = (size + 2);
setSize();
acc = (acc + 0.14);
friction = (friction - 0.0015);
}
public function animate(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = getTargetXDistance();
_local2 = getTargetYDistance();
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = Math.atan2(_local2, _local1);
_local5 = Math.cos(_local4);
_local6 = Math.sin(_local4);
if (_local3 > maxDistance){
_local7 = 1;
} else {
_local7 = (1 - ((maxDistance - _local3) / maxDistance));
};
xSpeed = (xSpeed + ((_local7 * _local5) * acc));
ySpeed = (ySpeed + ((_local7 * _local6) * acc));
xPos = (xPos + xSpeed);
yPos = (yPos + ySpeed);
xSpeed = (xSpeed * friction);
ySpeed = (ySpeed * friction);
this.x = xPos;
this.y = yPos;
}
}
}//package
Section 6
//electra1 (electra1)
package {
import flash.media.*;
public dynamic class electra1 extends Sound {
}
}//package
Section 7
//electra2 (electra2)
package {
import flash.media.*;
public dynamic class electra2 extends Sound {
}
}//package
Section 8
//electra3 (electra3)
package {
import flash.media.*;
public dynamic class electra3 extends Sound {
}
}//package
Section 9
//electraLoop (electraLoop)
package {
import flash.media.*;
public dynamic class electraLoop extends Sound {
}
}//package
Section 10
//LogoSymbol (LogoSymbol)
package {
import flash.display.*;
public dynamic class LogoSymbol extends MovieClip {
}
}//package
Section 11
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.media.*;
import flash.net.*;
public class Main {
private var guyIndicator:TextField;
private var guyMeterRate:Number;
private var currentLevel;// = 1
private var maxGuyValue:Number;
private var guyMeter:Meter;
private var sChannel:SoundChannel;
private var chaseItem:ChaseItem;
private var defaultXML:XML;
private var gameResultString:String;
private var maxGirlValue:Number;
private var bExternalUpsell:Boolean;
private var swfLoader:Loader;
private var gameState:String;
private var finalXML:XML;
private var targetItem:TargetItem;
private var loopSound:Sound;
private var girlMeter:Meter;
private var videoBox:MovieClip;
private var girlIndicator:TextField;
private var girlValue:Number;
private var girlMeterRate:Number;
private var eChannel:SoundChannel;
private var timeLine:MovieClip;
private var bHasUpsell:Boolean;
private var guyValue:Number;
private var levelIndicator:TextField;
private var configLoader:URLLoader;
public static const cMochiClickMenu:String = "fadfc182";
public static const cXMLRootLocation:String = "http://www.funsexgames.com/ourgames";
public static const cName:String = "Miki";
public static const cTrackerID:int = 1;
public static const cMochiPlay:String = "9cba4bb4";
public static const cMochiLose:String = "4c005890";
public static const cMochiClickSplash:String = "8fb19312";
public static const cMochiWin:String = "fe75aec9";
public function Main(_arg1:MovieClip){
var _local2:URLRequest;
currentLevel = 1;
super();
defaultXML = <game id="1" active="false" upsellSWF=""/>
;
finalXML = defaultXML;
timeLine = _arg1;
bExternalUpsell = false;
bHasUpsell = false;
gameResultString = "";
videoBox = (timeLine.videoBox as MovieClip);
girlIndicator = (timeLine.girlTargetText as TextField);
guyIndicator = (timeLine.guyTargetText as TextField);
levelIndicator = (timeLine.levelText as TextField);
girlMeter = (timeLine.girlMeterBar as Meter);
guyMeter = (timeLine.guyMeterBar as Meter);
updateGameState("init");
timeLine.buttonPlayMore.visible = false;
timeLine.buttonPlayMore.addEventListener(MouseEvent.CLICK, playMoreButtonClicked);
timeLine.playButton.addEventListener(MouseEvent.CLICK, playButtonClicked);
timeLine.playButton.visible = false;
timeLine.buttonReplay.addEventListener(MouseEvent.CLICK, replayButtonClicked);
timeLine.buttonReplay.visible = false;
timeLine.videoBox.addFrameScript((timeLine.videoBox.totalFrames - 1), stopVideo);
updateGameState("mainpage");
_local2 = new URLRequest(((((((Main.cXMLRootLocation + "/") + Main.cTrackerID) + "/") + Main.cTrackerID) + ".xml?ID=") + Main.cTrackerID));
configLoader = new URLLoader();
configLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorFunction);
configLoader.addEventListener(IOErrorEvent.IO_ERROR, errorFunction);
configLoader.addEventListener(Event.COMPLETE, completeFunction);
configLoader.load(_local2);
}
private function errorFunction(_arg1:IOErrorEvent){
finalXML = defaultXML;
checkExternalUpsell();
}
private function lose(_arg1:String):void{
updateGameState("finish");
videoBox.stop();
sChannel.stop();
levelIndicator.text = _arg1;
}
private function stopVideo(){
timeLine.videoBox.gotoAndStop(timeLine.videoBox.totalFrames);
trace("video stopped");
}
private function initializeGame(){
}
private function swfError(_arg1:Event){
trace("swf error");
initializeGame();
}
private function swfLoaded(_arg1:Event){
timeLine.mcUpsellInsertion.addChild(swfLoader.content);
timeLine.mcUpsellInsertion.visible = false;
bExternalUpsell = true;
bHasUpsell = true;
initializeGame();
}
private function completeFunction(_arg1:Event){
var checkXML:XML;
var e = _arg1;
checkXML = XML(configLoader.data);
if (checkXML.games.game.(@id = 1).@active == "true"){
finalXML = checkXML.games.game.(@id = 1);
} else {
finalXML = defaultXML;
};
checkExternalUpsell();
}
public function newFrame(_arg1:Event){
if (gameState != "play"){
return;
};
if (chaseItem){
chaseItem.animate();
if (chaseItem.onTarget()){
guyIndicator.text = "guy target: yes";
guyValue = (guyValue + (currentLevel * 2));
} else {
guyIndicator.text = "guy target: no";
guyValue = (guyValue - 0.2);
};
};
targetItem.animate();
if (targetItem.onTarget()){
girlIndicator.text = "girl target: yes";
girlValue = (girlValue + 1);
} else {
girlValue = (girlValue - (0.02 * currentLevel));
girlIndicator.text = "girl target: no";
};
if (girlValue >= maxGirlValue){
newLevel();
};
if (girlValue < 0){
girlValue = 0;
};
if (guyValue < 0){
guyValue = 0;
};
girlMeter.maxValue = maxGirlValue;
girlMeter.currentValue = girlValue;
girlMeter.showValue();
guyMeter.maxValue = maxGuyValue;
guyMeter.currentValue = guyValue;
guyMeter.showValue();
if (girlValue <= 0){
MochiBot.track(timeLine, Main.cMochiLose);
gameResultString = "lose";
timeLine.removeChild(targetItem);
timeLine.removeChild(chaseItem);
lose((("You lost the rhythm and " + Main.cName) + " is left unsatisfied."));
};
if (guyValue >= maxGuyValue){
MochiBot.track(timeLine, Main.cMochiLose);
gameResultString = "lose";
timeLine.removeChild(targetItem);
timeLine.removeChild(chaseItem);
lose((("You blew it! Don't feel too bad, " + Main.cName) + " is a lot to handle. Better luck next time."));
};
}
private function checkExternalUpsell(){
var _local1:URLRequest;
if (finalXML.@upsellSWF != ""){
_local1 = new URLRequest(finalXML.@upsellSWF);
swfLoader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, swfError);
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
swfLoader.load(_local1);
} else {
initializeGame();
};
}
private function playButtonClicked(_arg1:MouseEvent){
updateGameState("play");
timeLine.levelText.text = (("Put your mouse cursor in the pink circle to start pleasing " + Main.cName) + ".");
timeLine.addEventListener("enterFrame", newFrame);
guyMeter.myColor = 0x999999;
start();
timeLine.addChild(targetItem);
}
private function start(){
var _local1:SoundTransform;
targetItem = new TargetItem();
loopSound = new electraLoop();
sChannel = loopSound.play(0, 10000);
_local1 = sChannel.soundTransform;
_local1.volume = 0.5;
sChannel.soundTransform = _local1;
videoBox.gotoAndPlay(1);
girlValue = 100;
maxGirlValue = 200;
guyValue = 0;
maxGuyValue = 1000;
currentLevel = 0;
}
private function playMoreButtonClicked(_arg1:MouseEvent){
var m = _arg1;
try {
Object(swfLoader.content).upsellPlay(finalXML, gameResultString, this);
} catch(e) {
};
updateGameState("upsell");
}
private function replayButtonClicked(_arg1:Event){
chaseItem = null;
updateGameState("mainpage");
}
public function updateGameState(_arg1:String){
trace(("new game state: " + _arg1));
gameState = _arg1;
timeLine.playButton.visible = false;
timeLine.mcUpsellInsertion.visible = false;
timeLine.buttonReplay.visible = false;
timeLine.levelText.visible = false;
timeLine.txtExcitement.visible = false;
videoBox.visible = false;
girlIndicator.visible = false;
guyIndicator.visible = false;
levelIndicator.visible = false;
girlMeter.visible = false;
guyMeter.visible = false;
timeLine.mcMainPage.visible = false;
timeLine.buttonPlayMore.visible = false;
switch (gameState){
case "init":
timeLine.mcMainPage.visible = true;
break;
case "mainpage":
timeLine.playButton.visible = true;
timeLine.mcMainPage.visible = true;
break;
case "play":
videoBox.visible = true;
girlIndicator.visible = true;
guyIndicator.visible = true;
levelIndicator.visible = true;
girlMeter.visible = true;
guyMeter.visible = true;
timeLine.txtExcitement.visible = true;
break;
case "finish":
videoBox.visible = true;
levelIndicator.visible = true;
timeLine.buttonReplay.visible = true;
if (bHasUpsell == true){
timeLine.buttonPlayMore.visible = true;
};
break;
case "upsell":
timeLine.mcUpsellInsertion.visible = true;
break;
};
}
public function newLevel():void{
var _local1:Boolean;
var _local2:*;
var _local3:Sound;
var _local4:SoundTransform;
_local1 = false;
if (chaseItem){
chaseItem.newLevel();
};
targetItem.newLevel();
currentLevel++;
_local2 = Math.floor((Math.random() * 3));
if (_local2 == 0){
_local3 = new electra1();
};
if (_local2 == 1){
_local3 = new electra2();
};
if (_local2 == 2){
_local3 = new electra3();
};
eChannel = _local3.play(0, 1);
_local4 = eChannel.soundTransform;
_local4.volume = 0.25;
eChannel.soundTransform = _local4;
if (currentLevel == 1){
levelIndicator.text = "Nice work! You just made her cum! Keep your cursor in the circle!";
_local1 = true;
};
if (currentLevel == 2){
levelIndicator.text = "Yes, she is liking this! But watch out for your own excitement level.";
chaseItem = new ChaseItem();
timeLine.addChild(chaseItem);
_local1 = true;
};
if (currentLevel == 3){
levelIndicator.text = "When you touch the black circle your excitment level raises quickly. Stay in the pink. Avoid the black!";
timeLine.addChild(chaseItem);
_local1 = true;
};
if (currentLevel == 5){
levelIndicator.text = "Good job! You are making her very happy! If you can give 15 more she will be satisfied... for now.";
videoBox.gotoAndPlay("Part2");
chaseItem.xPos = 700;
_local1 = true;
};
if (currentLevel == 10){
levelIndicator.text = "Getting closer! If you can give 10 more she will be satisfied... for now.";
videoBox.gotoAndPlay("Part3");
chaseItem.xPos = 700;
_local1 = true;
};
if (currentLevel == 15){
levelIndicator.text = "Getting closer! If you can give 5 more she will be satisfied... for now.";
videoBox.gotoAndPlay("Part4");
chaseItem.xPos = 700;
_local1 = true;
};
if (currentLevel == 20){
MochiBot.track(timeLine, Main.cMochiWin);
gameResultString = "win";
timeLine.removeChild(targetItem);
timeLine.removeChild(chaseItem);
lose("You did it!! Go for the gold!");
chaseItem.xPos = 700;
videoBox.gotoAndPlay("Part5");
_local1 = true;
};
if (_local1 == false){
if (currentLevel < 5){
levelIndicator.text = (((((("You have made " + Main.cName) + " cum ") + currentLevel) + " times.\n Give her ") + (5 - currentLevel)) + " more for a new position");
} else {
if (currentLevel < 10){
levelIndicator.text = (((((("You have made " + Main.cName) + " cum ") + currentLevel) + " times.\n Give her ") + (10 - currentLevel)) + " more for a new position");
} else {
if (currentLevel < 15){
levelIndicator.text = (((((("You have made " + Main.cName) + " cum ") + currentLevel) + " times.\n Give her ") + (15 - currentLevel)) + " more for a new position");
} else {
if (currentLevel > 15){
levelIndicator.text = (((((("You have made " + Main.cName) + " cum ") + currentLevel) + " times.\n Give her ") + (20 - currentLevel)) + " more and it will be your turn.");
};
};
};
};
};
girlValue = (girlValue / 3);
}
}
}//package
Section 12
//Meter (Meter)
package {
import flash.display.*;
public class Meter extends MovieClip {
public var myColor:Number;
public var bar:MovieClip;
public var maxValue:Number;
public var currentValue:Number;
public var maxWidth:Number;// = 200
public var myBar:MovieClip;
public function Meter(){
maxWidth = 200;
super();
myBar = (this.bar as MovieClip);
maxValue = 100;
myColor = 16751103;
}
public function showValue(){
var _local1:Number;
myBar.graphics.clear();
myBar.graphics.beginFill(myColor, 1);
if (currentValue > maxValue){
currentValue = maxValue;
};
_local1 = ((currentValue / maxValue) * maxWidth);
myBar.graphics.drawRect(0, 0, _local1, 10);
}
}
}//package
Section 13
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 14
//Preloader (Preloader)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Preloader extends MovieClip {
public var txtLoading:TextField;
}
}//package
Section 15
//preloaderTantra (preloaderTantra)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class preloaderTantra extends MovieClip {
public var guyTargetText:TextField;
public var girlTargetText:TextField;
public var logoAnimation:MovieClip;
public var guyMeterBar:Meter;
public var mcUpsellInsertion:MovieClip;
public var videoBox:MovieClip;
public var m:Main;
public var txtExcitement:TextField;
private var bAppDone:Boolean;// = false
public var buttonPlayMore:SimpleButton;
public var girlMeterBar:Meter;
public var timelineMC:MovieClip;
public var playButton:SimpleButton;
public var mcMainPage:MovieClip;
public var preloaderMC:Preloader;
private var bLogoComplete:Boolean;// = false
private var waitTimer:Timer;
public var levelText:TextField;
private var loadingMC:MovieClip;
public var buttonLogo2:LogoSymbol;
public var buttonReplay:SimpleButton;
public function preloaderTantra(){
var onRootLoaderInit:Function;
var onRootLoaderProgress:Function;
var onRootLoaderComplete:Function;
var logoClick:Function;
var logoClick2:Function;
var timerDone:Function;
var logoComplete:Function;
var checkComplete:Function;
bAppDone = false;
bLogoComplete = false;
super();
onRootLoaderInit = function (_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
if (bAppDone == false){
timelineMC.preloaderMC.txtLoading.text = (("Loading - " + Math.floor((_local4 * 100))) + "%");
};
};
onRootLoaderProgress = function (_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
if (bAppDone == false){
timelineMC.preloaderMC.txtLoading.text = (("Loading - " + Math.floor((_local4 * 100))) + "%");
};
};
onRootLoaderComplete = function (_arg1:Event):void{
bAppDone = true;
checkComplete();
};
logoClick = function (_arg1:Event){
var _local2:URLRequest;
MochiBot.track(timelineMC, Main.cMochiClickSplash);
_local2 = new URLRequest("http://www.fishadultgames.com/free-sex-games/little-miki-hentai-fuck.php");
navigateToURL(_local2, "_blank");
};
logoClick2 = function (_arg1:Event){
var _local2:URLRequest;
MochiBot.track(timelineMC, Main.cMochiClickMenu);
_local2 = new URLRequest("http://www.fishadultgames.com/free-sex-games/little-miki-hentai-fuck.php");
navigateToURL(_local2, "_blank");
};
timerDone = function (_arg1:Event){
waitTimer.stop();
bLogoComplete = true;
checkComplete();
};
logoComplete = function (){
timelineMC.logoAnimation.gotoAndStop(243);
waitTimer.start();
};
checkComplete = function (){
if ((((bAppDone == true)) && ((bLogoComplete == true)))){
timelineMC.gotoAndStop("Start");
timelineMC.buttonLogo2.visible = true;
};
};
addFrameScript(0, frame1, 9, frame10);
timelineMC = this;
MochiBot.track(this, Main.cMochiPlay);
timelineMC.preloaderMC.txtLoading.text = "Loading - 0%";
timelineMC.logoAnimation.addEventListener(MouseEvent.MOUSE_UP, logoClick);
timelineMC.buttonLogo2.addEventListener(MouseEvent.MOUSE_UP, logoClick2);
timelineMC.buttonLogo2.buttonMode = true;
timelineMC.buttonLogo2.visible = false;
timelineMC.logoAnimation.buttonMode = true;
waitTimer = new Timer(4000, 1);
waitTimer.addEventListener(TimerEvent.TIMER, timerDone);
timelineMC.logoAnimation.addFrameScript(242, logoComplete);
this.loaderInfo.addEventListener(Event.INIT, onRootLoaderInit);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onRootLoaderProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onRootLoaderComplete);
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
bAppDone = true;
checkComplete();
};
}
function frame10(){
m = new Main(this);
stop();
}
function frame1(){
stop();
}
}
}//package
Section 16
//TargetItem (TargetItem)
package {
import flash.display.*;
public class TargetItem extends MovieClip {
public var friction:Number;
public var size:Number;
public var yPos:Number;
public var ySpeed:Number;
public var acc:Number;
public var maxDistance:Number;
public var xSpeed:Number;
public var xPos:Number;
public var targetY:Number;
public var targetX:Number;
public function TargetItem(){
acc = 1;
xSpeed = 0;
ySpeed = 0;
friction = 0.6;
maxDistance = 50;
size = 50;
setSize();
getNewTarget();
xPos = -10;
yPos = 200;
}
public function onTarget():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (-(xPos) + parent.mouseX);
_local2 = (-(yPos) + parent.mouseY);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 < size){
return (true);
};
return (false);
}
private function setSize(){
this.width = (size * 2);
this.height = (size * 2);
}
private function getNewTarget(){
targetX = (Math.random() * 600);
targetY = ((Math.random() * 300) + 90);
}
private function getTargetXDistance():Number{
return ((-(xPos) + targetX));
}
public function newLevel(){
setSize();
acc = (acc + 0.1);
friction = (friction + 0.01);
}
private function getTargetYDistance():Number{
return ((-(yPos) + targetY));
}
public function animate(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = getTargetXDistance();
_local2 = getTargetYDistance();
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 < 5){
getNewTarget();
};
_local4 = Math.atan2(_local2, _local1);
_local5 = Math.cos(_local4);
_local6 = Math.sin(_local4);
if (_local3 > maxDistance){
_local7 = 1;
} else {
_local7 = (1 - ((maxDistance - _local3) / maxDistance));
};
xSpeed = (xSpeed + ((_local7 * _local5) * acc));
ySpeed = (ySpeed + ((_local7 * _local6) * acc));
xPos = (xPos + xSpeed);
yPos = (yPos + ySpeed);
xSpeed = (xSpeed * friction);
ySpeed = (ySpeed * friction);
this.x = xPos;
this.y = yPos;
}
}
}//package