Frame 1
function GlobalParent() {
this._state = "Core";
this.Max_x = 480;
this.Max_y = 480;
this.Score = 0;
this._bestTime = 0;
this._theme = 1;
this._level = 1;
this.Depth_Count = 0;
this.Object_Count = 0;
this.PiCalculation = (Math.PI/180);
this._radius = 20;
this.LoadBar_Count = 0;
this.Sprite_Count = 0;
this._initTime = 0;
this._chosen1 = 0;
this._chosen2 = 0;
this._finalTime = 0;
this.BallScale = 40;
this._bestTime1 = 0;
this._bestTime2 = 0;
this._bestTime3 = 0;
this._bestTime4 = 0;
this._bestTime5 = 0;
this._bestTime6 = 0;
this._bestTime7 = 0;
this._curBackground = 1;
this.Theme_Count = 4;
this.Level_Count = 5;
this.MaxBubbles = 25;
}
function LevelDataParent() {
this._balls = 0;
this._targetTime = 0;
}
function ThemeDataParent() {
this._background = 0;
this._ballType = 0;
this._rotate = false;
this._alpha = 0;
this._pulse = false;
this._scale = false;
this._bubbles = false;
}
function SpriteParent(id, instanceName) {
Global.Sprite_Count++;
this._id = int(id);
this._spriteid = int(Global.Sprite_Count);
this._state = "Inactive";
this._color = 0;
this._xpos = 0;
this._ypos = 0;
this._xspeed = 0;
this._yspeed = 0;
this._targetx = 0;
this._targety = 0;
this._scale = 100;
this._rotation = 0;
this._speed = 0;
this._text = "#";
this._instance = instanceName;
this._scalestep = 0;
this._rotatestep = 0;
this._ballType = 0;
}
function Preloader_Status() {
myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
myPercent = myLoaded / myTotal;
return(myPercent * 100);
}
function Create_MovieClip(ObjectName, Instance, NewLevel) {
if (isNaN(Global[Instance + "_Count"])) {
Global[Instance + "_Count"] = 0;
}
Global[Instance + "_Count"]++;
Index = Global[Instance + "_Count"];
InstanceName = (Instance + "_") + Index;
InstanceInfoName = (Instance + "Info_") + Index;
SymbolName = ObjectName + "Symbol";
_root[InstanceInfoName] = new SpriteParent(Index, InstanceName);
_root.attachMovie(SymbolName, InstanceName, NewLevel);
_root[InstanceName].cacheAsBitmap;
MC_hide(InstanceName);
return(Index);
}
function create_instance(ObjectName, amount, Instance, TargetLevel) {
c_instance = 1;
while (c_instance <= amount) {
New_Index = Create_MovieClip(ObjectName, Instance, (TargetLevel + c_instance) - 1);
c_instance++;
}
}
function MC_alpha(InstanceName, pct) {
setProperty(InstanceName, _alpha , pct);
}
function MC_rotate(InstanceName, angle) {
setProperty(InstanceName, _rotation , angle);
}
function MC_pos(InstanceName, loc_x, loc_y) {
setProperty(InstanceName, _x , loc_x);
setProperty(InstanceName, _y , loc_y);
}
function MC_scale(InstanceName, newscale) {
setProperty(InstanceName, _xscale , newscale);
setProperty(InstanceName, _yscale , newscale);
}
function MC_size(InstanceName, new_width, new_height) {
setProperty(InstanceName, _width , new_width);
setProperty(InstanceName, _height , new_height);
}
function MC_show(InstanceName) {
setProperty(InstanceName, _visible , 1);
}
function MC_hide(InstanceName) {
setProperty(InstanceName, _visible , 0);
}
function display_prompt(PromptText, loc_x, loc_y) {
Prompt.PromptText.text = PromptText;
MC_pos("Prompt", loc_x, loc_y);
MC_show("Prompt");
}
function Process_Control_Input(KeyCode) {
switch (Global._state) {
case "MainMenu" :
levelbox_click();
if (MainMenu_1.StartGame.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(MainMenu_1);
Global._level = 1;
Global._state = "LevelStart";
}
if (MainMenu_1.Instructions.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(MainMenu_1);
Global._state = "Instructions";
}
break;
case "Core" :
check_click();
break;
case "GameOver" :
if (GameOver_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(GameOver_1);
Global._state = "MainMenu";
}
break;
case "LevelOver" :
if (LevelOver_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(LevelOver_1);
Global._state = "MainMenu";
}
break;
case "LevelStart" :
if (LevelStart_1.Continue.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(LevelStart_1);
level_setup(Global._level);
Global._state = "Core";
}
break;
case "HighScores" :
break;
case "Instructions" :
if (Instructions_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_hide(Instructions_1);
Global._state = "MainMenu";
}
break;
case "ResetGame" :
}
}
function check_click() {
cb = 1;
while (cb <= Global.Ball_Count) {
with (_root["BallInfo_" + cb]) {
if (_root["Ball_" + cb].hitTest(_root._xmouse, _root._ymouse) && (_state == "Active")) {
if (Global._chosen1 == 0) {
if (cb <= 26) {
Global._chosen1 = cb;
_state = "Chosen";
SFX_Pop.start();
return;
}
} else if (cb > 26) {
Global._chosen2 = cb;
_state = "Chosen";
SFX_Pop.start();
return;
}
}
}
cb++;
}
}
function main_loop() {
switch (Global._state) {
case "MainMenu" :
update_background();
check_mainmenu_rollovers();
levelbox_rollovers();
if (MainMenu_1._visible == 0) {
MC_show(MainMenu_1);
update_level_boxes();
}
return;
case "LevelStart" :
update_background();
check_levelstart_rollovers();
if (LevelStart_1._visible == 0) {
set_level_data(Global._level);
set_theme_data(Global._theme);
MC_show(LevelStart_1);
LevelStart_1.ThemeText.text = _root["Theme_" + Global._theme];
LevelStart_1.LevelText.text = _root["Difficulty_" + Global._level];
LevelStart_1.TargetTime.text = "Time to Beat\r" + timeString(LevelData._targetTime);
LevelStart_1.PromptText.text = _root["LevelPromptText_" + Global._theme];
}
return;
case "Core" :
update_background();
elapsedTime = (getTimer() - Global._initTime) / 1000;
elapsedTime = int(elapsedTime * 100) / 100;
newTime = timeString(elapsedTime);
TargetTimer_1.TimerText.text = timeString(LevelData._targetTime);
Timer_1.TimerText.text = newTime;
update_balls();
if ((Global._chosen1 > 0) && (Global._chosen2 > 0)) {
if (Letter[Global._chosen1 - 1] == Letter[Global._chosen2 - 27]) {
with (_root["BallInfo_" + Global._chosen1]) {
_state = "Solved";
}
with (_root["BallInfo_" + Global._chosen2]) {
_state = "Solved";
}
Global._chosen1 = 0;
Global._chosen2 = 0;
} else {
with (_root["BallInfo_" + Global._chosen1]) {
_state = "Active";
}
with (_root["BallInfo_" + Global._chosen2]) {
_state = "Active";
}
Global._chosen1 = 0;
Global._chosen2 = 0;
}
}
if (available_letters() == 0) {
Global._state = "LevelOver";
}
return;
case "GameOver" :
check_gameover_rollovers();
if (GameOver_1._visible == 0) {
Global._finalTime = (getTimer() - Global._initTime) / 1000;
Global._finalTime = int(Global._finalTime * 100) / 100;
if ((Global._finalTime < Global["_bestTime" + Global._level]) || (Global["_bestTime" + Global._level] == 0)) {
Global["_bestTime" + Global._level] = Global._finalTime;
}
newFinalTime = timeString(Global._finalTime);
newBestTime = timeString(Global["_bestTime" + Global._level]);
hide_balls();
MC_hide("Timer_1");
GameOver_1.ScoreText.text = "Time\r" + newFinalTime;
GameOver_1.BestTime.text = "Best Time\r" + newBestTime;
GameOver_1.FeedbackText.text = FeedbackString(Global._finalTime);
MC_show(GameOver_1);
}
return;
case "LevelOver" :
check_levelover_rollovers();
if (LevelOver_1._visible == 0) {
Global._finalTime = (getTimer() - Global._initTime) / 1000;
Global._finalTime = int(Global._finalTime * 100) / 100;
if ((Global._finalTime < BestTimes[Global._theme][Global._level]) || (BestTimes[Global._theme][Global._level] == 0)) {
BestTimes[Global._theme][Global._level] = Global._finalTime;
}
if (Global._finalTime <= LevelData._targetTime) {
Levels[Global._theme][Global._level] = true;
}
newFinalTime = timeString(Global._finalTime);
newBestTime = timeString(BestTimes[Global._theme][Global._level]);
hide_balls();
MC_hide("Timer_1");
MC_hide("TargetTimer_1");
LevelOver_1.ThemeText.text = _root["Theme_" + Global._theme];
LevelOver_1.LevelText.text = _root["Difficulty_" + Global._level];
LevelOver_1.YourTime.text = "Your Time\r" + newFinalTime;
LevelOver_1.BestTime.text = "Best Time\r" + newBestTime;
LevelOver_1.FeedbackText.text = FeedbackString(Global._finalTime);
MC_show(LevelOver_1);
}
return;
case "Instructions" :
update_background();
if (Instructions_1._visible == 0) {
MC_show(Instructions_1);
}
check_Instructions_rollovers();
return;
case "DisplayHighScores" :
return;
case "LevelChange" :
return;
case "ResetGame" :
reset_game();
Global._state = "Core";
}
}
function FeedbackString(TimeElapsed) {
if (TimeElapsed >= LevelData._targetTime) {
Feedback = "That kind of time just isn't going to cut it, you can do far better on this level";
} else {
Feedback = "That time was great for this level, but many have done far better. You still have room for improvement";
}
if (TimeElapsed < (LevelData._targetTime - 20)) {
Feedback = "That was an exceptional time, but I doubt you can beat it again.";
}
if (TimeElapsed > (LevelData._targetTime + 40)) {
Feedback = "I thought you were never going to finish. Did you ride a short bus to school by any chance ?";
}
return(Feedback);
}
function available_letters() {
letter_count = 0;
b = 1;
while (b <= Global.Ball_Count) {
if (_root["BallInfo_" + b]._state == "Active") {
letter_count++;
}
b++;
}
return(letter_count);
}
function next_letter() {
if (available_letters > 0) {
GoodLetter = false;
while (GoodLetter == false) {
new_letter = random(26) + 1;
if (_root["BallInfo_" + new_ball]._state == "Active") {
GoodLetter = true;
break;
}
}
} else {
new_letter = -1;
}
return(new_letter);
}
function reset_game() {
set_level_data(Global._level);
init_balls();
show_balls();
MC_show("Timer_1");
update_balls();
Global._initTime = getTimer();
Global._chosen1 = 0;
Global._chosen2 = 0;
}
function timeString(TimerValue) {
minutes = int(TimerValue / 60);
seconds = int(TimerValue - (minutes * 60));
extra = int((TimerValue - ((minutes * 60) + seconds)) * 100);
if (seconds < 10) {
seconds = "0" + seconds;
}
TimeValueString = (((minutes + ":") + seconds) + ".") + extra;
return(TimeValueString);
}
function init_balls() {
cb = 1;
while (cb <= Global.Ball_Count) {
with (_root["BallInfo_" + cb]) {
if ((cb <= LevelData._balls) || (((cb - 26) <= LevelData._balls) && (cb > 26))) {
_state = "Active";
} else {
_state = "Inactive";
}
_xpos = -50;
_ypos = -50;
}
cb++;
}
cb = 1;
while (cb <= Global.Ball_Count) {
with (_root["BallInfo_" + cb]) {
if (_state == "Active") {
GoodLocation = false;
while (GoodLocation == false) {
_xpos = random(Global.Max_x - 50) + 25;
_ypos = random(Global.Max_y - 100) + 25;
GoodLocation = check_distance(cb, _xpos, _ypos);
}
_scale = 40;
_rotatestep = 0;
_scalestep = 0;
if (cb <= 26) {
_text = Letter[cb - 1];
} else {
_text = cb - 26;
}
switch (Global._theme) {
case 1 :
break;
case 2 :
_rotation = random(360) + 1;
_rotatestep = random(10) - 5;
if (_rotatestep == 0) {
_rotatestep = random(5) + 1;
}
break;
case 3 :
_scale = random(20) + 20;
_scalestep = random(2) + 1;
break;
case 4 :
_rotation = random(360) + 1;
_rotatestep = random(10) - 5;
if (_rotatestep == 0) {
_rotatestep = random(5) + 1;
}
_scale = random(20) + 20;
_scalestep = random(2) + 1;
}
if (ThemeData._ballType == -1) {
_ballType = int(random(7) + 1);
} else {
_ballType = ThemeData._ballType;
}
}
MC_show("Ball_" + cb);
}
cb++;
}
}
function check_distance(ball_id, loc_x, loc_y) {
b = 1;
while (b <= Global.Ball_Count) {
with (_root["BallInfo_" + b]) {
if ((_state == "Active") && (b != ball_id)) {
xdiff = Math.abs(_xpos - loc_x);
ydiff = Math.abs(_ypos - loc_y);
if ((xdiff < Global.BallScale) && (ydiff < Global.BallScale)) {
return(false);
}
}
}
b++;
}
return(true);
}
function hide_balls() {
b = 1;
while (b <= Global.Ball_Count) {
MC_hide("Ball_" + b);
b++;
}
}
function show_balls() {
b = 1;
while (b <= Global.Ball_Count) {
MC_show("Ball_" + b);
b++;
}
}
function update_balls() {
b = 1;
while (b <= Global.Ball_Count) {
with (_root["BallInfo_" + b]) {
MC_pos(_root["Ball_" + b], _xpos, _ypos);
MC_scale(_root["Ball_" + b], _scale);
_root["Ball_" + b].Sphere.gotoAndStop(_ballType);
_root["Ball_" + b].BallText.text = _text;
if ((_text == 6) || (_text == 9)) {
_root["Ball_" + b].Underline._visible = 1;
} else {
_root["Ball_" + b].Underline._visible = 0;
}
if ((_state == "Chosen") || (_state == "Solved")) {
_root["Ball_" + b].Sphere._alpha = 80;
if (ThemeData._ballType == -1) {
_root["Ball_" + b].Sphere.gotoAndStop(9);
}
} else {
_root["Ball_" + b].Sphere._alpha = 30;
}
switch (Global._theme) {
case 1 :
break;
case 2 :
_rotation = _rotation + _rotatestep;
MC_rotate(_instance, _rotation);
break;
case 3 :
_scale = _scale + _scalestep;
if ((_scale < 20) || (_scale > Global.BallScale)) {
_scalestep = -_scalestep;
}
MC_scale(_instance, _scale);
break;
case 4 :
_scale = _scale + _scalestep;
if ((_scale < 20) || (_scale > Global.BallScale)) {
_scalestep = -_scalestep;
}
MC_scale(_instance, _scale);
_rotation = _rotation + _rotatestep;
MC_rotate(_instance, _rotation);
}
}
b++;
}
}
function display_tip_window(TextString, Timer) {
TipWindow._visible = 1;
TipWindow.TipText.text = TextString;
Global.TipTimer = Timer;
}
function hide_ui() {
MC_hide(ScorePanel_1);
MC_hide(HighScorePanel_1);
MC_hide(LevelPanel_1);
}
function show_ui() {
MC_show(ScorePanel_1);
MC_show(HighScorePanel_1);
MC_show(LevelPanel_1);
}
function create_ui() {
}
function check_mainmenu_rollovers() {
if (MainMenu_1.StartGame.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(MainMenu_1.StartGame, 150);
} else {
MC_scale(MainMenu_1.StartGame, 100);
}
if (MainMenu_1.Instructions.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(MainMenu_1.Instructions, 150);
} else {
MC_scale(MainMenu_1.Instructions, 100);
}
}
function check_Instructions_rollovers() {
if (Instructions_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(Instructions_1.Back, 150);
} else {
MC_scale(Instructions_1.Back, 100);
}
}
function check_levelover_rollovers() {
if (LevelOver_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(LevelOver_1.Back, 150);
} else {
MC_scale(LevelOver_1.Back, 100);
}
}
function check_levelstart_rollovers() {
if (LevelStart_1.Continue.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(LevelStart_1.Continue, 150);
} else {
MC_scale(LevelStart_1.Continue, 100);
}
}
function check_gameover_rollovers() {
if (GameOver_1.Back.hitTest(_root._xmouse, _root._ymouse)) {
MC_scale(GameOver_1.Back, 150);
} else {
MC_scale(GameOver_1.Back, 100);
}
}
function rotate_background() {
Background_1._rotation = Background_1._rotation + 0.05;
}
function scale_background() {
BackgroundInfo_1._scale = BackgroundInfo_1._scale + BackgroundInfo_1._scalestep;
if ((BackgroundInfo_1._scale > 150) || (BackgroundInfo_1._scale < 100)) {
BackgroundInfo_1._scalestep = -BackgroundInfo_1._scalestep;
}
MC_scale(Background_1, BackgroundInfo_1._scale);
}
function update_pulse(pulseSpeed) {
Pulse_1._xscale = Pulse_1._xscale + pulseSpeed;
Pulse_1._yscale = Pulse_1._yscale + pulseSpeed;
if (Pulse_1._xscale > 400) {
Pulse_1._xscale = 0;
Pulse_1._yscale = 0;
}
}
function change_background(NewIndex) {
Background_1.gotoAndStop(NewIndex);
}
function update_background() {
with (ThemeData) {
if (_pulse) {
update_pulse();
}
if (_rotate) {
rotate_background();
}
if (_scale) {
scale_background();
}
if (_bubbles) {
update_bubbles();
}
}
}
function update_level_boxes() {
t = 1;
while (t <= Global.Theme_Count) {
l = 1;
while (l <= Global.Level_Count) {
BoxIndex = ((t - 1) * Global.Level_Count) + l;
MainMenu_1.Levels["LevelBox_" + BoxIndex].BoxText.text = (((_root["Theme_" + t] + "\r") + _root["Difficulty_" + l]) + "\r") + timeString(BestTimes[t][l]);
if (Levels[t][l] == true) {
MC_show(MainMenu_1.Levels["LevelBox_" + BoxIndex].Star);
} else {
MC_hide(MainMenu_1.Levels["LevelBox_" + BoxIndex].Star);
}
l++;
}
t++;
}
}
function levelbox_rollovers() {
t = 1;
while (t <= (Global.Theme_Count * Global.Level_Count)) {
MainMenu_1.Levels["LevelBox_" + t].Star._rotation = MainMenu_1.Levels["LevelBox_" + t].Star._rotation + 5;
if (MainMenu_1.Levels["LevelBox_" + t].hitTest(_root._xmouse, _root._ymouse)) {
MC_alpha(MainMenu_1.Levels["LevelBox_" + t].Box, 70);
} else {
MC_alpha(MainMenu_1.Levels["LevelBox_" + t].Box, 35);
}
t++;
}
}
function levelbox_click() {
t = 1;
while (t <= (Global.Theme_Count * Global.Level_Count)) {
if (MainMenu_1.Levels["LevelBox_" + t].hitTest(_root._xmouse, _root._ymouse)) {
Global._theme = Math.floor(((t - 1) / Global.Level_Count) + 1);
Global._level = t - ((Global._theme - 1) * Global.Level_Count);
MC_hide(MainMenu_1);
Global._state = "LevelStart";
}
t++;
}
}
function level_setup(NewLevel) {
init_balls();
show_balls();
MC_show("Timer_1");
MC_show("TargetTimer_1");
Global._initTime = getTimer();
Global._chosen1 = 0;
Global._chosen2 = 0;
change_background(ThemeData._background);
}
function set_theme_data(NewTheme) {
kill_bubbles();
with (ThemeData) {
switch (NewTheme) {
case 1 :
_background = 1;
_ballType = 7;
_rotate = true;
_alpha = 35;
_pulse = true;
_scale = false;
_bubbles = false;
break;
case 2 :
_background = 2;
_ballType = 2;
_rotate = false;
_alpha = 100;
_pulse = false;
_scale = false;
_bubbles = true;
break;
case 3 :
_background = 4;
_ballType = 3;
_rotate = false;
_alpha = 100;
_pulse = false;
_scale = false;
_bubbles = false;
break;
case 4 :
_background = 3;
_ballType = -1;
_rotate = true;
_alpha = 100;
_pulse = false;
_scale = true;
_bubbles = false;
}
change_background(_background);
MC_rotate(Background_1, 0);
MC_scale(Background_1, 100);
MC_alpha(Background_1, _alpha);
if (_pulse) {
MC_show(Pulse_1);
} else {
MC_hide(Pulse_1);
}
if (_bubbles) {
init_bubbles();
}
}
}
function set_level_data(NewLevel) {
with (LevelData) {
switch (NewLevel) {
case 1 :
_balls = 5;
break;
case 2 :
_balls = 10;
break;
case 3 :
_balls = 15;
break;
case 4 :
_balls = 20;
break;
case 5 :
_balls = 26;
}
LevelData._targetTime = _balls * 4;
}
}
function init_bubbles() {
b = 1;
while (b <= Global.MaxBubbles) {
_root.attachMovie("BubbleSymbol", "Bubble_" + b, 1000 + b);
_root["Bubble_" + b]._x = random(Global.Max_x);
_root["Bubble_" + b]._y = random(Global.Max_y);
_root["Bubble_" + b]._alpha = 40;
bubbleSize = random(40) + 15;
_root["Bubble_" + b]._xscale = bubbleSize;
_root["Bubble_" + b]._yscale = bubbleSize;
b++;
}
}
function kill_bubbles() {
b = 1;
while (b <= Global.MaxBubbles) {
_root["Bubble_" + b].removeMovieClip();
b++;
}
}
function update_bubbles() {
b = 1;
while (b <= Global.MaxBubbles) {
_root["Bubble_" + b]._x = _root["Bubble_" + b]._x + (random(6) - 2.5);
_root["Bubble_" + b]._y = _root["Bubble_" + b]._y - 2;
if (_root["Bubble_" + b]._y < -5) {
_root["Bubble_" + b]._y = Global.Max_y + 10;
}
b++;
}
}
Global = new GlobalParent();
LevelData = new LevelDataParent();
ThemeData = new ThemeDataParent();
var blur = (new flash.filters.BlurFilter(10, 10, 3));
var drop = (new flash.filters.DropShadowFilter(40, 45, 0, 0.3, 10, 10, 2, Quality.HIGH));
var glow = (new flash.filters.GlowFilter(16777215, 0.5, 5, 5, 2, 3));
var Letter = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
Feedback_1 = "You can do much better than this, keep practicing.";
Feedback_2 = "You did ok, but with a little more practice you can do better.";
Feedback_3 = "You did pretty good, but there is still room for improvement.";
Feedback_4 = "You did great. If you can beat this time, you really have something to be proud of.";
Feedback_5 = "Excellent, you are a master of the alphabet and numbers.";
Theme_1 = "The Basics";
Theme_2 = "Dizzy";
Theme_3 = "Pulse";
Theme_4 = "The Works";
Difficulty_1 = "Simple";
Difficulty_2 = "Easy";
Difficulty_3 = "Normal";
Difficulty_4 = "Hard";
Difficulty_5 = "Master";
LevelPromptText_1 = "Lets just start off with the basics. Pretty simple stuff here, you should have no problem.";
LevelPromptText_2 = "Lets see how you do when the letters and numbers are trying to make you dizzy";
LevelPromptText_3 = "Do you think you can handle letters and numbers that have a pulse?";
LevelPromptText_4 = "If you can finish this theme on the Master level, you will have mastered this game.";
var Levels = new Array();
var BestTimes = new Array();
xx = 1;
while (xx <= 4) {
Levels[xx] = new Array(false, false, false, false, false, false);
BestTimes[xx] = new Array(0, 0, 0, 0, 0, 0);
xx++;
}
create_instance("Load", 1, "LoadBar", 100);
MC_show(LoadBar_1);
MC_pos(LoadBar_1, 0, 0);
userKey = new Object();
Key.addListener(userKey);
userKey.onKeyDown = function () {
KeyCode = Number(Key.getCode());
Process_Control_Input(KeyCode);
};
mouseObj = new Object();
Mouse.addListener(mouseObj);
mouseObj.onMouseDown = function () {
Process_Control_Input(0);
};
create_instance("Background", 1, "Background", 50);
MC_pos(Background_1, 240, 240);
MC_show(Background_1);
MC_alpha(Background_1, 35);
BackgroundInfo_1._scalestep = 0.25;
create_instance("Pulse", 1, "Pulse", 49);
MC_pos(Pulse_1, 240, 240);
MC_show(Pulse_1);
MC_alpha(Pulse_1, 35);
change_background(1);
Frame 3
LoadBar_1.LoadText.text = ("Loading : " + int(Preloader_Status())) + "%";
if (Preloader_Status() < 100) {
gotoAndPlay (2);
}
Frame 5
MC_hide(LoadBar_1);
SFX_Music = new Sound();
SFX_Music.attachSound("DropsOfLife");
SFX_Music.start();
SFX_Pop = new Sound();
SFX_Pop.attachSound("Pop");
SFX_Music.onSoundComplete = function () {
SFX_Music.start();
};
create_instance("MainMenu", 1, "MainMenu", 700);
MC_pos("MainMenu_1", 0, 0);
create_instance("Instructions", 1, "Instructions", 701);
MC_pos("Instructions_1", 0, 0);
create_instance("GameOver", 1, "GameOver", 702);
MC_pos("GameOver_1", 0, 0);
create_instance("LevelOver", 1, "LevelOver", 703);
MC_pos("LevelOver_1", 0, 0);
create_instance("LevelStart", 1, "LevelStart", 704);
MC_pos("LevelStart_1", 0, 0);
create_instance("Ball", 52, "Ball", 500);
create_instance("Timer", 1, "Timer", 600);
create_instance("TargetTimer", 1, "TargetTimer", 601);
MC_pos("Timer_1", 10, 450);
MC_pos("TargetTimer_1", 480 - (TargetTimer_1._width + 10), 450);
Global._state = "Instructions";
set_level_data(Global._level);
set_theme_data(Global._theme);
Frame 6
main_loop();
Frame 7
gotoAndPlay (6);
Symbol 48 MovieClip [SoundEffects] Frame 1
stop();