STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/76665527?noj=FRM76665527-22DC" width="1" height="1"></div>

Tractor Spheres.swf

This is the info page for
Flash #29010

(Click the ID number above for more basic data on this flash file.)


Text
PLAY MORE GAMES

not

DOPPLER

PLAY MORE GAMES

not

DOPPLER

<p align="center"></p>

PLAY!

PLAY!

not

DOPPLER

Yes

Yes

GAME COMPLETED!

FINAL SCORE:

It's impressive that you beat the game, but you
know that's not the best score you could have
gotten. Try again and secure yourself a place
among the highest scorers of all time?

START

START

MENU

MENU

RETRY

RETRY

PLAY

PLAY

PLAY MORE GAMES

PLAY MORE GAMES

No

No

NEXT

NEXT

Mx7f Games

Mx7f Games

CONTINUE

CONTINUE

INSTRUCTIONS

INSTRUCTIONS

Created by: Mx7f

Hit 'm' to toggle the music on/off

Hit 'S' to toggle the sounds on/off

QUIT

QUIT

ActionScript [AS3]

Section 1
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.display.*; import flash.system.*; import flash.net.*; public class AdLoader { private static var cpmstarLoader:Loader; public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{ var _local3:String; Security.allowDomain("server.cpmstar.com"); _local3 = "http://server.cpmstar.com/adviewas3.swf"; cpmstarLoader = new Loader(); cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2))); return (cpmstarLoader); } } }//package CPMStar
Section 2
//AdButton_2 (TractorSpheres_fla.AdButton_2) package TractorSpheres_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.text.*; import flash.system.*; import flash.net.*; import flash.external.*; import flash.utils.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class AdButton_2 extends MovieClip { public function AdButton_2(){ addFrameScript(0, frame1); } function frame1(){ addEventListener(MouseEvent.CLICK, clickHandler); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); gotoAndStop(1); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function clickHandler(_arg1:Event):void{ parent.removeChild(parent["adBox"]); removeEventListener(MouseEvent.CLICK, clickHandler); MovieClip(parent).playGame(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); } } }//package TractorSpheres_fla
Section 3
//introFlash_22 (TractorSpheres_fla.introFlash_22) package TractorSpheres_fla { import flash.display.*; public dynamic class introFlash_22 extends MovieClip { public function introFlash_22(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package TractorSpheres_fla
Section 4
//notDop300x250button_3 (TractorSpheres_fla.notDop300x250button_3) package TractorSpheres_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.text.*; import flash.system.*; import flash.net.*; import flash.external.*; import flash.utils.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class notDop300x250button_3 extends MovieClip { public function notDop300x250button_3(){ addFrameScript(0, frame1); } function frame1(){ addEventListener(MouseEvent.CLICK, clickHandler); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); gotoAndStop(1); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function clickHandler(_arg1:Event):void{ var url:String; var strUserAgent:String; var urlRequest:URLRequest; var event = _arg1; parent.removeChild(parent["notDop300But"]); removeEventListener(MouseEvent.CLICK, clickHandler); url = "http://www.notdoppler.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); } } }//package TractorSpheres_fla
Section 5
//Ball (Ball) package { import flash.display.*; public class Ball extends MovieClip { public function Ball(_arg1:Number=0, _arg2:Number=0){ this.x = _arg1; this.y = _arg2; } } }//package
Section 6
//BlackOut (BlackOut) package { import flash.display.*; public dynamic class BlackOut extends MovieClip { } }//package
Section 7
//BounceSound (BounceSound) package { import flash.media.*; public dynamic class BounceSound extends Sound { } }//package
Section 8
//ClickSound (ClickSound) package { import flash.media.*; public dynamic class ClickSound extends Sound { } }//package
Section 9
//ContinueButton (ContinueButton) package { import flash.display.*; import flash.events.*; public class ContinueButton extends MovieClip { public function ContinueButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).Continue(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 10
//Dashboard (Dashboard) package { import flash.display.*; public dynamic class Dashboard extends MovieClip { } }//package
Section 11
//ExpandSound (ExpandSound) package { import flash.media.*; public dynamic class ExpandSound extends Sound { } }//package
Section 12
//FakeResetButton (FakeResetButton) package { import flash.display.*; import flash.events.*; public class FakeResetButton extends MovieClip { public function FakeResetButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 13
//FakeTSphere (FakeTSphere) package { import flash.display.*; public dynamic class FakeTSphere extends MovieClip { } }//package
Section 14
//FinalButton (FinalButton) package { import flash.display.*; import flash.events.*; public class FinalButton extends MovieClip { public function FinalButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).Final(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 15
//GameMusic (GameMusic) package { import flash.media.*; public dynamic class GameMusic extends Sound { } }//package
Section 16
//Goal (Goal) package { import flash.display.*; import flash.events.*; public class Goal extends MovieClip { public function Goal(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ this.x = _arg1; this.y = _arg2; this.width = _arg3; this.height = _arg3; this.addEventListener(Event.ENTER_FRAME, EveryFrame); } public function EveryFrame(_arg1:Event){ this.rotation = (this.rotation + 25); } public function RemoveGoal(){ this.removeEventListener(Event.ENTER_FRAME, EveryFrame); MovieClip(parent).removeChild(this); } } }//package
Section 17
//GoalSound (GoalSound) package { import flash.media.*; public dynamic class GoalSound extends Sound { } }//package
Section 18
//GrayBox (GrayBox) package { import flash.display.*; public dynamic class GrayBox extends MovieClip { } }//package
Section 19
//InstructionButton (InstructionButton) package { import flash.display.*; import flash.events.*; public class InstructionButton extends MovieClip { public function InstructionButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).InstructionStart(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 20
//Instructions1 (Instructions1) package { import flash.display.*; public dynamic class Instructions1 extends MovieClip { } }//package
Section 21
//Instructions2 (Instructions2) package { import flash.display.*; public dynamic class Instructions2 extends MovieClip { } }//package
Section 22
//Instructions3 (Instructions3) package { import flash.display.*; public dynamic class Instructions3 extends MovieClip { } }//package
Section 23
//Instructions4 (Instructions4) package { import flash.display.*; public dynamic class Instructions4 extends MovieClip { } }//package
Section 24
//LevelData (LevelData) package { public class LevelData { var goalDiameter:int; var goalX:int; var goalY:int; var levelNumber:int; var TSMax:Number; var timeLimit:int; var startX:int; var startY:int; var levelName:String; public function LevelData(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){ levelNumber = _arg1; startX = _arg2; startY = _arg3; goalX = _arg6; goalY = _arg7; goalDiameter = _arg8; TSMax = _arg4; timeLimit = _arg5; levelName = _arg9; } } }//package
Section 25
//MenuBackdrop (MenuBackdrop) package { import flash.display.*; public dynamic class MenuBackdrop extends MovieClip { } }//package
Section 26
//MenuButton (MenuButton) package { import flash.display.*; import flash.events.*; public class MenuButton extends MovieClip { public function MenuButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).QuitGame(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 27
//MenuMusic (MenuMusic) package { import flash.media.*; public dynamic class MenuMusic extends Sound { } }//package
Section 28
//Mx7fButton (Mx7fButton) package { import flash.display.*; import flash.events.*; import flash.net.*; import flash.external.*; public class Mx7fButton extends MovieClip { public function Mx7fButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ var url:String; var strUserAgent:String; var urlRequest:URLRequest; var event = _arg1; MovieClip(parent).playSound(MovieClip(parent).clickSound); url = "http://www.mx7fgames.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 29
//NextButton (NextButton) package { import flash.display.*; import flash.events.*; public class NextButton extends MovieClip { public function NextButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).NextInstruction(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 30
//NoButton (NoButton) package { import flash.display.*; import flash.events.*; public class NoButton extends MovieClip { public function NoButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).NoQuit(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 31
//NotDopButton (NotDopButton) package { import flash.display.*; import flash.events.*; import flash.net.*; import flash.external.*; public class NotDopButton extends MovieClip { public function NotDopButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ var url:String; var strUserAgent:String; var urlRequest:URLRequest; var event = _arg1; MovieClip(parent).playSound(MovieClip(parent).clickSound); url = "http://www.notdoppler.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 32
//NotDoppler (NotDoppler) package { import flash.display.*; import flash.events.*; import flash.net.*; import flash.external.*; public class NotDoppler extends MovieClip { public function NotDoppler(){ addFrameScript(185, frame186); this.addEventListener(MouseEvent.CLICK, OnClick); } function frame186(){ stop(); } public function Remove(){ this.removeEventListener(MouseEvent.CLICK, OnClick); MovieClip(parent).removeChild(this); } public function OnClick(_arg1:MouseEvent){ var url:String; var strUserAgent:String; var urlRequest:URLRequest; var event = _arg1; url = "http://www.notdoppler.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; } } }//package
Section 33
//PlayButton (PlayButton) package { import flash.display.*; import flash.events.*; public class PlayButton extends MovieClip { public function PlayButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).PlayGame(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 34
//PlayMoreGames (PlayMoreGames) package { import flash.display.*; import flash.events.*; import flash.net.*; import flash.external.*; public class PlayMoreGames extends MovieClip { public function PlayMoreGames(){ this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function Remove(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } public function OnClick(_arg1:MouseEvent){ var url:String; var strUserAgent:String; var urlRequest:URLRequest; var event = _arg1; url = "http://www.notdoppler.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); if (!MovieClip(parent).gameStart){ MovieClip(parent).playSound(MovieClip(parent).rolloverSound); }; } } }//package
Section 35
//ResetButton (ResetButton) package { import flash.display.*; import flash.events.*; public class ResetButton extends MovieClip { public function ResetButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).ClearSpheres(); MovieClip(parent).SetSphereCounter(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 36
//RetryButton (RetryButton) package { import flash.display.*; import flash.events.*; public class RetryButton extends MovieClip { public function RetryButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).ResetLevel(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 37
//ReturnButton (ReturnButton) package { import flash.display.*; import flash.events.*; public class ReturnButton extends MovieClip { public function ReturnButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).ReturnButtonPress(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 38
//RolloverSound (RolloverSound) package { import flash.media.*; public dynamic class RolloverSound extends Sound { } }//package
Section 39
//StartLevelButton (StartLevelButton) package { import flash.display.*; import flash.events.*; public class StartLevelButton extends MovieClip { public function StartLevelButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).StartLevel(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package
Section 40
//Symbol2 (Symbol2) package { import flash.display.*; public dynamic class Symbol2 extends MovieClip { } }//package
Section 41
//TractorSpheres (TractorSpheres) package { import flash.display.*; import flash.events.*; import CPMStar.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.external.*; import flash.utils.*; public dynamic class TractorSpheres extends MovieClip { public var notDop300But:MovieClip; var menuMusic:MenuMusic; var summaryLine10Left:TextField; public var unplaced:Boolean; var blackingIn:Boolean;// = false var newTS:TSphere; var summaryLine5Right:TextField; public var ad:DisplayObject; var instructionNum:int;// = 1 var xtraTries:int;// = 0 var rightTotalTextFormat:TextFormat; var currentMusic:Object; public var percent:TextField; var finalButton:FinalButton; var xCat:Number; var summaryLine7Left:TextField; var nextSec:int;// = 1 var clickSound:ClickSound; var grayBox:GrayBox; public var moreGames:PlayMoreGames; var yVelocity:Number;// = 0 var theFakeTS:FakeTSphere; var precision:int; var vScreen:VictoryScreen; var radius:int; var xDistance:Number; var isBouncing:Boolean;// = false var yCat:Number; var level10:LevelData; var level11:LevelData; var level12:LevelData; var level13:LevelData; var level14:LevelData; var level15:LevelData; var level16:LevelData; var level18:LevelData; var level19:LevelData; var playMore:PlayMoreGames; var level17:LevelData; var theStartLevelButton:StartLevelButton; var rolloverSound:RolloverSound; var noTouchBonus:int; var level20:LevelData; var level21:LevelData; var level22:LevelData; public var CPMStarSubPoolID:int; var level24:LevelData; var level25:LevelData; public var CPMStarPoolID:int; var level23:LevelData; var summaryLine6Right:TextField; var theMenuButton:MenuButton; var velocity:Number; var summaryLine6Left:TextField; var theInstructionButton:InstructionButton; var xAcceleration:Number; var gameTextFormat:TextFormat; var theMx7fButton:Mx7fButton; var level1:LevelData; var level2:LevelData; var level3:LevelData; var level4:LevelData; var level5:LevelData; var level6:LevelData; var level7:LevelData; var level8:LevelData; public var adButton:MovieClip; var level9:LevelData; var leftYellowTextFormat:TextFormat; var summaryLine10Right:TextField; var levelArray:Array; public var loadBar:MovieClip; var gameMusic:GameMusic; var blackScreen:BlackOut; var rightYellowTextFormat:TextFormat; var summaryLine7Right:TextField; var timeBonus:int; var summaryLine5Left:TextField; var muted:Boolean;// = false var isRunning:Boolean;// = false var notFrames:int;// = 0 var xVelocity:Number;// = 0 var notDop:NotDoppler; var boundingCircleRadius:Number; var quitScore:TextField; var theFakeReset:FakeResetButton; var currentLevel:LevelData; var theLevel:Walls; var timeText:TextField; var timePassed:int; var theContinueButton:ContinueButton; var placingSpheres:Boolean;// = false var expandClock:int;// = 0 var ballColl:Number; var timeRemaining:Number; var soundChannel:SoundChannel; var soundMuted:Boolean;// = false var goalSound:GoalSound; var quitting:Boolean;// = false var currentTS:TSphere; var scoreDisplay:TextField; var TSCount:TextField; var summaryLine4Left:TextField; var titleImage:TractorSpheresTitle; var priorScore:int; var summaryLine8Right:TextField; var currentX:Number; var currentY:Number; var scoreSummaryTitle:TextField; var ballDir:Number; var theBall:Ball; var victory:Boolean;// = false var finalTSNumber:Number; var levelTotal:int; var groundRotation:Number; var levelTextFormat:TextFormat; var instruct1:Instructions1; var instruct2:Instructions2; var mouseInSpheres:Boolean; var summaryLine2Right:TextField; var spotYSphere:Number; var levelInfo:TextField; var theNotDopButton:NotDopButton; var instruct3:Instructions3; var summaryLine3Left:TextField; var whitingIn:Boolean;// = false var leftOrangeTextFormat:TextFormat; var instruct4:Instructions4; var lastTime:int; var accMagnitude:Number; var rightOrangeTextFormat:TextFormat; var score:int;// = 0 var expandSound:ExpandSound; var summaryLine9Right:TextField; var theta:Number; var centerX:Number; public var adBox:MovieClip; var centerY:Number; var TSNumber:int; var subtotalTwo:int; var subtotalOne:int; var rightTextFormat:TextFormat; var theRetryButton:RetryButton; var finalScore:TextField; var thePlayButton:PlayButton; var xtraTryPenalty:int; var leftTotalTextFormat:TextFormat; var menuBack:MenuBackdrop; var summaryLine2Left:TextField; var summaryLine3Right:TextField; var spotXSphere:Number; var expanding:Boolean;// = false var tracSpheres:Array; var musicChannel:SoundChannel; var currentTSNumber:Number;// = 0 var theGoal:Goal; var bounceAngle:Number; var victoryMusic:VictoryMusic; public var fake:MovieClip; var theNextButton:NextButton; var totalDistance:Number; var theReset:ResetButton; var quitQuestion:TextField; var summaryLine9Left:TextField; var bounceSound:BounceSound; var unusedSphereMultiplier:Number;// = 1 var instructGoal:Goal; var sumY:Number; var sphereDiameter:Number; var sumX:Number; var collisions:int; var summaryLine4Right:TextField; var yDistance:Number; var theYesButton:YesButton; var gameStart:Boolean;// = true var theReturnButton:ReturnButton; var spotY:Number; var tries:int;// = 0 var spotX:Number; var yAcceleration:Number; var theNoButton:NoButton; var summaryLine8Left:TextField; var levelNumber:uint;// = 1 public static const LEVEL_TEXT_X:int = 100; public static const ACC_COEFF_MULTIPLIER:Number = 0.00075; public static const LEVEL_TEXT_Y:int = 15; public static const MENU_SPACE:int = 65; public static const TITLE_X:int = 25; public static const TITLE_Y:int = 43; public static const TITLE_GOAL_Y = (TITLE_Y + 35); public static const TITLE_GOAL_X = (TITLE_X + 240); public static const SUMMARY_LINE_3_Y:Number = (SUMMARY_LINE_2_Y + LINE_SEPARATION); public static const NEXT_Y:int = 500; public static const SUMMARY_LINE_7_Y:Number = (SUMMARY_LINE_6_Y + LINE_SEPARATION); public static const MAX_DIAMETER:int = 100; public static const NEXT_X:int = Math.round(((700 - NEXT_WIDTH) / 2)); public static const PLAY_BUT_X:int = ((700 - PLAY_BUT_WIDTH) / 2); public static const PLAY_BUT_Y:int = 235; public static const WALL_SPACE:int = 3; public static const YES_WIDTH:int = 130; public static const SUMMARY_LINE_10_Y:Number = (SUMMARY_LINE_9_Y + LINE_SEPARATION); public static const GAME_BUTTON_HEIGHT:int = 34; public static const RESET_X:int = 670; public static const RESET_Y:int = 15; public static const SCORE_SUMMARY_X:int = 75; public static const LEVEL_COMPLETION_BONUS:int = 40; public static const FIRST_BUTTON_X:int = 453; public static const CONTINUE_BUT_HEIGHT:int = 45; public static const PRECISION:int = 90; public static const SUMMARY_LINE_2_Y:Number = (SUMMARY_LINE_1_Y + (LINE_SEPARATION * 1.5)); public static const CONTINUE_BUT_Y:int = 485; public static const SUMMARY_LINE_6_Y:Number = (SUMMARY_LINE_5_Y + LINE_SEPARATION); public static const CONTINUE_BUT_X:int = 225; public static const LINE_SEPARATION:int = 40; public static const TITLE_GOAL_DIAMETER = 60; public static const SPHERE_TEXT_X:int = 13; public static const NEXT_WIDTH:int = 235; public static const TIME_TEXT_X:int = 193; public static const PENALTY_PER_TRY:int = 5; public static const GAME_BUTTON_WIDTH:int = 121; public static const MAX_VELOCITY:int = 9; public static const INSTRUCT_BUT_WIDTH:int = PLAY_BUT_WIDTH; public static const BUTTON_Y:int = 532; public static const RADIUS:Number = 5.5; public static const POINTS_PER_SEC:int = 1; public static const FRAME_RATE:int = 30; public static const BUTTON_SEPARATION_FACTOR:int = 20; public static const SUMMARY_LINE_5_Y:Number = (SUMMARY_LINE_4_Y + LINE_SEPARATION); public static const YES_HEIGHT:int = 40; public static const SUMMARY_LINE_1_Y:Number = 50; public static const SUMMARY_LINE_9_Y:Number = (SUMMARY_LINE_8_Y + (LINE_SEPARATION * 1.25)); public static const SCORE_SUMMARY_WIDTH:int = 550; public static const RESET_DIAMETER = 25; public static const CONTINUE_BUT_WIDTH:int = 250; public static const INSTRUCT_BUT_X:int = PLAY_BUT_X; public static const INSTRUCT_BUT_Y:int = (PLAY_BUT_Y + MENU_SPACE); public static const PLAY_BUT_HEIGHT:int = 45; public static const GAME_TEXT_Y:int = 535; public static const NO_X:int = Math.round(((700 / 2) + BUTTON_SEPARATION_FACTOR)); public static const SCORE_X:int = 300; public static const LEVEL_TEXT_WIDTH:int = 500; public static const SUMMARY_LINE_4_Y:Number = (SUMMARY_LINE_3_Y + LINE_SEPARATION); public static const SUMMARY_LINE_8_Y:Number = (SUMMARY_LINE_7_Y + LINE_SEPARATION); public static const YES_Y:int = 300; public static const YES_X:int = Math.round((((700 / 2) - BUTTON_SEPARATION_FACTOR) - YES_WIDTH)); public static const INSTRUCT_BUT_HEIGHT:int = 45; public static const NEXT_HEIGHT:int = 40; public static const SECOND_BUTTON_X:int = ((FIRST_BUTTON_X + GAME_BUTTON_WIDTH) + 2); public static const PLAY_BUT_WIDTH:int = Math.round((PLAY_BUT_HEIGHT * 6)); public function TractorSpheres(){ level1 = new LevelData(1, 150, 280, 1, 10, 520, 280, 100, "Straight Shot"); level2 = new LevelData(2, 150, 140, 3, 20, 560, 430, 100, "Center Square"); level3 = new LevelData(3, 150, 150, 3, 30, 610, 150, 100, "'X'-it, Stage Right"); level4 = new LevelData(4, 200, 150, 3, 30, 560, 200, 100, "The 'U'-niverse"); level5 = new LevelData(5, 335, 100, 4, 40, 353, 450, 100, "Angry Bird?"); level6 = new LevelData(6, 24, 241, 2, 30, 482, 487, 50, "Teed Off"); level7 = new LevelData(7, 200, 150, 4, 50, 610, 470, 100, "Starstruck"); level8 = new LevelData(8, 50, 150, 4, 40, 640, 380, 100, "The Straight and Narrow"); level9 = new LevelData(9, 37, 303, 7, 40, 585, 277, 100, "Some Narrow Passes"); level10 = new LevelData(10, 20, 135, 7, 50, 620, 420, 60, "Polka Dot Hell"); level11 = new LevelData(11, 200, 150, 2, 10, 560, 200, 100, "The 'U'-niverse, Revisited"); level12 = new LevelData(12, 658, 83, 7, 50, 462, 336, 100, "Simple Spiral"); level13 = new LevelData(13, 150, 140, 3, 20, 560, 430, 100, "Invisible Center Square"); level14 = new LevelData(14, 653, 209, 7, 40, 144, 105, 100, "Mess of Smilies"); level15 = new LevelData(15, 570, 443, 7, 50, 166, 412, 85, "Bubbly"); level16 = new LevelData(16, 78, 118, 7, 40, 532, 382, 65, "Squares Everywhere"); level17 = new LevelData(17, 78, 489, 9, 50, 625, 100, 90, "Downright Slanted"); level18 = new LevelData(18, 76, 369, 9, 60, 489, 396, 55, "Namesake"); level19 = new LevelData(19, 605, 479, 7, 30, 477, 451, 40, "'Q'"); level20 = new LevelData(20, 638, 172, 7, 50, 85, 400, 60, "A Long, Winding Path"); level21 = new LevelData(21, 128, 194, 7, 50, 342, 470, 60, "Thunder Strike"); level22 = new LevelData(22, 662, 70, 10, 50, 104, 461, 80, "The Level of Modern Art"); level23 = new LevelData(23, 39, 479, 12, 60, 612, 134, 100, "Some More Narrow Passes"); level24 = new LevelData(24, 668, 75, 15, 99, 340, 291, 80, "Not-So-Simple Spiral"); level25 = new LevelData(25, 125, 220, 7, 40, 534, 84, 60, "'25'"); levelArray = new Array(level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, level11, level12, level13, level14, level15, level16, level17, level18, level19, level20, level21, level22, level23, level24, level25); levelNumber = 1; expanding = false; placingSpheres = false; isRunning = false; tracSpheres = new Array(); currentTSNumber = 0; nextSec = 1; score = 0; unusedSphereMultiplier = 1; tries = 0; xtraTries = 0; xVelocity = 0; yVelocity = 0; blackingIn = false; whitingIn = false; isBouncing = false; instructionNum = 1; victory = false; gameStart = true; quitting = false; muted = false; soundMuted = false; expandClock = 0; notFrames = 0; super(); addFrameScript(0, frame1, 1, frame2, 3, frame4); } public function DetectOthers(){ var _local1:int; TSNumber = (tracSpheres.length - 1); while (TSNumber >= 0) { boundingCircleRadius = ((tracSpheres[TSNumber].width + WALL_SPACE) / 2); precision = PRECISION; _local1 = 1; while (_local1 < precision) { spotXSphere = (tracSpheres[TSNumber].x + (boundingCircleRadius * Math.sin(((_local1 * 360) / precision)))); spotYSphere = (tracSpheres[TSNumber].y - (boundingCircleRadius * Math.cos(((_local1 * 360) / precision)))); if (newTS.hitTestPoint(spotXSphere, spotYSphere, true)){ expanding = false; soundChannel.stop(); expandClock = 0; }; _local1++; }; TSNumber--; }; } public function loader(_arg1:Event){ var _local2:Number; fake.rotation = (fake.rotation + 20); _local2 = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 100); this.percent.text = (Math.round(_local2).toString() + "%"); this.loadBar.width = (Math.round(_local2) * 3); if (_local2 > 99){ adButton.x = 250; }; } public function CheckGoal(){ if (theBall.hitTestObject(theGoal)){ if ((((theBall.x - theGoal.x) * (theBall.x - theGoal.x)) + ((theBall.y - theGoal.y) * (theBall.y - theGoal.y))) <= ((theGoal.width * 0.35) * (theGoal.width * 0.35))){ playSound(goalSound); EndLevel(); BlackIn(); }; }; } public function NextLevel(){ if (levelNumber < 25){ currentLevel = levelArray[levelNumber]; levelNumber++; tries = 0; theLevel.gotoAndStop(levelNumber); SetLevelInfo(); SetUpLevel(); SetScoreDisplay(); Retry2Start(); CreateReset(); } else { Victory(); }; } public function SetTimer(){ timeText.text = ("Time: " + timeRemaining); } public function SetLevelInfo(){ levelInfo.text = ((("Level: " + currentLevel.levelNumber) + " -- ") + currentLevel.levelName); } public function NotDopWaiting(_arg1:Event){ notFrames++; if (notFrames >= 185){ this.removeEventListener(Event.ENTER_FRAME, NotDopWaiting); notDop.Remove(); StartTractorSpheres(); }; } public function StartLevel(){ isRunning = true; placingSpheres = false; tries++; Start2Retry(); theReset.RemoveButton(); theReset = null; } public function VScreen(){ var _local1:*; victoryMusic = new VictoryMusic(); currentMusic = victoryMusic; playMusic(currentMusic); _local1 = new TextFormat("Copperplate", 85); _local1.color = 0xFFFFFF; _local1.align = TextFormatAlign.CENTER; vScreen = new VictoryScreen(); vScreen.x = 15; vScreen.y = 15; vScreen.width = 670; vScreen.height = 550; addChild(vScreen); finalScore = new TextField(); finalScore.x = 100; finalScore.width = (700 - (finalScore.x * 2)); finalScore.y = 270; finalScore.selectable = false; finalScore.defaultTextFormat = _local1; finalScore.text = ("" + score); addChild(finalScore); finalButton = new FinalButton(CONTINUE_BUT_X, (CONTINUE_BUT_Y + 15), CONTINUE_BUT_WIDTH, CONTINUE_BUT_HEIGHT); addChild(finalButton); } public function Timing(){ nextSec++; if (nextSec >= FRAME_RATE){ nextSec = 1; TimeDecrease(); }; } function frame1(){ stop(); CPMStarPoolID = 1377; CPMStarSubPoolID = 301; unplaced = true; if (unplaced){ ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID); adBox.addChild(ad); unplaced = false; moreGames = new PlayMoreGames(); addChild(moreGames); moreGames.x = 550; moreGames.y = 530; }; addEventListener(Event.ENTER_FRAME, loader); } public function SetSphereCounter(){ TSCount.text = ((("Spheres: " + currentTSNumber) + "/") + currentLevel.TSMax); } function frame2(){ gotoAndPlay(1); } function frame4(){ stop(); NotDopplerIntro(); } public function DetectGoal(){ var _local1:int; boundingCircleRadius = ((theGoal.width * 0.7) / 2); precision = PRECISION; _local1 = 1; while (_local1 < precision) { spotXSphere = (theGoal.x + (boundingCircleRadius * Math.sin(((_local1 * 360) / precision)))); spotYSphere = (theGoal.y - (boundingCircleRadius * Math.cos(((_local1 * 360) / precision)))); if (newTS.hitTestPoint(spotXSphere, spotYSphere, true)){ expanding = false; soundChannel.stop(); expandClock = 0; }; _local1++; }; } public function Start2Retry(){ theStartLevelButton.RemoveButton(); theStartLevelButton = null; theRetryButton = new RetryButton(FIRST_BUTTON_X, BUTTON_Y, GAME_BUTTON_WIDTH, GAME_BUTTON_HEIGHT); addChild(theRetryButton); } public function NewNext(){ theNextButton = new NextButton(NEXT_X, NEXT_Y, NEXT_WIDTH, NEXT_HEIGHT); addChild(theNextButton); } public function InstructionStart(){ instruct1 = new Instructions1(); addChild(instruct1); instructionNum = 1; instructGoal = new Goal(580, 200, 80); addChild(instructGoal); NewNext(); theFakeTS = new FakeTSphere(); theFakeTS.x = 580; theFakeTS.y = 420; addChild(theFakeTS); } public function Expansion(){ sphereDiameter = (sphereDiameter + 1); newTS.width = sphereDiameter; newTS.height = sphereDiameter; if (sphereDiameter > MAX_DIAMETER){ expanding = false; soundChannel.stop(); expandClock = 0; }; } public function SetDashboard(){ theStartLevelButton = new StartLevelButton(FIRST_BUTTON_X, BUTTON_Y, GAME_BUTTON_WIDTH, GAME_BUTTON_HEIGHT); theMenuButton = new MenuButton(SECOND_BUTTON_X, BUTTON_Y, GAME_BUTTON_WIDTH, GAME_BUTTON_HEIGHT); addChild(theStartLevelButton); addChild(theMenuButton); CreateReset(); gameTextFormat = new TextFormat("Copperplate", 24); gameTextFormat.color = 0xFFFFFF; leftTotalTextFormat = new TextFormat("Copperplate", 24); leftTotalTextFormat.color = 0xFF0000; leftTotalTextFormat.bold = true; leftOrangeTextFormat = new TextFormat("Copperplate", 24); leftOrangeTextFormat.color = 0xFFAA00; leftOrangeTextFormat.bold = true; leftYellowTextFormat = new TextFormat("Copperplate", 24); leftYellowTextFormat.color = 16777045; leftYellowTextFormat.bold = true; rightTextFormat = new TextFormat("Copperplate", 24); rightTextFormat.color = 0xFFFFFF; rightTextFormat.align = TextFormatAlign.RIGHT; rightTotalTextFormat = new TextFormat("Copperplate", 24); rightTotalTextFormat.color = 0xFF0000; rightTotalTextFormat.bold = true; rightTotalTextFormat.align = TextFormatAlign.RIGHT; rightOrangeTextFormat = new TextFormat("Copperplate", 24); rightOrangeTextFormat.color = 0xFFAA00; rightOrangeTextFormat.bold = true; rightOrangeTextFormat.align = TextFormatAlign.RIGHT; rightYellowTextFormat = new TextFormat("Copperplate", 24); rightYellowTextFormat.color = 16777045; rightYellowTextFormat.bold = true; rightYellowTextFormat.align = TextFormatAlign.RIGHT; TSCount = new TextField(); TSCount.defaultTextFormat = gameTextFormat; TSCount.text = "Spheres:"; TSCount.selectable = false; TSCount.x = SPHERE_TEXT_X; TSCount.y = GAME_TEXT_Y; TSCount.width = 200; addChild(TSCount); timeText = new TextField(); timeText.defaultTextFormat = gameTextFormat; timeText.text = "Time: "; timeText.selectable = false; timeText.x = TIME_TEXT_X; timeText.y = GAME_TEXT_Y; timeText.width = 200; addChild(timeText); scoreDisplay = new TextField(); scoreDisplay.defaultTextFormat = gameTextFormat; scoreDisplay.text = "Score:"; scoreDisplay.selectable = false; scoreDisplay.x = SCORE_X; scoreDisplay.y = GAME_TEXT_Y; scoreDisplay.width = 150; addChild(scoreDisplay); } public function Darkening(){ if ((((((blackScreen.alpha < 0.8)) && (!(victory)))) || ((((blackScreen.alpha < 1)) && (victory))))){ blackScreen.alpha = (blackScreen.alpha + 0.04); } else { blackingIn = false; if (victory){ victory = false; RemoveEverything(); VScreen(); } else { ScoreSummary(); }; }; } public function ScoreSummary(){ CalculateLevelScore(); scoreSummaryTitle = new TextField(); scoreSummaryTitle.x = SCORE_SUMMARY_X; scoreSummaryTitle.width = SCORE_SUMMARY_WIDTH; scoreSummaryTitle.y = SUMMARY_LINE_1_Y; scoreSummaryTitle.selectable = false; scoreSummaryTitle.defaultTextFormat = levelTextFormat; summaryLine2Left = new TextField(); summaryLine2Left.x = SCORE_SUMMARY_X; summaryLine2Left.width = SCORE_SUMMARY_WIDTH; summaryLine2Left.y = SUMMARY_LINE_2_Y; summaryLine2Left.selectable = false; summaryLine2Left.defaultTextFormat = gameTextFormat; summaryLine3Left = new TextField(); summaryLine3Left.x = SCORE_SUMMARY_X; summaryLine3Left.width = SCORE_SUMMARY_WIDTH; summaryLine3Left.y = SUMMARY_LINE_3_Y; summaryLine3Left.selectable = false; summaryLine3Left.defaultTextFormat = gameTextFormat; summaryLine4Left = new TextField(); summaryLine4Left.x = SCORE_SUMMARY_X; summaryLine4Left.width = SCORE_SUMMARY_WIDTH; summaryLine4Left.y = SUMMARY_LINE_4_Y; summaryLine4Left.selectable = false; summaryLine4Left.defaultTextFormat = leftYellowTextFormat; summaryLine5Left = new TextField(); summaryLine5Left.x = SCORE_SUMMARY_X; summaryLine5Left.width = SCORE_SUMMARY_WIDTH; summaryLine5Left.y = SUMMARY_LINE_5_Y; summaryLine5Left.selectable = false; summaryLine5Left.defaultTextFormat = gameTextFormat; summaryLine6Left = new TextField(); summaryLine6Left.x = SCORE_SUMMARY_X; summaryLine6Left.width = SCORE_SUMMARY_WIDTH; summaryLine6Left.y = SUMMARY_LINE_6_Y; summaryLine6Left.selectable = false; summaryLine6Left.defaultTextFormat = leftYellowTextFormat; summaryLine7Left = new TextField(); summaryLine7Left.x = SCORE_SUMMARY_X; summaryLine7Left.width = SCORE_SUMMARY_WIDTH; summaryLine7Left.y = SUMMARY_LINE_7_Y; summaryLine7Left.selectable = false; summaryLine7Left.defaultTextFormat = gameTextFormat; summaryLine8Left = new TextField(); summaryLine8Left.x = SCORE_SUMMARY_X; summaryLine8Left.width = SCORE_SUMMARY_WIDTH; summaryLine8Left.y = SUMMARY_LINE_8_Y; summaryLine8Left.selectable = false; summaryLine8Left.defaultTextFormat = leftOrangeTextFormat; summaryLine9Left = new TextField(); summaryLine9Left.x = SCORE_SUMMARY_X; summaryLine9Left.width = SCORE_SUMMARY_WIDTH; summaryLine9Left.y = SUMMARY_LINE_9_Y; summaryLine9Left.selectable = false; summaryLine9Left.defaultTextFormat = gameTextFormat; summaryLine10Left = new TextField(); summaryLine10Left.x = SCORE_SUMMARY_X; summaryLine10Left.width = SCORE_SUMMARY_WIDTH; summaryLine10Left.y = SUMMARY_LINE_10_Y; summaryLine10Left.selectable = false; summaryLine10Left.defaultTextFormat = leftTotalTextFormat; summaryLine2Right = new TextField(); summaryLine2Right.x = SCORE_SUMMARY_X; summaryLine2Right.width = SCORE_SUMMARY_WIDTH; summaryLine2Right.y = SUMMARY_LINE_2_Y; summaryLine2Right.selectable = false; summaryLine2Right.defaultTextFormat = rightTextFormat; summaryLine3Right = new TextField(); summaryLine3Right.x = SCORE_SUMMARY_X; summaryLine3Right.width = SCORE_SUMMARY_WIDTH; summaryLine3Right.y = SUMMARY_LINE_3_Y; summaryLine3Right.selectable = false; summaryLine3Right.defaultTextFormat = rightTextFormat; summaryLine4Right = new TextField(); summaryLine4Right.x = SCORE_SUMMARY_X; summaryLine4Right.width = SCORE_SUMMARY_WIDTH; summaryLine4Right.y = SUMMARY_LINE_4_Y; summaryLine4Right.selectable = false; summaryLine4Right.defaultTextFormat = rightYellowTextFormat; summaryLine5Right = new TextField(); summaryLine5Right.x = SCORE_SUMMARY_X; summaryLine5Right.width = SCORE_SUMMARY_WIDTH; summaryLine5Right.y = SUMMARY_LINE_5_Y; summaryLine5Right.selectable = false; summaryLine5Right.defaultTextFormat = rightTextFormat; summaryLine6Right = new TextField(); summaryLine6Right.x = SCORE_SUMMARY_X; summaryLine6Right.width = SCORE_SUMMARY_WIDTH; summaryLine6Right.y = SUMMARY_LINE_6_Y; summaryLine6Right.selectable = false; summaryLine6Right.defaultTextFormat = rightYellowTextFormat; summaryLine7Right = new TextField(); summaryLine7Right.x = SCORE_SUMMARY_X; summaryLine7Right.width = SCORE_SUMMARY_WIDTH; summaryLine7Right.y = SUMMARY_LINE_7_Y; summaryLine7Right.selectable = false; summaryLine7Right.defaultTextFormat = rightTextFormat; summaryLine8Right = new TextField(); summaryLine8Right.x = SCORE_SUMMARY_X; summaryLine8Right.width = SCORE_SUMMARY_WIDTH; summaryLine8Right.y = SUMMARY_LINE_8_Y; summaryLine8Right.selectable = false; summaryLine8Right.defaultTextFormat = rightOrangeTextFormat; summaryLine9Right = new TextField(); summaryLine9Right.x = SCORE_SUMMARY_X; summaryLine9Right.width = SCORE_SUMMARY_WIDTH; summaryLine9Right.y = SUMMARY_LINE_9_Y; summaryLine9Right.selectable = false; summaryLine9Right.defaultTextFormat = rightTextFormat; summaryLine10Right = new TextField(); summaryLine10Right.x = SCORE_SUMMARY_X; summaryLine10Right.width = SCORE_SUMMARY_WIDTH; summaryLine10Right.y = SUMMARY_LINE_10_Y; summaryLine10Right.selectable = false; summaryLine10Right.defaultTextFormat = rightTotalTextFormat; scoreSummaryTitle.text = (("" + currentLevel.levelName) + " Score Summary"); summaryLine2Left.text = "Level Completion Bonus"; summaryLine3Left.text = "Time Bonus"; summaryLine4Left.text = "Subtotal #1"; summaryLine5Left.text = "Unused Sphere Multiplier"; summaryLine6Left.text = "Subtotal #2"; summaryLine7Left.text = "Extra Try Penalty"; summaryLine8Left.text = "Level Total"; summaryLine9Left.text = "Previous Score"; summaryLine10Left.text = "Current Score"; summaryLine2Right.text = ("" + LEVEL_COMPLETION_BONUS); summaryLine3Right.text = ("+ " + timeBonus); summaryLine4Right.text = ("" + subtotalOne); summaryLine5Right.text = ("x" + unusedSphereMultiplier); summaryLine6Right.text = ("" + subtotalTwo); summaryLine7Right.text = ("-" + xtraTryPenalty); summaryLine8Right.text = ("" + levelTotal); summaryLine9Right.text = ("+" + priorScore); summaryLine10Right.text = ("" + score); addChild(scoreSummaryTitle); addChild(summaryLine2Left); addChild(summaryLine3Left); addChild(summaryLine4Left); addChild(summaryLine5Left); addChild(summaryLine6Left); addChild(summaryLine7Left); addChild(summaryLine8Left); addChild(summaryLine9Left); addChild(summaryLine10Left); addChild(summaryLine2Right); addChild(summaryLine3Right); addChild(summaryLine4Right); addChild(summaryLine5Right); addChild(summaryLine6Right); addChild(summaryLine7Right); addChild(summaryLine8Right); addChild(summaryLine9Right); addChild(summaryLine10Right); theContinueButton = new ContinueButton(CONTINUE_BUT_X, CONTINUE_BUT_Y, CONTINUE_BUT_WIDTH, CONTINUE_BUT_HEIGHT); addChild(theContinueButton); } public function ReturnButtonPress(){ removeChild(instruct4); theReturnButton.RemoveButton(); } public function Movement(){ if (isRunning){ currentX = theBall.x; currentY = theBall.y; isBouncing = false; MoveBall(); DetectWalls(); if (isRunning){ TSNumber = (tracSpheres.length - 1); while (TSNumber >= 0) { if (((LineOfSight(tracSpheres[TSNumber].x, theBall.x, tracSpheres[TSNumber].y, theBall.y, 10)) && (!(isBouncing)))){ Influence(); }; TSNumber--; }; theBall.x = currentX; theBall.y = currentY; }; }; } public function Continue(){ removeChild(scoreSummaryTitle); removeChild(summaryLine2Left); removeChild(summaryLine3Left); removeChild(summaryLine4Left); removeChild(summaryLine5Left); removeChild(summaryLine6Left); removeChild(summaryLine7Left); removeChild(summaryLine8Left); removeChild(summaryLine9Left); removeChild(summaryLine10Left); removeChild(summaryLine2Right); removeChild(summaryLine3Right); removeChild(summaryLine4Right); removeChild(summaryLine5Right); removeChild(summaryLine6Right); removeChild(summaryLine7Right); removeChild(summaryLine8Right); removeChild(summaryLine9Right); removeChild(summaryLine10Right); theContinueButton.RemoveButton(); removeChild(blackScreen); NextLevel(); } public function DetermineBounce(){ var _local1:Number; var _local2:Number; isBouncing = true; ballDir = (Math.atan((yVelocity / (xVelocity * -1))) / (Math.PI / 180)); if ((xVelocity * -1) < 0){ ballDir = (ballDir + 180); }; if (((((xVelocity * -1) >= 0)) && ((yVelocity < 0)))){ ballDir = (ballDir + 360); }; spotX = (sumX / collisions); spotY = (sumY / collisions); xCat = (spotX - currentX); yCat = (spotY - currentY); ballColl = (Math.atan((yCat / xCat)) / (Math.PI / 180)); if (xCat < 0){ ballColl = (ballColl + 180); }; if ((((xCat >= 0)) && ((yCat < 0)))){ ballColl = (ballColl + 360); }; groundRotation = (ballColl - 90); if (groundRotation < 0){ groundRotation = (groundRotation + 180); }; bounceAngle = ((180 - ballDir) - (2 * groundRotation)); if (bounceAngle < 0){ bounceAngle = (bounceAngle + 360); }; velocity = Math.sqrt(((yVelocity * yVelocity) + (xVelocity * xVelocity))); xVelocity = (velocity * Math.cos(((bounceAngle * Math.PI) / 180))); yVelocity = ((velocity * Math.sin(((bounceAngle * Math.PI) / 180))) * -1); _local1 = Math.sqrt(((xCat * xCat) + (yCat * yCat))); _local2 = ((RADIUS - _local1) + 0.2); currentX = (currentX + (_local2 * Math.cos(((ballDir * Math.PI) / 180)))); currentY = (currentY - (_local2 * Math.sin(((ballDir * Math.PI) / 180)))); } public function MouseInside(){ mouseInSpheres = false; TSNumber = (tracSpheres.length - 1); while (TSNumber >= 0) { if (tracSpheres[TSNumber].hitTestPoint(stage.mouseX, stage.mouseY, true)){ mouseInSpheres = true; }; TSNumber--; }; } public function StartTractorSpheres(){ if (gameStart){ stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDown); rolloverSound = new RolloverSound(); clickSound = new ClickSound(); expandSound = new ExpandSound(); bounceSound = new BounceSound(); goalSound = new GoalSound(); gameStart = false; }; menuMusic = new MenuMusic(); currentMusic = menuMusic; playMusic(currentMusic); thePlayButton = new PlayButton(PLAY_BUT_X, PLAY_BUT_Y, PLAY_BUT_WIDTH, PLAY_BUT_HEIGHT); theInstructionButton = new InstructionButton(INSTRUCT_BUT_X, INSTRUCT_BUT_Y, INSTRUCT_BUT_WIDTH, INSTRUCT_BUT_HEIGHT); theMx7fButton = new Mx7fButton(INSTRUCT_BUT_X, (INSTRUCT_BUT_Y + MENU_SPACE), INSTRUCT_BUT_WIDTH, INSTRUCT_BUT_HEIGHT); theNotDopButton = new NotDopButton(INSTRUCT_BUT_X, (INSTRUCT_BUT_Y + (MENU_SPACE * 2)), INSTRUCT_BUT_WIDTH, INSTRUCT_BUT_HEIGHT); titleImage = new TractorSpheresTitle(); titleImage.x = TITLE_X; titleImage.y = TITLE_Y; menuBack = new MenuBackdrop(); theGoal = new Goal(TITLE_GOAL_X, TITLE_GOAL_Y, TITLE_GOAL_DIAMETER); addChild(menuBack); addChild(thePlayButton); addChild(titleImage); addChild(theGoal); addChild(theInstructionButton); addChild(theMx7fButton); addChild(theNotDopButton); } public function OnUp(_arg1:MouseEvent){ if (expanding){ expanding = false; if (soundChannel != null){ soundChannel.stop(); }; expandClock = 0; }; } public function ExpandingNoise(){ expandClock++; if (expandClock > 15){ playSound(expandSound); expandClock = 0; }; } public function EraseGameMenu(){ thePlayButton.RemoveButton(); theInstructionButton.RemoveButton(); theMx7fButton.RemoveButton(); theNotDopButton.RemoveButton(); removeChild(titleImage); removeChild(menuBack); theGoal.RemoveGoal(); } public function TimeOut(){ timeRemaining = 0; currentTSNumber = 0; SetSphereCounter(); SetTimer(); ResetLevel(); } public function SiteLock(){ var urlStart:int; var urlEnd:int; var domain:String; var LastDot:int; var domEnd:int; var url:String; var strUserAgent:String; var urlRequest:URLRequest; urlStart = (stage.loaderInfo.url.indexOf("://") + 3); urlEnd = stage.loaderInfo.url.indexOf("/", urlStart); domain = stage.loaderInfo.url.substring(urlStart, urlEnd); LastDot = (domain.lastIndexOf(".") - 1); domEnd = (domain.lastIndexOf(".", LastDot) + 1); domain = domain.substring(domEnd, domain.length); trace(domain); if (domain != "mx7fgames.com"){ root.x = 50000; root.y = 40000; url = "http://www.mx7fgames.com"; if (ExternalInterface.available){ strUserAgent = "what?"; try { strUserAgent = ExternalInterface.call("function() { return navigator.userAgent; }").toLowerCase(); } catch(error:Error) { }; if (strUserAgent.indexOf("firefox") != -1){ ExternalInterface.call("window.open", url, "_blank"); } else { urlRequest = new URLRequest(url); navigateToURL(urlRequest, "_blank"); }; }; }; } public function playGame(){ moreGames.Remove(); removeChild(adButton); removeEventListener(Event.ENTER_FRAME, loader); gotoAndStop(4); } public function Final(){ finalButton.RemoveButton(); removeChild(vScreen); removeChild(finalScore); removeChild(blackScreen); StartTractorSpheres(); } public function CalculateLevelScore(){ priorScore = score; timeBonus = (timeRemaining * POINTS_PER_SEC); subtotalOne = (LEVEL_COMPLETION_BONUS + timeBonus); unusedSphereMultiplier = (1 + ((currentLevel.TSMax - finalTSNumber) * 0.5)); subtotalTwo = Math.floor((subtotalOne * unusedSphereMultiplier)); xtraTries = (tries - 1); xtraTryPenalty = (PENALTY_PER_TRY * xtraTries); if (xtraTryPenalty > subtotalTwo){ xtraTryPenalty = subtotalTwo; }; levelTotal = (subtotalTwo - xtraTryPenalty); score = (score + levelTotal); } public function BlackIn(){ blackScreen = new BlackOut(); addChild(blackScreen); blackScreen.alpha = 0; blackingIn = true; } public function PlayGame(){ gameMusic = new GameMusic(); currentMusic = gameMusic; playMusic(currentMusic); levelNumber = 1; EraseGameMenu(); theLevel = new Walls(); ResetScore(); addChild(theLevel); playMore = new PlayMoreGames(); playMore.x = 0; addChild(playMore); SetDashboard(); SetLevelDisplay(); lastTime = getTimer(); stage.addEventListener(MouseEvent.MOUSE_DOWN, OnClick); stage.addEventListener(MouseEvent.MOUSE_UP, OnUp); this.addEventListener(Event.ENTER_FRAME, EveryFrame); currentLevel = level1; SetUpLevel(); } public function MoveBall(){ var _local1:Number; var _local2:Number; timePassed = (getTimer() - lastTime); lastTime = (lastTime + timePassed); _local1 = (((xVelocity * timePassed) * FRAME_RATE) / 1000); _local2 = (((yVelocity * timePassed) * FRAME_RATE) / 1000); velocity = Math.sqrt(((yVelocity * yVelocity) + (xVelocity * xVelocity))); if (velocity > MAX_VELOCITY){ _local1 = ((_local1 / velocity) * MAX_VELOCITY); _local2 = ((_local2 / velocity) * MAX_VELOCITY); }; currentX = (currentX + _local1); currentY = (currentY + _local2); } public function CreateReset(){ theReset = new ResetButton(RESET_X, RESET_Y, RESET_DIAMETER, RESET_DIAMETER); addChild(theReset); } public function YesQuit(){ RemoveQuitScreen(); EndGame(); } public function RemoveEnterFrame(){ this.removeEventListener(Event.ENTER_FRAME, EveryFrame); } public function Victory(){ victory = true; BlackIn(); } public function SetLevelDisplay(){ levelInfo = new TextField(); levelTextFormat = new TextFormat("Copperplate", 24); levelTextFormat.color = 0xFFFFFF; levelTextFormat.align = TextFormatAlign.CENTER; levelInfo.defaultTextFormat = levelTextFormat; levelInfo.text = "Level:"; levelInfo.selectable = false; levelInfo.x = LEVEL_TEXT_X; levelInfo.y = LEVEL_TEXT_Y; levelInfo.width = LEVEL_TEXT_WIDTH; addChild(levelInfo); } public function playSound(_arg1:Object){ if (!soundMuted){ soundChannel = _arg1.play(); }; } public function RemoveEverything(){ removeChild(theLevel); if (theReset != null){ theReset.RemoveButton(); theReset = null; }; if (theStartLevelButton != null){ theStartLevelButton.RemoveButton(); theStartLevelButton = null; }; if (theRetryButton != null){ theRetryButton.RemoveButton(); theRetryButton = null; }; theMenuButton.RemoveButton(); removeChild(TSCount); removeChild(timeText); removeChild(scoreDisplay); removeChild(levelInfo); stage.removeEventListener(MouseEvent.MOUSE_DOWN, OnClick); stage.removeEventListener(MouseEvent.MOUSE_UP, OnUp); } public function TimeDecrease(){ if (timeRemaining > 1){ timeRemaining--; SetTimer(); } else { TimeOut(); }; } public function ResetScore(){ score = 0; } public function OnClick(_arg1:MouseEvent){ if (((placingSpheres) && (!(quitting)))){ if (currentTSNumber < currentLevel.TSMax){ MouseInside(); if (((((!(theLevel.hitTestPoint(stage.mouseX, stage.mouseY, true))) && (!(mouseInSpheres)))) && (!(theGoal.hitTestPoint(stage.mouseX, stage.mouseY, true))))){ sphereDiameter = 10; currentTSNumber++; SetSphereCounter(); newTS = new TSphere(stage.mouseX, stage.mouseY, sphereDiameter); addChild(newTS); tracSpheres.push(newTS); expanding = true; playSound(expandSound); }; }; }; } public function Influence(){ accMagnitude = (Math.pow(tracSpheres[TSNumber].width, 1.5) * ACC_COEFF_MULTIPLIER); xDistance = (-(currentX) + tracSpheres[TSNumber].x); yDistance = (currentY - tracSpheres[TSNumber].y); totalDistance = Math.sqrt(((xDistance * xDistance) + (yDistance * yDistance))); theta = Math.atan2(xDistance, yDistance); xAcceleration = (accMagnitude * Math.sin(theta)); yAcceleration = (-(accMagnitude) * Math.cos(theta)); xVelocity = (xVelocity + xAcceleration); yVelocity = (yVelocity + yAcceleration); } public function DetectWalls(){ var _local1:int; collisions = 0; sumX = 0; sumY = 0; _local1 = 1; while (_local1 < PRECISION) { spotX = (currentX + (RADIUS * Math.sin(((_local1 * 360) / PRECISION)))); spotY = (currentY - (RADIUS * Math.cos(((_local1 * 360) / PRECISION)))); if (theLevel.hitTestPoint(spotX, spotY, true)){ collisions++; sumX = (sumX + spotX); sumY = (sumY + spotY); }; _local1++; }; if (collisions > 0){ DetermineBounce(); playSound(bounceSound); }; } public function NotDopplerIntro(){ notDop = new NotDoppler(); addChild(notDop); this.addEventListener(Event.ENTER_FRAME, NotDopWaiting); } public function QuitGame(){ levelNumber; if (isRunning){ ResetLevel(); }; if (placingSpheres){ ClearSpheres(); SetSphereCounter(); }; quitting = true; blackScreen = new BlackOut(); quitQuestion = new TextField(); quitQuestion.x = 100; quitQuestion.width = (700 - (quitQuestion.x * 2)); quitQuestion.y = 240; quitQuestion.selectable = false; quitQuestion.defaultTextFormat = levelTextFormat; quitQuestion.text = "Are you sure you want to quit?"; quitScore = new TextField(); quitScore.x = 100; quitScore.width = (700 - (quitScore.x * 2)); quitScore.y = 200; quitScore.selectable = false; quitScore.defaultTextFormat = levelTextFormat; quitScore.text = ("FINAL SCORE: " + score); addChild(blackScreen); addChild(quitQuestion); addChild(quitScore); theYesButton = new YesButton(YES_X, YES_Y, YES_WIDTH, YES_HEIGHT); theNoButton = new NoButton(NO_X, YES_Y, YES_WIDTH, YES_HEIGHT); addChild(theYesButton); addChild(theNoButton); } public function SetUpLevel(){ placingSpheres = true; theBall = new Ball(currentLevel.startX, currentLevel.startY); addChild(theBall); theGoal = new Goal(currentLevel.goalX, currentLevel.goalY, currentLevel.goalDiameter); addChild(theGoal); xVelocity = 0; yVelocity = 0; nextSec = 1; timeRemaining = currentLevel.timeLimit; SetTimer(); SetSphereCounter(); SetLevelInfo(); SetScoreDisplay(); } public function DetectWall(){ var _local1:int; boundingCircleRadius = ((newTS.width + WALL_SPACE) / 2); precision = PRECISION; _local1 = 1; while (_local1 < precision) { spotXSphere = (newTS.x + (boundingCircleRadius * Math.sin(((_local1 * 360) / precision)))); spotYSphere = (newTS.y - (boundingCircleRadius * Math.cos(((_local1 * 360) / precision)))); if (theLevel.hitTestPoint(spotXSphere, spotYSphere, true)){ expanding = false; soundChannel.stop(); expandClock = 0; }; _local1++; }; } public function RemoveBallAndGoal(){ removeChild(theBall); theGoal.RemoveGoal(); } public function EndGame(){ RemoveEverything(); RemoveEnterFrame(); RemoveBallAndGoal(); ResetScore(); currentLevel = level1; StartTractorSpheres(); } public function EveryFrame(_arg1:Event){ if (expanding){ ExpandingNoise(); DetectOthers(); DetectWall(); DetectGoal(); Expansion(); }; if (isRunning){ Movement(); Timing(); CheckGoal(); }; if (blackingIn){ Darkening(); }; } public function playMusic(_arg1:Object){ if (musicChannel != null){ musicChannel.stop(); }; if (!muted){ musicChannel = _arg1.play(0, 999999); }; } public function RemoveQuitScreen(){ quitting = false; theYesButton.RemoveButton(); theNoButton.RemoveButton(); removeChild(quitQuestion); removeChild(quitScore); removeChild(blackScreen); } public function ClearSpheres(){ while (tracSpheres.length != 0) { currentTS = tracSpheres[0]; tracSpheres.shift(); currentTS.RemoveTS(); }; currentTSNumber = 0; } public function LineOfSight(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Boolean; var _local14:int; _local6 = Math.sqrt((((_arg1 - _arg2) * (_arg1 - _arg2)) + ((_arg3 - _arg4) * (_arg3 - _arg4)))); _local7 = (_local6 / _arg5); _local8 = (-(Math.atan2((_arg1 - _arg2), (_arg3 - _arg4))) / (Math.PI / 180)); _local9 = (_arg5 * Math.sin((_local8 * (Math.PI / 180)))); _local10 = (_arg5 * Math.cos((_local8 * (Math.PI / 180)))); _local11 = _arg1; _local12 = _arg3; _local13 = true; _local14 = 1; while (_local14 <= _local7) { _local12 = (_local12 - _local10); _local11 = (_local11 + _local9); if (theLevel.hitTestPoint(_local11, _local12, _local13)){ return (false); }; _local14++; }; return (true); } public function NextInstruction(){ if (instructionNum == 1){ instructionNum++; instruct2 = new Instructions2(); addChild(instruct2); removeChild(instruct1); removeChild(theFakeTS); instructGoal.RemoveGoal(); ReplaceNext(); } else { if (instructionNum == 2){ instructionNum++; instruct3 = new Instructions3(); addChild(instruct3); removeChild(instruct2); ReplaceNext(); theFakeReset = new FakeResetButton(570, 335, RESET_DIAMETER, RESET_DIAMETER); addChild(theFakeReset); } else { if (instructionNum == 3){ instructionNum++; instruct4 = new Instructions4(); addChild(instruct4); removeChild(instruct3); theFakeReset.RemoveButton(); theNextButton.RemoveButton(); theReturnButton = new ReturnButton(NEXT_X, NEXT_Y, NEXT_WIDTH, NEXT_HEIGHT); addChild(theReturnButton); instructionNum = 1; }; }; }; } public function SetScoreDisplay(){ scoreDisplay.text = ("Score: " + score); } public function ResetLevel(){ theBall.x = currentLevel.startX; theBall.y = currentLevel.startY; isRunning = false; ClearSpheres(); placingSpheres = true; Retry2Start(); xVelocity = 0; yVelocity = 0; timeRemaining = currentLevel.timeLimit; SetTimer(); SetSphereCounter(); CreateReset(); } public function EndLevel(){ isRunning = false; finalTSNumber = currentTSNumber; ClearSpheres(); removeChild(theBall); theGoal.RemoveGoal(); xVelocity = 0; yVelocity = 0; } public function KeyDown(_arg1:KeyboardEvent){ if (_arg1.keyCode == 77){ if (muted){ muted = false; playMusic(currentMusic); } else { musicChannel.stop(); muted = true; }; }; if (_arg1.keyCode == 83){ if (soundMuted){ soundMuted = false; } else { soundMuted = true; }; }; } public function ReplaceNext(){ theNextButton.RemoveButton(); NewNext(); } public function NoQuit(){ RemoveQuitScreen(); } public function Retry2Start(){ theRetryButton.RemoveButton(); theRetryButton = null; theStartLevelButton = new StartLevelButton(FIRST_BUTTON_X, BUTTON_Y, GAME_BUTTON_WIDTH, GAME_BUTTON_HEIGHT); addChild(theStartLevelButton); } } }//package
Section 42
//TractorSpheresTitle (TractorSpheresTitle) package { import flash.display.*; public dynamic class TractorSpheresTitle extends MovieClip { } }//package
Section 43
//TSphere (TSphere) package { import flash.display.*; public class TSphere extends MovieClip { public function TSphere(_arg1=0, _arg2=0, _arg3=0){ this.x = _arg1; this.y = _arg2; this.width = _arg3; this.height = _arg3; } public function RemoveTS(){ parent.removeChild(this); } } }//package
Section 44
//Walls (Walls) package { import flash.display.*; public class Walls extends MovieClip { public function Walls(){ addFrameScript(0, frame1); this.x = 0; this.y = 0; } function frame1(){ stop(); } } }//package
Section 45
//VictoryMusic (VictoryMusic) package { import flash.media.*; public dynamic class VictoryMusic extends Sound { } }//package
Section 46
//VictoryScreen (VictoryScreen) package { import flash.display.*; public dynamic class VictoryScreen extends MovieClip { } }//package
Section 47
//YesButton (YesButton) package { import flash.display.*; import flash.events.*; public class YesButton extends MovieClip { public function YesButton(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.x = _arg1; this.y = _arg2; this.height = _arg4; this.width = _arg3; this.addEventListener(MouseEvent.CLICK, OnClick); this.gotoAndStop(1); this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); } public function OnMouseOut(_arg1:MouseEvent){ this.gotoAndStop(1); } public function OnClick(_arg1:MouseEvent){ MovieClip(parent).playSound(MovieClip(parent).clickSound); MovieClip(parent).YesQuit(); } public function OnMouseOver(_arg1:MouseEvent){ this.gotoAndStop(2); MovieClip(parent).playSound(MovieClip(parent).rolloverSound); } public function RemoveButton(){ this.removeEventListener(MouseEvent.CLICK, OnClick); this.removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); MovieClip(parent).removeChild(this); } } }//package

