Frame 1
function idlePattern() {
clearInterval(idleInterval);
idleCount = 0;
currentPattern = 0;
idleInterval = setInterval(idlePatternCallback, 45);
}
function idlePatternCallback() {
clearGameBoard();
if (idleCount < gPattern[currentPattern].length) {
var _local1 = 0;
while (_local1 < gPattern[currentPattern][idleCount].length) {
wall[gPattern[currentPattern][idleCount][_local1]].gotoAndStop(2);
_local1++;
}
idleCount++;
} else {
idleCount = 0;
currentPattern++;
if (currentPattern >= gPattern[currentPattern].length) {
currentPattern = 0;
}
}
}
function initLoader() {
var myscreen = this.attachMovie("loaderscreen", "screen", 100);
myscreen.bkgd.onPress = function () {
this._parent.removeMovieClip();
};
playerdata._visible = false;
marquis._visible = false;
myscreen.startstop._visible = false;
myscreen.startstop.gotoAndStop(3);
myscreen.plunger.gotoAndStop(1);
myscreen.box.onPress = function () {
};
myscreen.box.useHandCursor = false;
this.onEnterFrame = function () {
var _local2 = Math.round(getBytesLoaded());
var _local3 = Math.round(getBytesTotal());
if (_local2 == _local3) {
loadComplete(myscreen);
delete this.onEnterFrame;
}
};
}
function tempLoadComplete(myscreen) {
myscreen.startstop._visible = true;
myscreen.startstop.gotoAndStop(3);
myscreen.plunger.onPress = function () {
initStacker();
myscreen.removeMovieClip();
};
}
function loadComplete(myscreen) {
myscreen.startstop._visible = true;
if ((username != "") && (username != undefined)) {
myscreen.marquis._visible = false;
myscreen.playerdata._visible = true;
myscreen.playerdata.displayusername.text = username;
doSendAndLoad(myscreen);
} else {
myscreen.startstop.gotoAndStop(3);
myscreen.playerdata._visible = false;
myscreen.marquis._visible = true;
username = "GUEST";
credits = 1000;
myscreen.plunger.onPress = function () {
initStacker();
myscreen.removeMovieClip();
};
}
}
function doSendAndLoad(myscreen) {
var _local4 = "http://www.stoopidgames.com/script/getscore.php";
var _local3 = new LoadVars();
var _local2 = new LoadVars();
_local3.username = username;
_local2.onLoad = function () {
if (this.valid == "1") {
myscreen.startstop.gotoAndStop(3);
myscreen.playerdata.displayscore.text = this.score;
credits = Number(this.score);
rank = Number(this.rank);
myscreen.plunger.onPress = function () {
initStacker();
myscreen.removeMovieClip();
};
} else {
myscreen.playerdata.displayusername.text = "Error connecting to the server";
myscreen.playerdata.displayscore.text = "Refresh this page";
}
};
_local3.sendAndLoad("script/getscore.php", _local2, "POST");
}
function initStacker() {
setMessageText("PLACE BET or PRESS START");
setCreditsText(credits);
setCreditsPlayedText(creditsplayed);
setWinnerPaidText(winnerpaid);
setCounterDisplay(counter);
myusername.text = username.toUpperCase();
speed = DEFAULT_speed;
numBlocks = DEFAULT_numBlocks;
level = DEFAULT_level;
currentStack = new Array();
var _local2 = 0;
while (_local2 < buttonNames.length) {
this["btn_" + buttonNames[_local2]].ID = buttonNames[_local2];
this["btn_" + buttonNames[_local2]].onRelease = function () {
if (this.enabled == true) {
this.gotoAndStop(1);
}
clickHandler(this.ID);
};
this["btn_" + buttonNames[_local2]].onPress = function () {
this.gotoAndStop(2);
};
this["btn_" + buttonNames[_local2]].onRollOver = function () {
if (this.ID != "sound") {
this.gotoAndStop(2);
}
};
this["btn_" + buttonNames[_local2]].onRollOut = (this["btn_" + buttonNames[_local2]].onReleaseOutside = function () {
if ((this.enabled == true) && (this.ID != "sound")) {
this.gotoAndStop(1);
}
});
_local2++;
}
plunger.gotoAndStop(2);
startstop.gotoAndStop(1);
plunger.onRelease = function () {
};
plunger.onPress = function () {
((isPlaying == false) ? (startStacking()) : (stopStacking()));
this.gotoAndStop(1);
};
plunger.onRollOver = function () {
this.roll.gotoAndStop(2);
};
plunger.onRollOut = (plunger.onReleaseOutside = function () {
this.roll.gotoAndStop(1);
});
((credits == 0) ? (initMoreCredits()) : null);
idlePattern();
moveY(wall.intro, -91, 214, 1.3);
}
function clickHandler(id) {
switch (id) {
case "paytable" :
((menuOn == false) ? (initPaytable()) : null);
break;
case "rules" :
((menuOn == false) ? (initRules()) : null);
break;
case "betPos" :
((isPlaying == false) ? (bet(1)) : null);
break;
case "betNeg" :
((isPlaying == false) ? (bet(0)) : null);
break;
case "betMax" :
((isPlaying == false) ? (bet(maxbet)) : null);
break;
case "sound" :
muteSound();
}
}
function runPreGameCheck(EXP_YEAR, EXP_MONTH, EXP_DAY, SITE) {
var _local1 = new SWFExpiration();
var _local2 = _local1.checkExpiration(EXP_YEAR, EXP_MONTH, EXP_DAY);
return(_local2);
}
function bet(amt) {
var _local4;
var _local3 = getRandom(1, 9);
var _local2 = "dong" + _local3;
if ((lastbet != 0) && ((amt == 0) || (amt == 1))) {
creditsplayed = lastbet;
}
trace((credits >= betIncrement) && (amt < maxbet));
trace((credits >= maxbet) && (amt == maxbet));
trace(amt == 0);
if ((((credits >= betIncrement) && ((creditsplayed + betIncrement) <= credits)) || (((maxbet - creditsplayed) <= credits) && (amt == maxbet))) || (amt == 0)) {
if ((amt == 0) && (creditsplayed > 0)) {
creditsplayed = creditsplayed - betIncrement;
}
if ((amt == 1) && (creditsplayed < maxbet)) {
creditsplayed = creditsplayed + betIncrement;
}
if ((amt > 1) && (amt < maxbet)) {
creditsplayed = amt;
}
if (amt == maxbet) {
_local4 = maxbet - creditsplayed;
creditsplayed = maxbet;
}
}
lastbet = 0;
setMessageText("PRESS START TO BEGIN");
if (creditsplayed > 0) {
playSound(_local2);
} else {
playSound("cancelbet");
setMessageText("PLACE BET or PRESS START");
}
setCreditsPlayedText(creditsplayed);
}
function startStacking() {
clearInterval(endInterval);
clearInterval(idleInterval);
isPlaying = true;
plunger.gotoAndStop(1);
startstop.gotoAndStop(2);
plunger.roll.gotoAndStop(2);
setPlungerEnabled();
if (firstRun == true) {
wall.intro._y = -91;
wall.intro._visible = false;
firstRun = false;
}
if (level == 0) {
if (creditsplayed == 0) {
if (lastbet != 0) {
if (credits >= lastbet) {
bet(lastbet);
} else {
bet(credits);
}
} else {
bet(defaultBet);
}
}
credits = credits - creditsplayed;
setCreditsText(credits);
clearGameBoard();
}
setMessageText("LEVEL " + (level + 1));
stopAllSounds();
playSound("swoosh");
setWinnerPaidText(0);
speed = getSpeed(level);
levelString = getLevel(level);
buildStack();
counterInterval = setInterval(moveStack, speed);
}
function buildStack() {
var _local1 = maxBlock + 1;
i = minBlock;
while (i < _local1) {
wall[levelString + i].gotoAndStop(2);
i++;
}
}
function moveStack() {
var _local3;
if (dir == "r") {
_local3 = 1;
if (maxBlock == 6) {
_local3 = -1;
dir = "l";
}
} else {
_local3 = -1;
if (minBlock == 0) {
_local3 = 1;
dir = "r";
}
}
if (_local3 == 1) {
minBlock++;
maxBlock++;
} else {
minBlock--;
maxBlock--;
}
var _local1 = 0;
while (_local1 < 7) {
wall[levelString + _local1].gotoAndStop(1);
_local1++;
}
var _local2 = maxBlock + 1;
_local1 = minBlock;
while (_local1 < _local2) {
wall[levelString + _local1].gotoAndStop(2);
_local1++;
}
}
function stopStacking() {
clearInterval(counterInterval);
setPlungerDisabled();
plunger.gotoAndStop(1);
startstop.gotoAndStop(5);
plunger.roll.gotoAndStop(1);
playSound("stopsound");
if (winnerRun == true) {
wall.winner._y = -31.6;
winnerRun = false;
}
var _local5 = new Array();
var _local4 = level - 1;
var _local1;
var _local2;
var _local7 = 500;
currentStack[level] = new Array();
var _local6 = maxBlock + 1;
var _local3 = minBlock;
while (_local3 < _local6) {
currentStack[level].push(_local3);
_local3++;
}
_local3 = 0;
while (_local3 < currentStack[level].length) {
_local1 = 0;
while (_local1 < currentStack[_local4].length) {
_local2 = false;
if (currentStack[level][_local3] == currentStack[_local4][_local1]) {
_local2 = true;
break;
}
_local1++;
}
if (_local2 == false) {
_local5.push(currentStack[level][_local3]);
_local7 = 2000;
}
_local3++;
}
numBlocks = currentStack[level].length - _local5.length;
if (_local5 != undefined) {
_local3 = 0;
while (_local3 < _local5.length) {
wall[levelString + _local5[_local3]].gotoAndPlay(3);
_local3++;
}
}
minBlock = 0;
_local3 = 0;
while (_local3 < 7) {
if (wall[levelString + _local3]._currentframe == 2) {
minBlock = _local3;
break;
}
_local3++;
}
maxBlock = minBlock + (numBlocks - 1);
currentStack[level] = new Array();
_local6 = maxBlock + 1;
_local3 = minBlock;
while (_local3 < _local6) {
currentStack[level].push(_local3);
_local3++;
}
if (Math.ceil(Math.random() * 2) == 1) {
((Math.ceil(Math.random() * 2) == 1) ? ((dir = "r")) : ((dir = "l")));
if (dir == "r") {
minBlock = 0;
maxBlock = minBlock + (numBlocks - 1);
} else {
maxBlock = 6;
minBlock = maxBlock - (numBlocks - 1);
}
}
if (numBlocks > 0) {
if (level == 7) {
moveY(wall.winner, -31.6, 29.4, 0.6);
winnerRun = true;
}
var _local8 = Math.ceil(Math.random() * 5) - 1;
var _local9 = new Array("KEEP STACKING", "GOOD JOB", "STACK-O-RIFIC", "NICE WORK", "WOO HOO");
setMessageText(_local9[_local8]);
level++;
if (level < 12) {
endInterval = setTimeout(startStacking, _local7);
} else {
setMessageText("*** JACKPOT ***");
endInterval = setTimeout(stopGame, _local7);
}
} else {
var _local8 = Math.ceil(Math.random() * 4) - 1;
var _local9 = new Array("GAME OVER", "AHHH... TOO BAD", "SORRY, YOU LOST", "MAYBE NEXT TIME");
setMessageText(_local9[_local8]);
endInterval = setTimeout(stopGame, _local7);
}
}
function stopGame() {
clearInterval(endInterval);
clearInterval(counterInterval);
setPlungerDisabled();
setMessageText("TRY AGAIN");
multiplier = currentStack[level - 1].length;
if (level == 8) {
winnerpaid = (payArray[0] * creditsplayed) * multiplier;
setMessageText("WINNER - " + winnerpaid);
playSound("payout1", 3);
} else if (level == 9) {
winnerpaid = (payArray[1] * creditsplayed) * multiplier;
setMessageText(("WINNER - " + winnerpaid) + " CREDITS");
playSound("payout1", 2);
} else if (level == 10) {
winnerpaid = (payArray[2] * creditsplayed) * multiplier;
setMessageText(("WINNER - " + winnerpaid) + " CREDITS");
playSound("payout2");
} else if (level == 11) {
winnerpaid = (payArray[3] * creditsplayed) * multiplier;
setMessageText(("WINNER - " + winnerpaid) + " CREDITS");
playSound("payout2");
} else if (level == 12) {
winnerpaid = (payArray[4] * creditsplayed) * multiplier;
setMessageText(("WINNER - " + winnerpaid) + " CREDITS");
playSound("payout3");
} else if ((msg.text != "") && (msg != "PLACE BET OR PRESS START")) {
msg.text = "GAME OVER - TRY AGAIN";
}
if (winnerpaid > 0) {
playSound("winnersound");
credits = credits + winnerpaid;
}
setCreditsText(credits);
setWinnerPaidText(winnerpaid);
var _local2 = new LoadVars();
var _local3 = new LoadVars();
_local2.username = username;
_local2.score = credits;
_local3.onLoad = function () {
if (this.valid == "1") {
}
};
((username != "GUEST") ? (_local2.sendAndLoad("script/savescore.php", _local3, "POST")) : null);
endInterval = setTimeout(resetGame, 1000);
}
function getLevel(n) {
var _local1 = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l");
return(_local1[n]);
}
function getSpeed(n) {
var _local1 = new Array(80, 70, 50, 65, 55, 45, 55, 35, 35, 35, 32, 30);
return(_local1[n]);
}
function clearGameBoard() {
var _local1;
var _local3;
var _local2 = 0;
while (_local2 < 12) {
_local3 = getLevel(_local2);
_local1 = 0;
while (_local1 < 7) {
wall[_local3 + _local1].gotoAndStop(1);
_local1++;
}
_local2++;
}
}
function resetGame() {
isPlaying = false;
speed = DEFAULT_speed;
numBlocks = DEFAULT_numBlocks;
level = DEFAULT_level;
dir = DEFAULT_dir;
minBlock = 2;
maxBlock = 4;
currentStack = new Array();
startstop.gotoAndStop(1);
lastbet = creditsplayed;
creditsplayed = 0;
winnerpaid = 0;
plunger.gotoAndStop(2);
setPlungerEnabled();
((credits == 0) ? (initMoreCredits()) : null);
}
function initPaytable() {
menuOn = true;
var _local3 = this.attachMovie("screen", "screen", screenDepth);
_local3._x = 0;
_local3._y = 0;
var _local2 = 0;
while (_local2 < payArray.length) {
_local3["p" + _local2].text = payArray[_local2];
_local2++;
}
_local3.onPress = function () {
fadeAni(this);
};
animateScreen(_local3);
}
function initRules() {
menuOn = true;
var _local2 = this.attachMovie("screen", "screen", screenDepth);
_local2._x = 0;
_local2._y = 0;
_local2.onPress = function () {
fadeAni(this);
};
_local2.gotoAndStop(2);
animateScreen(_local2);
}
function initMoreCredits() {
menuOn = true;
var _local2 = this.attachMovie("screen", "screen", screenDepth);
_local2._x = 0;
_local2._y = 0;
_local2.onPress = function () {
fadeAni(this);
};
_local2.gotoAndStop(3);
credits = 1000;
creditsplayed = 0;
winnerpaid = 0;
lastbet = 0;
setMessageText("FINANCIAL AID");
setCreditsPlayedText(creditsplayed);
setWinnerPaidText(winnerpaid);
setCreditsText(credits);
animateScreen(_local2);
}
function setMessageText(str) {
msg.text = str;
}
function setCreditsText(str) {
t_credits.text = str;
}
function setCreditsPlayedText(str) {
t_creditsplayed.text = str;
}
function setWinnerPaidText(str) {
t_winnerpaid.text = str;
}
function setPlungerEnabled() {
plunger.enabled = true;
}
function setPlungerDisabled() {
plunger.enabled = false;
}
function getRandom(x, y) {
var _local1 = Math.round(Math.random() * (y - x)) + x;
return(_local1);
}
function animateScreen(myani) {
myani._x = 342;
myani._y = 0;
var _local1 = 342;
var _local3 = 0;
moveX(myani, _local1, _local3, 1);
}
function moveX(_mc, beginLocation, endLocation, duration) {
var _local1 = new mx.transitions.Tween(_mc, "_x", mx.transitions.easing.Back.easeOut, beginLocation, endLocation, duration, true);
}
function moveY(_mc, beginLocation, endLocation, duration) {
var _local1 = new mx.transitions.Tween(_mc, "_y", mx.transitions.easing.Back.easeOut, beginLocation, endLocation, duration, true);
}
function fadeAni(myani) {
clearInterval(myint);
screen._alpha = 100;
mx.transitions.TransitionManager.start(myani, {type:mx.transitions.Fade, direction:mx.transitions.Transition.OUT, duration:0.5, easing:mx.transitions.easing.Back.easeOut});
myint = setTimeout(killAni, 600, myani);
}
function killAni(myani) {
clearInterval(myint);
myani.removeMovieClip();
menuOn = false;
}
function playSound(snd, mloop) {
((!mloop) ? (mloop = 0) : null);
if (soundFX == true) {
mySound = new Sound(this);
mySound.attachSound(snd);
mySound.start(0, mloop);
}
}
function muteSound() {
((soundFX == true) ? ((soundFX = false)) : ((soundFX = true)));
if (soundFX != true) {
(btn_sound.gotoAndStop(2));// not popped
} else {
(btn_sound.gotoAndStop(1));// not popped
}
}
Stage.showMenu = false;
var gPattern = new Array();
gPattern[0] = new Array(["l3"], ["k3"], ["j3"], ["i3"], ["h3"], ["g3"], ["f3"], ["e3"], ["d3"], ["c3"], ["b3"], ["a3"], ["a2", "a4"], ["a1", "a5"], ["a0", "a6"], ["b0", "b6"], ["c0", "c6"], ["d0", "d6"], ["e0", "e6"], ["f0", "f6"], ["g0", "g6"], ["h0", "h6"], ["i0", "i6"], ["j0", "j6"], ["k0", "k6"], ["l0", "l6"], ["l1", "l5"], ["l2", "l4"], ["k2", "k4"], ["j2", "j4"], ["i2", "i4"], ["h2", "h4"], ["g2", "g4"], ["f2", "f4"], ["e2", "e4"], ["d2", "d4"], ["c2", "c4"], ["b2", "b4"], ["b1", "b5"], ["c1", "c5"], ["d1", "d5"], ["e1", "e5"], ["f1", "f5"], ["g1", "g5"], ["h1", "h5"], ["i1", "i5"], ["j1", "j5"], ["k1", "k5"], ["l1", "l5"], ["l2", "l4"]);
gPattern[1] = new Array(["f0", "g6"], ["f1", "g5", "f0", "g6"], ["f1", "f2", "g4", "g5"], ["f2", "f3", "g4", "g3"], ["f3", "f4", "g3", "g2"], ["g1", "g2", "f4", "f5"], ["g0", "g1", "f5", "f6"], ["g0", "f6"], ["l2", "a4"], ["l2", "k2", "a4", "b4"], ["b4", "c4", "k2", "j2"], ["j2", "i2", "d4", "c4"], ["i2", "h2", "d4", "e4"], ["h2", "g2", "e4", "f4"], ["g2", "f2", "f4", "g4"], ["f2", "e2", "g4", "h4"], ["e2", "d2", "h4", "i4"], ["d2", "c2", "i4", "j4"], ["c2", "b2", "j4", "k4"], ["b2", "a2", "k4", "l4"], ["a2", "l4"], ["l3", "a3"], ["l3", "k3", "a3", "b3"], ["k3", "j3", "b3", "c3"], ["c3", "d3", "j3", "i3"], ["d3", "e3", "i3", "h3"], ["h3", "g3", "e3", "f3"], ["f3", "g3"], ["g2", "f2", "f4", "g4"], ["h1", "h5", "e5", "e1"], ["i0", "i6", "d6", "d0"], ["g2", "f2", "g4", "f4"], ["h1", "e1", "e5", "h5"], ["i0", "d0", "d6", "i6"]);
var isPlaying = false;
var firstRun = true;
var winnerRun = false;
var menuOn = false;
var DEFAULT_speed = 25;
var DEFAULT_numBlocks = 3;
var DEFAULT_level = 0;
var DEFAULT_levelString;
var DEFAULT_dir = "r";
var speed = DEFAULT_speed;
var numBlocks = DEFAULT_numBlocks;
var level = DEFAULT_level;
var levelString;
var dir = DEFAULT_dir;
var currentStack;
var minBlock = 2;
var maxBlock = 4;
var maxbet = 500;
var defaultBet = 25;
var betIncrement = 25;
var winnerpaid = 0;
var creditsplayed = defaultBet;
var lastbet = 0;
var screenDepth = 100;
var screenFadeDepth = 125;
var counterInterval;
var endInterval;
var soundFX = true;
var mySound = new Sound(this);
mySound.setVolume(100);
var payArray = new Array(2, 5, 10, 25, 100);
var multiplier = 1;
var buttonNames = new Array("paytable", "rules", "betPos", "betNeg", "betMax", "sound");
var isValid = runPreGameCheck(2006, 12, 30, "STOOPIDGAMES.COM");
((isValid == false) ? (initLoader()) : null);
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 2
play();
Symbol 28 MovieClip Frame 11
gotoAndPlay (2);
Symbol 78 MovieClip [screen] Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 68
stop();
Symbol 125 MovieClip [loaderscreen] Frame 1
bka.gotoAndPlay(2);
stop();
Symbol 127 MovieClip [anibkgd] Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 3
play();
Symbol 132 MovieClip Frame 7
_root.playSound("neg");
Symbol 132 MovieClip Frame 11
_root.playSound("tick");
Symbol 132 MovieClip Frame 13
_root.playSound("tick");
Symbol 132 MovieClip Frame 15
_root.playSound("tick");
Symbol 132 MovieClip Frame 29
play();
Symbol 157 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 1
stop();
Symbol 172 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 173 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 174 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 175 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 176 MovieClip [__Packages.mx.transitions.Transition] Frame 0
class mx.transitions.Transition
{
var _manager, removeEventListener, addEventListener, _content, _twn, _easing, _progress, dispatchEvent, _innerBounds, _outerBounds, _width, _height;
function Transition (content, transParams, manager) {
if (!arguments.length) {
return;
}
init(content, transParams, manager);
}
function set manager(mgr) {
if (_manager != undefined) {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
}
_manager = mgr;
addEventListener("transitionInDone", _manager);
addEventListener("transitionOutDone", _manager);
addEventListener("transitionProgress", _manager);
//return(manager);
}
function get manager() {
return(_manager);
}
function set content(c) {
if (typeof(c) == "movieclip") {
_content = c;
_twn.obj = c;
}
//return(content);
}
function get content() {
return(_content);
}
function set direction(direction) {
_direction = (direction ? 1 : 0);
//return(this.direction);
}
function get direction() {
return(_direction);
}
function set duration(d) {
if (d) {
_duration = d;
_twn.duration = d;
}
//return(duration);
}
function get duration() {
return(_duration);
}
function set easing(e) {
if (typeof(e) == "string") {
e = eval (e);
} else if (e == undefined) {
e = _noEase;
}
_easing = e;
_twn.easing = e;
//return(easing);
}
function get easing() {
return(_easing);
}
function set progress(p) {
if (_progress == p) {
return;
}
_progress = p;
if (_direction) {
_render(1 - p);
} else {
_render(p);
}
dispatchEvent({type:"transitionProgress", target:this, progress:p});
//return(progress);
}
function get progress() {
return(_progress);
}
function init(content, transParams, manager) {
this.content = (content);
direction = (transParams.direction);
duration = (transParams.duration);
easing = (transParams.easing);
this.manager = (manager);
_innerBounds = this.manager._innerBounds;
_outerBounds = this.manager._outerBounds;
_width = this.manager._width;
_height = this.manager._height;
_resetTween();
}
function toString() {
return(("[Transition " + className) + "]");
}
function start() {
content._visible = true;
_twn.start();
}
function stop() {
_twn.fforward();
_twn.stop();
}
function cleanUp() {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
stop();
}
function getNextHighestDepthMC(mc) {
var _local4 = mc.getNextHighestDepth();
if (_local4 != undefined) {
return(_local4);
}
_local4 = -1;
var _local3;
var _local1;
for (var _local5 in mc) {
_local1 = mc[_local5];
if ((typeof(_local1) == "movieclip") && (_local1._parent == mc)) {
_local3 = _local1.getDepth();
if (_local3 > _local4) {
_local4 = _local3;
}
}
}
return(_local4 + 1);
}
function drawBox(mc, x, y, w, h) {
mc.moveTo(x, y);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function _render(p) {
}
function _resetTween() {
_twn.stop();
_twn.removeListener(this);
_twn = new mx.transitions.Tween(this, null, easing, 0, 1, duration, true);
_twn.stop();
_twn.prop = "progress";
_twn.addListener(this);
}
function _noEase(t, b, c, d) {
return(((c * t) / d) + b);
}
function onMotionFinished(src) {
if (direction) {
dispatchEvent({type:"transitionOutDone", target:this});
} else {
dispatchEvent({type:"transitionInDone", target:this});
}
}
static var version = "1.1.0.52";
static var IN = 0;
static var OUT = 1;
var type = mx.transitions.Transition;
var className = "Transition";
var _direction = 0;
var _duration = 2;
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.Transition.prototype);
}
Symbol 177 MovieClip [__Packages.mx.transitions.TransitionManager] Frame 0
class mx.transitions.TransitionManager
{
var _transitions, removeEventListener, _content, addEventListener, _contentAppearance, _innerBounds, _outerBounds, _width, _height, _triggerEvent, dispatchEvent;
function TransitionManager (content) {
this.content = (content);
_transitions = {};
}
function set content(c) {
removeEventListener("allTransitionsInDone", _content);
removeEventListener("allTransitionsOutDone", _content);
_content = c;
saveContentAppearance();
addEventListener("allTransitionsInDone", _content);
addEventListener("allTransitionsOutDone", _content);
//return(content);
}
function get content() {
return(_content);
}
function get transitionsList() {
return(_transitions);
}
function get numTransitions() {
var _local2 = 0;
for (var _local3 in _transitions) {
_local2++;
}
return(_local2);
}
function get numInTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (!_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get numOutTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get contentAppearance() {
return(_contentAppearance);
}
static function start(content, transParams) {
if (content.__transitionManager == undefined) {
content.__transitionManager = new mx.transitions.TransitionManager(content);
}
if (transParams.direction == 1) {
content.__transitionManager._triggerEvent = "hide";
} else {
content.__transitionManager._triggerEvent = "reveal";
}
return(content.__transitionManager.startTransition(transParams));
}
function startTransition(transParams) {
removeTransition(findTransition(transParams));
var _local3 = transParams.type;
var _local2 = new _local3[undefined](_content, transParams, this);
addTransition(_local2);
_local2.start();
return(_local2);
}
function addTransition(trans) {
trans.ID = ++IDCount;
_transitions[trans.ID] = trans;
return(trans);
}
function removeTransition(trans) {
if (_transitions[trans.ID] == undefined) {
return(false);
}
trans.cleanUp();
return(delete _transitions[trans.ID]);
}
function findTransition(transParams) {
var _local2;
for (var _local4 in _transitions) {
_local2 = _transitions[_local4];
if (_local2.type == transParams.type) {
return(_local2);
}
}
return(undefined);
}
function removeAllTransitions() {
for (var _local2 in _transitions) {
_transitions[_local2].cleanUp();
removeTransition(_transitions[_local2]);
}
}
function saveContentAppearance() {
var _local2 = _content;
if (_contentAppearance == undefined) {
var _local3 = (_contentAppearance = {});
for (var _local4 in _visualPropList) {
_local3[_local4] = _local2[_local4];
}
_local3.colorTransform = new Color(_local2).getTransform();
}
_innerBounds = _local2.getBounds(targetPath(_local2));
_outerBounds = _local2.getBounds(targetPath(_local2._parent));
_width = _local2._width;
_height = _local2._height;
}
function restoreContentAppearance() {
var _local2 = _content;
var _local3 = _contentAppearance;
for (var _local4 in _visualPropList) {
_local2[_local4] = _local3[_local4];
}
new Color(_local2).setTransform(_local3.colorTransform);
}
function transitionInDone(e) {
removeTransition(e.target);
if (numInTransitions == 0) {
var _local2;
_local2 = _content._visible;
if ((_triggerEvent == "hide") || (_triggerEvent == "hideChild")) {
_content._visible = false;
}
if (_local2) {
dispatchEvent({type:"allTransitionsInDone", target:this});
}
}
}
function transitionOutDone(e) {
removeTransition(e.target);
if (numOutTransitions == 0) {
restoreContentAppearance();
var _local2;
_local2 = _content._visible;
if (_local2 && ((_triggerEvent == "hide") || (_triggerEvent == "hideChild"))) {
_content._visible = false;
}
updateAfterEvent();
if (_local2) {
dispatchEvent({type:"allTransitionsOutDone", target:this});
}
}
}
function toString() {
return("[TransitionManager]");
}
static var version = "1.1.0.52";
static var IDCount = 0;
var type = mx.transitions.TransitionManager;
var className = "TransitionManager";
var _visualPropList = {_x:null, _y:null, _xscale:null, _yscale:null, _alpha:null, _rotation:null};
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.TransitionManager.prototype);
}
Symbol 178 MovieClip [__Packages.mx.transitions.Fade] Frame 0
class mx.transitions.Fade extends mx.transitions.Transition
{
var _alphaFinal, __get__manager, _content;
function Fade (content, transParams, manager) {
super();
init(content, transParams, manager);
}
function init(content, transParams, manager) {
super.init(content, transParams, manager);
_alphaFinal = __get__manager().__get__contentAppearance()._alpha;
}
function _render(p) {
_content._alpha = _alphaFinal * p;
}
static var version = "1.1.0.52";
var type = mx.transitions.Fade;
var className = "Fade";
}
Symbol 179 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 180 MovieClip [__Packages.SWFExpiration] Frame 0
class SWFExpiration
{
function SWFExpiration () {
}
function checkExpiration(mYear, mMonth, mDay) {
var _local1 = false;
var _local2 = new Date();
var _local4 = _local2.getDate();
var _local5 = _local2.getYear();
var _local3 = _local2.getMonth() + 1;
if (_local5 > mYear) {
_local1 = true;
return(_local1);
}
if (_local3 > mMonth) {
_local1 = true;
return(_local1);
}
if ((_local4 > mDay) && (_local3 >= mMonth)) {
_local1 = true;
return(_local1);
}
_local1 = false;
return(_local1);
}
static function checkServer(testserver) {
var _local2 = false;
var _local4 = _url.substr(0, _url.indexOf(":"));
if (_local4 == "file") {
_local2 = true;
return(_local2);
}
if (_local4 == "http") {
var _local3 = _url.indexOf("//");
var _local1 = _url.substr(_local3 + 2, (_url.indexOf("/", _local3 + 2) - _local3) - 2);
_local1 = _local1.toUpperCase();
if (_local1.indexOf("WWW.") != -1) {
_local1 = _local1.substr(_local1.indexOf("WWW.") + 4, _local1.length);
}
if (_local1 == testserver) {
_local2 = false;
return(_local2);
}
_local2 = true;
return(_local2);
}
}
}