Frame 1
function startPreload() {
_root.onEnterFrame = function () {
var _local2 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (isNaN(_local2)) {
_local2 = 0;
}
if ((_local2 != 100) && (_local2 != 0)) {
trace("not loaded yet");
}
goToMax.gotoAndStop(_local2);
per.text = _local2;
if (_local2 >= 100) {
intro._visible = true;
intro.play();
goToMax._visible = false;
per._visible = false;
loadings._visible = false;
}
};
clearInterval(initPreload);
}
stop();
if (_global.$tweenManager == undefined) {
_global.$tweenManager = new zigo.tweenManager();
} else {
_global.$tweenManager.cleanUp();
_global.$tweenManager.init();
}
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
var Mp = MovieClip.prototype;
Mp.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.addListener.apply(this, arguments);
};
ASSetPropFlags(Mp, "addListener", 1, 0);
Mp.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if (_global.$tweenManager.isTweenLocked(this)) {
trace("tween not added, this movieclip is locked");
return(undefined);
}
if (arguments.length < 2) {
trace("tween not added, props & pEnd must be defined");
return(undefined);
}
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
if (!(pEnd instanceof Array)) {
pEnd = [pEnd];
while (pEnd.length < props.length) {
pEnd.push(pEnd[0]);
}
}
if (seconds == undefined) {
seconds = 2;
} else if (seconds < 0.01) {
seconds = 0;
}
if ((delay < 0.01) || (delay == undefined)) {
delay = 0;
}
switch (typeof(animType)) {
case "string" :
animType = animType.toLowerCase();
if (animType == "linear") {
var eqf = com.robertpenner.easing.Linear.easeNone;
} else if (animType.indexOf("easeoutin") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOutIn;
} else if (animType.indexOf("easeinout") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeInOut;
} else if (animType.indexOf("easein") == 0) {
var t = animType.substr(6);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeIn;
} else if (animType.indexOf("easeout") == 0) {
var t = animType.substr(7);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOut;
}
if (eqf == undefined) {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
case "function" :
var eqf = animType;
break;
case "object" :
if ((animType.ease != undefined) && (animType.pts != undefined)) {
var eqf = animType.ease;
extra1 = animType.pts;
} else {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
default :
var eqf = com.robertpenner.easing.Expo.easeOut;
}
switch (typeof(callback)) {
case "function" :
callback = {func:callback, scope:this._parent};
break;
case "string" :
var ilp;
var funcp;
var scope;
var args;
var a;
ilp = callback.indexOf("(");
funcp = callback.slice(0, ilp);
scope = eval (funcp.slice(0, funcp.lastIndexOf(".")));
func = eval (funcp);
args = callback.slice(ilp + 1, callback.lastIndexOf(")")).split(",");
var i = 0;
while (i < args.length) {
a = eval (args[i]);
if (a != undefined) {
args[i] = a;
}
i++;
}
callback = {func:func, scope:scope, args:args};
}
if (_global.$tweenManager.autoStop) {
_global.$tweenManager.removeTween(this);
}
if (delay > 0) {
_global.$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
_global.$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
Mp.stopTween = function (props) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_global.$tweenManager.removeTween(this, props);
};
Mp.isTweening = function (prop) {
return(_global.$tweenManager.isTweening(this, prop));
};
Mp.getTweens = function () {
return(_global.$tweenManager.getTweens(this));
};
Mp.lockTween = function () {
_global.$tweenManager.lockTween(this, true);
};
Mp.unlockTween = function () {
_global.$tweenManager.lockTween(this, false);
};
Mp.isTweenLocked = function () {
return(_global.$tweenManager.isTweenLocked(this));
};
Mp.isTweenPaused = function (prop) {
return(_global.$tweenManager.isTweenPaused(this, prop));
};
Mp.pauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.pauseTween(this, _local4);
};
Mp.unpauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.unpauseTween(this, _local4);
};
Mp.pauseAllTweens = function () {
_global.$tweenManager.pauseTween();
};
Mp.unpauseAllTweens = function () {
_global.$tweenManager.unpauseTween();
};
Mp.stopAllTweens = function () {
_global.$tweenManager.stopAll();
};
Mp.ffTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.ffTween(this, _local4);
};
Mp.rewTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.rewTween(this, _local4);
};
Mp.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_alpha"], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
Mp.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
Mp.sizeTo = function (destSize, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_width", "_height"], [destSize, destSize], seconds, animType, delay, callback, extra1, extra2);
};
Mp.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
Mp.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_rotation"], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
_global.getColorTransObj = function (type, amt, rgb) {
switch (type) {
case "brightness" :
var _local4 = 100 - Math.abs(amt);
var _local6 = 0;
if (amt > 0) {
_local6 = 256 * (amt / 100);
}
return({ra:_local4, rb:_local6, ga:_local4, gb:_local6, ba:_local4, bb:_local6});
case "brightOffset" :
_local6 = 256 * (amt / 100);
return({ra:100, rb:_local6, ga:100, gb:_local6, ba:100, bb:_local6});
case "contrast" :
var _local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = amt));
_local2.rb = (_local2.gb = (_local2.bb = 128 - (1.28 * amt)));
return(_local2);
case "invertColor" :
_local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = 100 - (2 * amt)));
_local2.rb = (_local2.gb = (_local2.bb = amt * 2.55));
return(_local2);
case "tint" :
if ((rgb == undefined) || (rgb == null)) {
} else {
var _local8 = rgb >> 16;
var _local9 = (rgb >> 8) & 255;
var _local7 = rgb & 255;
var _local5 = amt / 100;
_local2 = {rb:_local8 * _local5, gb:_local9 * _local5, bb:_local7 * _local5};
_local2.ra = (_local2.ga = (_local2.ba = 100 - amt));
return(_local2);
}
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
};
Mp.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightness", bright)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.brightOffsetTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightOffset", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.contrastTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("contrast", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTo = function (rgb, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", 100, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var _local2 = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
Mp.invertColorTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("invertColor", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.tintTo = function (rgb, percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", percent, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.getFrame = function () {
return(this._currentframe);
};
Mp.setFrame = function (fr) {
this.gotoAndStop(Math.round(fr));
};
Mp.addProperty("_frame", Mp.getFrame, Mp.setFrame);
Mp.frameTo = function (endframe, duration, animType, delay, callback, extra1, extra2) {
if (endframe == undefined) {
endframe = this._totalframes;
}
this.tween("_frame", endframe, duration, animType, delay, callback, extra1, extra2);
};
var TFP = TextField.prototype;
if (!TFP.origAddListener) {
TFP.origAddListener = TFP.addListener;
ASSetPropFlags(TFP, "origAddListener", 1, 0);
TFP.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.origAddListener.apply(this, arguments);
};
}
var $_$methods = ["tween", "stopTween", "isTweening", "getTweens", "lockTween", "isTweenLocked", "unlockTween", "isTweenPaused", "pauseTween", "unpauseTween", "pauseAllTweens", "unpauseAllTweens", "stopAllTweens", "ffTween", "rewTween", "getFrame", "setFrame", "_frame", "frameTo", "alphaTo", "brightnessTo", "colorTo", "colorTransformTo", "invertColorTo", "tintTo", "scaleTo", "sizeTo", "slideTo", "rotateTo", "brightOffsetTo", "contrastTo"];
for (var $_$i in $_$methods) {
ASSetPropFlags(Mp, $_$methods[$_$i], 1, 0);
if ($_$methods[$_$i].toLowerCase().indexOf("frame") == -1) {
TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
ASSetPropFlags(TFP, $_$methods[$_$i], 1, 0);
}
}
delete Mp;
delete TFP;
delete $_$methods;
delete $_$i;
this.intro._visible = false;
this.intro.stop();
var initPreload = 0;
initPreload = setInterval(startPreload, 1000);
goToMax.onRelease = function () {
getURL ("http://www.maxgames.com/", "_blank");
};
Frame 2
stop();
var sound = new Sound(this);
sound.attachSound("cath_sound");
sound.start(0, 20);
skiping.onRelease = function () {
this._parent.gotoAndStop(3);
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
};
Instance of Symbol 87 MovieClip "soundChanger" in Frame 2
on (press) {
if (this._currentframe == 1) {
_root.sound.setVolume(0);
this.gotoAndStop(2);
} else {
_root.sound.setVolume(100);
this.gotoAndStop(1);
}
}
Frame 3
stop();
if (!sound) {
var sound = new Sound(this);
sound.attachSound("full_sound");
sound.start(0, 999);
}
var home = this;
start.start.onPress = function () {
home.gotoAndStop("choose");
};
start.instr.onPress = function () {
home.gotoAndStop(4);
};
Frame 4
back.onPress = function () {
gotoAndStop ("start");
};
Frame 5
function pressed() {
var _local2 = "s" + this._name.substring(1);
home.gotoAndStop(_local2);
}
function overed() {
var _local3 = this._name.substring(1);
var _local2 = parseInt(_local3);
_local2 = _local2 + 1;
choose_mc.cover.gotoAndStop(_local2);
}
function outed() {
choose_mc.cover.gotoAndStop(1);
}
var home = this;
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var i = 1;
while (i <= 10) {
var icon = choose_mc["s" + i];
icon.onPress = pressed;
icon.onRollOver = overed;
i++;
}
Frame 11
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 12
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 13
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 14
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 15
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 16
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 17
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 18
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 19
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Frame 20
function RotateDisplayOrDrag(whichPiece) {
if (Key.isDown(18)) {
_root[whichPiece]._rotation = _root[whichPiece]._rotation + 90;
} else if (Key.isDown(16)) {
pieceNumber = whichPiece.slice(1);
nums_mc.nums_txt.text = pieceNumber;
} else {
startDrag (_root[whichPiece], false, 20, 20, 780, 580);
}
}
function IsItDone() {
var columnWidth = 8;
var i = 1;
while (i <= 55) {
var pieceName = home["p" + i];
var row = Math.ceil(i / columnWidth);
var column = (i - ((row - 1) * columnWidth));
with (pieceName) {
if (((((_x <= ((column * 40) + 17)) || (_x >= ((column * 40) + 23))) || (_y <= ((row * 40) + 17))) || (_y >= ((row * 40) + 23))) || (_rotation != 0)) {
trace(i + ": incorrect");
break;
}
}
i++;
}
if (i == 56) {
trace("All Correct");
puzzleSolved(cur_puzzle);
}
}
function puzzleSolved(frameToGo) {
a1.gotoAndStop(frameToGo);
_root.sound.setVolume(100);
_root.soundChanger.gotoAndStop(1);
show_image_btn.enabled = false;
show_bevel_btn.enabled = false;
show_pattern_btn.enabled = false;
show_nums_btn.enabled = false;
scramble_btn.enabled = false;
picture._visible = false;
numbers_mc._visible = false;
grid_mc._visible = false;
var _local4 = new mx.transitions.Tween(change_btn, "_y", mx.transitions.easing.Bounce.easeOut, change_btn._y, change_btn._y + 40, 1, true);
var _local5 = new mx.transitions.Tween(change_btn, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local5 = new mx.transitions.Tween(change_btn, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 110, 1, true);
_local4.onMotionFinished = function () {
var _local1 = new mx.transitions.Tween(a1, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 1, true);
};
var _local3 = 1;
while (_local3 <= 56) {
var _local2 = home["p" + _local3];
_local2.swapDepths(100);
delete _local2.onPress;
delete _local2.onRelease;
_local2.enabled = false;
pTween = new mx.transitions.Tween(_local2, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
_local2.onPress = null;
_local2.onRelease = null;
_local3++;
}
}
function Snap(whichPiece) {
if ((((whichPiece._x > 40) && (whichPiece._x < 360)) && (whichPiece._y > 40)) && (whichPiece._y < 320)) {
var _local3 = Math.floor((whichPiece._x - 20) / 40);
var _local2 = Math.floor((whichPiece._y - 20) / 40);
if ((((whichPiece._x - 20) % 40) / 40) < 0.5) {
whichPiece._x = (_local3 * 40) + 20;
} else {
whichPiece._x = ((_local3 + 1) * 40) + 20;
}
if ((((whichPiece._y - 20) % 40) / 40) < 0.5) {
whichPiece._y = (_local2 * 40) + 20;
} else {
whichPiece._y = ((_local2 + 1) * 40) + 20;
}
}
}
function scramble() {
var _local2 = 1;
while (_local2 <= 56) {
var _local1 = home["p" + _local2];
_local1._x = (Math.random() * 200) + 400;
_local1._y = (Math.random() * 320) + 40;
_local1._rotation = Math.floor(Math.random() * 4) * 90;
_local2++;
}
}
function on_switcher(mc, prop, type) {
if (type == 1) {
if (prop) {
image_is_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 70, 0, 0.5, true);
} else {
image_is_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 70, 0.5, true);
}
} else if (type == 2) {
if (prop) {
nums_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
nums_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
} else if (type == 3) {
if (prop) {
pattern_on = false;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 80, 0, 0.5, true);
} else {
pattern_on = true;
var _local4 = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 80, 0.5, true);
}
}
}
function changePuzzle() {
numbers_mc.swapDepths(500);
numbers_mc.removeMovieClip();
home.gotoAndStop("choose");
stopAllSounds();
_root.sound = new Sound(_root);
_root.sound.attachSound("full_sound");
_root.sound.start(0, 999);
}
stopAllSounds();
var sound = new Sound(this);
sound.attachSound("throu_sound");
sound.start(0, 999);
var i = 1;
while (i <= 56) {
this["p" + i].removeMovieClip();
i++;
}
var cur_puzzle = (this._currentframe - 10);
var filters_array = new Array();
stop();
fscommand ("allowscale", false);
var home = this;
Stage.showMenu = false;
var i = 1;
while (i <= 56) {
var piece = this["p" + i];
piece.onPress = function () {
filters_array = (bevel_on ? ([new flash.filters.DropShadowFilter(), new flash.filters.BevelFilter(1)]) : ([new flash.filters.DropShadowFilter()]));
this.filters = filters_array;
this.swapDepths(home.getNextHighestDepth());
numbers_mc.swapDepths(home.getNextHighestDepth());
if (this.hitTest(home._xmouse, home._ymouse, true)) {
home.RotateDisplayOrDrag(this._name);
}
};
piece.onRelease = (piece.onReleaseOutside = function () {
filters_array = (bevel_on ? ([new flash.filters.BevelFilter(1)]) : ([]));
this.filters = filters_array;
this.stopDrag();
home.Snap(this);
home.IsItDone();
});
i++;
}
a1._alpha = 0;
tween_enabled = true;
scramble_btn.onPress = function () {
scramble();
};
scramble();
var image_is_on = false;
show_image_btn.onPress = function () {
on_switcher(picture, image_is_on, 1);
};
var nums_on = false;
show_nums_btn.onPress = function () {
on_switcher(numbers_mc, nums_on, 2);
};
var pattern_on = false;
show_pattern_btn.onPress = function () {
on_switcher(grid_mc, pattern_on, 3);
};
var i = 1;
while (i <= 56) {
var piece = home["p" + i];
piece.filters = [new flash.filters.BevelFilter(1)];
i++;
}
var bevel_on = true;
show_bevel_btn.onPress = function () {
if (bevel_on) {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [];
_local1++;
}
} else {
bevel_on = !bevel_on;
var _local1 = 1;
while (_local1 <= 56) {
var _local2 = home["p" + _local1];
_local2.filters = [new flash.filters.BevelFilter(1)];
_local1++;
}
}
};
change_btn.onPress = changePuzzle;
Symbol 9 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 12 MovieClip Frame 60
stop();
Symbol 26 MovieClip Frame 14
stop();
Symbol 27 MovieClip Frame 240
this._parent.play();
Symbol 30 MovieClip Frame 1
toMask.cacheAsBitmap = true;
maska.cacheAsBitmap = true;
toMask.setMask(maska);
Symbol 1527 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((t * t) - 1)) + b);
}
t--;
return(((c / 2) * ((t * t) + 1)) + b);
}
}
Symbol 1528 MovieClip [__Packages.com.robertpenner.easing.Circ] Frame 0
class com.robertpenner.easing.Circ
{
function Circ () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
}
Symbol 1529 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((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) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
}
Symbol 1530 MovieClip [__Packages.com.robertpenner.easing.Sine] Frame 0
class com.robertpenner.easing.Sine
{
function Sine () {
}
static function easeIn(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOut(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOut(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
}
Symbol 1531 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.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 function easeOutIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
}
Symbol 1532 MovieClip [__Packages.com.robertpenner.easing.Quint] Frame 0
class com.robertpenner.easing.Quint
{
function Quint () {
}
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 function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
}
Symbol 1533 MovieClip [__Packages.com.robertpenner.easing.Linear] Frame 0
class com.robertpenner.easing.Linear
{
function Linear () {
}
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 function easeOutIn(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1534 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutIn(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
}
Symbol 1535 MovieClip [__Packages.com.robertpenner.easing.Elastic] Frame 0
class com.robertpenner.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)))) + b);
}
}
Symbol 1536 MovieClip [__Packages.com.robertpenner.easing.Bounce] Frame 0
class com.robertpenner.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutIn(t, b, c, d) {
if (t < (d / 2)) {
return((easeOut(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeIn((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
}
Symbol 1537 MovieClip [__Packages.zigo.tweenManager] Frame 0
class zigo.tweenManager
{
var playing, autoStop, broadcastEvents, autoOverwrite, ints, lockedTweens, tweenList, updateTime, tweenHolder, updateIntId, now;
function tweenManager () {
playing = false;
autoStop = false;
broadcastEvents = false;
autoOverwrite = true;
ints = new Array();
lockedTweens = new Object();
tweenList = new Array();
}
function cleanUp() {
if (!((tweenList instanceof Array) && (tweenList.length > 0))) {
return(undefined);
}
for (var _local2 in tweenList) {
if (tweenList[_local2].mc._x == undefined) {
tweenList.splice(Number(_local2), 1);
}
}
if (tweenList.length == 0) {
tweenList = [];
deinit();
}
for (var _local2 in ints) {
if ((ints[_local2] != undefined) && (ints[_local2].mc._x == undefined)) {
removeDelayedTween(Number(_local2));
}
}
}
function set updateInterval(time) {
if (playing) {
deinit();
updateTime = time;
init();
} else {
updateTime = time;
}
//return(updateInterval);
}
function get updateInterval() {
return(updateTime);
}
function set controllerDepth(v) {
if (_global.isNaN(v) == true) {
return;
}
if (tweenHolder._name != undefined) {
tweenHolder.swapDepths(v);
} else {
_th_depth = v;
}
//return(controllerDepth);
}
function get controllerDepth() {
return(_th_depth);
}
function init() {
if (updateTime > 0) {
clearInterval(updateIntId);
updateIntId = setInterval(this, "update", updateTime);
} else {
if (tweenHolder._name == undefined) {
tweenHolder = _root.createEmptyMovieClip("_th_", _th_depth);
}
var tm = this;
tweenHolder.onEnterFrame = function () {
tm.update.call(tm);
};
}
playing = true;
now = getTimer();
}
function deinit() {
playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
}
function update() {
var _local2;
var _local10;
var _local3;
var _local13 = false;
_local10 = tweenList.length;
if (broadcastEvents) {
var _local4;
var _local7;
var _local5;
var _local9;
_local4 = {};
_local7 = {};
_local5 = {};
_local9 = {};
}
while (_local10--) {
_local2 = tweenList[_local10];
if (_local2.mc._x == undefined) {
_local13 = true;
continue;
}
if (_local2.pt != -1) {
continue;
}
if ((_local2.ts + _local2.d) > now) {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ef(now - _local2.ts, _local2.ps, _local2.ch, _local2.d, _local2.e1, _local2.e2);
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.ef(now - _local2.ts, _local2.stm[_local3], _local2.ctm[_local3], _local2.d, _local2.e1, _local2.e2);
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.apply(_local2.cb.updscope, _local2.cb.updargs);
}
} else {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ps + _local2.ch;
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.stm[_local3] + _local2.ctm[_local3];
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local7[targetPath(_local2.mc)] == undefined) {
_local7[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
if (_local9[targetPath(_local2.mc)] == undefined) {
_local9[targetPath(_local2.mc)] = [];
}
_local9[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.updfunc.apply(_local2.cb.updscope, _local2.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(_local10);
}
}
if (_local13) {
cleanUp();
}
for (_local3 in _local4) {
_local4[_local3].broadcastMessage("onTweenUpdate", {target:_local4[_local3], props:_local5[_local3]});
}
if (endt != undefined) {
endTweens(endt);
}
for (_local3 in _local7) {
_local7[_local3].broadcastMessage("onTweenEnd", {target:_local7[_local3], props:_local9[_local3]});
}
now = getTimer();
if (updateTime > 0) {
updateAfterEvent();
}
}
function endTweens(tid_arr) {
var _local2;
var _local9;
var _local3;
var _local5;
var _local8;
_local2 = [];
_local9 = tid_arr.length;
_local3 = 0;
while (_local3 < _local9) {
_local5 = tweenList[tid_arr[_local3]].cb;
if (_local5 != undefined) {
var _local6 = true;
for (_local8 in _local2) {
if (_local2[_local8] == _local5) {
_local6 = false;
break;
}
}
if (_local6) {
_local2.push(_local5);
}
}
tweenList.splice(tid_arr[_local3], 1);
_local3++;
}
_local3 = 0;
while (_local3 < _local2.length) {
var _local4 = _local2[_local3].func;
if ((typeof(_local4) == "string") && (_local2[_local3].scope != undefined)) {
_local4 = _local2[_local3].scope[_local4];
}
_local4.apply(_local2[_local3].scope, _local2[_local3].args);
_local3++;
}
if (tweenList.length == 0) {
deinit();
}
}
function removeDelayedTween(index) {
clearInterval(ints[index].intid);
ints[index] = undefined;
var _local2 = true;
for (var _local3 in ints) {
if (ints[_local3] != undefined) {
_local2 = false;
break;
}
}
if (_local2) {
ints = [];
}
}
function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var _local4;
var _local13;
var _local6;
var _local3;
var _local2;
if (!playing) {
init();
}
var _local12 = [];
for (_local4 in props) {
_local13 = props[_local4];
_local6 = true;
if (_local13.substr(0, 4) != "_ct_") {
var _local17 = ((typeof(pEnd[_local4]) == "string") ? (Number(pEnd[_local4])) : (pEnd[_local4] - mc[_local13]));
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.pp == _local13)) {
_local2.ps = mc[_local13];
_local2.ch = _local17;
_local2.ts = now;
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push(_local2.pp);
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, pp:_local13, ps:mc[_local13], ch:_local17, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
} else {
var _local16 = new Color(mc);
var _local20 = _local16.getTransform();
var _local19 = {};
for (_local3 in pEnd[_local4]) {
if ((pEnd[_local4][_local3] != _local20[_local3]) && (pEnd[_local4][_local3] != undefined)) {
_local19[_local3] = ((typeof(pEnd[_local4][_local3]) == "string") ? (_local20[_local3] + Number(pEnd[_local4][_local3])) : (pEnd[_local4][_local3] - _local20[_local3]));
}
}
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.ctm != undefined)) {
_local2.c = _local16;
_local2.stm = _local20;
(_local2.ctm = _local19);
(_local2.ts = now);
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push("_ct_");
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, c:_local16, stm:_local20, ctm:_local19, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
}
}
if (broadcastEvents) {
if (_local12.length > 0) {
mc.broadcastMessage("onTweenInterrupt", {target:mc, props:_local12});
}
mc.broadcastMessage("onTweenStart", {target:mc, props:props});
}
if (callback.startfunc != undefined) {
var _local27 = callback.startfunc;
if ((typeof(_local27) == "string") && (callback.startscope != undefined)) {
_local27 = callback.startscope[_local27];
}
_local27.apply(callback.startscope, callback.startargs);
}
if (sec == 0) {
update();
}
}
function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var il;
var _local3;
il = ints.length;
_local3 = setInterval(function (obj) {
obj.removeDelayedTween(il);
if (mc._x != undefined) {
obj.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
}
}, delay * 1000, this);
ints[il] = {mc:mc, props:props, pend:pEnd, intid:_local3, st:getTimer(), delay:delay * 1000, args:arguments.slice(1), pt:-1};
if (!playing) {
init();
}
}
function removeTween(mc, props) {
var _local8;
var _local2;
var _local5;
_local8 = false;
if ((props == undefined) && (broadcastEvents != true)) {
_local8 = true;
}
_local2 = tweenList.length;
var _local4 = {};
while (_local2--) {
if (tweenList[_local2].mc == mc) {
if (_local8) {
tweenList.splice(_local2, 1);
} else {
for (_local5 in props) {
if (tweenList[_local2].pp == props[_local5]) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
} else if (((props[_local5] == "_ct_") && (tweenList[_local2].ctm != undefined)) && (tweenList[_local2].mc == mc)) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push("_ct_");
}
}
}
}
}
_local2 = ints.length;
while (_local2--) {
if (ints[_local2].mc == mc) {
if (_local8) {
removeDelayedTween(Number(_local2));
} else {
for (_local5 in props) {
for (var _local11 in ints[_local2].props) {
if (ints[_local2].props[_local11] == props[_local5]) {
ints[_local2].props.splice(_local11, 1);
ints[_local2].pend.splice(_local11, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
}
}
if (ints[_local2].props.length == 0) {
clearInterval(ints[_local2].intid);
}
}
}
}
}
if (broadcastEvents) {
for (var _local11 in _local4) {
if (_local4[_local11].p.length > 0) {
_local4[_local11].t.broadcastMessage("onTweenInterrupt", {target:_local4[_local11].t, props:_local4[_local11].p});
}
}
}
if (tweenList.length == 0) {
deinit();
}
}
function isTweening(mc, prop) {
var _local4 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if (((tweenList[_local6].mc == mc) && (tweenList[_local6].pt == -1)) && ((_local4 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(true);
}
}
return(false);
}
function getTweens(mc) {
var _local2 = 0;
for (var _local4 in tweenList) {
if (tweenList[_local4].mc == mc) {
_local2++;
}
}
return(_local2);
}
function lockTween(mc, bool) {
lockedTweens[targetPath(mc)] = bool;
}
function isTweenLocked(mc) {
if (lockedTweens[targetPath(mc)] == undefined) {
return(false);
}
return(lockedTweens[targetPath(mc)]);
}
function ffTween(mc, propsObj) {
var _local4 = mc == undefined;
var _local6 = propsObj == undefined;
for (var _local8 in tweenList) {
var _local2 = tweenList[_local8];
if (((_local2.mc == mc) || (_local4)) && (_local6 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now - _local2.d;
}
}
for (var _local8 in ints) {
if (ints[_local8] != undefined) {
if ((ints[_local8].mc == mc) || (_local4)) {
if (ints[_local8].mc._x != undefined) {
var _local3 = ints[_local8].args;
_local3[3] = 0;
addTween.apply(this, _local3);
}
removeDelayedTween(Number(_local8));
}
}
}
update();
}
function rewTween(mc, propsObj) {
var _local3 = mc == undefined;
var _local5 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.mc == mc) || (_local3)) && (_local5 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].mc == mc) || (_local3)) {
if (ints[_local7].mc._x != undefined) {
addTween.apply(this, ints[_local7].args);
}
removeDelayedTween(Number(_local7));
}
}
}
update();
}
function isTweenPaused(mc, prop) {
if (mc == undefined) {
return(null);
}
var _local5 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if ((tweenList[_local6].mc == mc) && ((_local5 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(Boolean(tweenList[_local6].pt != -1));
}
}
for (var _local6 in ints) {
if ((ints[_local6] != undefined) && (ints[_local6].mc == mc)) {
return(Boolean(ints[_local6].pt != -1));
}
}
return(false);
}
function pauseTween(mc, propsObj) {
var _local3 = mc == undefined;
if ((_local3 == false) && (isTweenPaused(mc) == true)) {
return(undefined);
}
var _local6 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.pt == -1) && ((_local2.mc == mc) || (_local3))) && ((_local6 || (propsObj[_local2.pp] == true)) || ((propsObj._ct_ != undefined) && (_local2.ctm != undefined)))) {
_local2.pt = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].pt == -1) && ((ints[_local7].mc == mc) || (_local3))) {
ints[_local7].pt = now;
}
}
}
}
function unpauseTween(mc, propsObj) {
var _local4 = mc == undefined;
if ((_local4 == false) && (isTweenPaused(mc) === false)) {
return(undefined);
}
var _local7 = propsObj == undefined;
if (!playing) {
init();
}
for (var _local2 in tweenList) {
var _local3 = tweenList[_local2];
if ((((_local3.pt != -1) && ((_local3.mc == mc) || (_local4))) && (_local7 || (propsObj[_local3.pp] == true))) || ((propsObj._ct_ != undefined) && (_local3.ctm != undefined))) {
_local3.ts = now - (_local3.pt - _local3.ts);
_local3.pt = -1;
}
}
for (var _local2 in ints) {
if (ints[_local2] != undefined) {
if ((ints[_local2].pt != -1) && ((ints[_local2].mc == mc) || (_local4))) {
ints[_local2].delay = ints[_local2].delay - (ints[_local2].pt - ints[_local2].st);
ints[_local2].st = now;
ints[_local2].intid = setInterval(function (obj, id) {
obj.addTween.apply(obj, obj.ints[id].args);
clearInterval(obj.ints[id].intid);
obj.ints[id] = undefined;
}, ints[_local2].delay, this, _local2);
}
}
}
}
function pauseAll() {
pauseTween();
}
function unpauseAll() {
unpauseTween();
}
function stopAll() {
for (var _local2 in ints) {
removeDelayedTween(Number(_local2));
}
tweenList = new Array();
deinit();
}
function toString() {
return("[AS2 tweenManager 1.2.0]");
}
var _th_depth = 6789;
}
Symbol 1538 MovieClip [__Packages.com.robertpenner.easing.Cubic] Frame 0
class com.robertpenner.easing.Cubic
{
function Cubic () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((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) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
}
Symbol 1539 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 1540 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 1541 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 1542 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 1543 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 80 MovieClip Frame 487
this._parent.play();
stopAllSounds();
var clip = this._parent;
clip.sound = new Sound(this);
clip.sound.attachSound("full_sound");
clip.sound.start(0, 999);
Symbol 87 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 1
maxGames.onRelease = function () {
getURL ("http://www.maxgames.com/", "_blank");
};
Symbol 184 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 45
stop();
Symbol 340 MovieClip Frame 75
stop();
Symbol 350 MovieClip Frame 25
stop();
Symbol 352 MovieClip Frame 160
stop();
Symbol 393 MovieClip Frame 95
stop();
Symbol 409 MovieClip Frame 70
stop();
Symbol 454 MovieClip Frame 120
stop();
Symbol 482 Button
on (release) {
getURL ("http://www.maxgames.com/", "_blank");
}