Section 1
//BGScape_20 (StarBoing_fla.BGScape_20)
package StarBoing_fla {
import flash.display.*;
public dynamic class BGScape_20 extends MovieClip {
public var springOffset:Number;
public var offSetX:Number;
public var offSetY:Number;
public var speedX:Number;
public var speedY:Number;
public function BGScape_20(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 10, frame11);
}
function frame10(){
stop();
}
function frame1(){
speedX = 0;
speedY = 0;
springOffset = 0.1;
offSetX = 0;
offSetY = 0;
}
function frame2(){
stop();
}
function frame11(){
gotoAndStop(2);
}
}
}//package StarBoing_fla
Section 2
//FADER_14 (StarBoing_fla.FADER_14)
package StarBoing_fla {
import flash.display.*;
public dynamic class FADER_14 extends MovieClip {
public function FADER_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package StarBoing_fla
Section 3
//GAMEENGINE_19 (StarBoing_fla.GAMEENGINE_19)
package StarBoing_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class GAMEENGINE_19 extends MovieClip {
public var FPSTimer:Number;
public var BGTimer:Number;
public var helpText:String;
public var BG:MovieClip;
public var ROBOT:MovieClip;
public var shardArrayYSpeed:Array;
public var levelFreezeTimerMax:Number;
public var SHARDS:MovieClip;
public var timeSwitch:Boolean;
public var BGPoint:Object;
public var scorePot:Number;
public var multiplyerSwitch:Boolean;
public var activeColour:Number;
public var gemScaler:Number;
public var score:Number;
public var mouse:Object;
public var ballSize:Number;
public var messageArray:Array;
public var scoreTarget:Number;
public var levelFreezeTimer:Number;
public var time:Number;
public var HUD:MovieClip;
public var LINES:MovieClip;
public var gameOverTimer:Number;
public var GEMS:MovieClip;
public var shardArray:Array;
public var hudNumber:Number;
public var jewArray:Array;
public var clusterCount:Number;
public var SPARKS:MovieClip;
public var levelFreeze:Boolean;
public var MESSAGES:MovieClip;
public var FRAME:MovieClip;
public var timeMax:Number;
public var level:Number;
public var scoreTemp:Number;
public var shardArrayXSpeed:Array;
public var mousePressed:Boolean;
public var FADER_BG:MovieClip;
public var multiplyer:Number;
public var gameOver:Boolean;
public var shardArraySpin:Array;
public var scoreTempMax;
public function GAMEENGINE_19(){
addFrameScript(0, frame1);
}
public function MouseUp(_arg1){
if (gameOver == false){
mousePressed = false;
endTurn();
};
}
public function destroyShard(_arg1:Number){
SHARDS.removeChild(shardArray[_arg1]);
delete shardArray[_arg1];
shardArray.splice(_arg1, 1);
shardArrayXSpeed.splice(_arg1, 1);
shardArrayYSpeed.splice(_arg1, 1);
shardArraySpin.splice(_arg1, 1);
}
public function newShard(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:MovieClip;
_local4 = 0;
while (_local4 < 10) {
_local5 = new Shard();
_local5.x = _arg1;
_local5.y = _arg2;
_local5.scaleX = ((Math.random() * 0.6) + 0.6);
_local5.scaleY = ((Math.random() * 0.6) + 0.6);
_local5.gotoAndStop(_arg3);
shardArrayXSpeed.push(((Math.random() * 60) - 30));
shardArrayYSpeed.push(((-(Math.random()) * 50) + 10));
shardArraySpin.push(((Math.random() * 20) - 10));
SHARDS.addChild(_local5);
shardArray.push(_local5);
_local4++;
};
}
public function newMessage(_arg1, _arg2, _arg3){
var _local4:MovieClip;
_local4 = new MSG();
_local4.gotoAndStop(_arg3);
_local4.x = _arg1;
_local4.y = _arg2;
_local4.alpha = 0;
MESSAGES.addChild(_local4);
messageArray.push(_local4);
}
function frame1(){
MovieClip(parent).But_P.QB.x = -5000;
LINES = new MovieClip();
SPARKS = new MovieClip();
GEMS = new MovieClip();
SHARDS = new MovieClip();
FRAME = new Frame();
HUD = new Hud();
MESSAGES = new MovieClip();
addChild(LINES);
addChild(SPARKS);
addChild(GEMS);
addChild(SHARDS);
addChild(FRAME);
addChild(HUD);
addChild(MESSAGES);
HUD.x = 10;
HUD.y = 500;
helpText = "";
jewArray = new Array();
makeBalls(false);
ballSize = 1;
clusterCount = 1;
score = 0;
scoreTarget = 2000;
timeMax = 1800;
time = timeMax;
level = 1;
levelFreeze = false;
levelFreezeTimerMax = 100;
levelFreezeTimer = 0;
scoreTemp = score;
scoreTempMax = scoreTarget;
timeSwitch = false;
gameOver = false;
gameOverTimer = 0;
mouse = new Object();
mousePressed = false;
activeColour = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
hudNumber = 0;
multiplyerSwitch = false;
gemScaler = 0.9;
HUD.comboCur.alpha = 0;
HUD.CLUSTER.alpha = 0;
HUD.comboCur.alpha = 0;
HUD.comboMax.alpha = 0;
shardArray = new Array();
shardArrayXSpeed = new Array();
shardArrayYSpeed = new Array();
shardArraySpin = new Array();
BGPoint = new Object();
BGPoint.x = 250;
BGPoint.y = 250;
BGTimer = 0;
scorePot = 0;
multiplyer = 0;
messageArray = new Array();
mouse.x = 250;
mouse.y = 250;
y = (y + 40);
FPSTimer = 0;
}
public function destroyJew(_arg1){
GEMS.removeChild(jewArray[_arg1]);
delete jewArray[_arg1];
jewArray.splice(_arg1, 1);
}
public function updateShards(){
var _local1:Number;
_local1 = 0;
while (_local1 < shardArray.length) {
shardArray[_local1].x = (shardArray[_local1].x + shardArrayXSpeed[_local1]);
shardArray[_local1].y = (shardArray[_local1].y + shardArrayYSpeed[_local1]);
shardArrayXSpeed[_local1] = (shardArrayXSpeed[_local1] / 1.1);
shardArrayYSpeed[_local1] = (shardArrayYSpeed[_local1] + 3);
shardArray[_local1].rotation = (shardArray[_local1].rotation + shardArraySpin[_local1]);
if (shardArray[_local1].y > 500){
destroyShard(_local1);
_local1--;
};
_local1++;
};
}
public function HUDControl(){
HUD.comboCur.textBox.text = clusterCount;
HUD.comboMax.textBox.text = hudNumber;
if (score > scoreTarget){
score = scoreTarget;
};
HUD.TOPBar.targetText.text = ((score + " / ") + scoreTarget);
HUD.TOPBar.timeText.text = Math.ceil((time / 30));
HUD.TOPBar.timeBar.width = ((300 / timeMax) * time);
if (HUD.TOPBar.timeBar.width > 300){
HUD.TOPBar.timeBar.width = 300;
};
if (time == 300){
MovieClip(parent).playSound("ALARM");
newMessage(250, 10, 6);
};
if (HUD.TOPBar.timeBar.width < 50){
HUD.TOPBar.timeBar.play();
};
HUD.TOPBar.scoreBar.width = ((300 / scoreTempMax) * scoreTemp);
if (score >= scoreTarget){
levelFreeze = true;
};
HUD.comboCur.GEM.FADER.alpha = 0;
HUD.comboMax.GEM.FADER.alpha = 0;
HUD.CLUSTER.scoreText.text = scorePot;
HUD.CLUSTER.multiText.text = ("MULTIPLYER: " + multiplyer);
HUD.MAIN.scorePot.text = scorePot;
HUD.MAIN.scoreText.text = score;
HUD.MAIN.levelText.text = ("Level " + level);
HUD.CLUSTER.helpText.text = helpText;
if (activeColour > 0){
if (HUD.MAIN.alpha > 0){
HUD.MAIN.alpha = (HUD.MAIN.alpha - 0.1);
};
if (HUD.comboCur.alpha < 1){
HUD.CLUSTER.alpha = (HUD.CLUSTER.alpha + 0.1);
HUD.comboCur.alpha = (HUD.comboCur.alpha + 0.1);
HUD.comboMax.alpha = (HUD.comboMax.alpha + 0.1);
};
} else {
if (HUD.MAIN.alpha < 1){
HUD.MAIN.alpha = (HUD.MAIN.alpha + 0.1);
};
if (HUD.comboCur.alpha > 0){
HUD.CLUSTER.alpha = (HUD.CLUSTER.alpha - 0.1);
HUD.comboCur.alpha = (HUD.comboCur.alpha - 0.1);
HUD.comboMax.alpha = (HUD.comboMax.alpha - 0.1);
};
};
if (HUD.comboCur.scaleX > 1){
HUD.comboCur.scaleX = (HUD.comboCur.scaleX / 1.05);
HUD.comboCur.scaleY = (HUD.comboCur.scaleY / 1.05);
} else {
HUD.comboCur.scaleX = 1;
HUD.comboCur.scaleY = 1;
};
}
public function DESTROYENGINE(){
var _local1:Number;
_local1 = 0;
while (_local1 < messageArray.length) {
destroyMessage(_local1);
_local1++;
};
_local1 = 0;
while (_local1 < jewArray.length) {
destroyJew(_local1);
_local1++;
};
_local1 = 0;
while (_local1 < shardArray.length) {
destroyShard(_local1);
_local1++;
};
removeChild(LINES);
removeChild(SPARKS);
removeChild(GEMS);
removeChild(SHARDS);
removeChild(FRAME);
removeChild(HUD);
removeChild(MESSAGES);
LINES = null;
SPARKS = null;
GEMS = null;
SHARDS = null;
FRAME = null;
HUD = null;
MESSAGES = null;
mouse = null;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
}
public function destroyMessage(_arg1){
MESSAGES.removeChild(messageArray[_arg1]);
delete messageArray[_arg1];
messageArray.splice(_arg1, 1);
}
public function onEnterFrame(_arg1){
var _local2:Number;
var _local3:Number;
var _local4:Number;
ROBOT.x = mouse.x;
ROBOT.y = mouse.y;
if (levelFreeze == true){
if (time < timeMax){
time = (time + 25);
} else {
time = timeMax;
};
levelFreezeTimer++;
if (levelFreezeTimer == 1){
newMessage(250, 200, 4);
newMessage(250, 250, 5);
scorePot = 0;
if (timeSwitch == true){
if (timeMax > 900){
timeMax = (timeMax - 120);
};
newMessage(220, 300, 7);
newMessage(220, 300, 8);
};
MovieClip(parent).playSound("LEVELUP");
_local3 = 0;
while (_local3 < jewArray.length) {
newShard(jewArray[_local3].x, jewArray[_local3].y, jewArray[_local3].colour);
destroyJew(_local3);
_local3--;
_local3++;
};
} else {
if (levelFreezeTimer == levelFreezeTimerMax){
level++;
MovieClip(parent).playSound("NEWLEVEL");
FADER_BG.alpha = 1;
BG.nextFrame();
_local2 = (2000 * (level * 0.5));
if (_local2 > 5000){
_local2 = 5000;
timeSwitch = true;
};
scoreTempMax = _local2;
scoreTemp = 0;
scoreTarget = (scoreTarget + _local2);
levelFreezeTimer = 0;
levelFreeze = false;
makeBalls(false);
};
};
};
BGRings();
updateShards();
updateMessage();
FADER_BG.alpha = (FADER_BG.alpha / 1.1);
scorePotControl();
HUDControl();
if ((((mouseX > 0)) && ((mouseX < 500)))){
mouse.x = mouseX;
};
if ((((mouseY > 0)) && ((mouseY < 500)))){
mouse.y = mouseY;
};
if (gameOver == true){
if (gameOverTimer == 0){
MovieClip(parent).playSound("GLASS");
_local3 = 0;
while (_local3 < jewArray.length) {
newShard(jewArray[_local3].x, jewArray[_local3].y, jewArray[_local3].colour);
destroyJew(_local3);
_local3--;
_local3++;
};
};
gameOverTimer++;
if (gameOverTimer == 200){
MovieClip(parent).playSound("NEWLEVEL");
MovieClip(parent).Score = level;
DESTROYENGINE();
MovieClip(parent).gotoFrame("GAMEOVER");
};
};
if (gameOver == false){
if (levelFreeze == false){
time = (time - 1);
if (time == 0){
newMessage(250, 250, 9);
gameOver = true;
};
gemScale();
_local3 = 0;
while (_local3 < jewArray.length) {
jewArray[_local3].FADER.alpha = (jewArray[_local3].FADER.alpha / 1.1);
if (jewArray[_local3].colour != 10){
jewArray[_local3].scaleX = gemScaler;
jewArray[_local3].scaleY = gemScaler;
};
if (jewArray[_local3].alpha < 1){
jewArray[_local3].alpha = (jewArray[_local3].alpha + 0.1);
};
if (jewArray[_local3].active == true){
elastic(jewArray[_local3], mouse, 0.1, 0.8);
if ((Math.random() * 5) < 1){
alterGem(jewArray[_local3]);
};
_local4 = 0;
while (_local4 < jewArray.length) {
if (jewArray[_local4].active == false){
if (pythag(jewArray[_local3].x, jewArray[_local3].y, jewArray[_local4].x, jewArray[_local4].y) < (jewArray[_local3].width / 2)){
if (jewArray[_local4].colour != activeColour){
if (mousePressed == true){
scorePot = Math.round((scorePot / 2));
FADER_BG.gotoAndStop(2);
FADER_BG.alpha = 2;
newMessage(150, 450, 3);
endTurn();
};
} else {
if (jewArray[_local4].active != true){
clusterCount++;
HUD.comboCur.scaleX = 2;
HUD.comboCur.scaleY = 2;
MovieClip(parent).playSound("CLINK");
jewArray[_local4].active = true;
jewArray[_local4].offSetX = 0;
jewArray[_local4].offSetY = 0;
jewArray[_local4].springOffset = 0.01;
ballSize = (ballSize + 2);
flashActiveGems();
increaseScorePot();
if ((((clusterCount > 2)) && ((clusterCount < hudNumber)))){
helpText = "Release Click to deposit your score!";
} else {
if (clusterCount == hudNumber){
FADER_BG.gotoAndStop(1);
FADER_BG.alpha = 2;
newMessage(350, 450, 1);
scorePot = (scorePot * 2);
MovieClip(parent).playSound("COIN");
MovieClip(parent).playSound("COIN");
MovieClip(parent).playSound("COIN");
MovieClip(parent).playSound("COIN");
MovieClip(parent).playSound("COIN");
MovieClip(parent).playSound("COIN");
helpText = "PERFECT! x2 BONUS!";
endTurn();
};
};
};
};
};
};
_local4++;
};
};
_local3++;
};
if (FRAME.sprite.alpha > 0){
FRAME.sprite.alpha = (FRAME.sprite.alpha - 0.1);
};
};
};
if (MovieClip(parent).quitGame == true){
MovieClip(parent).quitGame = false;
DESTROYENGINE();
MovieClip(parent).But_P.gotoAndStop(1);
MovieClip(parent).gotoFrame("TITLE");
};
}
public function increaseScorePot(){
multiplyer = ((clusterCount / 10) + 1);
scorePot = (scorePot + (100 * multiplyer));
}
public function MouseDown(_arg1){
var _local2:Number;
if ((((gameOver == false)) && ((stage.frameRate == 30)))){
multiplyerSwitch = false;
helpText = "Cluster those Gems!";
clusterCount = 1;
hudNumber = 0;
ballSize = 1;
_local2 = 0;
while (_local2 < jewArray.length) {
if ((((pythag(jewArray[_local2].x, jewArray[_local2].y, mouseX, mouseY) < (jewArray[_local2].width / 2))) && (!((jewArray[_local2].colour == 10))))){
MovieClip(parent).playSound("FIRSTGEM");
jewArray[_local2].active = true;
mousePressed = true;
activeColour = jewArray[_local2].colour;
HUD.comboCur.GEM.gotoAndStop(activeColour);
HUD.comboMax.GEM.gotoAndStop(activeColour);
FRAME.gotoAndStop(activeColour);
jewArray[_local2].offSetX = 0;
jewArray[_local2].offSetY = 0;
jewArray[_local2].springOffset = 0.01;
};
_local2++;
};
_local2 = 0;
while (_local2 < jewArray.length) {
if (jewArray[_local2].colour == activeColour){
hudNumber++;
};
_local2++;
};
};
}
public function angle(_arg1, _arg2, _arg3, _arg4){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / 3.141593) * 180)) + 90));
}
public function elastic(_arg1, _arg2, _arg3, _arg4){
_arg1.speedX = (_arg1.speedX + (((_arg2.x + _arg1.offSetX) - _arg1.x) * (_arg3 + _arg1.springOffset)));
_arg1.speedX = (_arg1.speedX * _arg4);
_arg1.x = (_arg1.x + _arg1.speedX);
_arg1.speedY = (_arg1.speedY + (((_arg2.y + _arg1.offSetY) - _arg1.y) * (_arg3 + _arg1.springOffset)));
_arg1.speedY = (_arg1.speedY * _arg4);
_arg1.y = (_arg1.y + _arg1.speedY);
}
public function calcSpeed(_arg1, _arg2){
var _local3:Number;
var _local4:Object;
_local3 = (_arg1 * 0.01745329);
_local4 = new Object();
_local4.x = (_arg2 * Math.cos(_local3));
_local4.y = (_arg2 * Math.sin(_local3));
return (_local4);
}
public function BGRings(){
elastic(BG, mouse, 0.1, 0.4);
elastic(BG, BGPoint, 0.1, 0.3);
}
public function makeBalls(_arg1){
var _local2:Number;
var _local3:Number;
var _local4:MovieClip;
var _local5:Boolean;
var _local6:Number;
_local2 = jewArray.length;
_local3 = 0;
while (_local3 < 40) {
if (jewArray.length < 40){
_local4 = new Ball();
_local5 = false;
while (_local5 == false) {
_local5 = true;
_local4.x = ((Math.random() * 420) + 40);
_local4.y = ((Math.random() * 420) + 40);
_local4.alpha = -1;
_local6 = 0;
while (_local6 < jewArray.length) {
if (pythag(_local4.x, _local4.y, jewArray[_local6].x, jewArray[_local6].y) < 50){
_local5 = false;
};
_local6++;
};
};
jewArray.push(_local4);
GEMS.addChild(_local4);
};
_local3++;
};
if (_arg1 == true){
_local3 = _local2;
while (_local3 < jewArray.length) {
colourGem(jewArray[_local3], 10);
_local3++;
};
};
}
public function updateMessage(){
var _local1:Number;
_local1 = 0;
while (_local1 < messageArray.length) {
if (messageArray[_local1].alpha > 2){
messageArray[_local1].x = (messageArray[_local1].x + messageArray[_local1].ySpeed);
messageArray[_local1].ySpeed = (messageArray[_local1].ySpeed + messageArray[_local1].yDir);
} else {
messageArray[_local1].alpha = (messageArray[_local1].alpha + 0.05);
};
if ((((messageArray[_local1].x < -300)) || ((messageArray[_local1].x > 900)))){
destroyMessage(_local1);
_local1--;
};
_local1++;
};
}
public function pythag(_arg1, _arg2, _arg3, _arg4){
return (Math.sqrt((Math.pow((_arg2 - _arg4), 2) + Math.pow((_arg1 - _arg3), 2))));
}
public function rotatedXY(_arg1, _arg2, _arg3){
var _local4:Object;
var _local5:*;
var _local6:*;
var _local7:*;
_local4 = new Object();
_local5 = ((6.28 / 360) * _arg3);
_local6 = Math.sin(_local5);
_local7 = Math.cos(_local5);
_local4.x = ((_arg1 * _local7) - (_arg2 * _local6));
_local4.y = ((_arg1 * _local6) + (_arg2 * _local7));
return (_local4);
}
public function flashActiveGems(){
var _local1:Number;
_local1 = 0;
while (_local1 < jewArray.length) {
if (jewArray[_local1].active == true){
jewArray[_local1].FADER.alpha = 1;
};
_local1++;
};
}
public function setFPS(){
var _local1:Date;
var _local2:Number;
_local1 = new Date();
_local2 = 0;
while (_local1.getTime() < FPSTimer) {
_local1 = new Date();
_local2++;
};
FPSTimer = (_local1.getTime() + 32);
}
public function gemScale(){
if (gemScaler < 0.9){
gemScaler = 1.05;
} else {
gemScaler = (gemScaler - 0.01);
};
}
public function alterGem(_arg1:MovieClip){
_arg1.offSetX = ((Math.random() * ballSize) - (ballSize / 2));
_arg1.offSetY = ((Math.random() * ballSize) - (ballSize / 2));
_arg1.springOffset = (Math.random() * 0.1);
}
public function scorePotControl(){
var _local1:Number;
if (mousePressed == false){
_local1 = Math.ceil((scorePot / 10));
score = (score + _local1);
scoreTemp = (scoreTemp + _local1);
scorePot = (scorePot - _local1);
};
}
public function colourGem(_arg1, _arg2){
_arg1.FADER.alpha = 1;
_arg1.colour = _arg2;
_arg1.gotoAndStop(_arg2);
}
public function endTurn(){
var _local1:Boolean;
var _local2:Number;
mousePressed = false;
FRAME.gotoAndStop(1);
FRAME.sprite.alpha = 1;
ballSize = 1;
_local1 = false;
_local2 = 0;
while (_local2 < jewArray.length) {
if (jewArray[_local2].active == true){
_local1 = true;
newShard(jewArray[_local2].x, jewArray[_local2].y, jewArray[_local2].colour);
destroyJew(_local2);
_local2--;
};
_local2++;
};
if (_local1 == true){
MovieClip(parent).playSound("GLASS");
};
_local2 = 0;
while (_local2 < jewArray.length) {
jewArray[_local2].active = false;
_local2++;
};
if (levelFreeze == false){
makeBalls(true);
};
activeColour = 0;
}
}
}//package StarBoing_fla
Section 4
//HUD_Bar_34 (StarBoing_fla.HUD_Bar_34)
package StarBoing_fla {
import flash.display.*;
public dynamic class HUD_Bar_34 extends MovieClip {
public function HUD_Bar_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package StarBoing_fla
Section 5
//HUD_Lines_31 (StarBoing_fla.HUD_Lines_31)
package StarBoing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUD_Lines_31 extends MovieClip {
public var multiText:TextField;
public var helpText:TextField;
public var scoreText:TextField;
}
}//package StarBoing_fla
Section 6
//HUD_main_32 (StarBoing_fla.HUD_main_32)
package StarBoing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUD_main_32 extends MovieClip {
public var scorePot:TextField;
public var levelText:TextField;
public var scoreText:TextField;
}
}//package StarBoing_fla
Section 7
//HUD_NumBox_27 (StarBoing_fla.HUD_NumBox_27)
package StarBoing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUD_NumBox_27 extends MovieClip {
public var GEM:Ball;
public var textBox:TextField;
}
}//package StarBoing_fla
Section 8
//HUD_TopBar_33 (StarBoing_fla.HUD_TopBar_33)
package StarBoing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUD_TopBar_33 extends MovieClip {
public var timeBar:MovieClip;
public var scoreBar:MovieClip;
public var targetText:TextField;
public var timeText:TextField;
}
}//package StarBoing_fla
Section 9
//MainTimeline (StarBoing_fla.MainTimeline)
package StarBoing_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var But_P:MovieClip;
public var But_A:MovieClip;
public var soundActive:Boolean;
public var But_Back:SimpleButton;
public var FADER:MovieClip;
public var myContextMenu:ContextMenu;
public var Score:Number;
public var soundArray:Array;
public var But_Go:SimpleButton;
public var activeSound:String;
public var But_Back2:SimpleButton;
public var soundBg:Sound;
public var But_Done:SimpleButton;
public var quitGame:Boolean;
public var plb:MovieClip;
public var introPlay;
public var scoreText:TextField;
public var GAME:MovieClip;
public var userName:TextField;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 8, frame9, 12, frame13);
}
public function Func_But_Back2(_arg1){
But_Back2.removeEventListener(MouseEvent.CLICK, Func_But_Back2);
But_Go.removeEventListener(MouseEvent.CLICK, Func_But_Go);
gotoFrame("TITLE");
}
public function sendScore(_arg1, _arg2){
var abrazor30Data:URLRequest;
var variables:URLVariables;
var verbs:Number;
var viper:String;
var loader:URLLoader;
var dataOnLoad:Function;
var userName = _arg1;
var scoreVar = _arg2;
dataOnLoad = function (_arg1:Event){
};
abrazor30Data = new URLRequest("http://rankz.armorbot.com/submit/as3_v0.php");
abrazor30Data.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.flashkey = "dnRuSEdHTGg=";
variables.SU0249 = "MjU5NWolZSVhJW4lcw==";
variables.bmFtZTE = userName;
verbs = scoreVar;
viper = (verbs + "Z");
variables.c2NvcmUx = viper.split("0").join("U");
variables.c2NvcmUx = variables.c2NvcmUx.split("").join("A");
variables.c2NvcmUx = variables.c2NvcmUx.split("AU").join("Y");
variables.c2NvcmUx = variables.c2NvcmUx.split("A1").join("B");
variables.c2NvcmUx = variables.c2NvcmUx.split(".").join("N");
abrazor30Data.data = variables;
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, dataOnLoad);
loader.load(abrazor30Data);
}
public function Func_But_Q(_arg1){
quitGame = true;
stage.frameRate = 30;
}
public function stopSound(){
soundBg = null;
SoundMixer.stopAll();
}
public function playSound(_arg1){
if (soundActive == true){
soundBg = soundArray[_arg1];
soundBg.play();
};
}
public function Func_But_Back(_arg1){
But_Back.removeEventListener(MouseEvent.CLICK, Func_But_Back);
gotoFrame("TITLE");
}
function frame1(){
stop();
introPlay = false;
addEventListener(Event.ENTER_FRAME, preLoader);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
contextMenu = myContextMenu;
}
public function Func_But_Go(_arg1){
But_Back2.removeEventListener(MouseEvent.CLICK, Func_But_Back2);
But_Go.removeEventListener(MouseEvent.CLICK, Func_But_Go);
activeSound = "GAME";
stopSound();
playMusic("GAME");
gotoFrame("GAME");
}
public function muteSound(){
if (soundActive == true){
But_A.gotoAndStop(2);
soundBg = null;
soundActive = false;
SoundMixer.stopAll();
} else {
But_A.gotoAndStop(1);
soundActive = true;
playMusic(activeSound);
};
}
function frame9(){
scoreText.text = (("You reached Level " + Score) + "!");
But_Done.addEventListener(MouseEvent.CLICK, Func_But_Done);
}
function frame13(){
stop();
}
function frame4(){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
But_P.PB.addEventListener(MouseEvent.MOUSE_DOWN, Func_But_P);
But_P.QB.addEventListener(MouseEvent.MOUSE_DOWN, Func_But_Q);
But_A.addEventListener(MouseEvent.MOUSE_DOWN, Func_But_A);
Score = 0;
quitGame = false;
soundActive = true;
soundArray = new Array();
activeSound = "TITLE";
soundArray["TITLE"] = new TITLEMUSIC();
soundArray["GAME"] = new StarboingSound();
soundArray["GLASS"] = new GlassSound();
soundArray["CLINK"] = new CLINK();
soundArray["LEVELUP"] = new LEVELUP();
soundArray["FIRSTGEM"] = new FIRSTGEM();
soundArray["NEWLEVEL"] = new NEWLEVEL();
soundArray["ALARM"] = new ALARM();
soundArray["COIN"] = new COIN();
playMusic(activeSound);
}
public function playMusic(_arg1){
if (soundActive == true){
soundBg = soundArray[_arg1];
soundBg.play(0, 999);
};
}
public function preLoader(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
plb.scaleX = ((1 / _local2) * _local3);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, preLoader);
play();
};
}
function frame5(){
stop();
if (activeSound != "TITLE"){
stopSound();
activeSound = "TITLE";
playMusic("TITLE");
};
}
function frame6(){
But_Back.addEventListener(MouseEvent.CLICK, Func_But_Back);
}
function frame7(){
But_Back2.addEventListener(MouseEvent.CLICK, Func_But_Back2);
But_Go.addEventListener(MouseEvent.CLICK, Func_But_Go);
}
function frame2(){
stop();
}
public function onEnterFrame(_arg1){
if (FADER.alpha > 0){
FADER.x = 0;
FADER.alpha = (FADER.alpha - 0.1);
} else {
FADER.x = -1000;
};
}
public function gotoFrame(_arg1){
FADER.alpha = 1;
gotoAndStop(_arg1);
}
public function Func_But_P(_arg1){
if (stage.frameRate == 30){
But_P.gotoAndStop(2);
But_P.QB.x = -400;
stage.frameRate = 0;
} else {
But_P.QB.x = -5000;
But_P.gotoAndStop(1);
stage.frameRate = 30;
};
}
public function Func_But_Done(_arg1){
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Number;
var _local7:Number;
But_Done.removeEventListener(MouseEvent.CLICK, Func_But_Done);
_local2 = stage.loaderInfo.url;
_local3 = (_local2.indexOf("://") + 3);
_local4 = _local2.indexOf("/", _local3);
_local5 = _local2.substring(_local3, _local4);
_local6 = (_local5.lastIndexOf(".") - 1);
_local7 = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 != ""){
sendScore(userName.text, Score);
};
gotoFrame("TITLE");
}
public function Func_But_A(_arg1){
muteSound();
}
}
}//package StarBoing_fla
Section 10
//Menu_AudioBut_12 (StarBoing_fla.Menu_AudioBut_12)
package StarBoing_fla {
import flash.display.*;
public dynamic class Menu_AudioBut_12 extends MovieClip {
public function Menu_AudioBut_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package StarBoing_fla
Section 11
//MENU_PauseBUt_10 (StarBoing_fla.MENU_PauseBUt_10)
package StarBoing_fla {
import flash.display.*;
public dynamic class MENU_PauseBUt_10 extends MovieClip {
public var QB:MovieClip;
public var PB:MovieClip;
public function MENU_PauseBUt_10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package StarBoing_fla
Section 12
//MENU_TITLE_15 (StarBoing_fla.MENU_TITLE_15)
package StarBoing_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MENU_TITLE_15 extends MovieClip {
public var but_Score:SimpleButton;
public var but_Play:SimpleButton;
public var but_Cred:SimpleButton;
public var but_Armor:SimpleButton;
public function MENU_TITLE_15(){
addFrameScript(0, frame1);
}
public function func_butCred(_arg1){
purgeListeners();
MovieClip(parent).gotoFrame("CRED");
}
function frame1(){
but_Play.addEventListener(MouseEvent.CLICK, func_butPlay);
but_Cred.addEventListener(MouseEvent.CLICK, func_butCred);
but_Armor.addEventListener(MouseEvent.CLICK, func_butArmor);
but_Score.addEventListener(MouseEvent.CLICK, func_butScore);
}
public function func_butArmor(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armorgames.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function func_butScore(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://rankz.armorbot.com/cluster/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function purgeListeners(){
but_Play.removeEventListener(MouseEvent.CLICK, func_butPlay);
but_Armor.removeEventListener(MouseEvent.CLICK, func_butArmor);
but_Cred.removeEventListener(MouseEvent.CLICK, func_butCred);
but_Score.removeEventListener(MouseEvent.CLICK, func_butScore);
}
public function func_butPlay(_arg1){
purgeListeners();
MovieClip(parent).gotoFrame("HOWTO");
}
}
}//package StarBoing_fla
Section 13
//xczcxzc_7 (StarBoing_fla.xczcxzc_7)
package StarBoing_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class xczcxzc_7 extends MovieClip {
public function xczcxzc_7(){
addFrameScript(0, frame1, 126, frame127);
}
function frame1(){
if (MovieClip(parent).introPlay == false){
MovieClip(parent).introPlay = true;
} else {
stop();
};
}
function frame127(){
MovieClip(parent).play();
}
}
}//package StarBoing_fla
Section 14
//ALARM (ALARM)
package {
import flash.media.*;
public dynamic class ALARM extends Sound {
}
}//package
Section 15
//Ball (Ball)
package {
import flash.display.*;
public dynamic class Ball extends MovieClip {
public var springOffset:Number;
public var active:Boolean;
public var offSetX:Number;
public var FADER:MovieClip;
public var offSetY:Number;
public var colour:Number;
public var speedX:Number;
public var speedY:Number;
public function Ball(){
addFrameScript(0, frame1);
}
function frame1(){
active = false;
speedX = 0;
speedY = 0;
offSetX = ((Math.random() * 50) - 25);
offSetY = ((Math.random() * 50) - 25);
springOffset = (Math.random() * 0.1);
colour = (Math.round((Math.random() * 5)) + 2);
gotoAndStop(colour);
}
}
}//package
Section 16
//CLINK (CLINK)
package {
import flash.media.*;
public dynamic class CLINK extends Sound {
}
}//package
Section 17
//COIN (COIN)
package {
import flash.media.*;
public dynamic class COIN extends Sound {
}
}//package
Section 18
//FIRSTGEM (FIRSTGEM)
package {
import flash.media.*;
public dynamic class FIRSTGEM extends Sound {
}
}//package
Section 19
//Frame (Frame)
package {
import flash.display.*;
public dynamic class Frame extends MovieClip {
public var sprite:MovieClip;
public function Frame(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 20
//GlassSound (GlassSound)
package {
import flash.media.*;
public dynamic class GlassSound extends Sound {
}
}//package
Section 21
//Hud (Hud)
package {
import flash.display.*;
public dynamic class Hud extends MovieClip {
public var TOPBar:MovieClip;
public var MAIN:MovieClip;
public var comboCur:MovieClip;
public var CLUSTER:MovieClip;
public var comboMax:MovieClip;
}
}//package
Section 22
//LEVELUP (LEVELUP)
package {
import flash.media.*;
public dynamic class LEVELUP extends Sound {
}
}//package
Section 23
//MSG (MSG)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MSG extends MovieClip {
public var yDir:Number;
public var ySpeed:Number;
public var scoreText:TextField;
public function MSG(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame3(){
ySpeed = 20;
yDir = -2;
}
function frame6(){
ySpeed = -10;
yDir = 2;
}
function frame7(){
ySpeed = -20;
yDir = 2;
}
function frame1(){
ySpeed = -20;
yDir = 2;
}
function frame4(){
ySpeed = 20;
yDir = -2;
}
function frame5(){
ySpeed = -20;
yDir = 2;
}
function frame9(){
ySpeed = 0;
yDir = 0;
}
function frame8(){
ySpeed = 20;
yDir = -4;
}
}
}//package
Section 24
//NEWLEVEL (NEWLEVEL)
package {
import flash.media.*;
public dynamic class NEWLEVEL extends Sound {
}
}//package
Section 25
//NullSound (NullSound)
package {
import flash.media.*;
public dynamic class NullSound extends Sound {
}
}//package
Section 26
//Shard (Shard)
package {
import flash.display.*;
public dynamic class Shard extends MovieClip {
}
}//package
Section 27
//Spark (Spark)
package {
import flash.display.*;
public dynamic class Spark extends MovieClip {
public var speedX:Number;
public var speedY:Number;
public function Spark(){
addFrameScript(0, frame1);
}
function frame1(){
speedX = ((Math.random() * 100) - 50);
speedY = ((Math.random() * 100) - 50);
}
}
}//package
Section 28
//StarboingSound (StarboingSound)
package {
import flash.media.*;
public dynamic class StarboingSound extends Sound {
}
}//package
Section 29
//TITLEMUSIC (TITLEMUSIC)
package {
import flash.media.*;
public dynamic class TITLEMUSIC extends Sound {
}
}//package