Frame 1
var snd_danger = new Sound();
snd_danger.attachSound("_danger");
var snd_discard_over = new Sound();
snd_discard_over.attachSound("_discard_over");
var snd_discard_use = new Sound();
snd_discard_use.attachSound("_discard_use");
var snd_gift_aroma_apply = new Sound();
snd_gift_aroma_apply.attachSound("_gift_aroma_apply");
var snd_gift_aroma_press = new Sound();
snd_gift_aroma_press.attachSound("_gift_aroma_press");
var snd_gift_food_apply = new Sound();
snd_gift_food_apply.attachSound("_gift_food_apply");
var snd_gift_food_press = new Sound();
snd_gift_food_press.attachSound("_gift_food_press");
var snd_gift_lotus_apply = new Sound();
snd_gift_lotus_apply.attachSound("_gift_lotus_apply");
var snd_gift_lotus_press = new Sound();
snd_gift_lotus_press.attachSound("_gift_lotus_press");
var snd_goal_reached = new Sound();
snd_goal_reached.attachSound("_goal_reached");
var snd_gui_click = new Sound();
snd_gui_click.attachSound("_gui_click");
var snd_gui_over = new Sound();
snd_gui_over.attachSound("_gui_over");
var snd_scene_move = new Sound();
snd_scene_move.attachSound("_scene_move");
var snd_scene_stop = new Sound();
snd_scene_stop.attachSound("_scene_stop");
var snd_shape_insert = new Sound();
snd_shape_insert.attachSound("_shape_insert");
var snd_shape_insert_combo = new Sound();
snd_shape_insert_combo.attachSound("_shape_insert_combo");
var snd_shape_pickup = new Sound();
snd_shape_pickup.attachSound("_shape_pickup");
var snd_thunder = new Sound();
snd_thunder.attachSound("_thunder");
var snd_stripe_arrive = new Sound();
snd_stripe_arrive.attachSound("_stripe_arrive");
var snd_stripe_deploy = new Sound();
snd_stripe_deploy.attachSound("_stripe_deploy");
var snd_stripe_destroy = new Sound();
snd_stripe_destroy.attachSound("_stripe_destroy");
var amulet_fly_start = new Sound();
amulet_fly_start.attachSound("_amulet_fly_start");
var amulet_show = new Sound();
amulet_show.attachSound("_amulet_show");
var bonus_gem_added = new Sound();
bonus_gem_added.attachSound("_bonus_gem_added");
var game_pause = new Sound();
game_pause.attachSound("_game_pause");
var game_unpause = new Sound();
game_unpause.attachSound("_game_unpause");
var scene_melt = new Sound();
scene_melt.attachSound("_scene_melt");
function gotoDownload() {
if (_root.link != undefined) {
getURL (link, "_blank");
} else {
getURL ("http://en.realore.com/mysteriesofhorus/", "_blank");
}
if (_root.dload_f != undefined) {
cstr = ("JavaScript:" + dload_f) + "()";
getURL (cstr);
}
}
if (Number(System.capabilities.version.slice(4, 5)) >= 8) {
warning._visible = false;
} else {
warning._visible = true;
progress._visible = false;
stop();
}
Frame 2
function ef_go() {
progress.setprogress((this.getBytesLoaded() / this.getBytesTotal()) * 100);
if (this.getBytesLoaded() == this.getBytesTotal()) {
this.onEnterFrame = undefined;
_root.gotoAndStop("MMenu");
}
}
stop();
Stage.showMenu = false;
progress.init();
progress.start();
Instance of Symbol 461 MovieClip "hlp_main" in Frame 2
onClipEvent (load) {
_root.hlp_main._visible = false;
}
Frame 7
stop();
if (close_f == undefined) {
mm_main.mmHideQuit();
}
Frame 12
_root.gotoAndStop("Game");
Frame 13
stop();
Frame 19
stop();
Symbol 143 MovieClip Frame 1
function init() {
this._alpha = 0;
up1._x = INITXUP;
down1._x = INITXDOWN - (1 * down1._width);
if (up2 != undefined) {
removeMovieClip(up2);
}
if (down2 != undefined) {
removeMovieClip(down2);
}
if (up3 != undefined) {
removeMovieClip(up3);
}
if (down3 != undefined) {
removeMovieClip(down3);
}
}
function start() {
duplicateMovieClip (up1, "up2", this.getNextHighestDepth());
duplicateMovieClip (up1, "up3", this.getNextHighestDepth());
duplicateMovieClip (down1, "down2", this.getNextHighestDepth());
duplicateMovieClip (down1, "down3", this.getNextHighestDepth());
up2._x = up1._width;
up3._x = up1._width * 2;
down2._x = 0;
down3._x = down1._width;
this.onEnterFrame = ef_start;
}
function ef_start() {
up1._x = up1._x - SHIFTSTEP;
up2._x = up2._x - SHIFTSTEP;
up3._x = up3._x - SHIFTSTEP;
down1._x = down1._x + SHIFTSTEP;
down2._x = down2._x + SHIFTSTEP;
down3._x = down3._x + SHIFTSTEP;
i = 1;
while (i <= 3) {
if (this["up" + i]._x < (-1 * up1._width)) {
this["up" + i]._x = up1._width * 2;
}
if (this["down" + i]._x > (2 * down1._width)) {
this["down" + i]._x = -1 * down1._width;
}
i++;
}
if (this._alpha <= (ALPHA - ALPHASTEP)) {
this._alpha = this._alpha + ALPHASTEP;
} else {
this._alpha = ALPHA;
}
}
var INITXUP = 0;
var INITXDOWN = 0;
var SHIFTSTEP = 1;
var ALPHASTEP = 0.7;
var ALPHA;
Symbol 145 MovieClip Frame 1
function init() {
text1.init();
text1.ALPHA = 75;
text2.init();
text2.ALPHA = 15;
}
function start() {
text1.start();
text2.start();
}
Symbol 149 MovieClip Frame 1
FirstTime = true;
Symbol 149 MovieClip Frame 28
if (FirstTime) {
stop();
FirstTime = false;
}
Symbol 149 MovieClip Frame 55
gotoAndPlay (2);
Symbol 169 MovieClip Frame 1
function start() {
Cnt = 0;
this.onEnterFrame = ef_start;
}
function ef_start() {
var _local3;
var _local4;
Cnt++;
if (Cnt < LFRAMES) {
i = 1;
while (i <= 10) {
_local4 = (INITAMP * Math.sin(((((Math.PI*2) / LFRAMES) / 4) * Cnt) + (Math.PI/4))) * (1 - (Cnt / LFRAMES));
_local3 = 100 - (_local4 * Math.sin((((Math.PI*2) / LFRAMES) * LPER) * ((Cnt + INITPH) + (i * LV))));
this["L" + i]._xscale = _local3;
this["L" + i]._yscale = _local3;
_local3 = this["L" + i]._xscale - 100;
if (_local3 > 0) {
if (_local3 > 19) {
this["L" + i]._alpha = (100 - (_local3 * 2.1)) - 20;
} else {
this["L" + i]._alpha = 100 - (_local3 * 2.1);
}
}
i++;
}
} else {
i = 1;
while (i <= 10) {
this["L" + i]._xscale = 100;
this["L" + i]._yscale = 100;
this["L" + i]._alpha = 100;
i++;
}
this.onEnterFrame = undefined;
_parent.dummy.onMouseMove = _parent.go;
}
}
function wave(cx) {
OldCX = CX;
CX = cx;
Cnt = 0;
startf = false;
this.onEnterFrame = ef_wave;
}
function ef_wave() {
var _local3;
var _local5;
var _local4;
Cnt++;
if ((Cnt > 1) && (!startf)) {
return(undefined);
}
if (Cnt < LFRAMES) {
i = 1;
while (i <= 10) {
_local4 = ((((Math.PI*2) * CX) / this._width) * 0.7) + 0.1;
_local5 = (INITAMP * Math.sin(((((Math.PI*2) / LFRAMES) / 4) * Cnt) + (Math.PI/4))) * (1 - (Cnt / LFRAMES));
if ((CX - OldCX) >= 0) {
_local3 = 100 - (_local5 * Math.sin(((((Math.PI*2) / LFRAMES) * LPER) * ((Cnt + INITPH) + (i * LV))) + _local4));
} else {
_local3 = 100 - (_local5 * Math.sin(((((Math.PI*2) / LFRAMES) * LPER) * ((Cnt + INITPH) - (i * LV))) + _local4));
}
if (_local3 < 100) {
_local3 = 100 - ((100 - _local3) * 0.8);
}
this["L" + i]._xscale = _local3;
this["L" + i]._yscale = _local3;
_local3 = this["L" + i]._xscale - 100;
if (_local3 > 0) {
if (_local3 > 18) {
this["L" + i]._alpha = (100 - (_local3 * 2.1)) - 20;
} else {
this["L" + i]._alpha = 100 - (_local3 * 2.1);
}
}
i++;
}
} else {
i = 1;
while (i <= 10) {
this["L" + i]._xscale = 100;
this["L" + i]._yscale = 100;
this["L" + i]._alpha = 100;
i++;
}
this.onEnterFrame = undefined;
_parent.dummy.onMouseMove = _parent.go;
}
}
var LFRAMES = 100;
var LPER = 3;
var INITAMP = 27;
var INITPH = 5;
var LV = 2;
var Cnt;
var CX;
var OldCX = 0;
var startf;
Symbol 175 MovieClip Frame 1
function go() {
if ((((dummy._xmouse < dummy._width) && (dummy._xmouse > 0)) && (dummy._ymouse < dummy._height)) && (dummy._ymouse > 0)) {
loading.wave(dummy._xmouse);
}
}
dummy.useHandCursor = false;
dummy.onRollOut = function () {
loading.startf = true;
};
Symbol 180 MovieClip Frame 1
function start() {
duplicateMovieClip (prnload, "prnload1", this.getNextHighestDepth());
duplicateMovieClip (prnload, "prnload2", this.getNextHighestDepth());
prnload._alpha = PRALPHAINIT;
prnload._xscale = PRMAGNINIT;
prnload._yscale = PRMAGNINIT;
prnload1._alpha = PRALPHAINIT1;
prnload1._xscale = PRMAGNINIT1;
prnload1._yscale = PRMAGNINIT1;
prnload2._alpha = PRALPHAINIT2;
prnload2._xscale = PRMAGNINIT2;
prnload2._yscale = PRMAGNINIT2;
this.onEnterFrame = ef1_start;
}
function ef1_start() {
if (prnload._xscale > 100) {
tmp = PRMAGNSTEP;
if ((prnload._xscale - tmp) < 0) {
tmp = prnload._xscale - 100;
}
prnload._xscale = prnload._xscale - tmp;
prnload._yscale = prnload._yscale - tmp;
prnload._alpha = prnload._alpha + (PRALPHASTEP * PRALPHASTEP);
} else {
prnload._xscale = prnload._xscale - 0.8;
prnload._yscale = prnload._yscale - 0.8;
}
if (prnload._xscale < PRSTART1) {
if (prnload1._xscale > 100) {
tmp = (PRMAGNSTEP1 * PRMAGNSTEP1) / 23;
if ((prnload1._xscale - tmp) < 100) {
tmp = prnload1._xscale - 100;
}
prnload1._xscale = prnload1._xscale - tmp;
prnload1._yscale = prnload1._yscale - tmp;
if (prnload._xscale > 100) {
prnload1._alpha = prnload1._alpha + (PRALPHASTEP1 * PRALPHASTEP1);
} else {
prnload1._alpha = prnload1._alpha - (PRALPHASTEP1 * PRALPHASTEP1);
}
} else {
removeMovieClip(prnload1);
}
}
if (prnload._xscale < PRSTART2) {
if (prnload2._xscale > 100) {
tmp = (PRMAGNSTEP2 * PRMAGNSTEP2) / 15.4;
if ((prnload2._xscale - tmp) < 100) {
tmp = prnload2._xscale - 100;
}
prnload2._xscale = prnload2._xscale - tmp;
prnload2._yscale = prnload2._yscale - tmp;
if (prnload1._xscale != 100) {
prnload2._alpha = prnload2._alpha + (PRALPHASTEP2 * PRALPHASTEP2);
} else {
prnload2._alpha = prnload2._alpha - (PRALPHASTEP2 * PRALPHASTEP2);
}
} else {
removeMovieClip(prnload2);
}
}
if (prnload2 == undefined) {
Cnt = 0;
prnload._alpha = 100;
shadow.play();
prnload.loading.start();
prnload.progress._alpha = 35;
this.onEnterFrame = ef2_start;
_root.onEnterFrame = _root.ef_go;
}
}
function ef2_start() {
Cnt++;
if (Cnt == TEXTSTART) {
text.start();
}
if (Cnt < WVFRAMES) {
tmp = 100 - ((WVINITAMP * (1 - (Cnt / WVFRAMES))) * Math.sin((((Math.PI * Cnt) / WVFRAMES) * WVPERIODS) + (Math.PI/4)));
prnload._xscale = tmp;
prnload._yscale = tmp;
maskmc._xscale = tmp;
maskmc._yscale = tmp;
filled._xscale = tmp;
filled._yscale = tmp;
} else {
this.onEnterFrame = undefined;
}
}
function init() {
text.init();
Cnt = 0;
this._alpha = 100;
htmp = maskmc.target._height;
ytmp = maskmc.target._y;
maskmc.target._height = 0;
maskmc.target._y = ytmp + htmp;
}
function setprogress(pr) {
maskmc.target._height = (pr * htmp) / 100;
maskmc.target._y = ytmp + (htmp * (1 - (pr / 100)));
}
var PRMAGNINIT = 1000;
var PRALPHAINIT = 0;
var PRMAGNSTEP = 25;
var PRALPHASTEP = 1.5;
var PRMAGNINIT1 = 1000;
var PRALPHAINIT1 = 0;
var PRMAGNSTEP1 = 25;
var PRALPHASTEP1 = 1.5;
var PRSTART1 = 700;
var PRMAGNINIT2 = 1000;
var PRALPHAINIT2 = 0;
var PRMAGNSTEP2 = 25;
var PRALPHASTEP2 = 1.6;
var PRSTART2 = 300;
var WVFRAMES = 85;
var WVINITAMP = 17;
var WVPERIODS = 3.5;
var TEXTSTART = 30;
var htmp;
var ytmp;
var Cnt;
Symbol 186 Button
on (press) {
getURL ("http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash", "_blank");
}
Symbol 227 MovieClip Frame 1
width = Stage.width;
height = Stage.height;
click_text.text = "CLICK!";
frame_text.text = "Take a symbol from the conveyor and place it in gap in a row.";
return(true);
Symbol 461 MovieClip Frame 1
hlp_pg2.onRelease = function () {
gotoAndStop (2);
_root.snd_gui_click.start();
};
function hlpShow(sender) {
Sndr = sender;
if (Sndr == "game") {
Key.removeListener(_root.gamedy.keyListenerP);
}
dummy.useHandCursor = false;
this._visible = true;
gotoAndStop (1);
}
function hlpHide() {
if (Sndr == "game") {
Key.addListener(_root.gamedy.keyListenerP);
}
this._visible = false;
_root.gamedy.pause();
}
var Sndr;
hlp_ok.onRelease = function () {
_root.hlp_main.hlpHide();
_root.snd_gui_click.start();
};
stop();
Symbol 461 MovieClip Frame 2
hlp_pg1.onRelease = function () {
gotoAndStop (1);
_root.snd_gui_click.start();
};
stop();
Symbol 485 MovieClip Frame 1
function mmHideQuit() {
mm_quit._visible = false;
mm_quitlabel._visible = false;
}
stop();
mm_play.onRelease = function () {
_root.FirstTime_f = true;
_root.newGame = true;
_root.play();
_root.snd_gui_click.start();
};
mm_play.onRollOver = function () {
_root.snd_gui_over.start();
};
mm_help.onRelease = function () {
_root.hlp_main.hlpShow("menu");
_root.snd_gui_click.start();
};
mm_help.onRollOver = function () {
_root.snd_gui_over.start();
};
mm_download.onRelease = function () {
_root.gotoAndStop("Download");
_root.snd_gui_click.start();
};
mm_download.onRollOver = function () {
_root.snd_gui_over.start();
};
mm_quit.onRelease = function () {
fscommand ("quit");
if (_root.close_f != 0) {
cstr = ("JavaScript:" + _root.close_f) + "()";
getURL (cstr);
}
_root.snd_gui_click.start();
};
mm_quit.onRollOver = function () {
_root.snd_gui_over.start();
};
Symbol 507 MovieClip Frame 1
dload_back.onRelease = function () {
_root.gotoAndStop("MMenu");
};
dload_dload.onRelease = function () {
_root.gotoDownload();
};
Symbol 516 MovieClip Frame 1
gamest_menu.onRelease = function () {
_root.gamedy.menu.pause.show();
_root.gamedy.pause();
_root.snd_gui_click.start();
};
gamest_help.onRelease = function () {
_root.hlp_main.hlpShow("game");
_root.gamedy.pause();
_root.snd_gui_click.start();
};
gamest_download.onRelease = function () {
_root.gotoAndStop("Download");
};
Symbol 523 MovieClip Frame 1
stop();
Symbol 523 MovieClip Frame 15
_root.snd_danger.start();
Symbol 523 MovieClip Frame 30
gotoAndPlay (2);
Symbol 529 MovieClip Frame 1
stop();
Symbol 529 MovieClip Frame 32
gotoAndPlay (2);
Symbol 530 MovieClip Frame 1
function init() {
slider._x = 0;
mask._width = slider._width / 4;
line.gotoAndStop(1);
slider.gotoAndStop(1);
}
var SLMAX = 76;
Symbol 542 MovieClip Frame 1
stop();
Symbol 542 MovieClip Frame 2
stop();
Symbol 542 MovieClip Frame 3
stop();
Symbol 543 MovieClip Frame 1
function init(god) {
ef_tmp = undefined;
this.onEnterFrame = undefined;
Cnt = 0;
Status = "_READY";
sky._x = skymask._width - sky._width;
gods._alpha = 0;
sky._alpha = 0;
gods.gotoAndStop(god);
line.init();
}
function decrease() {
Satisfaction = Satisfaction - _parent.SATDECSTEP_D;
setsat(false);
}
function increase(val) {
Satisfaction = Satisfaction + val;
setsat(false);
}
function start() {
Status = "_PLAY";
this.onEnterFrame = ef_start;
}
function ef_start() {
if (Cnt < 5) {
Cnt++;
} else {
Cnt = 0;
if (_parent.isPlayerReady) {
Satisfaction = Satisfaction - _parent.SATDECSTEP_T;
}
setsat(false);
}
}
function show() {
Status = "_SHOW";
StSatisfaction = 100;
Satisfaction = 0;
this.onEnterFrame = ef_show;
}
function ef_show() {
if (Satisfaction < StSatisfaction) {
Satisfaction = Satisfaction + SSTSTEP;
gods._alpha = gods._alpha + SSTSTEP;
sky._alpha = sky._alpha + SSTSTEP;
setsat(true);
} else {
Satisfaction = 100;
Status = "_READY";
this.onEnterFrame = undefined;
}
}
function hide() {
Status = "_HIDE";
StSatisfaction = 0;
this.onEnterFrame = ef_hide;
}
function ef_hide() {
if (gods._alpha > 0) {
Satisfaction = Satisfaction - SSTSTEP;
gods._alpha = gods._alpha - SSTSTEP;
sky._alpha = sky._alpha - SSTSTEP;
setsat(true);
} else {
init(3);
}
}
function stop() {
Status = "_STOP";
this.onEnterFrame = undefined;
}
function setsat(startf) {
var _local3;
if (Satisfaction < 0) {
Satisfaction = 0;
}
if (Satisfaction <= 100) {
_local3 = Satisfaction;
} else {
_local3 = 100;
}
line.slider._x = (line.SLMAX / 100) * _local3;
line.mask._width = ((line.SLMAX / 100) * _local3) + (line.slider._width / 4);
if (!startf) {
_parent.updamuletscore(_local3);
if (Satisfaction <= 85) {
_local3 = Satisfaction;
} else {
_local3 = 85;
}
sky._x = ((skymask._width - sky._width) * _local3) / 85;
if (Satisfaction >= 100) {
if (line.slider._currentframe == 1) {
line.slider.gotoAndPlay(2);
}
} else {
line.slider.gotoAndStop(1);
if (Satisfaction < 30) {
if (line.line._currentframe == 1) {
line.line.gotoAndPlay(2);
}
if (!_root.gamedy.isShown_igh) {
_root.gamedy.ighelp.gifts.show();
}
} else {
line.line.gotoAndStop(1);
}
}
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
line.slider.stop();
line.line.stop();
} else {
this.onEnterFrame = ef_tmp;
if (line.slider._currentFrame != 1) {
line.slider.play();
}
if (line.line._currentFrame != 1) {
line.line.play();
}
}
}
var SSTSTEP = 5;
var Status;
var Satisfaction;
var StSatisfaction;
var Cnt;
var ef_tmp;
Symbol 550 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 8
stop();
Symbol 550 MovieClip Frame 16
gotoAndStop ("Init");
Symbol 578 MovieClip Frame 1
function settype(etype) {
this.gotoAndStop(etype);
type = etype;
}
function setcolor(ecolor) {
var _local2 = new Color(this["clr" + type]);
switch (ecolor) {
case 0 :
_local2.setRGB(62483);
break;
case 1 :
_local2.setRGB(3407351);
break;
case 2 :
_local2.setRGB(16114984);
}
color = ecolor;
}
var type;
var color;
stop();
Symbol 578 MovieClip Frame 2
stop();
Symbol 578 MovieClip Frame 3
stop();
Symbol 578 MovieClip Frame 4
stop();
Symbol 578 MovieClip Frame 5
stop();
Symbol 578 MovieClip Frame 6
stop();
Symbol 578 MovieClip Frame 7
stop();
Symbol 578 MovieClip Frame 8
stop();
Symbol 578 MovieClip Frame 9
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 9
_parent.element._visible = false;
Symbol 583 MovieClip Frame 1
function init() {
element._visible = false;
}
function switchon() {
_root.snd_discard_over.start();
glow.gotoAndPlay("Start");
}
function switchoff() {
glow.gotoAndPlay("Stop");
}
function discard() {
_parent.isPlayerReady = true;
_parent.satisf.decrease();
if (_root.gamedy.figure.Status == "_DRAG") {
element.settype(_root.gamedy.figure.element.type);
element.setcolor(_root.gamedy.figure.element.color);
element._visible = true;
_root.gamedy.figure.reset();
cover.gotoAndPlay("Start");
_root.snd_discard_use.start();
} else if ((_root.gamedy.figure.Status == "_READY") && (_root.gamedy.stack.Status == "_READY")) {
i = 1;
while (i <= 6) {
if (_root.gamedy.stack["element" + i].eindex == 1) {
break;
}
i++;
}
element.settype(_root.gamedy.stack["element" + i].type);
element.setcolor(_root.gamedy.stack["element" + i].color);
_root.gamedy.stack.shift(_root.gamedy.stack["element" + i]);
element._visible = true;
cover.gotoAndPlay("Start");
_root.snd_discard_use.start();
}
}
function pause() {
if (_root.gamedy.isPaused) {
cover.stop();
} else if (cover._currentFrame != 1) {
cover.play();
}
}
button.onRollOver = function () {
};
button.onRollOut = function () {
};
button.onPress = function () {
};
Symbol 632 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 2
_root.bonus_gem_added.start();
Symbol 648 MovieClip Frame 1
function scoreclr() {
if (Number(current_score.text) < Number(goal_score.text)) {
current_score.textColor = 16712193 /* 0xFF0201 */;
} else {
current_score.textColor = 6442798 /* 0x624F2E */;
}
}
Symbol 653 MovieClip Frame 1
function settype(etype) {
this.gotoAndStop(etype);
type = etype;
}
function setcolor(ecolor) {
var _local2 = new Color(this["clr" + type]);
switch (ecolor) {
case 0 :
_local2.setRGB(62483);
break;
case 1 :
_local2.setRGB(3407351);
break;
case 2 :
_local2.setRGB(16114984);
}
color = ecolor;
}
var type;
var color;
var eindex;
clickarea.useHandCursor = false;
clickarea.onPress = function () {
_parent.element_onpress(this._parent);
};
stop();
Symbol 653 MovieClip Frame 2
stop();
Symbol 653 MovieClip Frame 3
stop();
Symbol 653 MovieClip Frame 4
stop();
Symbol 653 MovieClip Frame 5
stop();
Symbol 653 MovieClip Frame 6
stop();
Symbol 653 MovieClip Frame 7
stop();
Symbol 653 MovieClip Frame 8
stop();
Symbol 653 MovieClip Frame 9
stop();
Symbol 654 MovieClip Frame 1
function element_onpress(elem) {
var _local4;
if (!_root.gamedy.isShownD_igh) {
_local4 = _root.gamedy.gamearea.stripes.checkf(elem.type);
if (!_local4) {
_root.gamedy.ighelp.discard.show();
}
}
if (_parent.figure.Status == "_READY") {
_parent.figure.drag(elem);
shift(elem);
}
}
function start() {
init();
i = 1;
while (i <= 6) {
tmp = Math.floor(Math.random() * _parent.FiguresAmount);
this["element" + i].settype(_parent.AllowedFiguresArr[tmp]);
tmp = Math.floor(Math.random() * _parent.ColorsAmount);
this["element" + i].setcolor(tmp);
this["element" + i].eindex = i;
i++;
}
Status = "_SHOW";
this.onEnterFrame = ef_show;
}
function init() {
i = 1;
while (i <= 6) {
this["element" + i]._alpha = 100;
this["element" + i]._y = EDY;
this["element" + i]._x = RIGHTEX + (ESTEP * (i - 1));
i++;
}
Status = "_RESET";
}
function ef_show() {
if (element1._x > EDX) {
i = 1;
while (i <= 6) {
this["element" + i]._x = this["element" + i]._x - SHOWSTEP;
i++;
}
} else {
i = 1;
while (i <= 6) {
this["element" + i]._x = EDX + (ESTEP * (i - 1));
i++;
}
Status = "_READY";
this.onEnterFrame = undefined;
}
}
function shift(elem) {
Status = "_SHIFT";
elem._x = RIGHTEX;
tmp = Math.floor(Math.random() * _parent.FiguresAmount);
elem.settype(_parent.AllowedFiguresArr[tmp]);
tmp = Math.floor(Math.random() * _parent.ColorsAmount);
elem.setcolor(tmp);
i = 1;
while (i <= 6) {
if (this["element" + i].eindex > elem.eindex) {
this["element" + i].eindex--;
}
i++;
}
elem.eindex = 6;
this.onEnterFrame = ef_shift;
}
function ef_shift() {
cnt = 0;
i = 1;
while (i <= 6) {
if (this["element" + i]._x > (EDX + ((this["element" + i].eindex - 1) * ESTEP))) {
this["element" + i]._x = this["element" + i]._x - SHIFTSTEP;
} else {
this["element" + i]._x = EDX + (ESTEP * (this["element" + i].eindex - 1));
cnt++;
}
i++;
}
if (cnt == 6) {
Status = "_READY";
this.onEnterFrame = undefined;
}
}
function hide() {
Status = "_HIDE";
this.onEnterFrame = ef_hide;
}
function ef_hide() {
if (element1._alpha > 0) {
i = 1;
while (i <= 6) {
this["element" + i]._alpha = this["element" + i]._alpha - HIDESTEP;
i++;
}
} else {
this.onEnterFrame = undefined;
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var EDX = 0;
var EDY = 0;
var ESTEP = 71;
var RIGHTEX = (EDX + (ESTEP * 6));
var SHOWSTEP = 40;
var SHIFTSTEP = 35.5;
var HIDESTEP = 10;
var Status;
var ef_tmp;
Symbol 661 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 2
stop();
Symbol 661 MovieClip Frame 3
stop();
Symbol 668 MovieClip Frame 1
stop();
Symbol 668 MovieClip Frame 2
stop();
Symbol 668 MovieClip Frame 3
stop();
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 2
stop();
Symbol 675 MovieClip Frame 3
stop();
Symbol 682 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 2
stop();
Symbol 682 MovieClip Frame 3
stop();
Symbol 685 MovieClip Frame 1
function init(up, down, shiftf) {
Status = "_READY";
this.onEnterFrame = undefined;
darken._alpha = 0;
if (!up) {
scupgood._alpha = 0;
} else {
scupgood._alpha = 100;
}
if (!down) {
scdowngood._alpha = 0;
} else {
scdowngood._alpha = 100;
}
if (shiftf) {
scupbad._x = scupbad._width;
scupgood._x = scupbad._width;
scdownbad._x = -1 * scdownbad._width;
scdowngood._x = -1 * scdownbad._width;
}
}
function shiftin(loc) {
Status = "_SHIFT";
scupbad.gotoAndStop(loc);
scdownbad.gotoAndStop(loc);
scupgood.gotoAndStop(loc);
scdowngood.gotoAndStop(loc);
sndsceneflag = false;
if (scupbad._x != 0) {
_root.snd_scene_move.start();
sndsceneflag = true;
}
sndscenestopflag = true;
this.onEnterFrame = ef_shiftin;
}
function ef_shiftin() {
if (scupbad._x > 0) {
scupbad._x = scupbad._x - SHIFTSTEP;
scupgood._x = scupgood._x - SHIFTSTEP;
} else {
if (sndscenestopflag && (sndsceneflag)) {
_root.snd_scene_stop.start();
sndscenestopflag = false;
}
scupbad._x = 0;
scupgood._x = 0;
}
if (scdownbad._x < 0) {
scdownbad._x = scdownbad._x + SHIFTSTEP;
scdowngood._x = scdowngood._x + SHIFTSTEP;
} else {
scdownbad._x = 0;
scdowngood._x = 0;
}
if ((scupbad._x == 0) && (scupbad._x == 0)) {
if ((pausecnt++) >= SHIFTPAUSE) {
pausecnt = 0;
this.onEnterFrame = undefined;
Status = "_READY";
}
}
}
function shiftout() {
Status = "_SHIFT";
this.onEnterFrame = ef_shiftout;
}
function ef_shiftout() {
if (scupbad._x < scupbad._width) {
scupbad._x = scupbad._x + SHIFTSTEP;
scupgood._x = scupgood._x + SHIFTSTEP;
} else {
scupbad._x = scupbad._width;
scupgood._x = scupbad._width;
}
if (scdownbad._x > (-1 * scdownbad._width)) {
scdownbad._x = scdownbad._x - SHIFTSTEP;
scdowngood._x = scdowngood._x - SHIFTSTEP;
} else {
scdownbad._x = -1 * scdownbad._width;
scdowngood._x = -1 * scdownbad._width;
}
if ((scupbad._x == 0) && (scupbad._x == 0)) {
this.onEnterFrame = undefined;
Status = "_READY";
}
}
function fadeout() {
Status = "_FADEOUT";
this.onEnterFrame = ef_fadeout;
}
function ef_fadeout() {
if (darken._alpha < 100) {
darken._alpha = darken._alpha + DARKENSTEP;
} else {
darken._alpha = 100;
this.onEnterFrame = undefined;
Status = "_READY";
}
}
function show(scr) {
darken._alpha = 0;
Status = "_SHOW";
_root.scene_melt.start();
this.onEnterFrame = function () {
ef_show(scr);
};
}
function ef_show(scr) {
if (this[("sc" + scr) + "good"]._alpha < 100) {
this[("sc" + scr) + "good"]._alpha = this[("sc" + scr) + "good"]._alpha + DARKENSTEP;
} else {
this[("sc" + scr) + "good"]._alpha = 100;
this.onEnterFrame = undefined;
Status = "_READY";
}
}
var Status;
var SHIFTPAUSE = 24;
var SHIFTSTEP = 20;
var DARKENSTEP = 10;
var pausecnt = 0;
var sndscenestopflag;
var sndsceneflag;
Symbol 689 MovieClip Frame 1
function init() {
ef_tmp = undefined;
stop();
i = 1;
while (i <= 7) {
tmp = Math.floor(Math.random() * _root.gamedy.FiguresAmount);
tmp = _root.gamedy.AllowedFiguresArr[tmp];
if (this["F" + i] != undefined) {
removeMovieClip(this["F" + i]);
}
if (this["B" + i] != undefined) {
removeMovieClip(this["B" + i]);
}
this.attachMovie(String("source_hns" + tmp), String("B" + i), this.getNextHighestDepth());
this["B" + i].ftype = tmp;
this["B" + i]._y = SDY;
this["B" + i]._x = SDX + (SSTEP * (i - 1));
i++;
}
hyero1.swapDepths(this.getNextHighestDepth());
hyero2.swapDepths(this.getNextHighestDepth());
hyero1._x = -1 * hyero1._width;
hyero2._x = 0;
Status = "_READY";
Cnt = 0;
}
function stop() {
this.onEnterFrame = undefined;
}
function start() {
Status = "_SHIFT";
this.onEnterFrame = ef_start;
}
function ef_start() {
i = 1;
while (i <= 7) {
if (this["B" + i]._x < ((SDX + (7 * SSTEP)) - SCROLLSTEP)) {
this["B" + i]._x = this["B" + i]._x + SCROLLSTEP;
if (this["F" + i] != undefined) {
this["F" + i]._x = this["F" + i]._x + SCROLLSTEP;
}
} else {
this["B" + i]._x = SDX;
if (this["F" + i] != undefined) {
this["F" + i]._x = SDX;
}
}
i++;
}
i = 1;
while (i <= 2) {
if (this["hyero" + i]._x < (this["hyero" + i]._width - SCROLLSTEP)) {
this["hyero" + i]._x = this["hyero" + i]._x + SCROLLSTEP;
} else {
this["hyero" + i]._x = -1 * this["hyero" + i]._width;
}
i++;
}
}
function show(num, clr) {
switch (clr) {
case 0 :
clrt = "g";
break;
case 1 :
clrt = "b";
break;
case 2 :
clrt = "y";
}
tmp = this["B" + num].ftype;
if (this["F" + num] != undefined) {
removeMovieClip(this["F" + num]);
}
this.attachMovie(("source_fig_" + clrt) + tmp, "F" + num, this.getNextHighestDepth());
this["F" + num]._x = this["B" + num]._x;
this["F" + num]._y = SDY;
Colors[num] = clr;
}
function click(px) {
var _local4;
var _local7;
var _local12;
var _local8;
var _local9;
var _local5;
var _local6;
var _local10 = 1;
var _local13;
_local12 = false;
_local4 = 1;
while (_local4 <= 7) {
if ((px >= this["B" + _local4]._x) && (px < (this["B" + _local4]._x + SSTEP))) {
if (this["F" + _local4] == undefined) {
if (this["B" + _local4].ftype == _root.gamedy.figure.element.type) {
show(_local4, _root.gamedy.figure.element.color);
_root.gamedy.figure.reset();
Cnt++;
_local12 = true;
_local13 = _root.gamedy.figure.element.color;
}
}
break;
}
_local4++;
}
if (_local12) {
_local8 = true;
_local9 = true;
_local7 = 1;
while (_local7 <= 6) {
if (_local8) {
_local5 = _local4 + _local7;
if (_local5 > 7) {
_local5 = _local5 - 7;
}
}
if (_local9) {
_local6 = _local4 - _local7;
if (_local6 < 1) {
_local6 = _local6 + 7;
}
}
if ((this["F" + _local5] == undefined) || (Colors[_local5] != Colors[_local4])) {
_local8 = false;
}
if ((this["F" + _local6] == undefined) || (Colors[_local6] != Colors[_local4])) {
_local9 = false;
}
if (_local8 || (_local9)) {
if (_local8) {
_local10++;
}
if (_local9) {
_local10++;
}
} else {
break;
}
_local7++;
}
if (_local10 > 7) {
_local10 = 7;
}
if (_local10 >= 2) {
_root.gamedy.dtexts.combo.show(_local10, this["F" + _local4]._x + (this["F" + _local4]._width / 2), (Order - 1) * HGHT, _local13);
}
_root.gamedy.insertfigure(_local10, Cnt);
}
if (Cnt == 7) {
_parent.slide(this._name);
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var SDY = 0;
var SDX = -80;
var SSTEP = 80;
var SCROLLSTEP = 1;
var HGHT = 90;
var Order;
var OldOrder;
var Status;
var Colors = [0, 0, 0, 0, 0, 0, 0];
var Cnt;
var ef_tmp;
Symbol 690 MovieClip Frame 1
function init() {
ef_tmp = undefined;
i = 1;
while (i <= 9) {
this["hns" + i]._visible = false;
i++;
}
stop();
i = 1;
while (i <= 7) {
tmp = Math.floor(Math.random() * _root.gamedy.FiguresAmount);
tmp = _root.gamedy.AllowedFiguresArr[tmp];
if (this["F" + i] != undefined) {
removeMovieClip(this["F" + i]);
}
if (this["B" + i] != undefined) {
removeMovieClip(this["B" + i]);
}
this.attachMovie(String("source_hns" + tmp), String("B" + i), this.getNextHighestDepth());
this["B" + i].ftype = tmp;
this["B" + i]._y = SDY;
this["B" + i]._x = SDX + (SSTEP * (i - 1));
i++;
}
hyero1.swapDepths(this.getNextHighestDepth());
hyero2.swapDepths(this.getNextHighestDepth());
hyero1._x = 0;
hyero2._x = hyero1._width;
Cnt = 0;
}
function stop() {
this.onEnterFrame = undefined;
}
function start() {
Status = "_SHIFT";
this.onEnterFrame = ef_start;
}
function ef_start() {
i = 1;
while (i <= 7) {
if (this["B" + i]._x > ((SDX - SSTEP) + SCROLLSTEP)) {
this["B" + i]._x = this["B" + i]._x - SCROLLSTEP;
if (this["F" + i] != undefined) {
this["F" + i]._x = this["F" + i]._x - SCROLLSTEP;
}
} else {
this["B" + i]._x = SDX + (6 * SSTEP);
if (this["F" + i] != undefined) {
this["F" + i]._x = SDX + (6 * SSTEP);
}
}
i++;
}
i = 1;
while (i <= 2) {
if (this["hyero" + i]._x > ((-this["hyero" + i]._width) - SCROLLSTEP)) {
this["hyero" + i]._x = this["hyero" + i]._x - SCROLLSTEP;
} else {
this["hyero" + i]._x = this["hyero" + i]._width;
}
i++;
}
}
function show(num, clr) {
switch (clr) {
case 0 :
clr = "g";
break;
case 1 :
clr = "b";
break;
case 2 :
clr = "y";
}
tmp = this["B" + num].ftype;
if (this["F" + num] != undefined) {
removeMovieClip(this["F" + num]);
}
this.attachMovie(("source_fig_" + clr) + tmp, "F" + num, this.getNextHighestDepth());
this["F" + num]._x = this["B" + num]._x;
this["F" + num]._y = SDY;
Colors[num] = clr;
}
function click(px) {
var _local4;
var _local7;
var _local12;
var _local8;
var _local9;
var _local5;
var _local6;
var _local10 = 1;
var _local13;
_local12 = false;
_local4 = 1;
while (_local4 <= 7) {
if ((px >= this["B" + _local4]._x) && (px < (this["B" + _local4]._x + SSTEP))) {
if (this["F" + _local4] == undefined) {
if (this["B" + _local4].ftype == _root.gamedy.figure.element.type) {
show(_local4, _root.gamedy.figure.element.color);
_root.gamedy.figure.reset();
Cnt++;
_local12 = true;
_local13 = _root.gamedy.figure.element.color;
}
}
break;
}
_local4++;
}
if (_local12) {
_local8 = true;
_local9 = true;
_local7 = 1;
while (_local7 <= 6) {
if (_local8) {
_local5 = _local4 + _local7;
if (_local5 > 7) {
_local5 = _local5 - 7;
}
}
if (_local9) {
_local6 = _local4 - _local7;
if (_local6 < 1) {
_local6 = _local6 + 7;
}
}
if ((this["F" + _local5] == undefined) || (Colors[_local5] != Colors[_local4])) {
_local8 = false;
}
if ((this["F" + _local6] == undefined) || (Colors[_local6] != Colors[_local4])) {
_local9 = false;
}
if (_local8 || (_local9)) {
if (_local8) {
_local10++;
}
if (_local9) {
_local10++;
}
} else {
break;
}
_local7++;
}
if (_local10 > 7) {
_local10 = 7;
}
if (_local10 >= 2) {
_root.gamedy.dtexts.combo.show(_local10, this["F" + _local4]._x + (this["F" + _local4]._width / 2), (Order - 1) * HGHT, _local13);
}
_root.gamedy.insertfigure(_local10, Cnt);
}
if (Cnt == 7) {
_parent.slide(this._name);
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var SDY = 0;
var SDX = 0;
var SSTEP = 80;
var SCROLLSTEP = 1;
var HGHT = 90;
var Order;
var Status;
var Colors = [0, 0, 0, 0, 0, 0, 0];
var Cnt;
var ef_tmp;
Symbol 691 MovieClip Frame 1
function init() {
ef_tmp = undefined;
stripe1._alpha = 100;
stripe2._alpha = 100;
stripe3._alpha = 100;
stripe4._alpha = 100;
stripe5._alpha = 100;
this.onEnterFrame = undefined;
stripe1._y = 0;
stripe1._x = (-1 * stripe1.SSTEP) * 6;
stripe1.init();
stripe1.Order = 1;
stripe2._y = stripe2.HGHT;
stripe2._x = stripe2.SSTEP * 6;
stripe2.init();
stripe2.Order = 2;
stripe3._y = stripe3.HGHT * 2;
stripe3._x = (-1 * stripe3.SSTEP) * 6;
stripe3.init();
stripe3.Order = 3;
stripe4._y = stripe4.HGHT * 3;
stripe4._x = stripe4.SSTEP * 6;
stripe4.init();
stripe4.Order = 4;
stripe5._y = stripe5.HGHT * 4;
stripe5._x = (-1 * stripe5.SSTEP) * 6;
stripe5.init();
stripe5.Order = 5;
Status = "_READY";
}
function shiftin() {
Status = "_SHIFT";
_root.snd_stripe_arrive.start();
this.onEnterFrame = ef_shiftin;
}
function ef_shiftin() {
if (stripe1._x < 0) {
stripe1._x = stripe1._x + SHIFTSTEP;
stripe3._x = stripe3._x + SHIFTSTEP;
stripe5._x = stripe5._x + SHIFTSTEP;
} else {
stripe1._x = 0;
stripe3._x = 0;
stripe5._x = 0;
}
if (stripe2._x > 0) {
stripe2._x = stripe2._x - SHIFTSTEP;
stripe4._x = stripe4._x - SHIFTSTEP;
} else {
stripe2._x = 0;
stripe4._x = 0;
}
if ((stripe1._x == 0) && (stripe2._x == 0)) {
this.onEnterFrame = undefined;
Status = "_READY";
}
}
function shiftout() {
Status = "_SHIFT";
_root.snd_stripe_deploy.start();
this.onEnterFrame = ef_shiftout;
}
function ef_shiftout() {
if (stripe1._alpha > 0) {
stripe1._alpha = stripe1._alpha - SHIFTOUTSTEP;
stripe2._alpha = stripe2._alpha - SHIFTOUTSTEP;
stripe3._alpha = stripe3._alpha - SHIFTOUTSTEP;
stripe4._alpha = stripe4._alpha - SHIFTOUTSTEP;
stripe5._alpha = stripe5._alpha - SHIFTOUTSTEP;
} else {
this.onEnterFrame = undefined;
Status = "_READY";
}
}
function start() {
stripe1._x = 0;
stripe2._x = 0;
stripe3._x = 0;
stripe4._x = 0;
stripe5._x = 0;
stripe1.start();
stripe2.start();
stripe3.start();
stripe4.start();
stripe5.start();
}
function stop() {
stripe1.stop();
stripe2.stop();
stripe3.stop();
stripe4.stop();
stripe5.stop();
}
function click(px, py) {
tmp = Math.floor(py / stripe1.HGHT) + 1;
i = 1;
while (i <= 5) {
if (this["stripe" + i].Order == tmp) {
break;
}
i++;
}
this["stripe" + i].click(px);
}
function slide(obj) {
var cs;
cs = obj.slice(6, 7);
this["stripe" + cs]._y = this["stripe" + cs].HGHT * 5;
this["stripe" + cs].init();
this["stripe" + cs].start();
i = 1;
while (i <= 5) {
if (this["stripe" + i].Order > this["stripe" + cs].Order) {
this["stripe" + i].Order--;
}
i++;
}
this["stripe" + cs].OldOrder = this["stripe" + cs].Order;
this["stripe" + cs].Order = 5;
Status = "_SLIDE";
slflg = false;
_root.snd_stripe_destroy.start();
this.onEnterFrame = function () {
ef_slide(cs);
};
}
function ef_slide(cs) {
i = 1;
while (i <= 7) {
if (!slflg) {
if (this["stripe" + i].Order >= this["stripe" + cs].OldOrder) {
if (this["stripe" + i]._y > ((this["stripe" + i].Order - 1) * this["stripe" + i].HGHT)) {
this["stripe" + i]._y = this["stripe" + i]._y - (SLIDESPD / 2);
}
} else if (this["stripe" + i]._y < (this["stripe" + cs]._y - ((5 - this["stripe" + i].Order) * this["stripe" + i].HGHT))) {
this["stripe" + i]._y = this["stripe" + i]._y + SLIDESPD;
} else {
slflg = true;
}
} else if (this["stripe" + i]._y > ((this["stripe" + i].Order - 1) * this["stripe" + i].HGHT)) {
this["stripe" + i]._y = this["stripe" + i]._y - (SLIDESPD / 2);
} else {
this["stripe" + i]._y = (this["stripe" + i].Order - 1) * this["stripe" + i].HGHT;
}
i++;
}
}
function pause() {
stripe1.pause();
stripe2.pause();
stripe3.pause();
stripe4.pause();
stripe5.pause();
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
function checkf(type) {
var _local4;
var _local2;
var _local3;
_local4 = 1;
while (_local4 <= 5) {
_local2 = 1;
while (_local2 <= 7) {
_local3 = this["stripe" + _local4];
if ((_local3["F" + _local2] == undefined) && (_local3["B" + _local2].ftype == type)) {
return(true);
}
_local2++;
}
_local4++;
}
return(false);
}
var Status;
var SHIFTSTEP = 20;
var SHIFTOUTSTEP = 10;
var SLIDESPD = 10;
var slflg;
var ef_tmp;
Symbol 704 MovieClip Frame 1
stop();
Symbol 704 MovieClip Frame 2
stop();
Symbol 704 MovieClip Frame 3
stop();
Symbol 715 MovieClip Frame 1
stop();
Symbol 715 MovieClip Frame 2
stop();
Symbol 715 MovieClip Frame 3
stop();
Symbol 725 MovieClip Frame 1
stop();
Symbol 725 MovieClip Frame 2
stop();
Symbol 725 MovieClip Frame 3
stop();
Symbol 730 MovieClip Frame 1
function init() {
ef_tmp = undefined;
bigamulet._visible = false;
this.onEnterFrame = undefined;
Status = "_READY";
AmuletsCur = 1;
AmuletsCur_ = 1;
ScoreCur = 0;
amulet._alpha = 0;
gamulet._alpha = 0;
line._y = HGHT;
mask._y = HGHT;
mask._height = 0;
name.text = "";
score.text = "";
number.text = "";
_parent.amuletscore.score.text = "";
}
function show() {
Status = "_SHOW";
name.text = NAME[AmuletsCur - 1];
score.text = RESULTSCORE[AmuletsCur - 1];
number.text = (("Amulet " + AmuletsCur_) + " of ") + AMULETSNUM;
_parent.amuletscore.score.text = RESULTSCORE[AmuletsCur - 1];
amulet.gotoAndStop(AmuletsCur);
gamulet.gotoAndStop(AmuletsCur);
bigamulet.gotoAndStop(AmuletsCur);
this.onEnterFrame = ef_show;
}
function ef_show() {
if (amulet._alpha < 100) {
amulet._alpha = amulet._alpha + ASSTEP;
gamulet._alpha = gamulet._alpha + ASSTEP;
} else {
if (_parent.satisf.Status == "_STOP") {
_parent.satisf.start();
}
amulet._alpha = 100;
gamulet._alpha = 100;
Status = "_READY";
this.onEnterFrame = undefined;
}
}
function hide() {
Status = "_HIDE";
Cnt = 0;
this.onEnterFrame = ef_hide;
}
function ef_hide() {
Cnt++;
if (bigamulet._x > 0) {
bigamulet._x = bigamulet._x - ((((305 / FLYFRAMES) * Cnt) * Cnt) / 100);
bigamulet._y = bigamulet._y - ((((80 / FLYFRAMES) * Cnt) * Cnt) / 100);
bigamulet._xscale = bigamulet._xscale - ((FLYZOOMSTEP * Cnt) / 6);
bigamulet._yscale = bigamulet._yscale - ((FLYZOOMSTEP * Cnt) / 6);
}
bigamulet._alpha = bigamulet._alpha - 3;
if (line._y < HGHT) {
line._y = line._y + LINESTEP;
mask._y = mask._y + LINESTEP;
mask._height = mask._height - LINESTEP;
} else {
_parent.passamulet(RESULTSCORE[AmuletsCur - 1]);
nextamulet();
}
}
function addscore(score) {
if ((Status != "_FLY") && (Status != "_HIDE")) {
Status = "_ADDSCORE";
ScoreCur = ScoreCur + score;
this.onEnterFrame = ef_addscore;
}
}
function ef_addscore() {
var _local3;
if (ScoreCur <= REQSCORE[AmuletsCur - 1]) {
_local3 = ScoreCur;
} else {
_local3 = REQSCORE[AmuletsCur - 1];
}
if (line._y > (HGHT * (1 - (_local3 / REQSCORE[AmuletsCur - 1])))) {
line._y = line._y - SCADDSTEP;
mask._y = mask._y - SCADDSTEP;
mask._height = mask._height + SCADDSTEP;
} else if (ScoreCur >= REQSCORE[AmuletsCur - 1]) {
line._y = HGHT * (1 - (_local3 / REQSCORE[AmuletsCur - 1]));
mask._y = HGHT * (1 - (_local3 / REQSCORE[AmuletsCur - 1]));
mask._height = HGHT * (_local3 / REQSCORE[AmuletsCur - 1]);
_parent.satisf.stop();
fly();
_root.amulet_fly_start.start();
}
}
function fly() {
Status = "_FLY";
name.text = "";
score.text = "";
number.text = "";
amulet._alpha = 0;
gamulet._alpha = 0;
bigamulet._alpha = 100;
bigamulet._xscale = 28;
bigamulet._yscale = 28;
bigamulet._x = 0;
bigamulet._y = 0;
Cnt = 0;
bigamulet._visible = true;
this.onEnterFrame = ef_fly;
}
function ef_fly() {
Cnt++;
if (Cnt <= FLYFRAMES) {
bigamulet._x = bigamulet._x + (FLYX / FLYFRAMES);
bigamulet._y = bigamulet._y + ((FLYY / FLYFRAMES) + (10 * Math.sin((5.02654824574367 * Cnt) / FLYFRAMES)));
bigamulet._xscale = bigamulet._xscale + FLYZOOMSTEP;
bigamulet._yscale = bigamulet._yscale + FLYZOOMSTEP;
}
if (Cnt >= TFLYFRAMES) {
hide();
}
}
function nextamulet() {
var _local5;
var _local4;
if (AmuletsCur_ < AMULETSNUM) {
_local5 = AmuletsCur;
_local4 = AmuletsCur_;
init();
AmuletsCur = _local5;
AmuletsCur_ = _local4;
if (AmuletsCur < 3) {
AmuletsCur++;
} else {
AmuletsCur = 1;
}
AmuletsCur_++;
show();
_root.amulet_show.start();
} else {
_parent.allamulets();
Status = "_READY";
this.onEnterFrame = undefined;
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var ASSTEP = 6;
var HGHT = 104;
var LINESTEP = 3;
var FLYFRAMES = 24;
var TFLYFRAMES = 30;
var FLYX = 305;
var FLYY = -160;
var FLYZOOMSTEP = 2;
var SCADDSTEP = 1;
var AMULETSNUM = 2;
var REQSCORE = [700, 725, 750];
var RESULTSCORE = [1500, 2250, 3000];
var NAME = ["Dzed", "Ankh", "Adzat"];
var Status;
var AmuletsCur;
var AmuletsCur_;
var ScoreCur;
var Cnt;
var ef_tmp;
Symbol 737 Button
on (press) {
if ((_root.gamedy.Gift1 > 0) && (_root.gamedy.satisf.Status != "_STOP")) {
_root.gamedy.Gift1--;
_parent.refresh();
_parent.gift1.fly();
_root.gamedy.satisf.increase(_root.gamedy.SATGIFT1);
_root.snd_gift_aroma_press.start();
}
}
Symbol 742 MovieClip Frame 1
function fly() {
Cnt = 0;
flymc._x = 10;
flymc._y = 10;
flymc._visible = true;
this.onEnterFrame = ef_fly;
}
function ef_fly() {
Cnt++;
if (Cnt < _parent.FLYFRAMES) {
flymc._x = flymc._x + ((_parent.FLYX - this._x) / _parent.FLYFRAMES);
flymc._y = flymc._y + ((_parent.FLYY - this._y) / _parent.FLYFRAMES);
} else {
Cnt = 0;
flymc._x = 0;
flymc._y = 0;
flymc._visible = false;
this.onEnterFrame = undefined;
_root.snd_gift_aroma_apply.start();
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var Cnt;
var ef_tmp;
stop();
Symbol 742 MovieClip Frame 2
stop();
Symbol 749 Button
on (press) {
if ((_root.gamedy.Gift2 > 0) && (_root.gamedy.satisf.Status != "_STOP")) {
_root.gamedy.Gift2--;
_parent.refresh();
_parent.gift2.fly();
_root.gamedy.satisf.increase(_root.gamedy.SATGIFT2);
_root.snd_gift_food_press.start();
}
}
Symbol 754 MovieClip Frame 1
function fly() {
Cnt = 0;
flymc._x = 10;
flymc._y = 10;
flymc._visible = true;
this.onEnterFrame = ef_fly;
}
function ef_fly() {
Cnt++;
if (Cnt < _parent.FLYFRAMES) {
flymc._x = flymc._x + ((_parent.FLYX - this._x) / _parent.FLYFRAMES);
flymc._y = flymc._y + ((_parent.FLYY - this._y) / _parent.FLYFRAMES);
} else {
Cnt = 0;
flymc._x = 0;
flymc._y = 0;
flymc._visible = false;
this.onEnterFrame = undefined;
_root.snd_gift_food_apply.start();
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var Cnt;
var ef_tmp;
stop();
Symbol 754 MovieClip Frame 2
stop();
Symbol 761 Button
on (press) {
if ((_root.gamedy.Gift3 > 0) && (_root.gamedy.satisf.Status != "_STOP")) {
_root.gamedy.Gift3--;
_parent.refresh();
_parent.gift3.fly();
_root.gamedy.satisf.increase(_root.gamedy.SATGIFT3);
_root.snd_gift_lotus_press.start();
}
}
Symbol 766 MovieClip Frame 1
function fly() {
Cnt = 0;
flymc._x = 10;
flymc._y = 10;
flymc._visible = true;
this.onEnterFrame = ef_fly;
}
function ef_fly() {
Cnt++;
if (Cnt < _parent.FLYFRAMES) {
flymc._x = flymc._x + ((_parent.FLYX - this._x) / _parent.FLYFRAMES);
flymc._y = flymc._y + ((_parent.FLYY - this._y) / _parent.FLYFRAMES);
} else {
Cnt = 0;
flymc._x = 0;
flymc._y = 0;
flymc._visible = false;
this.onEnterFrame = undefined;
_root.snd_gift_lotus_apply.start();
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var Cnt;
var ef_tmp;
stop();
Symbol 766 MovieClip Frame 2
stop();
Symbol 767 MovieClip Frame 1
function init() {
refresh();
gift1.flymc._visible = false;
gift2.flymc._visible = false;
gift3.flymc._visible = false;
gift1.onEnterFrame = undefined;
gift2.onEnterFrame = undefined;
gift3.onEnterFrame = undefined;
}
function refresh() {
gift1.value.text = "0" + _parent.Gift1;
gift2.value.text = "0" + _parent.Gift2;
gift3.value.text = "0" + _parent.Gift3;
if (_parent.Gift1 > 0) {
gift1.gotoAndStop(1);
} else {
gift1.gotoAndStop(2);
}
if (_parent.Gift2 > 0) {
gift2.gotoAndStop(1);
} else {
gift2.gotoAndStop(2);
}
if (_parent.Gift3 > 0) {
gift3.gotoAndStop(1);
} else {
gift3.gotoAndStop(2);
}
}
function pause() {
gift1.pause();
gift2.pause();
gift3.pause();
}
var FLYFRAMES = 12;
var FLYX = 40;
var FLYY = -350;
gift1.btn.onRollOver = function () {
if (!_root.gamedy.isShown_igh) {
_root.gamedy.ighelp.gifts.show();
}
};
gift2.btn.onRollOver = function () {
if (!_root.gamedy.isShown_igh) {
_root.gamedy.ighelp.gifts.show();
}
};
gift3.btn.onRollOver = function () {
if (!_root.gamedy.isShown_igh) {
_root.gamedy.ighelp.gifts.show();
}
};
Symbol 775 MovieClip Frame 1
function init() {
ef_tmp = undefined;
Time = 0;
Status = "_READY";
this._y = 0;
this._xscale = 80;
this._yscale = 80;
this._visible = false;
this._alpha = 100;
this.onEnterFrame = undefined;
}
function show(num, posx, posy, clr) {
init();
var _local2 = new Color(this);
switch (clr) {
case 0 :
_local2.setRGB(62483);
break;
case 1 :
_local2.setRGB(3407351);
break;
case 2 :
_local2.setRGB(16114984);
}
posx = posx - 20;
posy = posy + 130;
Status = "_SHOW";
this._x = posx - (this._width / 2);
this._y = posy;
this._visible = true;
this.gotoAndStop(num - 1);
this.onEnterFrame = ef_show;
}
function ef_show() {
Time++;
this._y = this._y - FLYSTEP;
this._xscale = 80 + (10 * Math.sin((Math.PI * Time) / 5));
this._yscale = this._xscale;
if (Time > SHOWTIME) {
if (this._alpha > 0) {
this._alpha = this._alpha - HIDESTEP;
} else {
init();
}
}
}
function pause() {
if (_root.gamedy.isPaused) {
ef_tmp = this.onEnterFrame;
this.onEnterFrame = undefined;
} else {
this.onEnterFrame = ef_tmp;
}
}
var HIDESTEP = 15;
var SHOWTIME = 6;
var FLYSTEP = 1;
var Status;
var Time;
var ef_tmp;
stop();
Symbol 775 MovieClip Frame 2
stop();
Symbol 775 MovieClip Frame 3
stop();
Symbol 775 MovieClip Frame 4
stop();
Symbol 775 MovieClip Frame 5
stop();
Symbol 775 MovieClip Frame 6
stop();
Symbol 786 MovieClip Frame 1
function init() {
Status = "_READY";
this._visible = false;
this._alpha = 100;
this.onEnterFrame = undefined;
}
function show(num) {
Status = "_SHOW";
this._visible = true;
this.gotoAndStop(num);
}
function hide() {
Status = "_HIDE";
this.onEnterFrame = ef_hide;
}
function ef_hide() {
if (this._alpha > 0) {
this._alpha = this._alpha - HIDESTEP;
} else {
init();
}
}
var HIDESTEP = 7;
var Status;
stop();
Symbol 786 MovieClip Frame 2
stop();
Symbol 786 MovieClip Frame 3
stop();
Symbol 786 MovieClip Frame 4
stop();
Symbol 786 MovieClip Frame 5
stop();
Symbol 789 MovieClip Frame 1
function init() {
Status = "_READY";
this._visible = false;
this._alpha = 100;
this.onEnterFrame = undefined;
}
function show(num) {
Status = "_SHOW";
this._visible = true;
}
function hide() {
Status = "_HIDE";
this.onEnterFrame = ef_hide;
}
function ef_hide() {
if (this._alpha > 0) {
this._alpha = this._alpha - HIDESTEP;
} else {
init();
}
}
var HIDESTEP = 7;
var Status;
stop();
Symbol 790 MovieClip Frame 1
function init() {
level.init();
completed.init();
combo.init();
}
Symbol 791 MovieClip Frame 1
function reset() {
this.stopDrag();
this._visible = false;
this._x = 530;
this._y = 470;
Status = "_READY";
}
function drag(elem) {
_root.snd_shape_pickup.start();
this.hitArea = ha;
this._x = elem._x + (this._width / 2);
this._y = elem._parent._y + (this._height / 2);
element.settype(elem.type);
element.setcolor(elem.color);
this.startDrag(true);
this._visible = true;
Status = "_DRAG";
}
function pause() {
if (Status == "_DRAG") {
if (_root.gamedy.isPaused) {
this._visible = false;
} else {
this._visible = true;
}
}
}
function element_onpress() {
}
var Status;
Symbol 797 MovieClip Frame 1
var mouseListener = new Object();
Mouse.addListener(mouseListener);
disable_btn.useHandCursor = false;
discard_btn.useHandCursor = false;
discard_btn.onRollOver = function () {
_root.gamedy.discard.switchon();
};
discard_btn.onRollOut = function () {
_root.gamedy.discard.switchoff();
};
discard_btn.onPress = function () {
_root.gamedy.discard.discard();
};
stripes_btn.useHandCursor = false;
stripes_btn.onPress = function () {
if (_root.gamedy.figure.Status == "_DRAG") {
_root.gamedy.gamearea.stripes.click(stripes_btn._xmouse, stripes_btn._ymouse);
}
};
mouseListener.onMouseUp = function () {
if ((((_xmouse > stripes_btn._x) && (_xmouse < (stripes_btn._x + stripes_btn._width))) && (_ymouse > stripes_btn._y)) && (_ymouse < (stripes_btn._y + stripes_btn._height))) {
if (_root.gamedy.figure.Status == "_DRAG") {
_root.gamedy.gamearea.stripes.click(stripes_btn._xmouse, stripes_btn._ymouse);
}
}
};
Symbol 805 MovieClip Frame 1
function init() {
this._visible = false;
}
function show() {
this._visible = true;
_root.gamedy.pause();
}
function hide() {
this._visible = false;
_root.gamedy.pause();
_root.gamedy.isShown_igh = true;
}
cont.onRelease = function () {
hide();
_root.snd_gui_click.start();
};
Symbol 808 MovieClip Frame 1
function init() {
this._visible = false;
}
function show() {
this._visible = true;
_root.gamedy.pause();
}
function hide() {
this._visible = false;
_root.gamedy.pause();
_root.gamedy.isShownD_igh = true;
}
cont.onRelease = function () {
hide();
_root.snd_gui_click.start();
};
Symbol 809 MovieClip Frame 1
function init() {
gifts.init();
discard.init();
}
Symbol 827 MovieClip Frame 1
function init() {
this._visible = false;
disablebtn.useHandCursor = false;
disablebtn._visible = true;
}
function show() {
var _local3;
disablebtn._visible = true;
this._visible = true;
total_score.text = _root.gamedy.TotalScore;
current_score.text = _root.gamedy.CurrentScore;
goal_score.text = _root.gamedy.GoalScore;
profit.text = _root.gamedy.CurrentScore - _root.gamedy.GoalScore;
if ((_root.gamedy.CurrentScore - _root.gamedy.GoalScore) >= 0) {
profit.textColor = 6442798 /* 0x624F2E */;
_local3 = Math.floor((_root.gamedy.CurrentScore - _root.gamedy.GoalScore) / _root.gamedy.SCGEM);
if (_local3 > 15) {
_local3 = 15;
}
gems.text = _local3;
_root.gamedy.Gems = _root.gamedy.Gems + _local3;
_root.gamedy.gems.value.text = _root.gamedy.Gems;
_root.gamedy.gems.anim.play();
} else {
profit.textColor = 16712193 /* 0xFF0201 */;
}
}
function disable() {
disablebtn._visible = true;
}
function enable() {
disablebtn._visible = false;
}
menu.onRelease = function () {
_root.gotoAndStop("MMenu");
_root.snd_gui_click.start();
};
keep.onRelease = function () {
_root.gamedy.newGame = true;
_root.gamedy.startlevel(1);
_root.snd_gui_click.start();
};
download.onRelease = function () {
_root.gotoDownload();
_root.snd_gui_click.start();
};
Symbol 837 MovieClip Frame 1
function init() {
this._visible = false;
disablebtn.useHandCursor = false;
disablebtn._visible = true;
}
function show() {
var _local3;
disablebtn._visible = true;
this._visible = true;
total_score.text = _root.gamedy.TotalScore;
current_score.text = _root.gamedy.CurrentScore;
goal_score.text = _root.gamedy.GoalScore;
profit.text = _root.gamedy.CurrentScore - _root.gamedy.GoalScore;
profit.textColor = 6442798 /* 0x624F2E */;
_local3 = Math.floor((_root.gamedy.CurrentScore - _root.gamedy.GoalScore) / _root.gamedy.SCGEM);
if (_local3 > 15) {
_local3 = 15;
}
gems.text = _local3;
_root.gamedy.Gems = _root.gamedy.Gems + _local3;
_root.gamedy.gems.value.text = _root.gamedy.Gems;
_root.gamedy.gems.anim.play();
}
function disable() {
disablebtn._visible = true;
}
function enable() {
disablebtn._visible = false;
}
download.onRelease = function () {
_root.gotoDownload();
_root.snd_gui_click.start();
};
replay.onRelease = function () {
_root.gamedy.replaylevel();
_root.snd_gui_click.start();
};
next.onRelease = function () {
_root.gamedy.nextlevel();
_root.snd_gui_click.start();
};
spendgems.onRelease = function () {
_parent.gemshop.show();
_root.snd_gui_click.start();
};
Symbol 846 MovieClip Frame 1
function init() {
this._visible = false;
disablebtn.useHandCursor = false;
disablebtn._visible = true;
}
function show() {
var _local3;
disablebtn._visible = true;
this._visible = true;
total_score.text = _root.gamedy.TotalScore;
current_score.text = _root.gamedy.CurrentScore;
goal_score.text = _root.gamedy.GoalScore;
profit.text = _root.gamedy.CurrentScore - _root.gamedy.GoalScore;
profit.textColor = 16712193 /* 0xFF0201 */;
lives.text = _root.gamedy.Lives;
}
function disable() {
disablebtn._visible = true;
}
function enable() {
disablebtn._visible = false;
}
replay.onRelease = function () {
_root.gamedy.replaylevel();
_root.snd_gui_click.start();
};
spendgems.onRelease = function () {
_parent.gemshop.show();
_root.snd_gui_click.start();
};
Symbol 852 MovieClip Frame 1
function init() {
this._visible = false;
disablebtn.useHandCursor = false;
disablebtn._visible = true;
}
function show() {
var _local3;
disablebtn._visible = true;
this._visible = true;
total_score.text = _root.gamedy.TotalScore;
current_score.text = _root.gamedy.CurrentScore;
goal_score.text = _root.gamedy.GoalScore;
profit.text = _root.gamedy.CurrentScore - _root.gamedy.GoalScore;
profit.textColor = 16712193 /* 0xFF0201 */;
lives.text = _root.gamedy.Lives;
}
function disable() {
disablebtn._visible = true;
}
function enable() {
disablebtn._visible = false;
}
cont.onRelease = function () {
init();
_root.gamedy.surprise();
_parent.surprise.show();
_parent.surprise.enable();
_root.snd_gui_click.start();
};
Symbol 858 MovieClip Frame 1
function init() {
this._visible = false;
disablebtn.useHandCursor = false;
disablebtn._visible = true;
}
function show() {
var _local2;
disablebtn._visible = true;
this._visible = true;
}
function disable() {
disablebtn._visible = true;
}
function enable() {
disablebtn._visible = false;
}
menu.onRelease = function () {
_root.gotoAndStop("MMenu");
_root.snd_gui_click.start();
};
cont.onRelease = function () {
_root.gamedy.replaylevel();
_root.snd_gui_click.start();
};
Symbol 862 MovieClip Frame 1
Symbol 871 MovieClip Frame 1
dis.useHandCursor = false;
Symbol 872 MovieClip Frame 1
function init() {
dummy.useHandCursor = false;
this._visible = false;
hintwindow._visible = false;
}
function show() {
hintwindow._visible = false;
this._visible = true;
value.text = _root.gamedy.Gems;
}
function hide() {
init();
}
hint.onRelease = function () {
hintwindow._visible = true;
_root.snd_gui_click.start();
};
cont.onRelease = function () {
hide();
_root.snd_gui_click.start();
};
download.onRelease = function () {
_root.gotoDownload();
_root.snd_gui_click.start();
};
hintwindow.ok.onRelease = function () {
hintwindow._visible = false;
_root.snd_gui_click.start();
};
Symbol 876 MovieClip Frame 1
function init() {
this._visible = false;
}
function show() {
this._visible = true;
}
menu.onRelease = function () {
_root.snd_gui_click.start();
_root.gotoAndStop("MMenu");
};
cont.onRelease = function () {
init();
_root.gamedy.pause();
_root.snd_gui_click.start();
};
Symbol 877 MovieClip Frame 1
function init() {
pause.init();
surprise.init();
endlevel.init();
loselevel.init();
losegame.init();
wingame.init();
gemshop.init();
}
Symbol 878 MovieClip Frame 7
this._visible = false;
Symbol 879 MovieClip Frame 1
var cnt = 0;
_test.onPress = function () {
if (cnt == 0) {
_root.gamedy.ighelp.gifts.show();
cnt++;
} else if (cnt == 1) {
cnt = 0;
}
};
play();
function init() {
fscommand ("trapallkeys", "true");
Lives = GDLIVES;
TotalScore = 0;
Gems = 0;
Gift1 = GDGIFT1;
Gift2 = GDGIFT2;
Gift3 = GDGIFT3;
_root.newGame = false;
_root.isShown_igh = false;
_root.isShownD_igh = false;
}
function startlevel(level) {
isPaused = false;
if (_root.newGame) {
init();
}
OldTotalScore = TotalScore;
OldGems = Gems;
OldGift1 = Gift1;
OldGift2 = Gift2;
OldGift3 = Gift3;
CurrentLevel = level;
isPlayerReady = false;
CurrentScore = 0;
GoalScore = GoalScoreArr[level - 1];
info.goal_score.text = GoalScore;
info.total_score.text = TotalScore;
info.current_score.text = "0";
info.lives.text = Lives;
info.level.text = LevelArr[level - 1];
gems.value.text = Gems;
FiguresAmount = FiguresAmountArr[level - 1];
ColorsAmount = ColorsAmountArr[level - 1];
AllowedFiguresArr[0] = Math.floor(Math.random() * 9) + 1;
tmp = Math.floor(Math.random() * 9) + 1;
while (tmp == AllowedFiguresArr[0]) {
tmp = Math.floor(Math.random() * 9) + 1;
}
AllowedFiguresArr[1] = tmp;
tmp = Math.floor(Math.random() * 9) + 1;
while ((tmp == AllowedFiguresArr[0]) || (tmp == AllowedFiguresArr[1])) {
tmp = Math.floor(Math.random() * 9) + 1;
}
AllowedFiguresArr[2] = tmp;
menu.init();
dtexts.init();
stack.init();
discard.init();
satisf.init(GodsArr[level - 1]);
amulets.init();
gifts.init();
ighelp.init();
amulets.AMULETSNUM = AmuletsNumArr[level - 1];
figure.reset();
gamearea.scenes.init(ScInitArr[(level * 2) - 2], ScInitArr[(level * 2) - 1], ScShift[level - 1]);
gamearea.stripes.init();
Status = "_START";
gamearea.scenes.shiftin(ScArr[level - 1]);
this.onEnterFrame = ef_scenessi;
}
function startplay() {
Status = "_GAME";
dtexts.level.hide();
gamearea.stripes.start();
satisf.start();
_root.gamedy.btnareas.disable_btn._visible = false;
Key.addListener(keyListener);
Key.addListener(keyListenerP);
}
function ef_scenessi() {
if (gamearea.scenes.Status == "_READY") {
dtexts.level.show(CurrentLevel);
gamearea.scenes.fadeout();
this.onEnterFrame = ef_scenesfo;
}
}
function ef_scenesfo() {
if (gamearea.scenes.Status == "_READY") {
gamearea.stripes.shiftin();
satisf.show();
amulets.show();
stack.start();
this.onEnterFrame = ef_stripessi;
}
}
function ef_stripessi() {
if (gamearea.stripes.Status == "_READY") {
this.onEnterFrame = undefined;
startplay();
}
}
var keyListener = new Object();
var keyListenerP = new Object();
var AllowedFiguresArr = new Array(0, 0, 0);
var FiguresAmount;
var ColorsAmount;
var Lives;
var CurrentLevel;
var TotalScore;
var CurrentScore;
var GoalScore;
var Gems;
var Status;
var Gift1;
var Gift2;
var Gift3;
var OldTotalScore;
var OldGems;
var OldGift1;
var OldGift2;
var OldGift3;
var isPlayerReady;
var isPaused;
var isShown_igh;
var isShownD_igh;
keyListener.onKeyDown = function () {
if (Key.getCode() == 32) {
discard.discard();
}
};
keyListenerP.onKeyDown = function () {
if ((Key.getCode() == 80) || (Key.getCode() == 27)) {
if (!_root.gamedy.menu.pause._visible) {
_root.gamedy.menu.pause.show();
} else {
_root.gamedy.menu.pause.init();
}
pause();
}
};
GDLIVES = 3;
GDLEVELS = 5;
GDGIFT1 = 2;
GDGIFT2 = 1;
GDGIFT3 = 0;
SCFIGURE = 15;
SCCOMBO = 25;
SCLINE = 100;
SCGEM = 100;
SATINCFIGURE = 0.1;
SATINCLINE = 2;
SATDECSTEP_T = 0.2;
SATDECSTEP_D = 0.5;
SATAMULET = 10;
SATGIFT1 = 30;
SATGIFT2 = 60;
SATGIFT3 = 90;
GoalScoreArr = [1500, 2500, 5000, 7500, 10000];
LevelArr = ["1 - 1", "1 - 2", "1 - 3", "1 - 4", "2 - 1"];
GodsArr = [3, 3, 1, 1, 2];
ScArr = GodsArr;
ScInitArr = [false, false, true, false, false, false, true, false, false, false];
ScShowArr = ["up", "down", "up", "down", "up"];
ScShift = [true, false, true, false, true];
FiguresAmountArr = [3, 3, 3, 3, 3];
ColorsAmountArr = [2, 2, 2, 3, 3];
AmuletsNumArr = [2, 3, 3, 4, 4];
function insertfigure(combo, fcount) {
var _local2;
if (combo == 1) {
_root.snd_shape_insert.start();
} else {
_root.snd_shape_insert_combo.start();
}
if (satisf.Status != "_STOP") {
isPlayerReady = true;
_local2 = SCFIGURE + (SCCOMBO * (combo - 1));
if (fcount == 7) {
_local2 = _local2 + SCLINE;
}
CurrentScore = CurrentScore + _local2;
TotalScore = TotalScore + _local2;
info.current_score.text = CurrentScore;
info.total_score.text = TotalScore;
info.scoreclr();
amulets.addscore(_local2);
_local2 = SATINCFIGURE * combo;
if (fcount == 7) {
_local2 = _local2 + SATINCLINE;
}
satisf.increase(_local2);
}
}
function updamuletscore(sat) {
var _local1;
if (sat > 100) {
sat = 100;
}
_local1 = Math.floor((amulets.RESULTSCORE[amulets.AmuletsCur - 1] * sat) / 100);
if (_local1 < 100) {
_local1 = 100;
}
amuletscore.score.text = _local1;
}
function passamulet(score) {
CurrentScore = CurrentScore + Number(amuletscore.score.text);
TotalScore = TotalScore + Number(amuletscore.score.text);
info.current_score.text = CurrentScore;
info.total_score.text = TotalScore;
info.scoreclr();
satisf.increase(SATAMULET);
}
function allamulets() {
levelcomplete();
}
function levelcomplete() {
_root.gamedy.btnareas.disable_btn._visible = true;
Key.removeListener(keyListener);
Key.removeListener(keyListenerP);
gamearea.stripes.stop();
gamearea.scenes.darken._alpha = 0;
gamearea.stripes.shiftout();
if (Math.floor(CurrentScore - GoalScore) > 0) {
dtexts.completed.show();
_root.snd_goal_reached.start();
} else {
_root.snd_thunder.start();
}
figure.reset();
stack.hide();
Cnt = 0;
this.onEnterFrame = ef1_levelcomplete;
}
function ef1_levelcomplete() {
if (gamearea.stripes.Status != "_SHIFT") {
Cnt++;
if (Cnt > SCENEBADSHOWDELAY) {
if (Math.floor(CurrentScore - GoalScore) > 0) {
gamearea.scenes.show(ScShowArr[CurrentLevel - 1]);
dtexts.completed.hide();
}
Cnt = 0;
this.onEnterFrame = ef2_levelcomplete;
}
}
}
function ef2_levelcomplete() {
if (gamearea.scenes.Status != "_SHOW") {
Cnt++;
if (Cnt > SCENEGOODSHOWDELAY) {
satisf.hide();
endlevel();
Cnt = 0;
this.onEnterFrame = ef3_levelcomplete;
}
}
}
function ef3_levelcomplete() {
if (gamearea.scenes.Status != "_HIDE") {
Cnt++;
if (Cnt > SCENEGOODSHOWDELAY) {
this.onEnterFrame = undefined;
}
}
}
function replaylevel() {
TotalScore = OldTotalScore;
Gems = OldGems;
Gift1 = OldGift1;
Gift2 = OldGift2;
Gift3 = OldGift3;
startlevel(CurrentLevel);
}
function nextlevel() {
if (CurrentLevel < GDLEVELS) {
startlevel(CurrentLevel + 1);
} else {
trace("NO MORE LEVELS!");
}
}
function endlevel() {
if (Math.floor(CurrentScore - GoalScore) > 0) {
if (CurrentLevel < GDLEVELS) {
menu.endlevel.show();
menu.endlevel.enable();
} else {
menu.wingame.show();
menu.wingame.enable();
}
} else {
Lives--;
info.lives.text = Lives;
if (Lives > 0) {
menu.loselevel.show();
menu.loselevel.enable();
} else {
menu.losegame.show();
menu.losegame.enable();
}
}
}
function surprise() {
Lives++;
info.lives.text = Lives;
OldGift1++;
OldGift2++;
OldGift3++;
}
function pause() {
isPaused = !isPaused;
if (isPaused) {
_root.gamedy.btnareas.disable_btn._visible = true;
Key.removeListener(keyListener);
gamearea.stripes.pause();
satisf.pause();
stack.pause();
dtexts.combo.pause();
amulets.pause();
discard.pause();
gifts.pause;
figure.pause();
_root.game_pause.start();
} else {
_root.gamedy.btnareas.disable_btn._visible = false;
Key.addListener(keyListener);
gamearea.stripes.pause();
satisf.pause();
stack.pause();
dtexts.combo.pause();
amulets.pause();
discard.pause();
figure.pause();
_root.game_unpause.start();
}
}
var Cnt;
var SCENEBADSHOWDELAY = 16;
var SCENEGOODSHOWDELAY = 36;
Symbol 879 MovieClip Frame 2
stop();
startlevel(1);