Library Items

Symbol 1 GraphicUsed by:11 66 120 136 140  Timeline
Symbol 2 FontUsed by:3 8 39 41 68 69 70 83 84 87 89 91 92 98 100 121 123 125 126 128 129 131 132 137 138 149 150 167 168 171 173
Symbol 3 TextUses:2Used by:11
Symbol 4 FontUsed by:5 6 9 10 12 20 21
Symbol 5 TextUses:4Used by:11 116
Symbol 6 TextUses:4Used by:11 116
Symbol 7 GraphicUsed by:11 35 66
Symbol 8 TextUses:2Used by:11
Symbol 9 TextUses:4Used by:11
Symbol 10 TextUses:4Used by:11
Symbol 11 MovieClip {PlayMoreGames}Uses:1 3 5 6 7 8 9 10Used by:Timeline
Symbol 12 EditableTextUses:4Used by:Timeline
Symbol 13 GraphicUsed by:18
Symbol 14 FontUsed by:15 17
Symbol 15 TextUses:14Used by:18
Symbol 16 GraphicUsed by:18
Symbol 17 TextUses:14Used by:18
Symbol 18 MovieClip {TractorSpheres_fla.AdButton_2}Uses:13 15 16 17Used by:Timeline
Symbol 19 GraphicUsed by:Timeline
Symbol 20 TextUses:4Used by:Timeline
Symbol 21 TextUses:4Used by:Timeline
Symbol 22 GraphicUsed by:24 106
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {TractorSpheres_fla.notDop300x250button_3}Uses:22 23Used by:Timeline
Symbol 25 GraphicUsed by:Timeline
Symbol 26 BitmapUsed by:27
Symbol 27 GraphicUses:26Used by:28
Symbol 28 MovieClipUses:27Used by:29  Timeline
Symbol 29 MovieClip {TractorSpheresTitle}Uses:28Used by:Timeline
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:30Used by:32 146
Symbol 32 MovieClipUses:31Used by:Timeline
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:Timeline
Symbol 35 MovieClipUses:7Used by:Timeline
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:Timeline
Symbol 38 GraphicUsed by:42 85 93 127 174
Symbol 39 TextUses:2Used by:42
Symbol 40 GraphicUsed by:42 85 93 127
Symbol 41 TextUses:2Used by:42
Symbol 42 MovieClip {YesButton}Uses:38 39 40 41Used by:Timeline
Symbol 43 GraphicUsed by:66
Symbol 44 GraphicUsed by:66
Symbol 45 GraphicUsed by:66
Symbol 46 GraphicUsed by:66
Symbol 47 GraphicUsed by:66
Symbol 48 GraphicUsed by:66
Symbol 49 GraphicUsed by:66
Symbol 50 GraphicUsed by:66
Symbol 51 GraphicUsed by:66
Symbol 52 GraphicUsed by:66
Symbol 53 GraphicUsed by:66
Symbol 54 GraphicUsed by:66
Symbol 55 GraphicUsed by:66
Symbol 56 GraphicUsed by:66
Symbol 57 GraphicUsed by:66
Symbol 58 GraphicUsed by:66
Symbol 59 GraphicUsed by:66
Symbol 60 GraphicUsed by:66
Symbol 61 GraphicUsed by:66
Symbol 62 GraphicUsed by:66
Symbol 63 GraphicUsed by:66
Symbol 64 GraphicUsed by:66
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {Walls}Uses:43 44 1 45 46 47 48 49 50 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 65Used by:Timeline
Symbol 67 GraphicUsed by:71
Symbol 68 TextUses:2Used by:71
Symbol 69 TextUses:2Used by:71
Symbol 70 TextUses:2Used by:71
Symbol 71 MovieClip {VictoryScreen}Uses:67 68 69 70Used by:Timeline
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClip {TSphere}Uses:72Used by:Timeline
Symbol 74 Sound {MenuMusic}Used by:82
Symbol 75 Sound {ExpandSound}Used by:82
Symbol 76 Sound {RolloverSound}Used by:82
Symbol 77 Sound {GoalSound}Used by:82
Symbol 78 Sound {BounceSound}Used by:82
Symbol 79 Sound {ClickSound}Used by:82
Symbol 80 Sound {VictoryMusic}Used by:82
Symbol 81 Sound {GameMusic}Used by:82
Symbol 82 MovieClip {Symbol2}Uses:74 75 76 77 78 79 80 81Used by:Timeline
Symbol 83 TextUses:2Used by:85
Symbol 84 TextUses:2Used by:85
Symbol 85 MovieClip {StartLevelButton}Uses:38 83 40 84Used by:Timeline
Symbol 86 GraphicUsed by:90 130 139 145
Symbol 87 TextUses:2Used by:90 145
Symbol 88 GraphicUsed by:90 130 139 145
Symbol 89 TextUses:2Used by:90 145
Symbol 90 MovieClip {ReturnButton}Uses:86 87 88 89Used by:Timeline
Symbol 91 TextUses:2Used by:93
Symbol 92 TextUses:2Used by:93
Symbol 93 MovieClip {RetryButton}Uses:38 91 40 92Used by:Timeline
Symbol 94 GraphicUsed by:96 142
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClip {ResetButton}Uses:94 95Used by:Timeline
Symbol 97 GraphicUsed by:101 124 133 151
Symbol 98 TextUses:2Used by:101
Symbol 99 GraphicUsed by:101
Symbol 100 TextUses:2Used by:101
Symbol 101 MovieClip {PlayButton}Uses:97 98 99 100Used by:Timeline
Symbol 102 ShapeTweeningUsed by:120
Symbol 103 ShapeTweeningUsed by:105 106
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClip {TractorSpheres_fla.introFlash_22}Uses:103 104Used by:106
Symbol 106 ButtonUses:22 105 103Used by:120
Symbol 107 GraphicUsed by:120
Symbol 108 GraphicUsed by:120
Symbol 109 ShapeTweeningUsed by:120
Symbol 110 GraphicUsed by:120
Symbol 111 ShapeTweeningUsed by:120
Symbol 112 GraphicUsed by:120
Symbol 113 ShapeTweeningUsed by:120
Symbol 114 ShapeTweeningUsed by:120
Symbol 115 GraphicUsed by:120
Symbol 116 MovieClipUses:5 6Used by:120
Symbol 117 GraphicUsed by:120
Symbol 118 GraphicUsed by:120
Symbol 119 ShapeTweeningUsed by:120
Symbol 120 MovieClip {NotDoppler}Uses:102 106 107 108 109 110 111 112 113 1 114 115 116 117 118 119 SS1Used by:Timeline
Symbol 121 TextUses:2Used by:124
Symbol 122 GraphicUsed by:124 133 151
Symbol 123 TextUses:2Used by:124
Symbol 124 MovieClip {NotDopButton}Uses:97 121 122 123Used by:Timeline
Symbol 125 TextUses:2Used by:127
Symbol 126 TextUses:2Used by:127
Symbol 127 MovieClip {NoButton}Uses:38 125 40 126Used by:Timeline
Symbol 128 TextUses:2Used by:130
Symbol 129 TextUses:2Used by:130
Symbol 130 MovieClip {NextButton}Uses:86 128 88 129Used by:Timeline
Symbol 131 TextUses:2Used by:133
Symbol 132 TextUses:2Used by:133
Symbol 133 MovieClip {Mx7fButton}Uses:97 131 122 132Used by:Timeline
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClip {Ball}Uses:134Used by:Timeline
Symbol 136 MovieClip {BlackOut}Uses:1Used by:Timeline
Symbol 137 TextUses:2Used by:139
Symbol 138 TextUses:2Used by:139
Symbol 139 MovieClip {ContinueButton}Uses:86 137 88 138Used by:Timeline
Symbol 140 MovieClip {Dashboard}Uses:1Used by:Timeline
Symbol 141 GraphicUsed by:142
Symbol 142 MovieClip {FakeResetButton}Uses:94 141Used by:Timeline
Symbol 143 GraphicUsed by:144
Symbol 144 MovieClip {FakeTSphere}Uses:143Used by:Timeline
Symbol 145 MovieClip {FinalButton}Uses:86 87 88 89Used by:Timeline
Symbol 146 MovieClip {Goal}Uses:31Used by:Timeline
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClip {GrayBox}Uses:147Used by:Timeline
Symbol 149 TextUses:2Used by:151
Symbol 150 TextUses:2Used by:151
Symbol 151 MovieClip {InstructionButton}Uses:97 149 122 150Used by:Timeline
Symbol 152 BitmapUsed by:153
Symbol 153 GraphicUses:152Used by:154
Symbol 154 MovieClip {Instructions1}Uses:153Used by:Timeline
Symbol 155 BitmapUsed by:156
Symbol 156 GraphicUses:155Used by:157
Symbol 157 MovieClip {Instructions2}Uses:156Used by:Timeline
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:160
Symbol 160 MovieClip {Instructions3}Uses:159Used by:Timeline
Symbol 161 BitmapUsed by:162
Symbol 162 GraphicUses:161Used by:163
Symbol 163 MovieClip {Instructions4}Uses:162Used by:Timeline
Symbol 164 GraphicUsed by:170
Symbol 165 FontUsed by:166
Symbol 166 TextUses:165Used by:170
Symbol 167 TextUses:2Used by:170
Symbol 168 TextUses:2Used by:170
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {MenuBackdrop}Uses:164 166 167 168 169Used by:Timeline
Symbol 171 TextUses:2Used by:174
Symbol 172 GraphicUsed by:174
Symbol 173 TextUses:2Used by:174
Symbol 174 MovieClip {MenuButton}Uses:38 171 172 173Used by:Timeline
Symbol 175 GraphicUsed by:Timeline
Streaming Sound 1Used by:Symbol 120 MovieClip {NotDoppler}

Instance Names

"percent"Frame 1Symbol 12 EditableText
"adButton"Frame 1Symbol 18 MovieClip {TractorSpheres_fla.AdButton_2}
"notDop300But"Frame 1Symbol 24 MovieClip {TractorSpheres_fla.notDop300x250button_3}
"fake"Frame 1Symbol 32 MovieClip
"loadBar"Frame 1Symbol 35 MovieClip
"adBox"Frame 1Symbol 37 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$Wr$tMxENRHIKcvIjyvuUW1DV1."




http://swfchan.com/6/29010/info.shtml
Created: 11/8 -2019 17:53:30 Last modified: 11/8 -2019 17:53:30 Server time: 22/12 -2024 21:08:42