Frame 1
function soundLevel(vol) {
bgMusic.setVolume(vol * 0.2);
snd_pop.setVolume(vol);
snd_boink.setVolume(vol);
snd_btnOver.setVolume(vol);
snd_btnDown.setVolume(vol);
snd_pwr.setVolume(vol);
snd_gOver.setVolume(vol);
snd_lvl.setVolume(vol);
}
function gameReset() {
screen_gameMenu._visible = false;
menuBtn.enabled = true;
pauseBtn.enabled = true;
action = false;
score = 0;
score_txt.text = score;
level = 1;
level_txt.text = level;
levelCount = 0;
levelGoal = 20;
levelbar._xscale = 100;
dropCount = 1;
dropNum = 1;
clearField();
if (gmode) {
setField(2);
} else {
setField(4);
dropTimer_set();
}
joe.gotoAndPlay("blow");
setShooter(Math.round(Math.random() * (colors.length - 1)));
pointer._visible = true;
Mouse.addListener(lstn);
}
function gamePause(hold) {
menuBtn.enabled = false;
pauseBtn.enabled = false;
Mouse.removeListener(lstn);
delete dropZone.onEnterFrame;
pointer._visible = false;
if (hold) {
screen_gamePause._visible = true;
}
}
function gameResume() {
menuBtn.enabled = true;
pauseBtn.enabled = true;
screen_gamePause._visible = false;
pointer._visible = true;
Mouse.addListener(lstn);
if (!gmode) {
dropTimer_set();
}
}
function gameOver() {
gamePause(false);
screen_gameOver._visible = true;
snd_gOver.start();
joe.gotoAndStop("smile");
}
function addScore(num, c) {
score = score + num;
score_txt.text = score;
if (levelCount < levelGoal) {
levelCount++;
levelbar._xscale = 100 - ((levelCount / levelGoal) * 100);
} else {
levelCount = levelGoal;
levelbar._xscale = 0;
}
}
function levelCheck() {
action = false;
if (levelCount == levelGoal) {
snd_lvl.start();
levelBg.play();
level++;
level_txt.text = level;
levelCount = 0;
levelGoal = levelGoal + 10;
levelbar._xscale = 100;
droptime = 0;
dropCount = 1;
if ((level % 2) == 0) {
dropNum++;
}
}
if (!rowCheck()) {
if ((Math.random() * 100) < 10) {
setShooter(100);
} else {
setShooter(joe.bcolor);
joe.play();
}
if (gmode) {
dropField_strategy();
}
} else {
gameOver();
}
}
function rowCheck() {
var _local2 = false;
var _local1 = 0;
while (_local1 < 12) {
if (rows[8][_local1].mc != null) {
_local2 = true;
break;
}
_local1++;
}
return(_local2);
}
function loadHub() {
var _local1;
switch (gmode) {
case 0 :
_local1 = "arcade";
break;
case 1 :
_local1 = "strategy";
}
_level0.swHighScoreObject.gameId = "popthebubble" + _local1;
_level0.swHighScoreObject.gameTitle = ("Pop the Bubble - " + _local1) + " mode";
_level0.swHighScoreObject.player1Score = score;
hubLstn.onLoadStart = function () {
clearInterval(hubTimer);
hubTimer = setInterval(timeout, 60000);
};
hubLstn.onLoadComplete = function () {
clearInterval(hubTimer);
};
mcl.loadClip("http://www.shockwave.com/content/highscores/scorez-2002.swf", 100033);
}
function playAgain() {
screen_gameOver.submitBtn.gotoAndStop("_up");
screen_gameOver.submitBtn.enabled = false;
}
function timeout() {
clearInterval(hubTimer);
_level0.getInstanceAtDepth(100033).removeMovieClip();
}
function buildField() {
var _local5;
var _local4;
var _local2 = 0;
while (_local2 < 9) {
var _local3 = [];
if ((_local2 % 2) > 0) {
_local5 = 11;
_local4 = 15;
} else {
_local5 = 12;
_local4 = 0;
}
var _local1 = 0;
while (_local1 < _local5) {
_local3[_local1] = {mc:null, bx:((_local1 * 30) + 15) + _local4, by:(_local2 * 30) + 15, bc:null, br:_local2, bp:_local1, hook:false};
_local1++;
}
rows.push(_local3);
_local2++;
}
}
function setField(rnum) {
var _local6;
var _local4;
var _local2 = 0;
while (_local2 < rnum) {
if ((_local2 % 2) > 0) {
_local6 = 11;
_local4 = 15;
} else {
_local6 = 12;
_local4 = 0;
}
var _local1 = 0;
while (_local1 < _local6) {
if (((Math.random() * 100) < 10) && (!gmode)) {
field.attachMovie("blocker", "b" + bnum, bnum, {_x:((_local1 * 30) + 15) + _local4, _y:(_local2 * 30) + 15});
var _local3 = 200;
} else {
field.attachMovie("bubble", "b" + bnum, bnum, {_x:((_local1 * 30) + 15) + _local4, _y:(_local2 * 30) + 15});
var _local3 = Math.round(Math.random() * (colors.length - 1));
var _local5 = new flash.geom.Transform(field["b" + bnum].bg);
_local5.colorTransform = colors[_local3];
}
rows[_local2][_local1].mc = field["b" + bnum];
rows[_local2][_local1].bc = _local3;
((bnum < 1000) ? (bnum++) : ((bnum = 0)));
_local1++;
}
_local2++;
}
}
function clearField() {
shooter.s.removeMovieClip();
var _local2 = 0;
while (_local2 < 9) {
var _local1 = 0;
while (_local1 < rows[_local2].length) {
if (rows[_local2][_local1].mc != null) {
rows[_local2][_local1].mc.removeMovieClip();
}
rows[_local2][_local1].mc = null;
rows[_local2][_local1].bc = null;
_local1++;
}
_local2++;
}
}
function dropTimer_set() {
dropZone.onEnterFrame = function () {
if (droptime == (60 - (level * 5))) {
if (!action) {
dropField();
droptime = 0;
timebar._xscale = 100;
}
} else {
droptime++;
}
};
}
function dropField_strategy() {
if (dropCount < (dropNum + 1)) {
dropField();
dropCount++;
} else {
dropCount = 1;
action = false;
}
}
function dropField() {
action = true;
var pushed = false;
var pos = Math.round(Math.random() * 11);
var zcolor = Math.round(Math.random() * (colors.length - 1));
if (((Math.random() * 100) < 10) && (!gmode)) {
dropZone.attachMovie("blocker", "z", 0, {_x:(pos * 30) + 15});
zcolor = 200;
} else {
dropZone.attachMovie("bubble", "z", 0, {_x:(pos * 30) + 15});
var _local1 = new flash.geom.Transform(dropZone.z.bg);
_local1.colorTransform = colors[zcolor];
}
var z = (new mx.transitions.Tween(dropZone.z, "_y", mx.transitions.easing.Strong.easeOut, 0, 45, 5, false));
z.onMotionChanged = function () {
if ((z.position >= 30) && (!pushed)) {
pushField(pos);
pushed = true;
}
};
z.onMotionFinished = function () {
dropZone.z.removeMovieClip();
addField(pos, zcolor);
if (rowCheck()) {
gameOver();
}
};
}
function pushField(pos) {
var _local1 = [rows[0][pos]];
var _local3 = 0;
while (_local3 < _local1.length) {
if (_local1[_local3].mc == null) {
break;
}
if ((_local3 % 2) > 0) {
var _local7 = pos;
var _local6 = pos + 1;
} else {
var _local7 = pos - 1;
var _local6 = pos;
}
if ((pos > 0) && (pos < 11)) {
if (rows[_local3 + 1][_local7].mc == null) {
var _local5 = false;
} else {
var _local5 = true;
}
if (rows[_local3 + 1][_local6].mc == null) {
var _local4 = false;
} else {
var _local4 = true;
}
} else if ((pos == 0) && ((_local3 % 2) == 0)) {
var _local5 = true;
var _local4 = false;
} else if ((pos == 11) && ((_local3 % 2) == 0)) {
var _local5 = false;
var _local4 = true;
}
if (_local5 && (_local4)) {
var _local8 = Math.round(Math.random());
} else if ((!_local5) && (!_local4)) {
var _local8 = Math.round(Math.random());
} else if (_local5 && (!_local4)) {
var _local8 = 0;
} else if ((!_local5) && (_local4)) {
var _local8 = 1;
}
if (_local8) {
_local1.push(rows[_local3 + 1][_local7]);
pos = _local7;
} else {
_local1.push(rows[_local3 + 1][_local6]);
pos = _local6;
}
_local3++;
}
_local3 = _local1.length - 1;
while (_local3 > 0) {
new mx.transitions.Tween(_local1[_local3 - 1].mc, "_x", mx.transitions.easing.Back.easeOut, _local1[_local3 - 1].bx, _local1[_local3].bx, 6, false);
new mx.transitions.Tween(_local1[_local3 - 1].mc, "_y", mx.transitions.easing.Back.easeOut, _local1[_local3 - 1].by, _local1[_local3].by, 6, false);
_local3--;
}
_local3 = _local1.length - 1;
while (_local3 > 0) {
rows[_local1[_local3].br][_local1[_local3].bp].mc = _local1[_local3 - 1].mc;
rows[_local1[_local3].br][_local1[_local3].bp].bc = _local1[_local3 - 1].bc;
_local3--;
}
}
function addField(pos, bcolor) {
if (bcolor == 200) {
field.attachMovie("blocker", "b" + bnum, bnum, {_x:(pos * 30) + 15, _y:15});
} else {
field.attachMovie("bubble", "b" + bnum, bnum, {_x:(pos * 30) + 15, _y:15});
var _local2 = new flash.geom.Transform(field["b" + bnum].bg);
_local2.colorTransform = colors[bcolor];
}
rows[0][pos].mc = field["b" + bnum];
rows[0][pos].bc = bcolor;
((bnum < 1000) ? (bnum++) : ((bnum = 0)));
if (!gmode) {
action = false;
} else {
dropField_strategy();
}
}
function setShooter(c) {
if (c == 100) {
shooter.attachMovie("power", "s", 0, {_x:180, _y:320});
snd_pwr.start();
} else {
shooter.attachMovie("bubble", "s", 0, {_x:180, _y:320});
var _local2 = new flash.geom.Transform(shooter.s.bg);
_local2.colorTransform = colors[c];
}
sc = c;
}
function shotclock() {
Mouse.removeListener(lstn);
clock.onEnterFrame = function () {
if (!action) {
delete clock.onEnterFrame;
shoot();
Mouse.addListener(lstn);
}
};
}
function getAngle() {
var _local1 = flash.geom.Point.distance(new flash.geom.Point(_xmouse, _ymouse), new flash.geom.Point(300, 350));
angle = 90 + Math.round(Math.asin((300 - _xmouse) / _local1) * 57.3);
}
function drawLines() {
with (lines) {
clear();
lineStyle(1, 16711680);
moveTo(295, 350);
lineTo(tpoint.x - 5, tpoint.y);
moveTo(305, 350);
lineTo(tpoint.x + 5, tpoint.y);
}
trace((rpos + ":") + ppos);
}
function shoot() {
action = true;
var _local2 = false;
var _local3;
var _local5;
var _local4;
var _local6;
var _local1;
if ((!bounce) && (!reshoot)) {
getAngle();
_local1 = {x:300, y:350};
} else {
var _local7 = {x:shooter.s._x, y:shooter.s._y};
shooter.localToGlobal(_local7);
_local1 = {x:_local7.x, y:_local7.y};
reshoot = false;
}
while (!_local2) {
_local1.x = _local1.x + (10 * Math.cos(angle * 0.0175));
_local1.y = _local1.y - (10 * Math.sin(angle * 0.0175));
if (field.hitTest(_local1.x, _local1.y, true)) {
_local2 = true;
_local3 = 0;
} else if (field.hitTest(_local1.x - 5, _local1.y, true)) {
_local2 = true;
_local1.x = _local1.x - 5;
_local3 = 0;
} else if (field.hitTest(_local1.x + 5, _local1.y, true)) {
_local2 = true;
_local1.x = _local1.x + 5;
_local3 = 0;
} else if (_local1.y < field._y) {
_local2 = true;
_local1.y = 45;
_local3 = 1;
} else if (_local1.x < (field._x + 15)) {
_local2 = true;
_local1.x = 135;
_local3 = 2;
} else if (_local1.x > (field._x + 360)) {
_local2 = true;
_local1.x = 465;
_local3 = 3;
}
if (_local2) {
_local5 = Math.floor((_local1.y - 30) / 30);
(((_local5 % 2) > 0) ? (_local4 = Math.floor((_local1.x - 135) / 30)) : (_local4 = Math.floor((_local1.x - 120) / 30)));
if (((_local5 % 2) > 0) && (_local4 == 11)) {
_local4 = 10;
}
_local6 = rows[_local5][_local4];
}
}
switch (_local3) {
case 0 :
findPos_obj(_local6, _local1.x, _local1.y);
break;
case 1 :
findPos_top(_local6, _local1.x, _local1.y);
break;
case 2 :
findPos_left(_local6, _local1.x, _local1.y);
break;
case 3 :
findPos_right(_local6, _local1.x, _local1.y);
}
}
function findPos_top(pos, px, py) {
bounce = false;
var _local2;
if (pos.mc == null) {
_local2 = pos;
} else if ((angle >= 90) && (rows[pos.br][pos.bp - 1].mc == null)) {
_local2 = rows[pos.br][pos.bp - 1];
} else if ((angle < 90) && (rows[pos.br][pos.bp + 1].mc == null)) {
_local2 = rows[pos.br][pos.bp + 1];
}
shootTo(_local2);
}
function findPos_left(pos, px, py) {
bounce = true;
var _local2;
if (pos.mc == null) {
_local2 = pos;
} else if (rows[pos.br][pos.bp + 1].mc == null) {
_local2 = rows[pos.br][pos.bp + 1];
} else if (rows[pos.br + 1][0].mc == null) {
_local2 = rows[pos.br + 1][0];
}
shootTo(_local2);
}
function findPos_right(pos, px, py) {
bounce = true;
var _local2;
var _local3 = pos.br % 2;
if (pos.mc == null) {
_local2 = pos;
} else if (rows[pos.br][pos.bp - 1].mc == null) {
_local2 = rows[pos.br][pos.bp - 1];
} else {
(_local3 ? (_local2 = rows[pos.br + 1][pos.bp + 1]) : (_local2 = rows[pos.br + 1][pos.bp - 1]));
}
shootTo(_local2);
}
function findPos_obj(pos, px, py) {
bounce = false;
var _local6 = {x:px, y:py};
pos.mc.globalToLocal(_local6);
var _local4 = Math.round(Math.atan2(_local6.y, _local6.x) * 57.3);
var _local2;
var _local3 = pos.br % 2;
var _local5;
if ((_local4 >= -90) && (_local4 < -30)) {
_local5 = 1;
} else if ((_local4 >= -30) && (_local4 < 30)) {
_local5 = 2;
} else if ((_local4 >= 30) && (_local4 < 90)) {
_local5 = 3;
} else if ((_local4 >= 90) && (_local4 < 150)) {
_local5 = 4;
} else if ((_local4 >= 150) || (_local4 < -150)) {
_local5 = 5;
} else if ((_local4 >= -150) && (_local4 < -90)) {
_local5 = 6;
}
switch (_local5) {
case 1 :
if (rows[pos.br - 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br - 1][pos.bp + _local3];
} else if (rows[pos.br][pos.bp + 1].mc == null) {
_local2 = rows[pos.br][pos.bp + 1];
}
break;
case 2 :
if (angle > 90) {
if (rows[pos.br][pos.bp + 1].mc == null) {
_local2 = rows[pos.br][pos.bp + 1];
} else if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
}
} else if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
}
break;
case 3 :
if (angle > 90) {
if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
} else if (rows[pos.br][pos.bp + 1].mc == null) {
_local2 = rows[pos.br][pos.bp + 1];
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
}
} else if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
} else if (rows[pos.br][pos.bp - 1].mc == null) {
_local2 = rows[pos.br][pos.bp - 1];
}
break;
case 4 :
if (angle > 90) {
if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
} else if (rows[pos.br][pos.bp + 1].mc == null) {
_local2 = rows[pos.br][pos.bp + 1];
}
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
} else if (rows[pos.br][pos.bp - 1].mc == null) {
_local2 = rows[pos.br][pos.bp - 1];
} else if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
}
break;
case 5 :
if (angle > 90) {
if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
} else if (rows[pos.br + 1][pos.bp + _local3].mc == null) {
_local2 = rows[pos.br + 1][pos.bp + _local3];
}
} else if (rows[pos.br][pos.bp - 1].mc == null) {
_local2 = rows[pos.br][pos.bp - 1];
} else if (rows[pos.br + 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br + 1][pos.bp - (1 - _local3)];
}
break;
case 6 :
if (rows[pos.br - 1][pos.bp - (1 - _local3)].mc == null) {
_local2 = rows[pos.br - 1][pos.bp - (1 - _local3)];
} else {
if (rows[pos.br][pos.bp - 1].mc != null) {
break;
}
_local2 = rows[pos.br][pos.bp - 1];
}
}
if (((_local2.br % 2) > 0) && (_local2.bp == 11)) {
_local2 = rows[_local2.br][10];
}
if (((_local2.br % 2) > 0) && (_local2.bp == -1)) {
_local2 = rows[_local2.br][0];
}
shootTo(_local2);
}
function shootTo(tpos) {
if ((tpos.br == undefined) || (tpos.bp == undefined)) {
((angle < 90) ? ((angle = angle + 5)) : ((angle = angle - 5)));
reshoot = true;
shoot();
} else {
snd_boink.start();
var _local4 = flash.geom.Point.distance(new flash.geom.Point(shooter.s._x, shooter.s._y), new flash.geom.Point(tpos.bx, tpos.by));
var _local1 = Math.round(_local4 / 50);
if (_local1 < 1) {
_local1 = 1;
}
var _local2 = new mx.transitions.Tween(shooter.s, "_x", mx.transitions.easing.None.easeNone, shooter.s._x, tpos.bx, _local1, false);
var _local5 = new mx.transitions.Tween(shooter.s, "_y", mx.transitions.easing.None.easeNone, shooter.s._y, tpos.by, _local1, false);
_local2.onMotionFinished = function () {
if (bounce) {
angle = 180 - angle;
shoot();
} else {
shooter.s.removeMovieClip();
if (sc == 100) {
field.attachMovie("power", "b" + bnum, bnum, {_x:tpos.bx, _y:tpos.by});
} else {
field.attachMovie("bubble", "b" + bnum, bnum, {_x:tpos.bx, _y:tpos.by});
var _local1 = new flash.geom.Transform(field["b" + bnum].bg);
_local1.colorTransform = colors[sc];
}
tpos.mc = field["b" + bnum];
tpos.bc = sc;
((bnum < 1000) ? (bnum++) : ((bnum = 0)));
((tpos.bc == 100) ? (powerCheck(tpos)) : (matchCheck(tpos)));
}
};
}
}
function bubbleRemove(input, points, method) {
var group = [];
var _local1 = 0;
while (_local1 < input.length) {
var _local3;
switch (input[_local1].bc) {
case 100 :
_local3 = "power";
break;
case 200 :
_local3 = "blocker";
break;
default :
_local3 = "bubble";
}
popLevel.attachMovie(_local3, "p" + _local1, _local1, {_x:input[_local1].bx, _y:input[_local1].by});
var _local4 = new flash.geom.Transform(popLevel["p" + _local1].bg);
_local4.colorTransform = colors[input[_local1].bc];
group[_local1] = {mc:popLevel["p" + _local1], bc:input[_local1].bc};
input[_local1].mc.removeMovieClip();
input[_local1].mc = null;
input[_local1].bc = null;
_local1++;
}
var num = 0;
var count = 1;
onEnterFrame = function () {
if ((count % 3) == 0) {
group[num].mc.gotoAndPlay("popBubble");
if (group[num].bc == 100) {
addScore(50, null);
} else {
group[num].mc.points_txt.text = points;
group[num].mc.points_txt.textColor = scolors[group[num].bc];
var _local1 = new flash.geom.Transform(group[num].mc.popFX);
_local1.colorTransform = colors[group[num].bc];
addScore(points, group[num].bc);
}
if (num < (group.length - 1)) {
num++;
} else {
delete onEnterFrame;
method();
}
}
count++;
};
}
function powerCheck(n) {
var _local3 = [n];
var _local2 = n.br % 2;
if ((rows[n.br - 1][n.bp - (1 - _local2)].mc != null) && ((n.bp - (1 - _local2)) >= 0)) {
_local3.push(rows[n.br - 1][n.bp - (1 - _local2)]);
}
if (rows[n.br - 1][n.bp + _local2].mc != null) {
_local3.push(rows[n.br - 1][n.bp + _local2]);
}
if ((rows[n.br][n.bp - 1].mc != null) && ((n.bp - 1) >= 0)) {
_local3.push(rows[n.br][n.bp - 1]);
}
if (rows[n.br][n.bp + 1].mc != null) {
_local3.push(rows[n.br][n.bp + 1]);
}
if ((rows[n.br + 1][n.bp - (1 - _local2)].mc != null) && ((n.bp - (1 - _local2)) >= 0)) {
_local3.push(rows[n.br + 1][n.bp - (1 - _local2)]);
}
if (rows[n.br + 1][n.bp + _local2].mc != null) {
_local3.push(rows[n.br + 1][n.bp + _local2]);
}
bubbleRemove(_local3, 50, orphanCheck);
}
function matchCheck(n) {
function exclude(obj) {
var _local2 = false;
var _local1 = 0;
while (_local1 < match.length) {
if (obj.mc == match[_local1].mc) {
_local2 = true;
break;
}
_local1++;
}
if (!_local2) {
match.push(obj);
}
}
var match = [n];
var _local1 = 0;
while (_local1 < match.length) {
if ((match[_local1].br % 2) > 0) {
if (rows[match[_local1].br - 1][match[_local1].bp].bc == match[_local1].bc) {
exclude(rows[match[_local1].br - 1][match[_local1].bp]);
}
if (rows[match[_local1].br - 1][match[_local1].bp + 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br - 1][match[_local1].bp + 1]);
}
if (rows[match[_local1].br][match[_local1].bp - 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br][match[_local1].bp - 1]);
}
if (rows[match[_local1].br][match[_local1].bp + 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br][match[_local1].bp + 1]);
}
if (rows[match[_local1].br + 1][match[_local1].bp].bc == match[_local1].bc) {
exclude(rows[match[_local1].br + 1][match[_local1].bp]);
}
if (rows[match[_local1].br + 1][match[_local1].bp + 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br + 1][match[_local1].bp + 1]);
}
} else {
if (rows[match[_local1].br - 1][match[_local1].bp].bc == match[_local1].bc) {
exclude(rows[match[_local1].br - 1][match[_local1].bp]);
}
if (rows[match[_local1].br - 1][match[_local1].bp - 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br - 1][match[_local1].bp - 1]);
}
if (rows[match[_local1].br][match[_local1].bp - 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br][match[_local1].bp - 1]);
}
if (rows[match[_local1].br][match[_local1].bp + 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br][match[_local1].bp + 1]);
}
if (rows[match[_local1].br + 1][match[_local1].bp].bc == match[_local1].bc) {
exclude(rows[match[_local1].br + 1][match[_local1].bp]);
}
if (rows[match[_local1].br + 1][match[_local1].bp - 1].bc == match[_local1].bc) {
exclude(rows[match[_local1].br + 1][match[_local1].bp - 1]);
}
}
_local1++;
}
if (match.length >= 3) {
bubbleRemove(match, 20, orphanCheck);
} else {
levelCheck();
}
}
function orphanCheck() {
var _local3 = [];
var _local2 = 0;
while (_local2 < rows.length) {
var _local1 = 0;
while (_local1 < rows[_local2].length) {
if (rows[_local2][_local1].mc != null) {
rows[_local2][_local1].hook = false;
}
_local1++;
}
_local2++;
}
var _local1 = 0;
while (_local1 < rows[0].length) {
if (rows[0][_local1].mc != null) {
rows[0][_local1].hook = true;
}
_local1++;
}
_local2 = 0;
while (_local2 < rows.length) {
_local1 = 0;
while (_local1 < rows[_local2].length) {
if (rows[_local2][_local1].mc != null) {
setHook(_local2, _local1);
}
_local1++;
}
_local2++;
}
_local2 = rows.length - 1;
while (_local2 > -1) {
_local1 = rows[_local2].length - 1;
while (_local1 > -1) {
if (rows[_local2][_local1].mc != null) {
setHook(_local2, _local1);
}
_local1--;
}
_local2--;
}
_local2 = rows.length - 1;
while (_local2 > -1) {
_local1 = 0;
while (_local1 < rows[_local2].length) {
if ((rows[_local2][_local1].mc != null) && (!rows[_local2][_local1].hook)) {
_local3.push(rows[_local2][_local1]);
}
_local1++;
}
_local2--;
}
if (_local3.length > 0) {
bubbleRemove(_local3, 50, levelCheck);
} else {
levelCheck();
}
}
function setHook(r, p) {
var _local3 = rows[r].length;
if (rows[r][p].hook) {
if ((r % 2) > 0) {
if (r > 0) {
if ((p >= 0) && (rows[r - 1][p].mc != null)) {
rows[r - 1][p].hook = true;
}
if (((p + 1) <= _local3) && (rows[r - 1][p + 1].mc != null)) {
rows[r - 1][p + 1].hook = true;
}
}
if (((p - 1) >= 0) && (rows[r][p - 1].mc != null)) {
rows[r][p - 1].hook = true;
}
if (((p + 1) <= _local3) && (rows[r][p + 1].mc != null)) {
rows[r][p + 1].hook = true;
}
if (r <= (rows.length - 1)) {
if ((p >= 0) && (rows[r + 1][p].mc != null)) {
rows[r + 1][p].hook = true;
}
if (((p + 1) <= _local3) && (rows[r + 1][p + 1].mc != null)) {
rows[r + 1][p + 1].hook = true;
}
}
} else {
if (r > 0) {
if ((p <= _local3) && (rows[r - 1][p].mc != null)) {
rows[r - 1][p].hook = true;
}
if (((p - 1) >= 0) && (rows[r - 1][p - 1].mc != null)) {
rows[r - 1][p - 1].hook = true;
}
}
if (((p - 1) >= 0) && (rows[r][p - 1].mc != null)) {
rows[r][p - 1].hook = true;
}
if (((p + 1) <= _local3) && (rows[r][p + 1].mc != null)) {
rows[r][p + 1].hook = true;
}
if ((r + 1) <= (rows.length - 1)) {
if ((p <= _local3) && (rows[r + 1][p].mc != null)) {
rows[r + 1][p].hook = true;
}
if (((p - 1) >= 0) && (rows[r + 1][p - 1].mc != null)) {
rows[r + 1][p - 1].hook = true;
}
}
}
}
}
stop();
var score = 0;
var gmode = 1;
var level = 1;
var levelCount = 0;
var levelGoal = 50;
var action = false;
var lstn = new Object();
screen_gamePause.swapDepths(10100);
screen_gameOver.swapDepths(10200);
screen_gameMenu.swapDepths(10300);
screen_gameScores.swapDepths(10400);
lockup.swapDepths(10500);
screen_gamePause._visible = false;
screen_gameOver._visible = false;
screen_gameScores._visible = false;
pointer._visible = false;
menuBtn.enabled = false;
pauseBtn.enabled = false;
var colors = [];
colors[0] = new flash.geom.ColorTransform(0, 0, 0, 1, 102, 0, 153, 0);
colors[1] = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 204, 0, 0);
colors[2] = new flash.geom.ColorTransform(0, 0, 0, 1, 255, 0, 0, 0);
colors[3] = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 204, 0);
colors[4] = new flash.geom.ColorTransform(0, 0, 0, 1, 255, 204, 0, 0);
colors[5] = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 188, 221, 0);
var scolors = [];
scolors[0] = 6684825 /* 0x660099 */;
scolors[1] = 52224;
scolors[2] = 16711680 /* 0xFF0000 */;
scolors[3] = 204;
scolors[4] = 16763904 /* 0xFFCC00 */;
scolors[5] = 48349;
this.createEmptyMovieClip("soundfx", 99000);
this.createEmptyMovieClip("music", 99001);
var bgMusic = new Sound(music);
bgMusic.attachSound("bgMusic");
bgMusic.start(0, 9999);
soundfx.createEmptyMovieClip("popMC", 0);
var snd_pop = new Sound(soundfx.popMC);
snd_pop.attachSound("Pop1");
soundfx.createEmptyMovieClip("boinkMC", 1);
var snd_boink = new Sound(soundfx.boinkMC);
snd_boink.attachSound("boink");
soundfx.createEmptyMovieClip("btnOverMC", 2);
var snd_btnOver = new Sound(soundfx.btnOverMC);
snd_btnOver.attachSound("btnOver");
soundfx.createEmptyMovieClip("btnDownMC", 3);
var snd_btnDown = new Sound(soundfx.DownMC);
snd_btnDown.attachSound("blop");
soundfx.createEmptyMovieClip("pwrMC", 4);
var snd_pwr = new Sound(soundfx.pwrMC);
snd_pwr.attachSound("powerup");
soundfx.createEmptyMovieClip("gOverMC", 5);
var snd_gOver = new Sound(soundfx.gOverMC);
snd_gOver.attachSound("gOver");
soundfx.createEmptyMovieClip("levelMC", 6);
var snd_lvl = new Sound(soundfx.gOverMC);
snd_lvl.attachSound("levelup");
soundLevel(100);
volumebar.onPress = function () {
var _local2 = 10 * Math.round(this._xmouse / 10);
this.bar._xscale = _local2;
soundLevel(_local2);
};
var shotCount = 1;
var shotNum = 1;
lockup.onPress = function () {
getURL ("http://ad.doubleclick.net/clk;202674185;15177704;g?http://www.BubbleBlow");
};
menuBtn.onPress = function () {
this.gotoAndStop("_up");
gamePause(false);
screen_gameMenu._visible = true;
};
pauseBtn.onPress = function () {
this.gotoAndStop("_up");
gamePause(true);
};
screen_gameOver.submitBtn.onPress = function () {
this.enabled = false;
loadHub();
};
screen_gameOver.restartBtn.onPress = function () {
screen_gameOver._visible = false;
screen_gameMenu._visible = true;
screen_gameOver.submitBtn.enabled = true;
screen_gameOver.saveBtn.enabled = true;
};
screen_gameOver.saveBtn.onPress = function () {
screen_gameOver._visible = false;
screen_gameScores._visible = true;
};
screen_gamePause.resumeBtn.onPress = function () {
gameResume();
};
var mcl = new MovieClipLoader();
var hubLstn = new Object();
mcl.addListener(hubLstn);
var hubTimer;
_level0.swHighScoreObject = new Object();
_level0.HSLOAD_ID = 0;
System.security.allowDomain("shockwave.com", "intranet.shockwave.com", "gameblast.shockwave.com", "www.shockwave.com", "dev.shockwave.com", "stage.shockwave.com");
_level0.swHighScoreObject = {showTab:"submit", gameId:null, gameTitle:null, screenWidth:500, screenHeight:400, scoreDescriptor:"points", numPlayers:1, player1Score:0};
var rows = [];
var bnum = 0;
this.createEmptyMovieClip("field", 0);
field._x = 120;
field._y = 30;
buildField();
this.createEmptyMovieClip("dropZone", 2000);
dropZone._x = 120;
var droptime = 0;
var dropCount = 1;
var dropNum = 1;
this.createEmptyMovieClip("shooter", 1000);
shooter._x = field._x;
shooter._y = field._y;
var sc;
lstn.onMouseDown = function () {
if ((((_xmouse > 120) && (_xmouse < 480)) && (_ymouse > 30)) && (_ymouse < 300)) {
if (!action) {
shoot();
} else if (joe.ready) {
shotclock();
}
}
};
this.createEmptyMovieClip("clock", 3000);
var angle;
var bounce = false;
var reshoot = false;
this.createEmptyMovieClip("popLevel", 5000);
popLevel._x = field._x;
popLevel._y = field._y;
Symbol 23 MovieClip [blocker] Frame 1
stop();
var trans = (new flash.geom.Transform(bg));
trans.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0);
popFX._visible = false;
Symbol 23 MovieClip [blocker] Frame 6
popFX._visible = true;
_root.snd_pop.start();
Symbol 23 MovieClip [blocker] Frame 15
this.removeMovieClip();
Symbol 31 MovieClip [power] Frame 1
stop();
popFX._visible = false;
points_txt._visible = false;
var trans = (new flash.geom.Transform(bg));
trans.colorTransform = _root.colors[0];
var num = (_root.colors.length - 1);
var c = 1;
var count = 1;
onEnterFrame = function () {
if ((count % 2) == 0) {
trans.colorTransform = _root.colors[c];
((c < num) ? (c++) : ((c = 0)));
count = 1;
} else {
count++;
}
};
Symbol 31 MovieClip [power] Frame 6
delete onEnterFrame;
popFX._visible = true;
_root.snd_pop.start();
Symbol 31 MovieClip [power] Frame 11
points_txt._visible = true;
Symbol 31 MovieClip [power] Frame 15
this.removeMovieClip();
Symbol 37 MovieClip [bubble] Frame 1
stop();
popFX._visible = false;
points_txt._visible = false;
Symbol 37 MovieClip [bubble] Frame 6
popFX._visible = true;
_root.snd_pop.start();
Symbol 37 MovieClip [bubble] Frame 11
points_txt._visible = true;
Symbol 37 MovieClip [bubble] Frame 15
this.removeMovieClip();
Symbol 49 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + Math.round(Math.atan2(_ymouse, _xmouse) * 57.3);
};
Symbol 52 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 1
stop();
var over = false;
Symbol 61 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 61 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 65 MovieClip Frame 1
stop();
var over = false;
Symbol 65 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 65 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 92 MovieClip Frame 1
stop();
var ready = false;
var bcolor;
holder.attachMovie("bubble", "jbubble", 0);
Symbol 92 MovieClip Frame 6
bcolor = Math.round(Math.random() * (_parent.colors.length - 1));
var trans = (new flash.geom.Transform(holder.jbubble.bg));
trans.colorTransform = _parent.colors[bcolor];
Symbol 92 MovieClip Frame 11
stop();
ready = true;
Symbol 92 MovieClip Frame 12
ready = false;
Symbol 92 MovieClip Frame 17
gotoAndPlay ("blow");
Symbol 107 MovieClip Frame 1
stop();
var pink = (new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0));
var trans = (new flash.geom.Transform(tbubble.bg));
trans.colorTransform = pink;
Symbol 114 MovieClip Frame 1
stop();
var over = false;
Symbol 114 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 114 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 118 MovieClip Frame 1
stop();
var over = false;
Symbol 118 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 118 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 123 MovieClip Frame 1
stop();
popFX._visible = false;
_parent.strategyGO = false;
_parent.strategyUP = false;
var trans = (new flash.geom.Transform(bg));
trans.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0);
var trans2 = (new flash.geom.Transform(popFX));
trans2.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0);
Symbol 123 MovieClip Frame 6
popFX._visible = true;
_root.snd_pop.start();
Symbol 123 MovieClip Frame 12
_root.gmode = 1;
_root.gameReset();
Symbol 127 MovieClip Frame 1
stop();
popFX._visible = false;
_parent.arcadeGO = false;
_parent.arcadeUP = false;
var trans = (new flash.geom.Transform(bg));
trans.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0);
var trans2 = (new flash.geom.Transform(popFX));
trans2.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 239, 79, 154, 0);
Symbol 127 MovieClip Frame 6
popFX._visible = true;
_root.snd_pop.start();
Symbol 127 MovieClip Frame 12
_root.gmode = 0;
_root.gameReset();
Symbol 137 MovieClip Frame 1
stop();
var over = false;
Symbol 137 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 137 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 158 MovieClip Frame 1
stop();
credits_logo.onPress = function () {
getURL ("http://ad.doubleclick.net/clk;202674185;15177704;g?http://www.BubbleBlow");
};
Symbol 158 MovieClip Frame 6
stop();
Symbol 158 MovieClip Frame 11
stop();
Symbol 158 MovieClip Frame 16
stop();
fsound_logo.onPress = function () {
getURL ("http://freesound.iua.upf.edu/index.php", "_blank");
};
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 6
stop();
Symbol 165 MovieClip Frame 11
stop();
Symbol 165 MovieClip Frame 16
stop();
Symbol 165 MovieClip Frame 21
stop();
Symbol 165 MovieClip Frame 26
stop();
Symbol 166 MovieClip Frame 1
stop();
title_a.gotoAndStop("white");
title_s.gotoAndStop("white");
var arcadeGO = false;
var arcadeUP = false;
arcadeBtn.onPress = function () {
arcadeGO = true;
this.play();
};
arcadeBtn.onRollOver = function () {
if ((!arcadeGO) && (!arcadeUP)) {
arcadeUP = true;
title_a.gotoAndStop("pink");
_root.snd_btnOver.start();
this._xscale = (this._yscale = 300);
}
};
arcadeBtn.onRollOut = (arcadeBtn.onReleaseOutside = function () {
arcadeUP = false;
title_a.gotoAndStop("white");
this._xscale = (this._yscale = 250);
});
var strategyGO = false;
var strategyUP = false;
strategyBtn.onPress = function () {
strategyGO = true;
this.play();
};
strategyBtn.onRollOver = function () {
if ((!strategyGO) && (!strategyUP)) {
strategyUP = true;
title_s.gotoAndStop("pink");
_root.snd_btnOver.start();
this._xscale = (this._yscale = 300);
}
};
strategyBtn.onRollOut = (strategyBtn.onReleaseOutside = function () {
strategyUP = false;
title_s.gotoAndStop("white");
this._xscale = (this._yscale = 250);
});
howtoBtn.onPress = function () {
gotoAndStop ("howto");
};
creditsBtn.onPress = function () {
gotoAndStop ("credits");
};
Symbol 166 MovieClip Frame 6
stop();
var pg = 1;
credits_nextBtn.onPress = function () {
((pg < 4) ? (pg++) : ((pg = 1)));
credits.gotoAndStop("p" + pg);
};
credits_menuBtn.onPress = function () {
gotoAndStop ("menu");
};
Symbol 166 MovieClip Frame 11
stop();
var pg = 1;
howto_nextBtn.onPress = function () {
((pg < 5) ? (pg++) : ((pg = 1)));
howto.gotoAndStop("p" + pg);
};
howto_menuBtn.onPress = function () {
gotoAndStop ("menu");
};
Symbol 171 MovieClip Frame 1
stop();
var over = false;
Symbol 171 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 171 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 178 MovieClip Frame 1
stop();
var over = false;
Symbol 178 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 178 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 182 MovieClip Frame 1
stop();
var over = false;
Symbol 182 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 182 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 186 MovieClip Frame 1
stop();
var over = false;
Symbol 186 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 186 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 197 MovieClip Frame 1
stop();
var over = false;
Symbol 197 MovieClip Frame 6
stop();
if (!over) {
over = true;
_root.snd_btnOver.start();
}
Symbol 197 MovieClip Frame 11
stop();
_root.snd_btnDown.start();
Symbol 227 MovieClip Frame 1
function updateBoard() {
if (sObj.data.scores == undefined) {
sObj.data.scores = sboard;
} else {
sboard = sObj.data.scores;
}
stats_txt.text = (_root.levelNum + " / ") + _root.score;
name_txt.text = "";
}
function saveScore() {
m = _root.gmode;
var _local2 = {nm:name_txt.text, lv:_root.level, sc:_root.score};
sboard[m].push(_local2);
sboard[m].sortOn("sc", Array.NUMERIC | Array.DESCENDING);
if (sboard[m].length > 5) {
sboard[m].pop();
}
sObj.data.scores = sboard;
sObj.flush();
setBoard();
}
function setBoard() {
updateBoard();
sboard[0].sortOn("sc", Array.NUMERIC | Array.DESCENDING);
sboard[1].sortOn("sc", Array.NUMERIC | Array.DESCENDING);
var _local4 = sboard[0];
var _local3 = sboard[1];
var _local2 = 1;
while (_local2 < (_local4.length + 1)) {
this["Aname_" + _local2].text = _local4[_local2 - 1].nm;
this["Ascore_" + _local2].text = (_local4[_local2 - 1].lv + "-") + _local4[_local2 - 1].sc;
_local2++;
}
_local2 = 1;
while (_local2 < (_local3.length + 1)) {
this["Sname_" + _local2].text = _local3[_local2 - 1].nm;
this["Sscore_" + _local2].text = (_local3[_local2 - 1].lv + "-") + _local3[_local2 - 1].sc;
_local2++;
}
}
stop();
var m;
name_txt.maxChars = 8;
var sboard = [];
var i = 0;
while (i < 2) {
var md = [];
var j = 0;
while (j < 5) {
var obj = {nm:" ", lv:0, sc:0};
md.push(obj);
j++;
}
sboard.push(md);
i++;
}
var sObj = SharedObject.getLocal("bubblicious", "/");
saveBtn.onPress = function () {
this.enabled = false;
this.gotoAndStop("_up");
_root.screen_gameOver.saveBtn.enabled = false;
saveScore();
};
backBtn.onPress = function () {
saveBtn.enabled = true;
_root.screen_gameScores._visible = false;
_root.screen_gameOver._visible = true;
};
setBoard();
Symbol 228 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 229 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 230 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 231 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 232 MovieClip [__Packages.mx.transitions.easing.Back] Frame 0
class mx.transitions.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 233 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}