Frame 1
var debug = false;
var gameID = 233;
var gameName = "ice_castle_blaster";
stop();
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) > 99) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
if (!okToPlay) {
gotoAndStop (2);
}
Frame 4
var globalScore = 0;
var globalLevel = 1;
var globalBullets = 0;
var globalBounceLimit = 3;
var startUp = new Boolean();
startUp = false;
var highScore = new Boolean();
highScore = false;
stop();
start_btn.onRelease = function () {
black_mc.play();
startUp = true;
};
hs_btn.onRelease = function () {
black_mc.play();
highScore = true;
};
fgfyw_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/?" + _root.gameName, "_blank");
};
foggy_btn.onRelease = function () {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
};
Frame 23
stop();
bar_mc._xscale = 0;
gameOver_mc._visible = false;
complete_mc._visible = false;
retry_btn.onRelease = function () {
gotoAndStop ("blankScreen");
};
Frame 32
gotoAndStop ("gameScreen");
Frame 43
stop();
retry_btn.onRelease = function () {
gotoAndStop ("titleScreen");
};
Frame 54
stop();
back_btn.onRelease = function () {
gotoAndStop ("titleScreen");
};
Instance of Symbol 463 MovieClip [TMP6pbk6uzm9i] in Frame 54
//component parameters
onClipEvent (construct) {
gameID = 233;
}
Instance of Symbol 468 MovieClip [TMP6ojzjuzm8i] in Frame 54
//component parameters
onClipEvent (construct) {
gameID = 233;
}
Symbol 22 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
}
Symbol 83 MovieClip Frame 1
stop();
var tagctr = (random(55) + 1);
gotoAndStop(tagctr);
Symbol 84 MovieClip Frame 105
stop();
Symbol 90 MovieClip Frame 1
_root.earl223 = function (val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
};
Symbol 97 MovieClip Frame 1
stop();
Symbol 471 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 472 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 473 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 474 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";
}
Instance of Symbol 110 MovieClip "mcNotice" in Symbol 147 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 147 MovieClip Frame 120
stop();
if ((_url.indexOf("freeonlinegames.com") >= 0) && (_url.indexOf("file:") == -1)) {
_root.okToPlay = true;
_root.play();
} else if (_root.debug) {
_root.okToPlay = true;
_root.play();
} else {
_root.mcTaglines._visible = false;
mcNotice._visible = true;
}
Symbol 148 MovieClip Frame 71
stop();
var fogsound = new Sound();
fogsound.onSoundComplete = function () {
_root.okToPlay = true;
_root.play();
};
fogsound.attachSound("fogaudio");
fogsound.start(0, 1);
Symbol 163 MovieClip Frame 1
stop();
Symbol 174 MovieClip [addStone] Frame 1
function moveUp() {
thisClip._y = thisClip._y - 2;
if (thisClip._y <= 0) {
clearInterval(burst);
removeMovieClip(thisClip);
}
}
stop();
var burst = setInterval(moveUp, 20);
var thisClip = this;
Symbol 176 MovieClip [addStone2] Frame 1
function moveUp() {
thisClip._y = thisClip._y - 2;
if (thisClip._y <= 0) {
clearInterval(burst);
removeMovieClip(thisClip);
}
}
stop();
var burst = setInterval(moveUp, 20);
var thisClip = this;
Symbol 191 MovieClip [castle1MC] Frame 1
function moveExt() {
extMov = (thisMov = new mx.transitions.Tween(ext_mc, "_y", mx.transitions.easing.None.easeIn, ext_mc._y, ext_mc._y + ext_mc._height, speed, true));
extMov.onMotionChanged = function () {
moving = true;
ext = false;
};
extMov.onMotionFinished = function () {
moving = false;
ext = false;
unloadMovie (ext_mc);
};
}
function moveThis() {
if (!moving) {
checkNow();
thisClip._parent.crumbleSound.start();
thisMov = new mx.transitions.Tween(thisClip, "_y", mx.transitions.easing.None.easeIn, thisClip._y, thisClip._y + sinkDist, speed, true);
}
thisMov.onMotionChanged = function () {
moving = true;
};
thisMov.onMotionFinished = function () {
if (!gateOpen) {
initKnight();
kniInt = setInterval(initKnight, initRate);
}
if (thisClip._y >= limit) {
clearInterval(kniInt);
thisClip._parent.castleCount--;
removeMovieClip(thisClip);
thisMov = new mx.transitions.Tween(thisClip, "_y", mx.transitions.easing.None.easeIn, thisClip._y, thisClip._y + sinkDist, speed, true);
}
moving = false;
hit = false;
gateOpen = true;
};
}
function checkNow() {
if (stones) {
thisClip._parent.addStones(thisClip, false);
thisClip._parent._parent.globalBullets = thisClip._parent._parent.globalBullets + 3;
thisClip._parent._parent.bullet_txt.text = thisClip._parent._parent.globalBullets;
stones = false;
}
trace("?");
if (ext) {
gotoAndStop ("extDestroyed1");
} else {
gotoAndStop ("destroyed1");
}
}
function initKnight() {
if (!moving) {
var _local1 = thisClip._parent.attachMovie("knightMC", "knight_mc" + kCount, thisClip._parent.getNextHighestDepth());
_local1._x = thisClip._x + KNIGHT_OFFSET_X;
_local1._y = thisClip._y + KNIGHT_OFFSET_Y;
kCount++;
}
}
stop();
var KNIGHT_OFFSET_X = 45;
var KNIGHT_OFFSET_Y = 15;
var thisClip = this;
var sinkDist = 38;
var speed = 0.5;
var moving = new Boolean();
var gateOpen = new Boolean();
var thisMov;
var limit = this._parent.projectile.limit;
var kniInt;
var initRate = 7500;
var kCount = this._parent.knightCount;
var maxPan = 0;
var thisName = "castle";
var hit = new Boolean();
hit = false;
var smoke;
moving = false;
gateOpen = false;
thisClip = this;
var stones;
var ext;
Symbol 203 MovieClip [castle2MC] Frame 1
function moveExt() {
extMov = (thisMov = new mx.transitions.Tween(ext_mc, "_y", mx.transitions.easing.None.easeIn, ext_mc._y, ext_mc._y + ext_mc._height, speed, true));
extMov.onMotionChanged = function () {
moving = true;
ext = false;
};
extMov.onMotionFinished = function () {
moving = false;
ext = false;
unloadMovie (ext_mc);
};
}
function moveThis() {
if (!moving) {
thisClip._parent.crumbleSound.start();
checkNow();
thisMov = new mx.transitions.Tween(thisClip, "_y", mx.transitions.easing.None.easeIn, thisClip._y, thisClip._y + sinkDist, speed, true);
}
thisMov.onMotionChanged = function () {
moving = true;
};
thisMov.onMotionFinished = function () {
if (thisClip._y >= limit) {
thisClip._parent.castleCount--;
removeMovieClip(thisClip);
}
moving = false;
hit = false;
};
}
function checkNow() {
if (stones) {
thisClip._parent.addStones(thisClip, false);
thisClip._parent._parent.globalBullets = thisClip._parent._parent.globalBullets + 3;
thisClip._parent._parent.bullet_txt.text = thisClip._parent._parent.globalBullets;
stones = false;
}
if (ext && (thisClip._currentFrame != 6)) {
gotoAndStop ("extDestroyed1");
} else if (ext) {
gotoAndStop ("extDestroyed2");
} else if ((thisClip._currentFrame != 8) && (thisClip._currentFrame != 9)) {
gotoAndStop ("Destroyed1");
} else {
gotoAndStop ("Destroyed2");
}
}
stop();
var thisClip = this;
var sinkDist = 37;
var speed = 0.5;
var moving = new Boolean();
var thisMov;
var extMov;
var limit = this._parent.projectile.limit;
var thisName = "castle";
var hit = new Boolean();
var smoke;
var stones;
var ext;
hit = false;
moving = false;
Symbol 213 MovieClip [castle3MC] Frame 1
function moveExt() {
extMov = (thisMov = new mx.transitions.Tween(ext_mc, "_y", mx.transitions.easing.None.easeIn, ext_mc._y, ext_mc._y + ext_mc._height, speed, true));
extMov.onMotionChanged = function () {
moving = true;
ext = false;
};
extMov.onMotionFinished = function () {
moving = false;
ext = false;
unloadMovie (ext_mc);
};
}
function moveThis() {
if (!moving) {
checkNow();
thisClip._parent.crumbleSound.start();
thisMov = new mx.transitions.Tween(thisClip, "_y", mx.transitions.easing.None.easeIn, thisClip._y, thisClip._y + sinkDist, speed, true);
}
thisMov.onMotionChanged = function () {
moving = true;
};
thisMov.onMotionFinished = function () {
if (thisClip._y >= limit) {
thisClip._parent.castleCount--;
removeMovieClip(thisClip);
}
moving = false;
hit = false;
};
}
function checkNow() {
if (stones) {
thisClip._parent.addStones(thisClip, true);
thisClip._parent._parent.globalBullets = thisClip._parent._parent.globalBullets + 9;
thisClip._parent._parent.bullet_txt.text = thisClip._parent._parent.globalBullets;
stones = false;
}
if (ext && (thisClip._currentFrame == 3)) {
gotoAndStop ("ext1Destroyed");
} else if ((ext && (thisClip._currentFrame == 5)) || (ext && (thisClip._currentFrame == 6))) {
gotoAndStop ("ext2Destroyed");
} else {
gotoAndStop ("destroyed");
}
}
stop();
var thisClip = this;
var sinkDist = 30.8;
var speed = 0.5;
var moving = new Boolean();
var thisMov;
var limit = this._parent.projectile.limit;
var thisName = "castle";
var smoke;
moving = false;
var hit = new Boolean();
hit = false;
var stones;
var ext;
Symbol 217 MovieClip [castle4MC] Frame 1
function moveThis() {
if (!moving) {
checkNow();
thisClip._parent.crumbleSound.start();
thisMov = new mx.transitions.Tween(thisClip, "_y", mx.transitions.easing.None.easeIn, thisClip._y, thisClip._y + sinkDist, speed, true);
}
thisMov.onMotionChanged = function () {
moving = true;
};
thisMov.onMotionFinished = function () {
if (thisClip._y >= limit) {
thisClip._parent.castleCount--;
removeMovieClip(thisClip);
}
moving = false;
hit = false;
};
}
function checkNow() {
if (stones) {
thisClip._parent.addStones(thisClip, false);
thisClip._parent._parent.globalBullets = thisClip._parent._parent.globalBullets + 3;
thisClip._parent._parent.bullet_txt.text = thisClip._parent._parent.globalBullets;
stones = false;
}
gotoAndStop ("destroyed");
}
stop();
var thisClip = this;
var sinkDist = 77;
var speed = 0.5;
var moving = new Boolean();
var thisMov;
var limit = this._parent.projectile.limit;
var thisName = "castle";
var smoke;
moving = false;
var hit = new Boolean();
hit = false;
var stones;
var ext;
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 5
stop();
Symbol 240 MovieClip [TMPd4lzhusf84] Frame 1
function earl223(val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
}
mcButtonMain.mcButton.FOG.swapDepths(0);
mcButtonMain.mcButton.attachMovie(btnMC, "btnMC", 0);
mcButtonMain.mcButton.btnMC.onRelease = function () {
var _local2 = new LoadVars();
_local2.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local2.score = Score;
_local2.score2 = earl223(String(Score));
_local2.gamer = gameID;
_local2.id = random(9999999);
_local2.toString();
_local2.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local2, "POST");
delete this.onRelease;
};
Symbol 243 MovieClip [gameOverMC] Frame 1
back2main_btn.onRelease = function () {
_root.gotoAndStop("titleScreen");
};
playmore_btn.onRelease = function () {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
};
submitMe.Score = _root.globalScore;
Instance of Symbol 240 MovieClip [TMPd4lzhusf84] "submitMe" in Symbol 243 MovieClip [gameOverMC] Frame 1
//component parameters
onClipEvent (construct) {
btnMC = "submitScore";
gameID = 233;
}
Symbol 259 MovieClip [guardMC] Frame 1
stop();
var thisName = "guard";
Symbol 259 MovieClip [guardMC] Frame 5
stop();
Symbol 259 MovieClip [guardMC] Frame 20
gotoAndStop ("guard");
Symbol 259 MovieClip [guardMC] Frame 21
var thisName = "deadGuard";
Symbol 259 MovieClip [guardMC] Frame 35
removeMovieClip(this);
Symbol 274 MovieClip [hitAnimMC] Frame 23
removeMovieClip(this);
Symbol 290 MovieClip [knightMC] Frame 1
function moveMe() {
moving = true;
thisClip._x = thisClip._x - moveSpeed;
if ((thisClip._x <= 0) || (thisClip._y >= 275)) {
removeMe();
}
hitTestGuard();
}
function moveCall() {
trace("move me again");
gotoAndStop ("walk2");
moveInt = setInterval(moveMe, 30);
}
function hitTestGuard() {
for (var _local1 in holder) {
if (typeof(holder[_local1]) == "movieclip") {
if (thisClip.hitTest(holder[_local1]) && (holder[_local1].thisName == "guard")) {
thisClip._parent.startBattle(holder[_local1], thisClip);
moving = false;
clearInterval(moveInt);
} else if (((holder[_local1] != thisClip) && (thisClip.hitTest(holder[_local1]))) && (holder[_local1].thisName == "knight")) {
thisClip._x = thisClip._x + 2.5;
gotoAndStop ("guard");
moving = false;
clearInterval(moveInt);
} else if (thisClip.hitTest(thisClip._parent.surrender_mc)) {
clearInterval(moveInt);
thisClip._parent.surrender_mc.gotoAndStop(2);
thisClip._parent.gameOver(true);
trace(thisClip._parent.gameOver);
}
}
}
}
function removeMe() {
clearInterval(moveInt);
clearInterval(remInt);
}
stop();
var thisClip = this;
var holder = this._parent;
var moveSpeed = thisClip._parent.kMoveSpd;
var moveInt = setInterval(moveMe, 30);
var remInt;
var gameMC = this._parent;
var thisName = "knight";
var moving = new Boolean();
var fighting = new Boolean();
fighting = false;
Symbol 290 MovieClip [knightMC] Frame 19
gotoAndStop ("guard");
Symbol 290 MovieClip [knightMC] Frame 20
var thisName = "dead";
removeMe();
Symbol 290 MovieClip [knightMC] Frame 40
removeMovieClip(this);
Symbol 314 MovieClip [levelCompleteMC] Frame 1
function basic() {
fade_mc.gotoAndStop(1);
fade.play();
thisClip._visible = false;
}
stop();
var fade = this._parent.black_mc;
var thisClip = this;
stone_btn.onRelease = function () {
basic();
thisClip._parent.game_mc.bulletCount = thisClip._parent.game_mc.bulletCount + 1;
};
bounce_btn.onRelease = function () {
basic();
thisClip._parent.globalBounceLimit = thisClip._parent.globalBounceLimit + 2;
};
guard_btn.onRelease = function () {
basic();
thisClip._parent.game_mc.initGuard(thisClip._parent.game_mc.gClip + 20);
};
Symbol 317 MovieClip [pointBurst] Frame 30
removeMovieClip(this);
Symbol 326 MovieClip [projectileMC] Frame 1
stop();
Symbol 326 MovieClip [projectileMC] Frame 12
this._parent.projectile.charging = false;
this._parent.initProjectile();
removeMovieClip(this);
Symbol 329 MovieClip [smokeTrailMC] Frame 20
removeMovieClip(this);
Symbol 334 MovieClip [treeMC] Frame 1
stop();
var thisName = "tree";
this._parent.castleCount--;
Symbol 391 MovieClip Frame 15
stop();
Symbol 391 MovieClip Frame 35
if (this._parent.startUp) {
this._parent.gotoAndStop("gameScreen");
this._parent.startUp = false;
} else if (this._parent.highScore) {
this._parent.gotoAndStop("highScoreScreen");
this._parent.highScore = false;
} else {
this._parent.game_mc.setLevel();
}
gotoAndPlay (1);
Symbol 394 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 3
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 2
stop();
Symbol 411 MovieClip Frame 1
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function initProjectile() {
var _local1 = attachMovie("projectileMC", "projectile_mc", 150);
_local1._x = 100;
_local1._y = 245;
_local1._visible = false;
}
function chargePower() {
thisClip._parent.bar_mc._xscale = thisClip._parent.bar_mc._xscale + 2;
projectile.power = thisClip._parent.bar_mc._xscale;
if (projectile.power >= 100) {
thisClip._parent.globalBullets--;
thisClip._parent.bullet_txt.text = thisClip._parent.globalBullets;
clearInterval(interval.charge);
Mouse.removeListener(mouseListener);
chargeSound.stop();
fireSound.start();
catapult_mc.play();
projectile_mc._visible = true;
turn(checkAngle());
}
}
function checkAngle() {
var _local2 = _xmouse - projectile.origin._x;
var _local3 = _ymouse - projectile.origin._y;
var _local4 = Math.atan(_local3 / _local2);
var _local1 = (_local4 * 180) / Math.PI;
if (_local2 < 0) {
_local1 = _local1 - 180;
}
if ((_local1 >= -75) && (_local1 <= 75)) {
projectile.origin._rotation = _local1;
return(_local1);
}
if ((_local1 < -75) && (_local1 > -180)) {
return(-75);
}
if ((_local1 > 75) || (_local1 < -180)) {
return(75);
}
}
function turn(degrees) {
radians = (degrees / 180) * Math.PI;
var _local2 = Math.cos(radians);
var _local1 = Math.sin(radians);
_local2 = _local2 * (projectile.power / 5);
_local1 = _local1 * (projectile.power / 5);
projectile.dx = _local2;
projectile.dy = _local1;
projectile.degrees = degrees;
interval.shot = setInterval(moveProjectile, interval.speed);
}
function moveProjectile() {
projectile_mc._x = projectile_mc._x + projectile.dx;
projectile_mc._y = projectile_mc._y + projectile.dy;
projectile.dy = projectile.dy + projectile.gravity;
if (projectile.dy >= 0) {
projectile.rising = false;
} else {
projectile.rising = true;
}
if (projectile_mc._x <= 0) {
ballStop();
}
if (projectile_mc._x >= myPoint.x) {
panScreen();
}
hitTestModule();
}
function panScreen() {
if (thisClip._x >= maxPan) {
thisClip._x = thisClip._x - projectile.dx;
} else if (projectile_mc._x >= ballLimit) {
ballStop();
}
}
function panBack() {
if (thisClip._x < (panSpeed * -1)) {
thisClip._x = thisClip._x + panSpeed;
} else {
trace("Castles Left: " + castleCount);
Mouse.addListener(mouseListener);
crossHair_mc._visible = true;
if ((thisClip._parent.globalBullets <= 0) && (castleCount > 0)) {
gameOver(false);
}
if ((castleCount <= 0) && (thisClip._parent.globalLevel >= 5)) {
youWin();
} else if (castleCount <= 0) {
showUpgrades();
}
thisClip._x = 0;
clearInterval(interval.panBack);
}
}
function showUpgrades() {
winSound.start();
cleanUp();
thisClip._parent.globalLevel++;
Mouse.removeListener(mouseListener);
crossHair_mc._visible = false;
castleCount = 0;
thisClip._parent.complete_mc._visible = true;
thisClip._parent.complete_mc.fade_mc.play();
}
function smokeTrail() {
var _local1 = attachMovie("smokeTrailMC", "smokeTrail_mc", getNextHighestDepth());
_local1._x = projectile_mc._x;
_local1._y = projectile_mc._y;
}
function hitTestModule() {
if ((projectile.power < 1) && (projectile_mc._y >= projectile.limit)) {
clearInterval(interval.shot);
groundSound.start();
projectile_mc._y = projectile.limit;
ballStop();
} else if (projectile_mc._y >= projectile.limit) {
clearInterval(interval.shot);
projectile.power = projectile.power * groundBounceRate;
if ((projectile.degrees <= -270) && (projectile.degrees >= -180)) {
turn(projectile.degrees * -1);
} else if (projectile.degrees > 0) {
turn(projectile.degrees * -1);
} else {
turn(projectile.degrees);
}
}
if (bounceCount < thisClip._parent.globalBounceLimit) {
for (var _local1 in thisClip) {
if (typeof(thisClip[_local1]) == "movieclip") {
if (projectile_mc.hitTest(thisClip[_local1].hit_mc) && (thisClip[_local1].thisName == "tree")) {
if (projectile.dx >= 5) {
projectile.dx = projectile.dx - 5;
projectile.dy = projectile.dy + 1;
} else if (projectile.dx <= -5) {
projectile.dx = projectile.dx + 5;
projectile.dy = projectile.dy + 1;
} else {
projectile.power = 0;
}
} else if (((((((projectile_mc.hitTest(thisClip[_local1]) && (thisClip[_local1] != _level0.game_mc)) && (thisClip[_local1] != projectile_mc)) && (thisClip[_local1] != crossHair_mc)) && (thisClip[_local1].thisName != "knight")) && (thisClip[_local1].thisName != "guard")) && (thisClip[_local1].thisName != "dead")) && (thisClip[_local1].moving == false)) {
projectile.power = projectile.power * castleBounceRate;
hitSound.start();
clearInterval(interval.shot);
attachHit(projectile_mc._x, projectile_mc._y);
checkCombo();
bounceCount++;
if ((thisClip[_local1].ext == true) && (projectile_mc._y < thisClip[_local1]._y)) {
thisClip[_local1].moveExt();
turn(projectile.degrees);
return(0);
}
if (projectile_mc._x < thisClip[_local1]._x) {
projectile_mc._x = thisClip[_local1]._x - 6;
turn(projectile.degrees + 180);
} else if (projectile_mc._x > (thisClip[_local1]._x + thisClip[_local1]._width)) {
projectile_mc._x = (thisClip[_local1]._x + thisClip[_local1]._width) + 6;
turn(projectile.degrees + 180);
} else if (projectile_mc._y < thisClip[_local1]._y) {
projectile_mc._y = thisClip[_local1]._y - 6;
turn(projectile.degrees);
} else {
turn(projectile.degrees + 180);
}
thisClip[_local1].moveThis();
} else if (projectile_mc.hitTest(thisClip[_local1]) && (thisClip[_local1].thisName == "knight")) {
if (thisClip[_local1].fighting == true) {
clearInterval(interval.guard);
clearInterval(interval.knight);
}
dieSound.start();
thisClip[_local1].gotoAndPlay("dead");
setScore(10);
} else if (((projectile_mc.hitTest(thisClip[_local1]) && (thisClip[_local1].moving == true)) && (thisClip[_local1].thisName != "knight")) && (thisClip[_local1].thisName != "dead")) {
clearInterval(interval.shot);
turn(projectile.degrees);
}
}
}
} else {
projectile.power = 0;
ballStop();
}
}
function checkCombo() {
if (!projectile.firstHit) {
projectile.firstHit = true;
setScore(10);
} else if (projectile.firstHit && (!projectile.secondHit)) {
projectile.secondHit = true;
setScore(20);
} else if (projectile.secondHit) {
setScore(30);
}
}
function ballStop() {
bounceCount = 0;
catapult_mc.gotoAndStop(1);
clearInterval(interval.shot);
projectile.sameBall = false;
projectile.firstHit = false;
projectile.secondHit = false;
interval.panBack = setInterval(panBack, interval.speed);
removeMovieClip(projectile_mc);
initProjectile();
projectile.charging = false;
thisClip._parent.bar_mc._xscale = 0;
}
function initGuard(xPos) {
var _local1 = attachMovie("guardMC", "guard_mc" + guardCount, 50 + guardCount);
_local1._x = xPos;
_local1._y = 272;
guardCount++;
gClip = _local1._x;
}
function startBattle(guard, knight) {
if (!battleStarted) {
guard.gotoAndStop("guard");
knight.gotoAndStop("guard");
interval.guard = setInterval(guardAttack, randRange(500, 750), knight, guard);
interval.knight = setInterval(knightAttack, randRange(1000, 1500), guard, knight);
knight.fighting = true;
battleStarted = true;
}
}
function guardAttack(enemy, guardClip) {
guardClip.gotoAndPlay("attack");
guardSound.start();
hit2Sound.start();
enemy.hBar_mc.greenBar_mc._xscale = enemy.hBar_mc.greenBar_mc._xscale - attackDamage;
var _local3 = "knight_mc";
if (enemy.hBar_mc.greenBar_mc._xscale <= 0) {
knightKilled++;
for (var _local1 in thisClip) {
if (typeof(thisClip[_local1]) == "movieclip") {
if ((thisClip[_local1].thisName == "knight") && (thisClip[_local1].moving == false)) {
thisClip[_local1].moveCall();
}
}
}
clearInterval(interval.guard);
clearInterval(interval.knight);
battleStarted = false;
enemy.thisName = "dead";
enemy.gotoAndPlay("dead");
die2Sound.start();
}
}
function knightAttack(foe, knightClip) {
knightClip.gotoAndPlay("attack");
knightSound.start();
hit3Sound.start();
foe.hBar_mc.greenBar_mc._xscale = foe.hBar_mc.greenBar_mc._xscale - attackDamage;
if (foe.hBar_mc.greenBar_mc._xscale <= 0) {
clearInterval(interval.guard);
clearInterval(interval.knight);
battleStarted = false;
knightClip.gotoAndStop("walk");
foe.gotoAndPlay("dead");
die2Sound.start();
}
}
function gameOver(stone) {
loseSound.start();
clearInternalInt();
Mouse.removeListener(mouseListener);
clearInterval(interval.moveProjectile);
clearInterval(interval.shot);
clearInterval(interval.charge);
clearInterval(interval.panBack);
clearInterval(interval.guard);
clearInterval(interval.knight);
if (!stone) {
thisClip._parent.gameOver_mc._visible = true;
thisClip._parent.gameOver_mc.gotoAndStop("stone");
thisClip._parent.gameOver_mc.fade_mc.play();
} else {
thisClip._parent.gameOver_mc._visible = true;
thisClip._parent.gameOver_mc.gotoAndStop("surrender");
thisClip._parent.gameOver_mc.fade_mc.play();
}
}
function youWin() {
cleanUp();
winSound.start();
thisClip._parent.gameOver_mc._visible = true;
thisClip._parent.gameOver_mc.gotoAndStop("win");
thisClip._parent.gameOver_mc.fade_mc.play();
}
function cleanUp() {
clearInternalInt();
Mouse.removeListener(mouseListener);
clearInterval(interval.moveProjectile);
clearInterval(interval.shot);
clearInterval(interval.charge);
clearInterval(interval.panBack);
clearInterval(interval.guard);
clearInterval(interval.knight);
}
function clearInternalInt() {
for (var _local1 in thisClip) {
if (typeof(thisClip[_local1]) == "movieclip") {
clearInterval(thisClip[_local1].kniInt);
clearInterval(thisClip[_local1].moveInt);
if (thisClip[_local1].thisName == "knight") {
removeMovieClip(thisClip[_local1]);
}
if (thisClip[_local1].thisName == "guard") {
thisClip[_local1].gotoAndStop("alive");
}
}
}
}
function addStones(clip, plus) {
if (!plus) {
var _local2 = attachMovie("addStone", "addStone_mc", getNextHighestDepth());
_local2._y = clip._y - 20;
_local2._x = clip._x + (clip._width / 2);
} else {
var _local2 = attachMovie("addStone2", "addStone_mc", getNextHighestDepth());
_local2._y = clip._y - 20;
_local2._x = clip._x + (clip._width / 2);
}
}
function setScore(points) {
var _local1 = attachMovie("pointBurst", "pointBurst_mc", getNextHighestDepth());
_local1._x = projectile_mc._x - 5;
_local1._y = projectile_mc._y - 5;
_local1.burst_mc.burst_txt.text = points;
thisClip._parent.globalScore = thisClip._parent.globalScore + points;
thisClip._parent.score_txt.text = thisClip._parent.globalScore;
}
function checkLevel(level) {
switch (level) {
case 1 :
attachCastle("castle2MC", "c1_mc", 306, 235, "flag", false, false);
attachCastle("castle3MC", "c2_mc", 362, 250, "whole", false, false);
attachCastle("castle2MC", "c3_mc", 468, 185, "stones", false, true);
attachCastle("castle1MC", "c4_mc", 525, 219, "flagGuard", false, false);
attachCastle("castle2MC", "c5_mc", 596, 185, "stones", false, true);
attachCastle("castle3MC", "c6_mc", 654, 250, "whole", false, false);
attachCastle("castle2MC", "c7_mc", 760, 235, "flag", false, false);
break;
case 2 :
attachCastle("castle2MC", "c1_mc", 293, 185, "ext", true, false);
attachCastle("castle1MC", "c2_mc", 350, 219, "ext", true, false);
attachCastle("castle2MC", "c3_mc", 421, 185, "ext", true, false);
attachCastle("castle3MC", "c4_mc", 478, 218, "ext1", true, false);
attachCastle("castle2MC", "c5_mc", 584, 185, "ext", true, false);
attachCastle("castle2MC", "c6_mc", 702, 185, "guardFlag", false, false);
attachCastle("castle3MC", "c7_mc", 759, 218, "stones", false, true);
attachCastle("castle2MC", "c8_mc", 865, 185, "guardFlag", false, false);
break;
case 3 :
attachCastle("castle2MC", "c1_mc", 356, 205, "ext", true, false);
attachCastle("castle4MC", "c2_mc", 413, 252, "stones", false, true);
attachCastle("castle2MC", "c3_mc", 469, 195, "whole", false, false);
attachCastle("castle3MC", "c4_mc", 526, 252, "ext2", true, false);
attachCastle("castle2MC", "c5_mc", 631, 185, "ext", true, false);
attachCastle("castle1MC", "c6_mc", 688, 219, "ext", true, false);
attachCastle("castle2MC", "c7_mc", 759, 195, "ext", true, false);
attachCastle("castle3MC", "c9_mc", 816, 252, "ext2", true, false);
attachCastle("castle2MC", "c10_mc", 922, 205, "whole", false, false);
break;
case 4 :
attachCastle("treeMC", "c1_mc", 225, 150);
attachCastle("castle2MC", "c2_mc", 435, 185, "stones", false, true);
attachCastle("castle3MC", "c3_mc", 492, 250, "ext2Guards", true, false);
attachCastle("castle2MC", "c4_mc", 598, 185, "ext", true, false);
attachCastle("castle1MC", "c5_mc", 655, 219, "stones", false, true);
attachCastle("castle2MC", "c6_mc", 726, 185, "ext", true, false);
attachCastle("castle3MC", "c7_mc", 783, 250, "ext2Guards", true, false);
attachCastle("castle2MC", "c8_mc", 888, 185, "stones", false, true);
break;
case 5 :
attachCastle("castle2MC", "c1_mc", 357, 185, "flag", false, false);
attachCastle("castle4MC", "c2_mc", 415, 220, "stones", false, true);
attachCastle("castle2MC", "c3_mc", 472, 185, "ext", true, false);
attachCastle("castle1MC", "c4_mc", 529, 219, "stones", false, true);
attachCastle("castle2MC", "c5_mc", 600, 185, "ext", true, false);
attachCastle("castle4MC", "c6_mc", 657, 220, "stones", false, true);
attachCastle("castle2MC", "c7_mc", 713, 185, "flag", false, false);
attachCastle("treeMC", "c8_mc", 780, 150);
attachCastle("castle2MC", "c9_mc", 908, 185, "whole", false, false);
attachCastle("castle1MC", "c10_mc", 966, 219, "whole", false, false);
attachCastle("castle2MC", "c11_mc", 1037, 185, "whole", false, false);
}
}
function attachSmoke(clip) {
var _local2 = clip._x + (clip._width / 2);
var _local1 = attachMovie("groundSmokeMC", "groundSmoke_mc" + smokeCount, getNextHighestDepth());
_local1._x = _local2;
_local1._y = 270;
smokeCount++;
return(_local1);
}
function attachHit(xPos, yPos) {
hitAnim = attachMovie("hitAnimMC", "hitAnim_mc", getNextHighestDepth());
hitAnim._x = xPos;
hitAnim._y = yPos;
}
function attachCastle(libName, newName, xPos, yPos, frame, ex, ammo) {
var _local1 = attachMovie(libName, newName, castleCount, {ext:ex, stones:ammo});
_local1._x = xPos;
_local1._y = yPos;
_local1.gotoAndStop(frame);
castleCount++;
}
function setLevel() {
introSound.start();
if (thisClip._parent.globalLevel >= 5) {
bg_mc.gotoAndStop("night");
} else {
bg_mc.gotoAndStop("day");
}
initialPan();
checkLevel(thisClip._parent.globalLevel);
thisClip._parent.globalBullets = bulletCount;
thisClip._parent.bullet_txt.text = thisClip._parent.globalBullets;
thisClip._parent.level_txt.text = thisClip._parent.globalLevel;
}
function initialPan() {
thisClip._x = maxPan;
interval.initPan = setInterval(startPan, interval.initPanCount);
}
function startPan() {
clearInterval(interval.initPan);
interval.panBack = setInterval(panBack, interval.speed);
}
function setGround() {
var _local1 = attachMovie("groundMC", "ground1_mc", 100);
_local1._x = 0;
_local1._y = projectile.limit;
}
stop();
var thisClip = this;
var interval = new Object();
var projectile = new Object();
var mouseListener = new Object();
var panSpeed = 10;
var knightCount = 0;
var guardCount = 1;
var attackDamage = 10;
var castleCount = 0;
var maxPan = (((this._width - Stage.width) - 20) * -1);
var ballLimit = this._width;
var kMoveSpd = 1;
var smokeCount = 0;
var bulletCount = 10;
var gClip;
var bounceCount = 0;
var groundBounceRate = 0.44;
var castleBounceRate = 0.6;
var guardStartPos = 133;
var battleStarted = new Boolean();
battleStarted = false;
var myPoint = new Object();
myPoint.x = 300;
thisClip.globalToLocal(myPoint);
projectile.origin = crossHair_mc;
projectile.degrees = 0;
projectile.charge = 0;
projectile.fall = false;
projectile.dx = 0;
projectile.dy = 0;
projectile.gravity = 0.25;
projectile.power = 0;
projectile.distCovered;
projectile.initialDist = projectile_mc._x;
projectile.dist = 10;
projectile.offSet = 6;
projectile.hit = false;
projectile.charging = false;
projectile.txt = thisClip._parent.power_txt.text;
projectile.rising = false;
projectile.firstHit = false;
projectile.limit = 295;
projectile.sameBall = false;
projectile.firstHit = false;
projectile.secondHit = false;
projectile.thirdHit = false;
interval.moveProjectile;
interval.shot;
interval.charge;
interval.panBack;
interval.guard;
interval.knight;
interval.initPan;
interval.speed = 15;
interval.initPanCount = 2000;
var introSound = new Sound();
introSound.attachSound("introSound");
var loseSound = new Sound();
loseSound.attachSound("loseSound");
var winSound = new Sound();
winSound.attachSound("winSound");
var chargeSound = new Sound();
chargeSound.attachSound("chargeSound");
var fireSound = new Sound();
fireSound.attachSound("fireSound");
var hitSound = new Sound();
hitSound.attachSound("hitSound");
var hit2Sound = new Sound();
hit2Sound.attachSound("hit2Sound");
var hit3Sound = new Sound();
hit3Sound.attachSound("hit3Sound");
var guardSound = new Sound();
guardSound.attachSound("guardSound");
var knightSound = new Sound();
knightSound.attachSound("knightSound");
var dieSound = new Sound();
dieSound.attachSound("dieSound");
var die2Sound = new Sound();
die2Sound.attachSound("die2Sound");
var groundSound = new Sound();
groundSound.attachSound("groundSound");
mouseListener.onMouseMove = function () {
projectile.origin.cross_mc._rotation = projectile.origin._rotation * -1;
checkAngle();
};
mouseListener.onMouseDown = function () {
if ((!projectile.charging) && (thisClip._parent.globalBullets > 0)) {
interval.charge = setInterval(chargePower, interval.speed);
projectile.charging = true;
chargeSound.start();
chargeSound.onSoundComplete = function () {
chargeSound.start();
};
}
};
mouseListener.onMouseUp = function () {
if (projectile.charging && (thisClip._parent.globalBullets > 0)) {
clearInterval(interval.charge);
Mouse.removeListener(mouseListener);
chargeSound.stop();
fireSound.start();
catapult_mc.play();
projectile_mc._visible = true;
turn(checkAngle());
thisClip._parent.globalBullets--;
thisClip._parent.bullet_txt.text = thisClip._parent.globalBullets;
projectile.sameBall = true;
}
};
thisClip._parent.globalScore = 0;
initGuard(guardStartPos);
initProjectile();
setLevel();
setGround();
Symbol 445 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 446 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 2
stop();
Symbol 463 MovieClip [TMP6pbk6uzm9i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + gameID) + "&rand=") + random(999999)) + "&filt=1");
Symbol 468 MovieClip [TMP6ojzjuzm8i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));