[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 4 (1.33 KiB) ●
function myLoad() {
var a = this.firstChild.childNodes.length;
var i = 0;
while (i < a) {
Set("game" + i, this.firstChild.childNodes[i]);
minigameArray[i] = new Array();
var counter = 0;
for (attr in eval ("game" + i).attributes) {
Set("value" + i, eval ("game" + i).attributes[attr]);
minigameArray[i][counter] = eval ("value" + i);
counter++;
}
i++;
}
gotoAndStop ("beginGame");
}
function onResponse(awardGiven) {
if (awardGiven) {
if (candyAward) {
msg.awardText = "Candy Master Award!!";
_root.mcAwardCandy = myMiniclipAwards.loadAwardGfx(53);
_root.mcAwardCandy._y = 170;
_root.mcAwardCandy._x = 220;
_root.mcAwardCandy._xscale = (_root.mcAwardCandy._yscale = 350);
} else if (clydeAward) {
msg.awardText = "Clyde Trooper Award!!";
_root.mcAwardClyde = myMiniclipAwards.loadAwardGfx(54);
_root.mcAwardClyde._y = 170;
_root.mcAwardClyde._x = 220;
_root.mcAwardClyde._xscale = (_root.mcAwardClyde._yscale = 350);
}
_root.msg.gotoAndStop("award");
} else {
continueMG();
}
}
var demo = false;
if (demo) {
url1 = "http://www.miniclip.com/swfcontent/freegames/";
} else {
url1 = "";
}
var minigameArray = new Array();
thisXML = new XML();
thisXML.ignoreWhite = true;
thisXML.onLoad = myLoad;
thisXML.load(url1 + "gamelist.xml");
stop();
Frame 5 (17.67 KiB) ● ● ●
function startLoadingGames() {
loadSequenceID = 0;
var _local3 = gameIDs.length;
var _local1 = 0;
while (_local1 < _local3) {
var _local2 = random(gameIDs.length);
gameSequence[_local1] = gameIDs[_local2];
gameIDs.splice(_local2, 1);
_local1++;
}
gID = gameSequence[loadSequenceID];
createMiniGame(gID);
}
function createMiniGame(gameID) {
function onLoadProgress(target, bytesLoaded, bytesTotal) {
}
function checkProgress(mcLoader, container, interval) {
var _local1 = mcLoader.getProgress(container);
if (_local1.bytesLoaded == _local1.bytesTotal) {
clearInterval(interval.id);
if (loadSequenceID < (gameSequence.length - 1)) {
loadSequenceID++;
createMiniGame(gameSequence[loadSequenceID]);
}
}
}
var _local5 = createEmptyMovieClip("miniGame" + gameID, gameID + 10);
var _local2 = new MovieClipLoader();
_local2.addListener(this);
var _local7 = (url1 + minigameArray[gameID][5]) + ".swf";
_local2.loadClip(_local7, _local5);
var _local3 = new Object();
_local3.id = setInterval(checkProgress, 100, _local2, _local5, _local3);
}
function startNewGame(gameMode) {
music.music1.stop();
music.music9.start(0, 9999);
if (gameMode == "test") {
testGame = gamesList.selectedItem.data;
difficultyLevel = dLevels.selectedItem.data;
_global.localSave("candyandclyde", "testGame", testGame);
_global.localSave("candyandclyde", "difficultyLevel", difficultyLevel);
txtTitle = minigameArray[testGame][0];
} else {
difficultyLevel = 1;
sequenceID = 0;
handicap = 0;
myMiniclipAwards = new MiniclipAwards(this);
candyAward = true;
clydeAward = true;
txtTitle = minigameArray[gameSequence[sequenceID]][0];
}
_root.gameMode = gameMode;
score = 0;
lives = maxLives;
}
function preStart(behave) {
attachMovie("msg", "msg", depthArray[1]);
msg.gotoAndStop("fade");
msg.phase = "startGame";
behaviour = behave;
if (behaviour == "good") {
clydeAward = false;
} else if (behaviour == "cheeky") {
candyAward = false;
}
if (gameMode == "test") {
mg = testGame;
} else {
mg = gameSequence[sequenceID];
}
}
function startMinigame() {
fxs.fx54.start();
_root["miniGame" + mg].gotoAndStop("on");
bg._y = bg._y + 400;
gotoAndStop ("gameplay");
if (behaviour == "cheeky") {
var musicID = 8;
var _local3 = 4;
var _local5 = 90;
} else {
var musicID = 7;
var _local3 = 2;
var _local5 = 75;
}
attachMovie("timer", "timer", depthArray[0]);
timer._x = 55;
timer._y = 40;
attachMovie("msg", "msg", depthArray[1]);
msg.gotoAndStop("instruction");
var _local2 = mg + _local5;
fxs["fx" + _local2].start();
msg.colorFrame.gotoAndStop(behaviour);
msg.instruction = minigameArray[mg][_local3];
music.music9.stop();
music["music" + musicID].start();
music["music" + musicID].onSoundComplete = function () {
var _local1 = musicID - 5;
music["music" + _local1].start(0, 9999);
startTimer();
};
}
function freezeTime(flag) {
timeFrozen = flag;
}
function startTimer() {
_root["miniGame" + mg].startGame();
msg.removeMovieClip();
miniGameActive = true;
timeFrozen = false;
stars = 5;
starFlag = new Array(0, true, true, true, true, true);
var timeCounter = 0;
if (behaviour == "cheeky") {
var timeID = 3;
} else {
var timeID = 1;
}
var gameTime = minigameArray[mg][timeID];
var totalTimerLength = 342;
var starTime = Math.abs(gameTime / 2.5);
var timeNoStar = (((gameTime * difficultyLevel) + (Math.abs(gameTime / difficultyLevel) * 2)) - ((gameTime / 4) * handicap));
if (timeNoStar < 10) {
timeNoStar = 10;
}
totalGameTime = timeNoStar + (starTime * 5);
var dX = (totalTimerLength / timeNoStar);
var i = 1;
while (i <= 5) {
Set("starTime" + (6 - i), timeNoStar + (starTime * i));
i++;
}
timer.onEnterFrame = function () {
if (timeCounter <= totalGameTime) {
if (!timeFrozen) {
timer.bar._x = timer.bar._x - dX;
timeCounter++;
var i = 1;
while (i <= 5) {
i++;
}
if (timeCounter > starTime5) {
if (_root.starFlag[5]) {
_root.removeStar();
}
if (timeCounter > starTime4) {
if (_root.starFlag[4]) {
_root.removeStar();
}
if (timeCounter > starTime3) {
if (_root.starFlag[3]) {
_root.removeStar();
}
if (timeCounter > starTime2) {
if (_root.starFlag[2]) {
_root.removeStar();
}
}
}
}
}
}
} else {
if (_root.starFlag[1]) {
_root.removeStar();
}
Mouse.show();
timer.bar._visible = false;
_root.miniGameActive = false;
_root["miniGame" + mg].timeUp();
_root.lives--;
_root.attachMovie("msg", "msg", depthArray[1]);
_root.music.music2.stop();
_root.music.music3.stop();
if (_root.lives == 0) {
_root.music.music4.start(0, 9999);
_root.msg.gotoAndStop("gameOver");
_root.gameOver = true;
} else {
_root.msg.gotoAndStop("timeup");
_root.music.music6.start();
}
counterMax = 20;
counter = 0;
desaturation = 0;
this.onEnterFrame = function () {
if (counter < counterMax) {
blurAndDesaturate();
counter++;
} else {
delete this.onEnterFrame;
}
};
}
};
}
function postMinigame() {
blur.blurX = (blur.blurY = 0);
_root["miniGame" + mg].filters = new Array();
_root["miniGame" + mg].gotoAndStop("off");
bg._y = bg._y - 400;
}
function checkAward() {
if (score >= awardScore) {
if (candyAward) {
_root.msg.gotoAndStop("wait");
myMiniclipAwards.give(53, onResponse);
} else if (clydeAward) {
_root.msg.gotoAndStop("wait");
myMiniclipAwards.give(54, onResponse);
}
} else {
continueMG();
}
}
function continueMG() {
attachMovie("msg", "msg", depthArray[1]);
msg.gotoAndStop("fade");
msg.phase = "continue";
_root.mcAwardCandy.removeMovieClip();
_root.mcAwardClyde.removeMovieClip();
_root.mcAwardCandy._alpha = 0;
_root.mcAwardClyde._alpha = 0;
music.music2.stop();
music.music3.stop();
music.music4.stop();
timer.removeMovieClip();
if ((gameMode != "test") && (lives > 0)) {
sequenceID++;
if (sequenceID >= minigameArray.length) {
sequenceID = 0;
if (difficultyLevel < 5) {
difficultyLevel++;
} else {
handicap++;
}
}
txtTitle = minigameArray[gameSequence[sequenceID]][0];
}
if (lives == 0) {
music.music1.start(0, 9999);
bg._y = bg._y - 800;
gotoAndStop ("savescore");
} else if (demo && (difficultyLevel >= 3)) {
music.music1.start(0, 9999);
bg._y = bg._y - 400;
gameOver = true;
gotoAndStop ("demo");
} else {
music.music9.start(0, 9999);
gotoAndStop ("gametitle");
}
}
function endGame() {
Mouse.show();
miniGameActive = false;
delete timer.onEnterFrame;
attachMovie("msg", "msg", depthArray[1]);
music.music2.stop();
music.music3.stop();
music.music5.start();
msg.gotoAndStop("congrats");
msg.colorFrame.gotoAndStop(behaviour);
score = score + stars;
complimentCounter = 0;
if (stars == 5) {
complimentAddon = "!!!";
} else if (stars == 4) {
complimentAddon = "!!";
} else if (stars == 3) {
complimentAddon = "!";
} else if (stars == 2) {
complimentAddon = "";
} else if (stars == 1) {
complimentAddon = "...";
}
complimentString = complimentgood[stars][random(complimentgood[stars].length)] + complimentAddon;
moreTextString = "your score is:";
maxCC = complimentString.length;
complimentInterval = setInterval(printCompliment, 30);
var counterMax = 20;
var counter = 0;
var i = 1;
while (i <= stars) {
Set("dx" + i, ((starArray[stars][i] - timer["star" + i]._x) - 40) / counterMax);
i++;
}
var i = 1;
while (i <= stars) {
timer["star" + i].filters = [dropShadow];
i++;
}
dy = (starY - timer.star1._y) / counterMax;
dRot = 360 / counterMax;
var i = 1;
while (i <= stars) {
timer["star" + i].gotoAndStop("staronly");
i++;
}
desaturation = 0;
timer.onEnterFrame = function () {
if (counter < counterMax) {
var i = 1;
while (i <= stars) {
timer["star" + i]._x = timer["star" + i]._x + eval ("dx" + i);
timer["star" + i]._y = timer["star" + i]._y + dy;
timer["star" + i]._rotation = timer["star" + i]._rotation + dRot;
timer["star" + i]._xscale = timer["star" + i]._xscale + 8;
timer["star" + i]._yscale = timer["star" + i]._yscale + 8;
i++;
}
} else if ((counter >= counterMax) && (counter <= (counterMax + 5))) {
var counterTemp = ((counter - counterMax) + 1);
if (counterTemp <= stars) {
timer["star" + counterTemp].gotoAndPlay("flash");
}
} else if (counter <= ((counterMax * 2) + 5)) {
blurAndDesaturate();
} else if (counter > ((counterMax * 2) + 5)) {
delete this.onEnterFrame;
}
counter++;
};
}
function printCompliment() {
complimentCounter++;
if (complimentCounter <= complimentString.length) {
_root.msg.compliment = complimentString.slice(0, complimentCounter);
} else {
_root.msg.moreText = moreTextString;
clearInterval(complimentInterval);
}
}
function getDesaturationFilter(t) {
t = ((t == undefined) ? 1 : (t));
var _local3 = 0.212671;
var _local4 = 0.71516;
var _local2 = 0.072169;
return(new flash.filters.ColorMatrixFilter([((t * _local3) + 1) - t, t * _local4, t * _local2, 0, 0, t * _local3, ((t * _local4) + 1) - t, t * _local2, 0, 0, t * _local3, t * _local4, ((t * _local2) + 1) - t, 0, 0, 0, 0, t, 1, 0]));
}
function blurAndDesaturate() {
blur.blurX = blur.blurX + 0.3;
blur.blurY = blur.blurY + 0.3;
desaturation = desaturation + 0.05;
_root["miniGame" + mg].filters = new Array(getDesaturationFilter(desaturation), blur);
}
function penalty() {
attachMovie("msg", "msg", depthArray[1]);
msg.gotoAndStop("penalty");
removeStar();
}
function removeStar() {
if (stars > 0) {
starFlag[stars] = false;
fxs.fx3.start();
timer["star" + stars].gotoAndPlay("disappear");
timer["starBG" + stars].gotoAndStop("off");
stars = stars - 1;
}
}
function menuGo(frame, direct) {
if (frame == "mainmenu") {
fxs.fx1.start();
} else {
fxs.fx2.start();
}
var bgX = bg._x;
var bgY = bg._y;
if ((direct == 0) || (direct == 2)) {
if (((frame == "showscore") || (frame == "mainmenu")) || (frame == "getcode")) {
gotoAndStop ("transitionscore");
} else if (frame == "gametitle") {
gotoAndStop ("transition");
}
var counter = 30;
var incr = 1;
} else {
gotoAndStop ("transition");
var counter = 48;
var incr = 2;
}
bg.onEnterFrame = function () {
counter = counter - incr;
if ((direct == 1) || (direct == -1)) {
var _local4 = counter * direct;
this._x = this._x - _local4;
var _local3 = this._x - bgX;
if (direct == 1) {
if (_local3 <= -550) {
if (frame == "mainmenu") {
this._x = 550;
} else if (frame == "audio") {
this._x = 0;
} else if (frame == "gameplay") {
startMinigame();
}
gotoAndStop(frame);
delete this.onEnterFrame;
}
} else if (direct == -1) {
if (_local3 >= 550) {
if (frame == "mainmenu") {
this._x = 550;
} else if (frame == "help") {
this._x = 1100;
}
gotoAndStop(frame);
delete this.onEnterFrame;
}
}
} else if (direct == 0) {
this._y = this._y + counter;
var _local2 = this._y - bgY;
if (_local2 >= 400) {
if (frame == "mainmenu") {
this._y = 200;
} else if (frame == "gametitle") {
startNewGame("normal");
this._y = 600;
}
gotoAndStop(frame);
delete this.onEnterFrame;
}
} else if (direct == 2) {
this._y = this._y - counter;
var _local2 = this._y - bgY;
if (_local2 < -400) {
this._y = -200;
gotoAndStop(frame);
delete this.onEnterFrame;
}
}
};
}
function changeVolume(kind, tempVolume, makeSound) {
if (makeSound) {
var dVolume = (eval (kind + "Volume") - tempVolume);
if (dVolume > 0) {
fxs.fx1.start();
} else {
fxs.fx2.start();
}
}
if ((tempVolume >= 0) && (tempVolume <= 100)) {
_root[kind + "Level"].level._x = _root[kind + "Level"].level._x - (((eval (kind + "Volume") - tempVolume) / 5) * 7);
Set(kind + "Volume", tempVolume);
if (kind == "fxs") {
var i = 1;
while (i <= 75) {
_root.fxs["fx" + i].setVolume(tempVolume);
i++;
}
_global.localSave("candyandclyde", "fxsVolume", tempVolume);
} else if (kind == "music") {
var i = 1;
while (i <= 9) {
_root.music["music" + i].setVolume(tempVolume);
i++;
}
_global.localSave("candyandclyde", "musicVolume", tempVolume);
}
}
}
function feedComboBoxes() {
var _local1 = 0;
while (_local1 < minigameArray.length) {
gamesList.addItem({data:_local1, label:minigameArray[_local1][0]});
_local1++;
}
_local1 = 1;
while (_local1 <= 5) {
dLevels.addItem({data:_local1, label:"difficulty " + _local1});
_local1++;
}
}
function setLabels(gameID, dLevel) {
var _local2 = minigameArray[gameID][0];
var _local1 = "difficulty " + dLevel;
gamesList.removeItemAt(gameID);
dLevels.removeItemAt(dLevel - 1);
gamesList.addItemAt(gamesList.length, {label:minigameArray[0][0], data:0});
dLevels.addItemAt(dLevels.length, {label:"difficulty 1", data:1});
gamesList.text = _local2;
gamesList.replaceItemAt(0, {label:_local2, data:gameID});
dLevels.text = _local1;
dLevels.replaceItemAt(0, {label:_local1, data:dLevel});
}
function exit() {
fxs.fx1.start();
attachMovie("msg", "msg", depthArray[1]);
msg.gotoAndPlay("yousure");
}
function arrayScrambler(arrayName) {
var _local5 = new Array();
var _local4 = arrayName.length;
var _local1 = 0;
while (_local1 < _local4) {
var _local3 = random(arrayName.length);
_local5[_local1] = arrayName[_local3];
arrayName.splice(_local3, 1);
_local1++;
}
_local1 = 0;
while (_local1 < _local4) {
arrayName[_local1] = _local5[_local1];
_local1++;
}
}
function getRnd(mi, ma) {
return(Math.floor(Math.random() * ((ma + 1) - mi)) + mi);
}
var version = "version 1.29";
var behaviour;
var loadSequenceID;
var sequenceID;
var score;
var awardScore = 600;
var lives;
var maxLives = 3;
var gameMode = "normal";
var stars = 5;
var handicap = 0;
var deltaVolume = 5;
var initMusicVolume = 35;
var initSoundVolume = 100;
var centerX = (Stage.width / 2);
var starDistance = 40;
var starY = 170;
var instructionTime = 1000;
var miniGameActive = false;
var timeFrozen = false;
var gameOver = true;
var candyAward;
var clydeAward;
var myMiniclipAwards;
if (demo) {
version = "demo " + version;
}
var gameIDs = new Array();
var i = 0;
while (i < minigameArray.length) {
gameIDs[i] = i;
i++;
}
var gameSequence = new Array();
var starArray = new Array();
starArray[1] = new Array(0, centerX);
starArray[2] = new Array(0, centerX - starDistance, centerX + starDistance);
starArray[3] = new Array(0, centerX - (starDistance * 2), centerX, centerX + (starDistance * 2));
starArray[4] = new Array(0, centerX - (starDistance * 3), centerX - starDistance, centerX + starDistance, centerX + (starDistance * 3));
starArray[5] = new Array(0, centerX - (starDistance * 4), centerX - (starDistance * 2), centerX, centerX + (starDistance * 2), centerX + (starDistance * 4));
complimentgood = new Array();
complimentgood[1] = new Array("Passable", "Mediocre", "Not too bad", "Okay", "Slowly but surely", "Practice more", "Sufficient", "Acceptable", "no comment");
complimentgood[2] = new Array("Good", "Not Bad", "Nice", "Fair", "Ideal", "Honorable");
complimentgood[3] = new Array("Well Done", "Cool", "Lovely", "Sweet", "Groovy");
complimentgood[4] = new Array("Great", "Far Out", "Wonderful", "Bravo", "Stunning", "Fascinating", "Classy", "Fantastic");
complimentgood[5] = new Array("Awesome", "Excellent", "Fantabulous", "Exceptional", "Sublime", "Amazing", "Superb");
complimentcheeky = new Array();
complimentcheeky[1] = new Array("1 stars", "1 stelle");
complimentcheeky[2] = new Array("2 stars", "2 stelle");
complimentcheeky[3] = new Array("3 stars", "3 stelle");
complimentcheeky[4] = new Array("4 stars", "4 stelle");
complimentcheeky[5] = new Array("5 stars", "5 stelle");
var depthArray = new Array();
depthArray[0] = 100;
depthArray[1] = 200;
depthArray[2] = 300;
depthArray[3] = 400;
depthArray[4] = 500;
depthArray[5] = 350;
_global.localSave = function (trecord, tfield, tvalue) {
var _local1 = Object(SharedObject.getLocal(trecord));
_local1.data[tfield] = tvalue;
_local1.flush();
};
_global.localLoad = function (trecord, tfield) {
trecord = Object(SharedObject.getLocal(trecord)).data[tfield];
return(trecord);
};
if (gameMode == "test") {
testGame = _global.localLoad("candyandclyde", "testGame");
difficultyLevel = _global.localLoad("candyandclyde", "difficultyLevel");
}
var blur = (new flash.filters.BlurFilter(0, 0, 1));
var dropShadow = (new flash.filters.DropShadowFilter(2, 45, 0, 0.5, 3, 3, 3, 3));
_root.createEmptyMovieClip("music", depthArray[4]);
i = 1;
while (i < 10) {
music["music" + i] = new Sound(_root.music);
music["music" + i].attachSound("music" + i);
i++;
}
_root.createEmptyMovieClip("fxs", depthArray[3]);
i = 1;
while (i < 110) {
fxs["fx" + i] = new Sound(_root.fxs);
fxs["fx" + i].attachSound("fx" + i);
i++;
}
music.music1.start(0, 9999);
musicVolume = _global.localLoad("candyandclyde", "musicVolume");
fxsVolume = _global.localLoad("candyandclyde", "fxsVolume");
if (musicVolume == undefined) {
var musicVolume = initMusicVolume;
}
if (fxsVolume == undefined) {
var fxsVolume = initSoundVolume;
}
changeVolume("music", musicVolume, false);
changeVolume("fxs", fxsVolume, false);
startLoadingGames();
play();
Frame 21 (178 B)
if (gameMode == "test") {
feedComboBoxes();
if ((testGame != undefined) && (difficultyLevel != undefined)) {
setLabels(testGame, difficultyLevel);
}
}
stop();
Frame 24 (185 B)
_root.fxsLevel.level._x = _root.fxsLevel.level._x - (((100 - _root.fxsVolume) / 5) * 7);
_root.musicLevel.level._x = _root.musicLevel.level._x - (((100 - _root.musicVolume) / 5) * 7);
Instance of Symbol 343 MovieClip "comHighscores" in Frame 27 (208 B)
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "candyandclyde";
saveScore = false;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Instance of Symbol 343 MovieClip "comHighscores" in Frame 28 (207 B)
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "candyandclyde";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 7 Button (37 B)
on (release) {
_root.continueMG();
}
Symbol 13 Button (37 B)
on (release) {
_root.checkAward();
}
Symbol 23 MovieClip Frame 40 (29 B)
_root.msg.removeMovieClip();
Symbol 28 MovieClip Frame 13 (131 B)
if (_parent.phase == "startGame") {
_root.startMinigame();
} else if (_parent.phase == "continue") {
_root.postMinigame();
}
Symbol 28 MovieClip Frame 21 (8 B)
stop();
Symbol 38 Button (219 B)
on (release) {
_root.gameOver = true;
_root.fxs.fx2.start();
_root.bg._y = _root.bg._y - 400;
_root.music.music9.stop();
_root.music.music1.start(0, 9999);
_root.gotoAndStop("mainmenu");
this.removeMovieClip();
}
Symbol 42 Button (65 B)
on (release) {
_root.fxs.fx2.start();
this.removeMovieClip();
}
Symbol 44 MovieClip [msg] Frame 1 (8 B)
stop();
Symbol 44 MovieClip [msg] Frame 26 (8 B)
play();
Symbol 44 MovieClip [msg] Frame 30 (8 B)
stop();
Symbol 50 MovieClip Frame 1 (8 B)
stop();
Symbol 61 MovieClip Frame 1 (8 B)
stop();
Symbol 61 MovieClip Frame 6 (8 B)
stop();
Symbol 61 MovieClip Frame 7 (8 B)
play();
Symbol 68 Button (64 B)
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 69 MovieClip Frame 2 (37 B)
_parent.mcAnimation.play();
stop();
Symbol 69 MovieClip Frame 13 (41 B)
_parent.gotoAndPlay("preload");
stop();
Symbol 84 MovieClip Frame 1 (8 B)
stop();
Symbol 84 MovieClip Frame 60 (1 B)
Symbol 84 MovieClip Frame 121 (38 B)
_parent.mcBackground.play();
stop();
Symbol 86 MovieClip Frame 1 (23 B)
this._visible = false;
Symbol 92 Button (63 B)
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 97 MovieClip Frame 2 (301 B)
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 97 MovieClip Frame 4 (167 B)
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 97 MovieClip Frame 12 (8 B)
stop();
Symbol 107 MovieClip Frame 1 (8 B)
stop();
Symbol 107 MovieClip Frame 100 (8 B)
stop();
Symbol 109 MovieClip Frame 1 (8 B)
stop();
Symbol 109 MovieClip Frame 12 (66 B)
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 110 MovieClip Frame 1 (43 B)
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 86 MovieClip "mcIntro" in Symbol 110 MovieClip Frame 1 (46 B)
onClipEvent (load) {
this._visible = false;
}
Symbol 110 MovieClip Frame 2 (534 B)
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 109 MovieClip "mcLoadingAnimated" in Symbol 110 MovieClip Frame 2 (42 B)
onClipEvent (load) {
_visible = false;
}
Symbol 110 MovieClip Frame 3 (206 B)
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 110 MovieClip Frame 5 (479 B)
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
_root.gotoAndStop(2);
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 378 MovieClip [__Packages.MiniclipAwards] Frame 0 (2.5 KiB) ●
class MiniclipAwards
{
var target, aid, onAwardResponse, mcGiveAward, mlAwardLoader;
function MiniclipAwards (t) {
target = t;
}
function give(awardId, onResponse) {
aid = awardId;
onAwardResponse = onResponse;
System.security.allowDomain("www.miniclip.com");
System.security.allowDomain("cms.miniclip.com");
if (mcGiveAward == undefined) {
mcGiveAward = target.createEmptyMovieClip("mcMiniclipGiveAward", target.getNextHighestDepth());
}
mlAwardLoader = new MovieClipLoader();
var _local4 = new Object();
_local4.onLoadInit = mx.utils.Delegate.create(this, onAwardSwfLoaded);
mlAwardLoader.addListener(_local4);
var _local3 = new Date();
var _local5 = (((_local3.getFullYear() + "-") + _local3.getMonth()) + "-") + _local3.getDay();
if (_root._url.indexOf("file:///") > -1) {
var _local6 = ("http://cms.miniclip.com/players/swf/components/giveuseraward_as2.swf?deCache=" + _local5) + random(1000000);
} else {
var _local6 = "/players/swf/components/giveuseraward_as2.swf?deCache=" + _local5;
}
mlAwardLoader.loadClip(_local6, mcGiveAward);
}
function loadAwardGfx(awardId, mcTarget) {
if (mcTarget == undefined) {
mcTarget = target;
}
var _local4 = mcTarget.createEmptyMovieClip("mcAward_" + awardId, mcTarget.getNextHighestDepth());
var _local6 = new MovieClipLoader();
var _local7 = new Object();
_local7.onLoadInit = mx.utils.Delegate.create(this, onAwardGfxLoaded);
_local6.addListener(_local7);
var _local3 = new Date();
var _local8 = (((_local3.getFullYear() + "-") + _local3.getMonth()) + "-") + _local3.getDay();
if (_root._url.indexOf("file:///") > -1) {
var _local9 = ("http://cms.miniclip.com/players/swf/components/awards.swf?deCache=" + _local8) + random(1000000);
} else {
var _local9 = "/players/swf/components/awards.swf?deCache=" + _local8;
}
_local6.loadClip(_local9, _local4);
_local4._alpha = 0;
return(_local4);
}
function onAwardSwfLoaded(mc) {
mc.aid = aid;
mc.onAwardGiven = mx.utils.Delegate.create(this, onAwardGivenPrivate);
mc.onAwardNotGiven = mx.utils.Delegate.create(this, onAwardNotGivenPrivate);
}
function onAwardGfxLoaded(mcAward) {
var _local2 = int(mcAward._name.split("_")[1]);
mcAward.gotoAndStop(_local2);
mcAward._alpha = 100;
}
function onAwardGivenPrivate() {
onAwardResponse(true);
mlAwardLoader.unloadClip(mcGiveAward);
}
function onAwardNotGivenPrivate() {
onAwardResponse(false);
mlAwardLoader.unloadClip(mcGiveAward);
}
}
Symbol 379 MovieClip [__Packages.mx.utils.Delegate] Frame 0 (458 B)
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 114 MovieClip Frame 11 (8 B)
stop();
Symbol 118 Button (63 B)
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 228 MovieClip Frame 1 (8 B)
stop();
Symbol 235 Button (41 B)
on (release) {
menuGo("showscore", 2);
}
Symbol 241 Button (37 B)
on (release) {
menuGo("audio", 1);
}
Symbol 251 Button (37 B)
on (release) {
menuGo("help", -1);
}
Symbol 256 Button (41 B)
on (release) {
menuGo("gametitle", 0);
}
Symbol 262 Button (45 B)
on (release) {
_root.menuGo("getcode", 2);
}
Symbol 263 Button (66 B)
on (release) {
_root.gameOver = false;
menuGo("gametitle", 0);
}
Symbol 270 Button (35 B)
on (release) {
preStart("good");
}
Symbol 274 Button (37 B)
on (release) {
preStart("cheeky");
}
Symbol 279 Button (31 B)
on (release) {
_root.exit();
}
Symbol 280 Button (113 B)
on (release) {
_root.bg._y = _root.bg._y - 400;
_root.bg._x = _root.bg._x - 550;
_root.gotoAndStop("audio");
}
Symbol 283 Button (182 B)
on (release) {
if (_root.gameOver) {
menuGo("mainmenu", -1);
} else {
_root.bg._x = _root.bg._x + 550;
_root.bg._y = _root.bg._y + 400;
_root.gotoAndStop("gametitle");
}
}
Symbol 289 Button (161 B)
on (press) {
targ = _name.slice(0, 3);
if (targ == "mus") {
targ = "music";
}
_root.changeVolume(targ, _root.deltaVolume * Math.ceil(_xmouse / 7), true);
}
Symbol 294 Button (81 B)
on (release) {
changeVolume("fxs", _root.fxsVolume + _root.deltaVolume, true);
}
Symbol 295 Button (85 B)
on (release) {
changeVolume("music", _root.musicVolume + _root.deltaVolume, true);
}
Symbol 296 Button (81 B)
on (release) {
changeVolume("fxs", _root.fxsVolume - _root.deltaVolume, true);
}
Symbol 297 Button (85 B)
on (release) {
changeVolume("music", _root.musicVolume - _root.deltaVolume, true);
}
Symbol 308 Button (40 B)
on (release) {
menuGo("mainmenu", 1);
}
Symbol 317 Button (65 B)
on (release) {
_root.fxs.fx63.start();
gotoAndPlay ("page2");
}
Symbol 323 Button (127 B)
on (release) {
_root.fxs.fx63.start();
if (Key.isDown(17)) {
gotoAndStop ("page3");
} else {
gotoAndPlay ("page1");
}
}
Symbol 324 Button (102 B)
on (release) {
if (Key.isDown(17)) {
gotoAndStop ("page3");
} else {
gotoAndPlay ("page1");
}
}
Symbol 328 MovieClip Frame 3 (8 B)
stop();
Symbol 328 MovieClip Frame 5 (8 B)
stop();
Symbol 332 MovieClip Frame 1 (23 B)
this._visible = false;
Symbol 341 Button (130 B)
on (release) {
gameURL = ("http://www.miniclip.com/games/" + gamename) + "/en/";
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 343 MovieClip Frame 1 (49 B)
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 332 MovieClip "mcHighscores" in Symbol 343 MovieClip Frame 1 (42 B)
onClipEvent (load) {
_visible = false;
}
Symbol 343 MovieClip Frame 2 (424 B)
if (scoreLocation == undefined) {
}
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 343 MovieClip Frame 3 (8 B)
stop();
Symbol 347 Button (40 B)
on (release) {
menuGo("mainmenu", 0);
}
Symbol 363 Button (89 B)
on (release) {
getURL ("http://www.miniclip.com/games/candy-and-clyde/en/", "_blank");
}
Symbol 367 Button (43 B)
on (release) {
gotoAndStop ("mainmenu");
}
Symbol 371 Button (89 B)
on (release) {
getURL ("http://www.miniclip.com/games/candy-and-clyde/en/", "_blank");
}
Symbol 376 MovieClip Frame 1 (437 B)
function selectAll() {
Selection.setFocus(txtEcardURL1);
Selection.setSelection(900, 0);
clearInterval(ivSelectAll);
}
this.onMouseDown = function () {
if ((((_xmouse >= txtEcardURL1._x) && (_xmouse <= (txtEcardURL1._x + txtEcardURL1._width))) && (_ymouse >= txtEcardURL1._y)) && (_ymouse <= (txtEcardURL1._y + txtEcardURL1._height))) {
ivSelectAll = setInterval(selectAll, 100);
}
};