Section 1
//ASLForm (com.morpheme.g5.ASLForm)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class ASLForm extends MovieClip {
private var sexId:Number;// = 0
private var g5:G5Framework;// = null
private var soSurvey:SharedObject;// = null
private var ageId:Number;// = 0
public function ASLForm(g5:G5Framework){
super();
this.g5 = g5;
var i:Number = 0;
i = 1;
while (i <= 7) {
this[("movAge" + i)].gotoAndStop(1);
i++;
};
this["movSex1"].gotoAndStop(1);
this["movSex2"].gotoAndStop(1);
i = 1;
while (i <= 7) {
this[("movAge" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPressAge);
i++;
};
this["movSex1"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPressSex);
this["movSex2"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPressSex);
this["btnSkip"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPressSkip);
this["btnDone"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPressDone);
i = 1;
while (i <= 7) {
this[("movAge" + i)].buttonMode = true;
i++;
};
this["movSex1"].buttonMode = true;
this["movSex2"].buttonMode = true;
}
public function onButtonPressDone(event:MouseEvent):void{
soSurvey.setProperty("a", ageId);
soSurvey.setProperty("s", sexId);
soSurvey.flush();
var vars:URLVariables = new URLVariables();
vars.op = G5Framework.OP_OTW_SUBMIT_ASL_VALS;
vars.GameId = g5.getGameId();
vars.AgeId = ageId;
vars.SexId = sexId;
var request:URLRequest = new URLRequest(G5Framework.SERVLET_URL);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, aslSubmitHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, aslSubmitError);
loader.load(request);
g5.surveyComplete();
}
public function cookieCheck():Boolean{
soSurvey = SharedObject.getLocal("g5Survey");
return (((g5.isASLEnabled()) && ((soSurvey.size == 0))));
}
public function onButtonPressAge(event:MouseEvent):void{
var name:String;
var i:Number = 1;
while (i <= 7) {
name = ("movAge" + i);
if (event.target.name != name){
this[name].gotoAndStop(1);
} else {
ageId = i;
this[name].gotoAndStop(2);
};
i++;
};
showDoneButton();
}
public function onButtonPressSkip(event:MouseEvent):void{
g5.surveyComplete();
}
private function showDoneButton():void{
this.btnDone.visible = (((ageId > 0)) && ((sexId > 0)));
this.btnSkip.visible = !(this.btnDone.visible);
}
public function onButtonPressSex(event:MouseEvent):void{
var name:String;
var i:Number = 1;
while (i <= 2) {
name = ("movSex" + i);
if (event.target.name != name){
this[name].gotoAndStop(1);
} else {
sexId = i;
this[name].gotoAndStop(2);
};
i++;
};
showDoneButton();
}
public function aslSubmitError(errEvent:IOErrorEvent):void{
}
public function aslSubmitHandler(event:Event):void{
}
}
}//package com.morpheme.g5
Section 2
//G5Framework (com.morpheme.g5.G5Framework)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
public class G5Framework extends MovieClip {
private var TeaserScreen:Class;
private var movTeaser:MovieClip;
private var timedOut:Boolean;// = false
private var movSplash:MovieClip;
private var gameName:String;// = ""
private var mochiEnabled:Boolean;// = false
private var gameId:Number;
private var igaEnabled:Boolean;// = false
private var g5Game:G5Game;
public var teaserSkipped:Boolean;// = false
private var teaserEnabled:Boolean;// = false
private var SplashScreen:Class;
private var teaserTimer:Timer;// = null
private var aslForm:ASLForm;// = null
private var mochiadId:String;// = ""
private var mochibotId:String;// = ""
private var timeoutTimer:Timer;// = null
private var aslEnabled:Boolean;// = false
private var gameCode:String;// = ""
public static var TEASER_URL:String = "http://www.addictinggames.com";
public static var HS_SERVLET_URL:String = (SERVER_URL + "/servlet/hiServlet");
public static var INDEX_URL:String = (SERVER_URL + "/index.jsp?id=");
public static var HS_DATA_DELIM_ROW:String = ">";
public static var OP_OTW_GET_CONFIG_PROPS:Number = 0;
private static var SERVER_TIMEOUT_MILLIS:Number = 7500;
public static var OP_HS_GET_DATA:Number = 1;
public static var SERVER_URL:String = "http://www.gimme5games.com";
public static var SERVLET_URL:String = (SERVER_URL + "/servlet/otwServlet");
public static var HS_DATA_DELIM_COL:String = "/";
public static var OP_OTW_SUBMIT_ASL_VALS:Number = 1;
public function G5Framework(){
SplashScreen = G5Framework_SplashScreen;
movSplash = new SplashScreen();
TeaserScreen = G5Framework_TeaserScreen;
movTeaser = new TeaserScreen();
super();
}
public function teaserPause():void{
if (g5Game.debug){
trace("[G5 DEBUG] - teaserWait");
};
movTeaser["AGhome01"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
teaserTimer = new Timer(4000, 1);
teaserTimer.addEventListener("timer", teaserComplete);
teaserTimer.start();
}
public function setConfigProps(gameCode:String, gameName:String, aslEnabled:Boolean, igaEnabled:Boolean, mochiEnabled:Boolean, teaserEnabled:Boolean, mochiadId:String, mochibotId:String):void{
this.gameCode = gameCode;
this.gameName = gameName;
this.aslEnabled = aslEnabled;
this.igaEnabled = igaEnabled;
this.mochiEnabled = mochiEnabled;
this.teaserEnabled = teaserEnabled;
this.mochiadId = mochiadId;
this.mochibotId = mochibotId;
}
public function getConfigPropsHandler(event:Event):void{
var loader:URLLoader;
timeoutTimer.stop();
timeoutTimer = null;
if (!timedOut){
if (g5Game.debug){
trace("[G5 DEBUG] - Config props fetched from server");
};
loader = URLLoader(event.target);
if (loader.data.err == undefined){
setConfigProps(loader.data.GameCode, loader.data.GameName, (loader.data.ASLEnabled == 1), (loader.data.IGAEnabled == 1), (loader.data.MochiEnabled == 1), false, loader.data.MochiAdId, loader.data.MochiBotId);
} else {
getConfigPropsError(null);
};
configComplete();
};
}
public function getGameName():String{
return (this.gameName);
}
public function getMochiBotId():String{
return (this.mochibotId);
}
public function getConfigProps():void{
if (g5Game.debug){
trace("[G5 DEBUG] - getConfigProps");
};
var vars:URLVariables = new URLVariables();
vars.op = OP_OTW_GET_CONFIG_PROPS;
vars.GameId = gameId;
var request:URLRequest = new URLRequest(SERVLET_URL);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, getConfigPropsHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, getConfigPropsError);
loader.load(request);
timedOut = false;
timeoutTimer = new Timer(G5Framework.SERVER_TIMEOUT_MILLIS, 1);
timeoutTimer.addEventListener("timer", getConfigPropsTimeout);
timeoutTimer.start();
}
public function isIGAEnabled():Boolean{
return (this.igaEnabled);
}
public function getGameId():Number{
return (this.gameId);
}
public function getConfigPropsTimeout(timerEvent:TimerEvent):void{
if (g5Game.debug){
trace("[G5 DEBUG] - getConfigPropsTimeout");
};
timedOut = true;
configComplete();
}
public function teaserComplete(timerEvent:TimerEvent):void{
if (g5Game.debug){
trace("[G5 DEBUG] - teaserComplete");
};
if (teaserTimer != null){
teaserTimer.stop();
teaserTimer = null;
};
this.g5Game.removeChild(this.movTeaser);
this.g5Game.showSplashScreen(movSplash);
}
public function isASLEnabled():Boolean{
return (this.aslEnabled);
}
public function surveyComplete():void{
if (g5Game.debug){
trace("[G5 DEBUG] - surveyComplete");
};
if (this.g5Game.contains(aslForm)){
this.g5Game.removeChild(aslForm);
};
this.g5Game.initGame();
this.g5Game.showTitleScreen();
}
private function configComplete():void{
if (g5Game.debug){
trace("[G5 DEBUG] - configComplete");
};
this.g5Game.trackMochi();
if (teaserEnabled){
this.g5Game.showTeaserScreen(movTeaser);
} else {
this.g5Game.showSplashScreen(movSplash);
};
this.g5Game.removePreloader();
}
public function splashComplete():void{
if (g5Game.debug){
trace("[G5 DEBUG] - splashComplete");
};
if (aslForm.cookieCheck()){
aslForm.x = ((this.g5Game.swfWidth - aslForm.width) / 2);
aslForm.y = ((this.g5Game.swfHeight - aslForm.height) / 2);
this.g5Game.addChild(aslForm);
} else {
surveyComplete();
};
}
public function getMochiAdId():String{
return (this.mochiadId);
}
public function getConfigPropsError(errEvent:IOErrorEvent):void{
if (g5Game.debug){
trace("[G5 DEBUG] - getConfigPropsError");
};
}
public function onButtonPress(event:MouseEvent):void{
var _local2:URLRequest;
var _local3:URLRequest;
switch (event.target.name){
case "btnUrl":
_local2 = new URLRequest(G5Framework.SERVER_URL);
navigateToURL(_local2, "_blank");
break;
case "AGhome01":
_local3 = new URLRequest(G5Framework.TEASER_URL);
navigateToURL(_local3, "_blank");
break;
case "OriginalSkip":
teaserSkipped = true;
break;
};
}
public function toggleSound():void{
g5Game.toggleSound();
}
public function initG5(gameId:Number, g5Game:G5Game):void{
if (g5Game.debug){
trace("[G5 DEBUG] - initG5");
};
this.gameId = gameId;
this.g5Game = g5Game;
aslForm = new ASLForm(this);
movSplash.gotoAndStop(1);
movTeaser.gotoAndStop(1);
movSplash["btnUrl"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
movTeaser["OriginalSkip"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
if (!g5Game.skip){
getConfigProps();
} else {
configComplete();
};
}
public function isMochiEnabled():Boolean{
return (this.mochiEnabled);
}
public function getGameCode():String{
return (this.gameCode);
}
}
}//package com.morpheme.g5
Section 3
//G5Framework_SplashScreen (com.morpheme.g5.G5Framework_SplashScreen)
package com.morpheme.g5 {
import mx.core.*;
import flash.display.*;
public class G5Framework_SplashScreen extends MovieClipAsset {
public var movSex2:DisplayObject;
public var movAge1:DisplayObject;
public var movAge3:DisplayObject;
public var movAge4:DisplayObject;
public var movAge5:DisplayObject;
public var movAge6:DisplayObject;
public var movAge2:DisplayObject;
public var movAge7:DisplayObject;
public var hand:DisplayObject;
public var btnUrl:DisplayObject;
public var btnSkip:DisplayObject;
public var btnDone:DisplayObject;
public var movSex1:DisplayObject;
}
}//package com.morpheme.g5
Section 4
//G5Framework_TeaserScreen (com.morpheme.g5.G5Framework_TeaserScreen)
package com.morpheme.g5 {
import mx.core.*;
import flash.display.*;
public class G5Framework_TeaserScreen extends MovieClipAsset {
public var movSex2:DisplayObject;
public var movAge1:DisplayObject;
public var movAge3:DisplayObject;
public var movAge4:DisplayObject;
public var movAge5:DisplayObject;
public var movAge6:DisplayObject;
public var movAge7:DisplayObject;
public var AGhome01:DisplayObject;
public var movAge2:DisplayObject;
public var OriginalSkip:DisplayObject;
public var hand:DisplayObject;
public var btnUrl:DisplayObject;
public var btnSkip:DisplayObject;
public var btnDone:DisplayObject;
public var movSex1:DisplayObject;
}
}//package com.morpheme.g5
Section 5
//G5Game (com.morpheme.g5.G5Game)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class G5Game extends MovieClip {
private var g5Game:G5Game;// = null
private var hiScores:HiScores;
private var movTeaser:MovieClip;// = null
public var swfHeight:Number;// = 0
public var debug:Boolean;// = false
private var loader:G5Preloader;// = null
private var movSplash:MovieClip;// = null
public var swfWidth:Number;// = 0
protected var g5:G5Framework;
private var gameId:Number;// = 0
public var skip:Boolean;// = false
public static const SURVEY_ON:Boolean = true;
public static const TEASER_OFF:Boolean = false;
public static const SURVEY_OFF:Boolean = false;
public static const TEASER_ON:Boolean = true;
public static const MOCHI_AD_OFF:Boolean = false;
public static const IGA_OFF:Boolean = false;
public static const IGA_ON:Boolean = true;
public static const MOCHI_AD_ON:Boolean = true;
public function G5Game(gameId:Number, swfWidth:Number, swfHeight:Number, g5Game:G5Game, debug:Boolean){
g5 = new G5Framework();
hiScores = new HiScores();
super();
this.gameId = gameId;
this.swfWidth = swfWidth;
this.swfHeight = swfHeight;
this.g5Game = g5Game;
this.debug = debug;
}
public function hiScoreDataLoaded(scores:Array):void{
}
public function exitHiScoresScreen():void{
removeHiScores();
advertFinished();
}
public function advertStarted():void{
}
public function showSplashScreen(movSplash:MovieClip):void{
if (debug){
trace("[G5 DEBUG] - showSplashScreen");
};
this.movSplash = movSplash;
this.movSplash.x = ((this.swfWidth - movSplash.width) / 2);
this.movSplash.y = ((this.swfHeight - movSplash.height) / 2);
this.movSplash.addEventListener(Event.ENTER_FRAME, splashEnterFrame);
addChild(this.movSplash);
this.movSplash.gotoAndPlay(1);
}
public function showMenuScreen():void{
}
private function showAd():void{
if (debug){
trace("[G5 DEBUG] - showAd");
};
if (g5.isMochiEnabled()){
MochiAd.showTimedAd({id:g5.getMochiAdId(), res:((this.swfWidth + "x") + this.swfHeight), clip:this, ad_started:advertStarted, ad_finished:advertFinished});
} else {
advertFinished();
};
}
public function removePreloader():void{
loader.removeLoader();
}
public function getHiScoreDataHandler(event:Event):void{
var arrRows:Array;
var i:Number;
var arrRow:Array;
var row:HiScoreRow;
var rows:Array = new Array();
var loader:URLLoader = URLLoader(event.target);
if (loader.data.err == undefined){
arrRows = loader.data.res.split(G5Framework.HS_DATA_DELIM_ROW);
i = 0;
while (i < arrRows.length) {
arrRow = arrRows[i].split(G5Framework.HS_DATA_DELIM_COL);
if (arrRow[1] != null){
row = new HiScoreRow();
row.setLevelId(arrRow[0]);
row.setName(arrRow[1]);
row.setScore(arrRow[2]);
rows.push(row);
};
i++;
};
hiScoreDataLoaded(rows);
} else {
getHiScoreDataError(null);
};
}
public function advertFinished():void{
showMenuScreen();
}
public function preloadComplete(loader:G5Preloader):void{
if (debug){
trace("[G5 DEBUG] - preloadComplete");
};
this.loader = loader;
g5.initG5(this.gameId, this.g5Game);
}
public function getHiScoreDataError(errEvent:IOErrorEvent):void{
trace("[G5 ERROR] - getHiScoreDataError");
}
public function teaserEnterFrame(evt:Event):void{
if ((((this.movTeaser.currentFrame == this.movTeaser.totalFrames)) || (g5.teaserSkipped))){
this.movTeaser.removeEventListener(Event.ENTER_FRAME, teaserEnterFrame);
this.movTeaser.stop();
if (g5.teaserSkipped){
g5.teaserComplete(null);
} else {
g5.teaserPause();
};
};
}
public function showTitleScreen():void{
}
public function manualConfig(gameCode:String, gameName:String, aslEnabled:Boolean, igaEnabled:Boolean, mochiEnabled:Boolean, teaserEnabled:Boolean, mochiadId:String, mochibotId:String):void{
this.skip = true;
g5.setConfigProps(gameCode, gameName, aslEnabled, igaEnabled, mochiEnabled, teaserEnabled, mochiadId, mochibotId);
}
public function initGame():void{
}
public function toggleSound():void{
}
public function removeHiScores():void{
removeChild(hiScores);
//unresolved jump
var _slot1 = error;
}
public function initHiScores(levelId:Number, lowIsBest:Boolean, score:Number, msg1:String, msg2:String, x:Number, y:Number):void{
if (debug){
trace("[G5 DEBUG] - initHiScores");
};
hiScores.setDetails(g5.getGameId(), levelId, g5.getGameCode(), lowIsBest, score, msg1, msg2, x, y);
addChild(hiScores);
}
public function exitTitleScreen():void{
showAd();
}
public function trackMochi():void{
MochiBot.track(this.loader, g5.getMochiBotId());
}
public function showTeaserScreen(movTeaser:MovieClip):void{
if (debug){
trace("[G5 DEBUG] - showTeaserScreen");
};
this.movTeaser = movTeaser;
this.movTeaser.x = 0;
this.movTeaser.y = 0;
this.movTeaser.width = swfWidth;
this.movTeaser.height = swfHeight;
this.movTeaser.addEventListener(Event.ENTER_FRAME, teaserEnterFrame);
addChild(this.movTeaser);
this.movTeaser.gotoAndPlay(1);
}
public function splashEnterFrame(evt:Event):void{
if (this.movSplash.currentFrame == this.movSplash.totalFrames){
this.movSplash.removeEventListener(Event.ENTER_FRAME, splashEnterFrame);
this.movSplash.stop();
removeChild(this.movSplash);
g5.splashComplete();
};
}
public function getHiScoreData(startPos:int, endPos:int, startLevel:int, endLevel:int, lowIsBest:Boolean):void{
var vars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
if (debug){
trace("[G5 DEBUG] - getHiScoreData");
};
var maxRecs:Number = (((endPos + 1) - startPos) * ((endLevel + 1) - startLevel));
if (maxRecs <= 100){
vars = new URLVariables();
vars.op = G5Framework.OP_HS_GET_DATA;
vars.gameId = gameId;
vars.startPos = startPos;
vars.endPos = endPos;
vars.startLevel = startLevel;
vars.endLevel = endLevel;
vars.lowIsBest = lowIsBest;
request = new URLRequest(G5Framework.HS_SERVLET_URL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, getHiScoreDataHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, getHiScoreDataError);
loader.load(request);
} else {
trace("[G5 ERROR] - 100 row max per request");
};
}
}
}//package com.morpheme.g5
Section 6
//G5Preloader (com.morpheme.g5.G5Preloader)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class G5Preloader extends MovieClip {
private var G5Loader:Class;
private var swfWidth:Number;// = 0
private var percent:Number;// = 0
private var movLoader:Sprite;
private var swfHeight:Number;// = 0
private var mainClassName:String;// = ""
private var barWidth:Number;// = 0
public function G5Preloader(mainClassName:String, swfWidth:Number, swfHeight:Number){
G5Loader = G5Preloader_G5Loader;
movLoader = new G5Loader();
super();
this.mainClassName = mainClassName;
this.swfWidth = swfWidth;
this.swfHeight = swfHeight;
stop();
movLoader.x = ((this.swfWidth - movLoader.width) / 2);
movLoader.y = ((this.swfHeight - movLoader.height) / 2);
addChild(movLoader);
barWidth = movLoader["movLoadingBar"].width;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
movLoader["btnUrl"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
}
private function init():void{
var app:Object;
var mainClass:Class = Class(getDefinitionByName(mainClassName));
if (mainClass){
app = new mainClass(this.swfWidth, this.swfHeight);
addChild((app as DisplayObject));
app.preloadComplete(this);
};
}
public function removeLoader():void{
removeChild(movLoader);
}
public function onButtonPress(event:MouseEvent):void{
var _local2:URLRequest;
switch (event.target.name){
case "btnUrl":
_local2 = new URLRequest(G5Framework.SERVER_URL);
navigateToURL(_local2, "_blank");
break;
};
}
public function onEnterFrame(event:Event):void{
if (framesLoaded == totalFrames){
movLoader["movLoadingBar"].width = barWidth;
movLoader["txtPercent"].text = "100% loaded";
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
init();
} else {
percent = Math.round(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 100));
movLoader["movLoadingBar"].width = Math.round((percent * (barWidth / 100)));
movLoader["txtPercent"].text = (percent + "% loaded");
};
}
}
}//package com.morpheme.g5
Section 7
//G5Preloader_G5Loader (com.morpheme.g5.G5Preloader_G5Loader)
package com.morpheme.g5 {
import mx.core.*;
import flash.display.*;
public class G5Preloader_G5Loader extends SpriteAsset {
public var movSex2:DisplayObject;
public var AGhome01:DisplayObject;
public var movAge3:DisplayObject;
public var movAge4:DisplayObject;
public var movAge5:DisplayObject;
public var movAge6:DisplayObject;
public var movAge7:DisplayObject;
public var movAge1:DisplayObject;
public var movAge2:DisplayObject;
public var OriginalSkip:DisplayObject;
public var movLoadingBar:DisplayObject;
public var hand:DisplayObject;
public var btnUrl:DisplayObject;
public var txtPercent:DisplayObject;
public var btnSkip:DisplayObject;
public var btnDone:DisplayObject;
public var movSex1:DisplayObject;
}
}//package com.morpheme.g5
Section 8
//HiScoreRow (com.morpheme.g5.HiScoreRow)
package com.morpheme.g5 {
public class HiScoreRow {
private var name:String;// = ""
private var score:Number;// = 0
private var levelId:Number;// = 0
public function HiScoreRow(){
super();
}
public function getName():String{
return (this.name);
}
public function getLevelId():Number{
return (this.levelId);
}
public function setName(name:String):void{
this.name = name;
}
public function setScore(score:Number):void{
this.score = score;
}
public function getScore():Number{
return (this.score);
}
public function setLevelId(levelId:Number):void{
this.levelId = levelId;
}
}
}//package com.morpheme.g5
Section 9
//HiScores (com.morpheme.g5.HiScores)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class HiScores extends MovieClip {
private var levelId:Number;
private var KEY:String;// = "rocket"
private var score:Number;
private var lowIsBest:Boolean;
private var gameId:Number;
private var infoScreen:MovieClip;// = null
private var entryScreen:MovieClip;// = null
private var gameCode:String;
public function HiScores(){
super();
this.visible = false;
}
public function setDetails(gameId:Number, levelId:Number, gameCode:String, lowIsBest:Boolean, score:Number, msg1:String, msg2:String, x:Number, y:Number):void{
this.gameId = gameId;
this.levelId = levelId;
this.gameCode = gameCode;
this.lowIsBest = lowIsBest;
this.score = score;
this.infoScreen = this["movInfoScreen"];
this.entryScreen = this["movEntryScreen"];
entryScreen["txtMsg1"].text = msg1;
entryScreen["txtMsg2"].text = msg2;
entryScreen["txtName"].text = "";
entryScreen["txtCode"].text = "";
entryScreen.visible = true;
infoScreen.visible = false;
secCodeLoad();
entryScreen["btnRefreshCode"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
entryScreen["btnSubmit"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
infoScreen["btnView"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
infoScreen["btnBack"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
this.x = x;
this.y = y;
this.visible = true;
}
public function showInfoMessage(msg:String, error:Boolean):void{
infoScreen["txtInfo"].text = msg;
infoScreen["btnBack"].visible = error;
infoScreen["btnView"].visible = !(error);
}
public function submitDetails():void{
var data:String;
var encrypted:String;
var i:Number;
var j:Number;
var vars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
entryScreen.visible = false;
infoScreen.visible = true;
var error:Boolean;
if (entryScreen["txtName"].text.length == 0){
showInfoMessage("Please enter your name.", true);
} else {
if (entryScreen["txtCode"].text.length != 5){
showInfoMessage("Please enter all 5 letters of the security code.", true);
} else {
showInfoMessage("Submitting hi-score details to the server, please wait.", true);
infoScreen["btnBack"].visible = false;
error = false;
};
};
if (!error){
data = ((((((((("save|" + entryScreen["txtName"].text) + "|") + entryScreen["txtCode"].text) + "|") + score) + "|") + gameId) + "|") + levelId);
encrypted = "";
i = 0;
j = 0;
while (i < data.length) {
if (j >= KEY.length){
j = 0;
};
encrypted = (encrypted + String.fromCharCode(((data.charCodeAt(i) ^ KEY.charCodeAt(j)) + 1)));
i++;
j++;
};
vars = new URLVariables();
vars.ffdata = encrypted;
vars.lowIsBest = lowIsBest;
request = new URLRequest(G5Framework.HS_SERVLET_URL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, submitHiScoreHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, submitHiScoreError);
loader.load(request);
};
}
public function secCodeLoadError(errEvent:IOErrorEvent):void{
entryScreen.visible = false;
infoScreen.visible = true;
showInfoMessage("Could not generate a security code. Click on back and try to refresh the code window.", true);
}
public function onButtonPress(event:MouseEvent):void{
switch (event.target.name){
case "btnRefreshCode":
secCodeLoad();
break;
case "btnSubmit":
submitDetails();
break;
case "btnView":
viewScore();
break;
case "btnBack":
back();
break;
};
}
public function back():void{
entryScreen.visible = true;
infoScreen.visible = false;
}
public function secCodeLoad():void{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, secCodeLoadError);
var url:String = ((G5Framework.HS_SERVLET_URL + "?type=genCode&cachebuster=") + new Date().getTime());
loader.load(new URLRequest(url));
entryScreen["movCode"].addChild(loader);
}
public function submitHiScoreError(errEvent:IOErrorEvent):void{
showInfoMessage("A serious problem was encountered with the server, please try again in a few minutes.", true);
}
public function submitHiScoreHandler(event:Event):void{
var loader:URLLoader = URLLoader(event.target);
var resCode:Number = loader.data.res;
if (resCode == -1){
showInfoMessage("Could not store hi-score details. Click on back, generate a new security code and re-submit.", true);
} else {
if (resCode == 0){
showInfoMessage("Sorry, a better score already exists with that name.", false);
} else {
if (resCode == 1){
showInfoMessage("Congratulations! You made it into the\nhi-score table.", false);
};
};
};
}
public function viewScore():void{
var url:URLRequest = new URLRequest(((((((((G5Framework.INDEX_URL + gameCode) + "_hs") + "&name=") + entryScreen["txtName"].text) + "&levelId=") + levelId) + "&cachebuster=") + new Date().getTime()));
navigateToURL(url, "_blank");
}
}
}//package com.morpheme.g5
Section 10
//MochiAd (com.morpheme.g5.MochiAd)
package com.morpheme.g5 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public function MochiAd(){
super();
}
public static function getVersion():String{
return ("1.5");
}
public static function showTimedAd(options:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = options;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
}, ad_finished:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _clip:MovieClip;
var p:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0){
this.parent.alpha = (p * 0.01);
} else {
_clip = this.parent.parent;
MochiAd.unload(_clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (msec:Number):void{
var _chk:Object = mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = (msec - 250);
};
chk["onEnterFrame"] = function ():void{
var total:Number;
var ad_clip:Object = this.parent._mochiad_ctr;
var elapsed:Number = (getTimer() - this.started);
var finished:Boolean;
if (!chk.showing){
total = ad_clip.loaderInfo.bytesTotal;
if ((((total > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (elapsed > chk.ad_timeout){
finished = true;
};
};
};
if ((((elapsed > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
finished = true;
};
if (finished){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _allowDomains(server:String):String{
var hostname:String = server.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(hostname);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(hostname);
return (hostname);
}
public static function unload(clip:Object):Boolean{
if (((clip.clip) && (clip.clip._mochiad))){
clip = clip.clip;
};
if (!clip._mochiad){
return (false);
};
if (clip._mochiad.onUnload){
clip._mochiad.onUnload();
};
clip.removeChild(clip._mochiad);
delete clip._mochiad_loaded;
delete clip._mochiad;
return (true);
}
public static function sendHighScore(options:Object, callbackObj:Object, callbackMethod:Object=null):Boolean{
var lc:MovieClip = MochiAd._loadCommunicator({clip:options.clip, id:options.id});
if (!lc){
return (false);
};
lc.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return (true);
}
public static function _parseOptions(options:Object, defaults:Object):Object{
var k:String;
var pairs:Array;
var i:Number;
var kv:Array;
var optcopy:Object = {};
for (k in defaults) {
optcopy[k] = defaults[k];
};
if (options){
for (k in options) {
optcopy[k] = options[k];
};
};
options = optcopy.clip.loaderInfo.parameters.mochiad_options;
if (options){
pairs = options.split("&");
i = 0;
while (i < pairs.length) {
kv = pairs[i].split("=");
optcopy[unescape(kv[0])] = unescape(kv[1]);
i++;
};
};
return (optcopy);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function load(options:Object):MovieClip{
var mc:MovieClip;
var k:String;
var v:Object;
var options = options;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
var clip:Object = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
if (clip.loaderInfo.loaderURL.indexOf("http") != 0){
options.no_page = true;
};
var server:String = lv.server;
delete lv.server;
var hostname:String = _allowDomains(server);
mc["onEnterFrame"] = function ():void{
if (!this._mochiad_ctr){
delete this["onEnterFrame"];
MochiAd.unload(this.parent);
};
};
doOnEnterFrame(mc);
var lc:LocalConnection = new LocalConnection();
lc.client = mc;
var name:String = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
var loader:Loader = new Loader();
var f:Function = function (ev:Object):void{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var req:URLRequest = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function createEmptyMovieClip(parent:Object, name:String, depth:Number):MovieClip{
var mc:MovieClip = new MovieClip();
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
parent[name] = mc;
mc["_name"] = name;
return (mc);
}
public static function _getRes(options:Object, clip:Object):Array{
var xy:Array;
var b:Object = clip.getBounds(clip.root);
var w:Number = 0;
var h:Number = 0;
if (typeof(options.res) != "undefined"){
xy = options.res.split("x");
w = parseFloat(xy[0]);
h = parseFloat(xy[1]);
} else {
w = (b.xMax - b.xMin);
h = (b.yMax - b.yMin);
};
if ((((w == 0)) || ((h == 0)))){
w = clip.stage.stageWidth;
h = clip.stage.stageHeight;
};
return ([w, h]);
}
public static function _loadCommunicator(options:Object):MovieClip{
var mc:MovieClip;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = options;
var DEFAULTS:Object = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
var clip:Object = options.clip;
var clipname:String = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
var server:String = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
var lv:URLVariables = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (cb:Object):void{
cb = parseInt(cb.toString());
var cblst:Array = mc._callbacks[cb];
if (typeof(cblst) == "undefined"){
return;
};
delete mc._callbacks[cb];
var args:Array = [];
var i:Number = 2;
while (i < cblst.length) {
args.push(cblst[i]);
i++;
};
i = 1;
while (i < arguments.length) {
args.push(arguments[i]);
i++;
};
var method:Object = cblst[1];
var obj:Object = cblst[0];
if (((obj) && ((typeof(method) == "string")))){
method = obj[method];
};
if (typeof(method) == "function"){
method.apply(obj, args);
};
};
mc._didConnect = function (endpoint:String):void{
var item:Array;
mc._endpoint = endpoint;
var q:Array = mc._queue;
delete mc._queue;
var ds:Function = mc.doSend;
var i:Number = 0;
while (i < q.length) {
item = q[i];
ds.apply(this, item);
i++;
};
};
mc.doSend = function (args:Array, cbobj:Object, cbfn:Object):void{
var qargs:Array;
var i:Number;
if (mc._endpoint == null){
qargs = [];
i = 0;
while (i < arguments.length) {
qargs.push(arguments[i]);
i++;
};
mc._queue.push(qargs);
return;
};
mc._id = (mc._id + 1);
var id:Number = mc._id;
mc._callbacks[id] = [cbobj, ((cbfn) || (cbobj))];
var slc:LocalConnection = new LocalConnection();
slc.send(mc._endpoint, "rpc", id, args);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreloaderAd(options:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = options;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _clip:MovieClip;
var p:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0){
this.parent.alpha = (p * 0.01);
} else {
_clip = this.parent.parent;
MochiAd.unload(_clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (msec:Number):void{
var _chk:Object = mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = msec;
};
chk["onEnterFrame"] = function ():void{
var total:Number;
var _clip:Object = this.parent.parent.root;
if (!_clip){
delete this["onEnterFrame"];
return;
};
var ad_clip:Object = this.parent._mochiad_ctr;
var elapsed:Number = (getTimer() - this.started);
var finished:Boolean;
var clip_total:Number = _clip.loaderInfo.bytesTotal;
var clip_loaded:Number = _clip.loaderInfo.bytesLoaded;
var clip_pcnt:Number = ((100 * clip_loaded) / clip_total);
var ad_pcnt:Number = ((100 * elapsed) / chk.ad_msec);
var _inside:Object = this._mochiad_bar._inside;
var pcnt:Number = Math.min(100, Math.min(((clip_pcnt) || (0)), ad_pcnt));
pcnt = Math.max(this.last_pcnt, pcnt);
this.last_pcnt = pcnt;
_inside.scaleX = (pcnt * 0.01);
if (!chk.showing){
total = ad_clip.loaderInfo.bytesTotal;
if ((((total > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (elapsed > chk.ad_timeout){
finished = true;
};
};
};
if ((((elapsed > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
finished = true;
};
if ((((((clip_total > 0)) && ((clip_loaded >= clip_total)))) && (finished))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function fetchHighScores(options:Object, callbackObj:Object, callbackMethod:Object=null):Boolean{
var lc:MovieClip = MochiAd._loadCommunicator({clip:options.clip, id:options.id});
if (!lc){
return (false);
};
lc.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return (true);
}
public static function doOnEnterFrame(mc:MovieClip):void{
var f:Function;
var mc = mc;
f = function (ev:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package com.morpheme.g5
Section 11
//MochiBot (com.morpheme.g5.MochiBot)
package com.morpheme.g5 {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public function MochiBot(){
super();
}
public static function track(parent:Sprite, tag:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var self:MochiBot = new (MochiBot);
parent.addChild(self);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var server:String = "http://core.mochibot.com/my/core.swf";
var lv:URLVariables = new URLVariables();
lv["sb"] = Security.sandboxType;
lv["v"] = Capabilities.version;
lv["swfid"] = tag;
lv["mv"] = "8";
lv["fv"] = "9";
var url:String = self.root.loaderInfo.loaderURL;
if (url.indexOf("http") == 0){
lv["url"] = url;
} else {
lv["url"] = "local";
};
var req:URLRequest = new URLRequest(server);
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
var loader:Loader = new Loader();
self.addChild(loader);
loader.load(req);
return (self);
}
}
}//package com.morpheme.g5
Section 12
//ButtonAsset (mx.core.ButtonAsset)
package mx.core {
public class ButtonAsset extends FlexSimpleButton implements IFlexAsset, IFlexDisplayObject {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function ButtonAsset(){
super();
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(newWidth:Number, newHeight:Number):void{
width = newWidth;
height = newHeight;
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
}
}//package mx.core
Section 13
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){
super();
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 14
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 15
//FlexSimpleButton (mx.core.FlexSimpleButton)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSimpleButton extends SimpleButton {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexSimpleButton(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 16
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexSprite(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 17
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 18
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 19
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(void:Point):Point;
function get name():String;
function set width(flash.display:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(flash.display:String):void;
function set scaleX(flash.display:Number):void;
function set scaleY(flash.display:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(flash.display:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(void:Point):Point;
function get height():Number;
function set blendMode(flash.display:String):void;
function get parent():DisplayObjectContainer;
function getBounds(String:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(flash.display:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(flash.display:Number):void;
function set accessibilityProperties(flash.display:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(flash.display:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(flash.display:Number):void;
function set mask(flash.display:DisplayObject):void;
function getRect(String:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(flash.display:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean;
function set opaqueBackground(flash.display:Object):void;
function set visible(flash.display:Boolean):void;
function get mask():DisplayObject;
function set x(flash.display:Number):void;
function set y(flash.display:Number):void;
function get transform():Transform;
function set filters(flash.display:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(flash.display:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 20
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(E:\dev\3.0.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get isDocument():Boolean;
function set repeaters(E:\dev\3.0.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function initializeRepeaterArrays(E:\dev\3.0.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(E:\dev\3.0.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 21
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
super();
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(newWidth:Number, newHeight:Number):void{
width = newWidth;
height = newHeight;
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 22
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 23
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
public function SoundAsset(){
super();
}
}
}//package mx.core
Section 24
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function SpriteAsset(){
super();
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(newWidth:Number, newHeight:Number):void{
width = newWidth;
height = newHeight;
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 25
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public function NameUtil(){
super();
}
public static function displayObjectToString(displayObject:DisplayObject):String{
var result:String;
var s:String;
var indices:Array;
var o:DisplayObject = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
return (result);
}
public static function createUniqueName(object:Object):String{
if (!object){
return (null);
};
var name:String = getQualifiedClassName(object);
var index:int = name.indexOf("::");
if (index != -1){
name = name.substr((index + 2));
};
var charCode:int = name.charCodeAt((name.length - 1));
if ((((charCode >= 48)) && ((charCode <= 57)))){
name = (name + "_");
};
return ((name + counter++));
}
}
}//package mx.utils
Section 26
//minesweeper (minesweeper)
package {
import flash.events.*;
import flash.display.*;
import com.morpheme.g5.*;
import flash.text.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class minesweeper extends G5Game {
public const STATUS_ENDING:int = 3;
public const STATUS_GAME:int = 2;
public const STATUS_LANGUAGE:int = 4;
public const STATUS_MENU:int = 1;
public const STATUS_TITLE:int = 0;
public var tooltip:TextField;
public var bonusActive:Boolean;// = false
public var gridHeight:Number;// = 15
private var tileclip3cla:Class;
public var bonusX:Number;// = -1
private var LangScreen:Class;
private var mineclipcla:Class;
public var bonus:MovieClip;
public var gridWidth:Number;// = 10
private var restartButton:SimpleButton;
public var qpulmenuclip:String;// = ""
private var movLangScreen:MovieClip;
private var bonusButton:SimpleButton;
public var bonusY:Number;// = -1
public var gametext:TextField;
public var bonusWait:Number;// = 0
public var bg:MovieClip;
public var bonusNumber:Number;// = 1
public var currentLocation:Number;// = 1
public var arrMine:Array;
private var goClip:MovieClip;// = null
private var ButtonRestart:Class;
private var YouWinClip:Class;
private var numbersclipcla:Class;
private var tilecollisioncla:Class;
public var firstTimeInit:Boolean;// = true
private var InfoBar:Class;
private var GameOverClip:Class;
public var tileStartX:Number;// = 349
public var tileStartY:Number;// = 100
private var ClickSound:Class;
public var gameStatus:int;// = 0
private var infoBar:Sprite;
private var EndingScreen:Class;
private var timerBar:Sprite;
private var pl_jump:Class;
private var moscowsnowcla:Class;
private var pigeoncla:Class;
public var minesLeft:TextField;
private var TimerBar:Class;
public var arrTile:Array;
private var WinSound:Class;
private var winSound:Sound;
private var mainMenu:MovieClip;
public var totcasok:Number;// = 0
public var quitTarget:Sprite;// = null
private var clickSnd:Sound;
private var TitleScreen:Class;
private var bonusLeft:TextField;
private var GameoverSound:Class;
private var MenuScreen:Class;
private var themeSound:Sound;// = null
public var timerPaused:Boolean;// = false
private var flagclipcla:Class;
private var movMenuScreen:Sprite;
private var PlayScreen:Class;
public var bgTargetW:int;
private var nextLevelButton:SimpleButton;
private var FlagSound:Class;
public var minesNum:Number;// = 10
private var movPlayScreen:Sprite;
public var switchTheme:Boolean;// = false
private var themeChannel:SoundChannel;// = null
private var Explosion:Class;
private var pl_ok:Class;
private var EndingScreenIta:Class;
private var goSound:Sound;
private var ThemeSound:Class;
private var pl_win:Class;
public var pausedTime:Number;// = -1
private var ButtonNextLevel:Class;
private var soundButton:SimpleButton;
private var ExplosionSound:Class;
private var backgroundcla:Class;
public var curTime:Number;// = -1
public var paused:Boolean;// = false
private var movTitleScreen:MovieClip;
public var cascadeTiles:Array;
private var TitleScreenIta:Class;
private var Clic0:Class;
private var huskywalkcla:Class;
public var timer:TextField;
private var whiteFlash:MovieClip;
private var tileclip1cla:Class;
private var clic0:Sound;// = null
private var ButtonSoundOff:Class;
private var huskydiggcla:Class;
private var JumpSound:Class;
public var soundOn:int;// = 1
public var endingLoops:int;// = 4
private var tumbleweedcla:Class;
public var arrFlag:Array;
private var minesBar:Sprite;
private var pl_lose:Class;
private var usadirtcla:Class;
public var flagsNum:Number;// = 0
private var MenuTheme:Class;
public var bonusFlagX:Number;// = -1
public var bonusFlagY:Number;// = -1
public var startIndex:int;// = 0
public var flagActive:Boolean;// = false
private var MinesBar:Class;
private var ywClip:MovieClip;// = null
private var ButtonSoundOn:Class;
private var ButtonExit:Class;
private var tileclip2cla:Class;
private var movEndingScreen:MovieClip;
private var menuTheme:Sound;// = null
public var ctrlDown:Boolean;// = false
private var HiScoresScreen:Class;
public var arrClick:Array;
private var movHiScoresScreen:Sprite;
private var menumccla:Class;
public var bonusTargetX:Number;// = -1
private var pl_flag:Class;
public var bonusTargetY:Number;// = -1
public var win:Boolean;// = false
private var targetInfo:int;// = 639
private var exitTitle:Boolean;// = false
public var gameOver:Boolean;// = false
public var lang:Number;// = 0
private var exitButton:SimpleButton;
private var InfoBarIta:Class;
private var menumcclaita:Class;
private var ButtonBonus:Class;
private static var Player:MovieClip;
private static var cellTargetX:int = 0;
private static var cellTargetY:int = 0;
private static var GAME_ID:Number = 75;
private static var PlayerAnim:Number = -1;
public static var checkResult:int = 0;
private static var explosion:MovieClip;
public function minesweeper(swfWidth:Number, swfHeight:Number){
LangScreen = minesweeper_LangScreen;
movLangScreen = new LangScreen();
TitleScreen = minesweeper_TitleScreen;
movTitleScreen = new TitleScreen();
TitleScreenIta = minesweeper_TitleScreenIta;
MenuScreen = minesweeper_MenuScreen;
movMenuScreen = new MenuScreen();
PlayScreen = minesweeper_PlayScreen;
movPlayScreen = new PlayScreen();
HiScoresScreen = minesweeper_HiScoresScreen;
movHiScoresScreen = new HiScoresScreen();
EndingScreen = minesweeper_EndingScreen;
EndingScreenIta = minesweeper_EndingScreenIta;
tooltip = new TextField();
cascadeTiles = new Array();
backgroundcla = minesweeper_backgroundcla;
usadirtcla = minesweeper_usadirtcla;
moscowsnowcla = minesweeper_moscowsnowcla;
tileclip1cla = minesweeper_tileclip1cla;
tileclip2cla = minesweeper_tileclip2cla;
tileclip3cla = minesweeper_tileclip3cla;
tilecollisioncla = minesweeper_tilecollisioncla;
mineclipcla = minesweeper_mineclipcla;
numbersclipcla = minesweeper_numbersclipcla;
flagclipcla = minesweeper_flagclipcla;
GameOverClip = minesweeper_GameOverClip;
YouWinClip = minesweeper_YouWinClip;
TimerBar = minesweeper_TimerBar;
MinesBar = minesweeper_MinesBar;
InfoBar = minesweeper_InfoBar;
InfoBarIta = minesweeper_InfoBarIta;
tumbleweedcla = minesweeper_tumbleweedcla;
pigeoncla = minesweeper_pigeoncla;
huskywalkcla = minesweeper_huskywalkcla;
huskydiggcla = minesweeper_huskydiggcla;
Explosion = minesweeper_Explosion;
menumccla = minesweeper_menumccla;
menumcclaita = minesweeper_menumcclaita;
ButtonSoundOn = minesweeper_ButtonSoundOn;
ButtonSoundOff = minesweeper_ButtonSoundOff;
ButtonExit = minesweeper_ButtonExit;
ButtonRestart = minesweeper_ButtonRestart;
ButtonNextLevel = minesweeper_ButtonNextLevel;
ButtonBonus = minesweeper_ButtonBonus;
GameoverSound = minesweeper_GameoverSound;
WinSound = minesweeper_WinSound;
ThemeSound = minesweeper_ThemeSound;
MenuTheme = minesweeper_MenuTheme;
ClickSound = minesweeper_ClickSound;
clickSnd = new ClickSound();
FlagSound = minesweeper_FlagSound;
JumpSound = minesweeper_JumpSound;
ExplosionSound = minesweeper_ExplosionSound;
Clic0 = minesweeper_Clic0;
pl_jump = minesweeper_pl_jump;
pl_ok = minesweeper_pl_ok;
pl_flag = minesweeper_pl_flag;
pl_win = minesweeper_pl_win;
pl_lose = minesweeper_pl_lose;
super(GAME_ID, swfWidth, swfHeight, this, true);
}
public function mouseMove(event:MouseEvent):void{
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
public function startTimer():void{
if (((!((curTime == -1))) && (!(timerPaused)))){
return;
};
if (curTime == -1){
curTime = getTimer();
} else {
curTime = (curTime + (getTimer() - pausedTime));
};
timerPaused = false;
}
public function mouseUp(event:MouseEvent):void{
}
public function onButtonDown(event:MouseEvent):void{
clickSnd.play();
}
public function sortCascadeVector():void{
if (cascadeTiles.length > 0){
quickSort(cascadeTiles, 0, (cascadeTiles.length - 1));
};
}
public function switchSound(event:MouseEvent):void{
if (paused){
return;
};
if (gameStatus == STATUS_GAME){
bg.removeChild(soundButton);
};
if (soundOn){
if ((((gameStatus == STATUS_GAME)) || ((gameStatus == STATUS_ENDING)))){
soundButton = new ButtonSoundOff();
if (lang == 0){
tooltip.text = "Sound ON";
} else {
tooltip.text = "Suono ON";
};
tooltip.setTextFormat(new TextFormat("Impact", 16));
tooltip.autoSize = TextFieldAutoSize.RIGHT;
tooltip.filters = [new GlowFilter(0xFFFFFF, 1, 4, 4, 3, 1)];
tooltip.x = (636 - tooltip.width);
} else {
mainMenu["buttonSound"].visible = false;
mainMenu["buttonSoundOff"].visible = true;
};
soundOn = 0;
} else {
if ((((gameStatus == STATUS_GAME)) || ((gameStatus == STATUS_ENDING)))){
soundButton = new ButtonSoundOn();
if (lang == 0){
tooltip.text = "Sound OFF";
} else {
tooltip.text = "Suono ON";
};
tooltip.setTextFormat(new TextFormat("Impact", 16));
tooltip.autoSize = TextFieldAutoSize.RIGHT;
tooltip.filters = [new GlowFilter(0xFFFFFF, 1, 4, 4, 3, 1)];
tooltip.x = (636 - tooltip.width);
} else {
mainMenu["buttonSound"].visible = true;
mainMenu["buttonSoundOff"].visible = false;
};
soundOn = 1;
};
if (gameStatus == STATUS_GAME){
bg.addChild(soundButton);
soundButton.x = 614;
soundButton.y = 454;
soundButton.addEventListener(MouseEvent.CLICK, switchSound);
soundButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
soundButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
soundButton.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
stage.focus = bg;
bg.focusRect = null;
};
}
public function mouseClickCasella(event:MouseEvent):void{
if (((((((gameOver) || (win))) || (bonusActive))) || (paused))){
return;
};
startTimer();
var queryStr:String = String(event.target);
var params:Array = queryStr.split("right", 2);
var inqueryStr:String = params[0];
var inparams:Array = inqueryStr.split("left", 2);
var leftvar:Number = inparams[1];
var rightvar:Number = params[1];
if (arrClick[leftvar][rightvar] == false){
if ((((ctrlDown == true)) && ((arrFlag[leftvar][rightvar] == null)))){
if (flagsNum < minesNum){
setAnim(2, leftvar, rightvar, -15, -45);
};
} else {
setAnim(0, leftvar, rightvar, 2, -40);
};
};
}
public function mouseOverCasella(event:MouseEvent):void{
if (((((((!(gameOver)) && (!(win)))) && (!(bonusActive)))) && (!(paused)))){
event.target.gotoAndStop(2);
};
}
public function freeMineBonus(event:MouseEvent):void{
var j:Number;
var randMine:int;
if ((((((((bonusNumber <= 0)) || (bonusActive))) || (flagActive))) || (!(bonusButton.enabled)))){
return;
};
var minesCoord:Array = new Array();
var i:Number = 0;
while (i < gridWidth) {
j = 0;
while (j < gridHeight) {
if (((arrMine[i][j]) && ((arrFlag[i][j] == null)))){
minesCoord.push(new Array(i, j));
};
j++;
};
i++;
};
if (minesCoord.length > 0){
randMine = int((Math.random() * minesCoord.length));
bonusFlagX = minesCoord[randMine][0];
bonusFlagY = minesCoord[randMine][1];
bonusTargetX = (((tileStartX - (20 * bonusFlagY)) + (20 * bonusFlagX)) + 20);
bonusTargetY = (((tileStartY + (10 * bonusFlagY)) + (10 * bonusFlagX)) + 3);
if (currentLocation == 1){
if (bonusFlagX >= (gridWidth / 2)){
bonusX = (tileStartX - (20 * bonusFlagY));
bonusY = ((tileStartY + (10 * bonusFlagY)) - 7);
} else {
bonusX = (((tileStartX - (20 * bonusFlagY)) + (20 * gridWidth)) + 20);
bonusY = (((tileStartY + (10 * bonusFlagY)) + (10 * gridWidth)) + 3);
};
} else {
if (currentLocation == 2){
bonusX = (((tileStartX - (20 * bonusFlagY)) + (20 * bonusFlagX)) + 20);
bonusY = (((tileStartY + (10 * bonusFlagY)) + (10 * bonusFlagX)) + 20);
} else {
if (currentLocation == 3){
if (bonusFlagX >= (gridWidth / 2)){
bonusX = ((tileStartX - (20 * bonusFlagY)) - 10);
bonusY = ((tileStartY + (10 * bonusFlagY)) - 7);
} else {
bonusX = ((tileStartX + (20 * bonusFlagX)) + 10);
bonusY = ((tileStartY + (10 * bonusFlagX)) + 3);
};
bonusTargetX = (((tileStartX - (20 * bonusFlagY)) + (20 * bonusFlagX)) + 10);
bonusTargetY = (((tileStartY + (10 * bonusFlagY)) + (10 * bonusFlagX)) + 3);
};
};
};
bonusActive = true;
bonusButton.enabled = false;
pauseTimer();
bonusNumber--;
bonusLeft.text = ("x" + bonusNumber);
bonusLeft.setTextFormat(new TextFormat("Impact", 20));
if (bonusNumber == 0){
if (bg.contains(tooltip)){
bg.removeChild(tooltip);
};
bonusButton.enabled = false;
bonusButton.removeEventListener(MouseEvent.CLICK, freeMineBonus);
bonusButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
bonusButton.removeEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
bonusButton.mouseEnabled = false;
bonusButton.transform.colorTransform = new ColorTransform(1, 1, 1, 1, -100, -100, -100);
};
};
minesCoord = null;
}
public function initLevel(gridWidthpar:Number, gridHeightpar:Number, minesNumpar:Number, startingOffsetX:int, startingOffsetY:int):void{
var ii:int;
var leftval:*;
var rightval:*;
var i:int;
var area:Sprite;
var tile:MovieClip;
var dirt:Sprite;
gridWidth = gridWidthpar;
gridHeight = gridHeightpar;
minesNum = minesNumpar;
tileStartX = startingOffsetX;
tileStartY = startingOffsetY;
arrMine = new Array(gridWidth);
arrClick = new Array(gridWidth);
arrTile = new Array(gridWidth);
arrFlag = new Array(gridWidth);
gameOver = false;
win = false;
goClip = null;
checkResult = 0;
targetInfo = 639;
bg = new backgroundcla();
bg.name = "sfondo";
bg.mouseEnabled = false;
bg.x = 0;
bg.y = 0;
bg.gotoAndStop(currentLocation);
win = false;
bonus = null;
bonusActive = false;
bonusTargetX = -1;
bonusTargetY = -1;
bonusFlagX = -1;
bonusFlagY = -1;
endingLoops = 4;
ywClip = (goClip = null);
clic0 = null;
movPlayScreen.addChild(bg);
var ee:int;
while (ee < gridWidth) {
arrMine[ee] = new Array(gridHeight);
arrClick[ee] = new Array(gridHeight);
ii = 0;
while (ii < gridHeight) {
arrMine[ee][ii] = false;
arrClick[ee][ii] = false;
ii++;
};
ee++;
};
var t:int;
while (t < minesNum) {
do {
leftval = randRange(0, (gridWidth - 1));
rightval = randRange(0, (gridHeight - 1));
} while (arrMine[leftval][rightval] == true);
arrMine[leftval][rightval] = true;
t++;
};
var e:int;
while (e < gridWidth) {
arrTile[e] = new Array(gridHeight);
arrFlag[e] = new Array(gridHeight);
i = 0;
while (i < gridHeight) {
area = new tilecollisioncla();
area.visible = false;
area.mouseEnabled = false;
area.x = (((tileStartX - (20 * i)) + (20 * e)) + 5);
area.y = (((tileStartY + (10 * i)) + (10 * e)) + 10);
bg.addChild(area);
if (currentLocation == 1){
tile = new tileclip1cla();
} else {
if (currentLocation == 2){
tile = new tileclip2cla();
} else {
if (currentLocation == 3){
tile = new tileclip3cla();
};
};
};
tile.name = ((("romboleft" + e) + "right") + i);
tile.x = ((tileStartX - (20 * i)) + (20 * e));
tile.y = ((tileStartY + (10 * i)) + (10 * e));
tile.gotoAndStop(1);
tile.buttonMode = true;
tile.useHandCursor = true;
tile.mouseChildren = true;
tile.hitArea = area;
tile.addEventListener(MouseEvent.MOUSE_OVER, mouseOverCasella);
tile.addEventListener(MouseEvent.MOUSE_OUT, mouseOutCasella);
tile.addEventListener(MouseEvent.CLICK, mouseClickCasella);
tile.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
tile.addEventListener(KeyboardEvent.KEY_UP, keyUp);
arrTile[e][i] = tile;
arrFlag[e][i] = null;
bg.addChild(tile);
i++;
};
e++;
};
if (currentLocation != 2){
if (currentLocation == 1){
dirt = new usadirtcla();
} else {
if (currentLocation == 3){
dirt = new moscowsnowcla();
};
};
dirt.buttonMode = false;
dirt.mouseEnabled = false;
dirt.x--;
bg.addChild(dirt);
};
startIndex = bg.numChildren;
timerBar = new TimerBar();
timerBar.x = 0;
timerBar.y = 4;
bg.addChild(timerBar);
minesBar = new MinesBar();
minesBar.x = 639;
minesBar.y = 4;
bg.addChild(minesBar);
timer = new TextField();
timer.autoSize = TextFieldAutoSize.CENTER;
timer.x = 150;
timer.y = 12;
timer.text = "00:00:00";
timer.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
timer.filters = [new GlowFilter(0xFFFFFF, 1, 7, 7, 3, 1)];
timer.mouseEnabled = false;
timer.selectable = false;
bg.addChild(timer);
curTime = -1;
timerPaused = false;
minesLeft = new TextField();
minesLeft.autoSize = TextFieldAutoSize.RIGHT;
minesLeft.x = 630;
minesLeft.y = 12;
minesLeft.text = ("" + minesNum);
minesLeft.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
minesLeft.filters = [new GlowFilter(0xFFFFFF, 1, 7, 7, 3, 1)];
minesLeft.mouseEnabled = false;
minesLeft.selectable = false;
bg.addChild(minesLeft);
bonusButton = new ButtonBonus();
bonusButton.x = 320;
bonusButton.y = 454;
bonusButton.addEventListener(MouseEvent.CLICK, freeMineBonus);
bonusButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
bonusButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
bonusButton.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
bonusLeft = new TextField();
bonusLeft.selectable = false;
bonusLeft.mouseEnabled = false;
bonusLeft.text = ("x" + bonusNumber);
bonusLeft.setTextFormat(new TextFormat("Impact", 20));
bonusLeft.filters = [new GlowFilter(0xFFFFFF, 1, 4, 4, 3, 2)];
bonusLeft.antiAliasType = AntiAliasType.ADVANCED;
bonusLeft.autoSize = TextFieldAutoSize.LEFT;
bonusLeft.x = Math.floor(((bonusButton.x + (bonusButton.width / 2)) + 8));
bonusLeft.y = Math.floor((bonusButton.y - (bonusLeft.height / 2)));
bg.addChild(bonusButton);
bg.addChild(bonusLeft);
if (soundOn == 1){
soundButton = new ButtonSoundOn();
} else {
soundButton = new ButtonSoundOff();
};
soundButton.addEventListener(MouseEvent.CLICK, switchSound);
soundButton.x = 614;
soundButton.y = 454;
soundButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
soundButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
soundButton.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
bg.addChild(soundButton);
exitButton = new ButtonExit();
exitButton.x = 26;
exitButton.y = 454;
exitButton.addEventListener(MouseEvent.CLICK, mouseClickTorna);
exitButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
exitButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
exitButton.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
bg.addChild(exitButton);
restartButton = new ButtonRestart();
restartButton.x = 75;
restartButton.y = 454;
restartButton.addEventListener(MouseEvent.CLICK, mouseClickRico);
restartButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
restartButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
restartButton.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
bg.addChild(restartButton);
stage.focus = bg;
bg.focusRect = null;
}
public function infoOver(event:MouseEvent):void{
if (infoBar != null){
targetInfo = ((640 - infoBar.width) + 62);
};
}
public function checkCell(leftvar:Number, rightvar:Number):void{
var snd:Sound;
var e:int;
var i:int;
var mina:Sprite;
var totxvin:Number;
var nm:Number;
var xl:Number;
var scw:SoundChannel;
var yr:Number;
var numer:MovieClip;
var xls:Number;
var yrs:Number;
if (arrClick[leftvar][rightvar] == true){
return;
};
arrClick[leftvar][rightvar] = true;
if (arrMine[leftvar][rightvar] == true){
pauseTimer();
gameOver = true;
snd = new ExplosionSound();
snd.play();
e = 0;
while (e < gridWidth) {
i = 0;
while (i < gridHeight) {
if (arrMine[e][i] == true){
if (arrFlag[e][i] != null){
bg.removeChild(arrFlag[e][i]);
arrFlag[e][i] = null;
};
arrTile[e][i].gotoAndStop(2);
arrTile[e][i].removeEventListener(MouseEvent.MOUSE_OUT, mouseOutCasella);
mina = new mineclipcla();
mina.x = ((tileStartX - (20 * i)) + (20 * e));
mina.y = ((tileStartY + (10 * i)) + (10 * e));
mina.mouseEnabled = false;
addChildByY(mina);
};
i++;
};
e++;
};
setAnim(5, leftvar, rightvar, 0, -40);
checkResult++;
} else {
totcasok++;
totxvin = ((gridWidth * gridHeight) - minesNum);
if (totcasok >= totxvin){
pauseTimer();
win = true;
winSound = new WinSound();
scw = winSound.play();
scw.soundTransform = new SoundTransform(soundOn);
scw.addEventListener(Event.SOUND_COMPLETE, playAnother);
setAnim(3, leftvar, rightvar, 5, -53);
checkResult++;
};
nm = 0;
xl = (leftvar - 1);
while (xl <= (leftvar + 1)) {
yr = (rightvar - 1);
while (yr <= (rightvar + 1)) {
if ((((((((yr >= 0)) && ((yr < gridHeight)))) && ((xl >= 0)))) && ((xl < gridWidth)))){
if (arrMine[xl][yr] == true){
nm++;
};
};
yr++;
};
xl++;
};
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.MOUSE_OVER, mouseOverCasella);
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.MOUSE_OUT, mouseOutCasella);
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.CLICK, mouseClickCasella);
arrTile[leftvar][rightvar].removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
arrTile[leftvar][rightvar].removeEventListener(KeyboardEvent.KEY_UP, keyUp);
arrTile[leftvar][rightvar].useHandCursor = false;
cascadeTiles.push(new Array(leftvar, rightvar, int(Math.sqrt((((leftvar - cellTargetX) * (leftvar - cellTargetX)) + ((rightvar - cellTargetY) * (rightvar - cellTargetY))))), 1));
if (arrFlag[leftvar][rightvar] != null){
bg.removeChild(arrFlag[leftvar][rightvar]);
arrFlag[leftvar][rightvar] = null;
flagsNum--;
minesLeft.text = ("" + (minesNum - flagsNum));
minesLeft.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
};
if (nm > 0){
numer = new numbersclipcla();
numer.x = ((tileStartX - (20 * rightvar)) + (20 * leftvar));
numer.y = ((tileStartY + (10 * rightvar)) + (10 * leftvar));
numer.name = ((("number" + leftvar) + ",") + rightvar);
numer.gotoAndStop(nm);
numer.mouseEnabled = false;
numer.visible = ((!((cellTargetX == leftvar))) || (!((cellTargetY == rightvar))));
numer.alpha = 0;
addChildByY(numer);
} else {
xls = (leftvar - 1);
while (xls <= (leftvar + 1)) {
yrs = (rightvar - 1);
while (yrs <= (rightvar + 1)) {
if ((((((((yrs >= 0)) && ((yrs < gridHeight)))) && ((xls >= 0)))) && ((xls < gridWidth)))){
if ((((arrClick[xls][yrs] == false)) && ((arrMine[xls][yrs] == false)))){
checkCell(xls, yrs);
};
};
yrs++;
};
xls++;
};
};
};
}
public function fadeIn(clip:MovieClip):void{
if (clip.alpha < 1){
clip.alpha = (clip.alpha + 0.2);
if (clip.alpha > 1){
clip.alpha = 1;
};
};
}
public function onButtonPress(event:MouseEvent):void{
switch (event.target.name){
case "itaButton":
lang = 1;
removeChild(movTitleScreen);
movTitleScreen = new TitleScreenIta();
addChild(movTitleScreen);
showScreen(movTitleScreen);
break;
case "engButton":
lang = 0;
showScreen(movTitleScreen);
break;
case "btnNext":
exitTitle = true;
movTitleScreen["btnNext"].enabled = false;
movTitleScreen["btnNext"].removeEventListener(MouseEvent.CLICK, onButtonPress);
movTitleScreen["btnNext"].removeEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
exitTitleScreen();
break;
case "buttonPlay":
mainMenu.play();
break;
case "buttonMore":
GoLink("http://www.gimme5games.com");
break;
case "buttonHelp":
if (mainMenu.getChildByName("textAbout") != null){
MovieClip(mainMenu.getChildByName("textAbout")).alpha = 0;
};
if (mainMenu.getChildByName("textCredits") != null){
MovieClip(mainMenu.getChildByName("textCredits")).alpha = 0;
};
if (mainMenu.getChildByName("help") != null){
MovieClip(mainMenu.getChildByName("help")).alpha = 0;
};
mainMenu.gotoAndPlay(73);
qpulmenuclip = "Help";
break;
case "buttonAbout":
qpulmenuclip = "About";
mainMenu.gotoAndPlay(73);
break;
case "buttonCredits":
qpulmenuclip = "CreditsClip";
mainMenu.gotoAndPlay(73);
break;
case "javartlogo":
GoLink("http://www.javartgames.com");
break;
case "logojavartlittle":
GoLink("http://www.javartgames.com");
break;
case "logoeidos":
GoLink("http://www.eidos.co.uk/mobile/");
break;
case "xclose":
mainMenu.gotoAndPlay(127);
qpulmenuclip = "";
if (mainMenu.getChildByName("textAbout") != null){
MovieClip(mainMenu.getChildByName("textAbout")).alpha = 0;
};
if (mainMenu.getChildByName("textCredits") != null){
MovieClip(mainMenu.getChildByName("textCredits")).alpha = 0;
};
if (mainMenu.getChildByName("help") != null){
MovieClip(mainMenu.getChildByName("help")).alpha = 0;
};
break;
case "btnHiScores":
showScreen(movHiScoresScreen);
initHiScores(0, false, 12345, "12345", "points scored", 180, 50);
break;
case "btnNextHiScores":
exitHiScoresScreen();
break;
};
}
public function update(event:Event):void{
var newVolume:Number;
var diff:Number;
var text:String;
var min:Number;
var sec:Number;
var dec:Number;
var flag:MovieClip;
var val:Number;
var snd:Sound;
if (firstTimeInit){
soundButton = new ButtonSoundOn();
soundOn = 1;
root.stage.stageFocusRect = false;
firstTimeInit = false;
gameStatus = STATUS_LANGUAGE;
showScreen(movLangScreen);
};
if (endingLoops == -1){
if (((!((goClip == null))) && ((goClip.currentFrame == 48)))){
goClip.stop();
goClip.nextFrame();
ChiediRetryExit();
enableGUI(true);
};
};
if (((!((ywClip == null))) && ((ywClip.currentFrame == 48)))){
ywClip.stop();
ywClip.nextFrame();
};
if (((!((themeChannel == null))) && ((((((SoundMixer.soundTransform.volume > 0)) && ((soundOn == 0)))) || (switchTheme))))){
newVolume = (SoundMixer.soundTransform.volume - 0.05);
if (newVolume < 0){
newVolume = 0;
};
SoundMixer.soundTransform = new SoundTransform(newVolume);
if ((((newVolume == 0)) && (switchTheme))){
themeChannel.stop();
themeSound = null;
menuTheme = null;
switchTheme = false;
themeChannel = null;
};
};
if (((((((!((themeChannel == null))) && ((SoundMixer.soundTransform.volume < 1)))) && ((soundOn == 1)))) && (!(switchTheme)))){
newVolume = (SoundMixer.soundTransform.volume + 0.05);
if (newVolume > 1){
newVolume = 1;
};
SoundMixer.soundTransform = new SoundTransform(newVolume);
};
if (themeChannel == null){
if (gameStatus == STATUS_MENU){
menuTheme = new MenuTheme();
themeChannel = menuTheme.play(0, 1000);
SoundMixer.soundTransform = new SoundTransform(soundOn);
} else {
if (gameStatus == STATUS_GAME){
themeSound = new ThemeSound();
themeChannel = themeSound.play(0, 1000);
SoundMixer.soundTransform = new SoundTransform(soundOn);
};
};
switchTheme = false;
};
switch (gameStatus){
case STATUS_LANGUAGE:
if (movTitleScreen.currentFrame == 15){
movLangScreen.stop();
movLangScreen.nextFrame();
};
break;
case STATUS_TITLE:
if (movTitleScreen.currentFrame == 35){
movTitleScreen["btnNext"].enabled = true;
movTitleScreen.stop();
movTitleScreen.nextFrame();
};
if (exitTitle){
movTitleScreen.alpha = (movTitleScreen.alpha - 0.1);
if (movTitleScreen.alpha <= 0){
};
};
break;
case STATUS_MENU:
if (mainMenu.currentFrame == 39){
mainMenu.stop();
SimpleButton(mainMenu.getChildByName("buttonPlay")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonHelp")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonAbout")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonCredits")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonMore")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonSound")).enabled = true;
SimpleButton(mainMenu.getChildByName("buttonSoundOff")).enabled = true;
mainMenu.nextFrame();
} else {
if (mainMenu.currentFrame == 69){
switchTheme = true;
} else {
if (mainMenu.currentFrame == 70){
mainMenu.stop();
mainMenu.nextFrame();
} else {
if (mainMenu.currentFrame == 71){
if (mainMenu.width > 0){
mainMenu.width = logInterpolate(mainMenu.width, 0, 2);
if (mainMenu.width < 0){
mainMenu.width = 0;
};
mainMenu.x = ((640 - mainMenu.width) / 2);
} else {
if (mainMenu.width == 0){
movMenuScreen.removeChild(mainMenu);
mainMenu = null;
showScreen(movPlayScreen);
};
};
} else {
if (mainMenu.currentFrame == 97){
if (MovieClip(mainMenu.getChildByName("textAbout")) != null){
MovieClip(mainMenu.getChildByName("textAbout")).alpha = 0;
};
if (MovieClip(mainMenu.getChildByName("textCredits")) != null){
MovieClip(mainMenu.getChildByName("textCredits")).alpha = 0;
};
if (MovieClip(mainMenu.getChildByName("help")) != null){
MovieClip(mainMenu.getChildByName("help")).alpha = 0;
};
if (qpulmenuclip == "About"){
if (MovieClip(mainMenu.getChildByName("textAbout")) != null){
MovieClip(mainMenu.getChildByName("textAbout")).alpha = 1;
};
if (MovieClip(mainMenu.getChildByName("textCredits")) != null){
MovieClip(mainMenu.getChildByName("textCredits")).alpha = 0;
};
mainMenu.textAbout.getChildByName("logojavartlittle").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
mainMenu.textAbout.getChildByName("logojavartlittle").buttonMode = true;
mainMenu.textAbout.getChildByName("logoeidos").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
mainMenu.textAbout.getChildByName("logoeidos").buttonMode = true;
} else {
if (qpulmenuclip == "CreditsClip"){
if (MovieClip(mainMenu.getChildByName("textAbout")) != null){
MovieClip(mainMenu.getChildByName("textAbout")).alpha = 0;
};
if (MovieClip(mainMenu.getChildByName("textCredits")) != null){
MovieClip(mainMenu.getChildByName("textCredits")).alpha = 1;
};
mainMenu.textCredits.getChildByName("javartlogo").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
mainMenu.textCredits.getChildByName("javartlogo").buttonMode = true;
} else {
if (qpulmenuclip == "Help"){
if (MovieClip(mainMenu.getChildByName("help")) != null){
MovieClip(mainMenu.getChildByName("help")).alpha = 1;
};
};
};
};
} else {
if (mainMenu.currentFrame == 98){
} else {
if (mainMenu.currentFrame == 126){
mainMenu.stop();
MovieClip(mainMenu.getChildByName("xclose")).enabled = true;
MovieClip(mainMenu.getChildByName("xclose")).buttonMode = true;
mainMenu.getChildByName("xclose").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
} else {
if (mainMenu.currentFrame == 152){
mainMenu.gotoAndStop(39);
};
};
};
};
};
};
};
};
break;
case STATUS_GAME:
if (infoBar != null){
if (infoBar.x > 639){
infoBar.x = logInterpolate(infoBar.x, 639, 2);
} else {
if (infoBar.x != targetInfo){
infoBar.x = logInterpolate(infoBar.x, targetInfo, 2);
};
};
};
if (bg.width < bgTargetW){
if (((!(gameOver)) && (!(win)))){
bg.width = int(Math.ceil(logInterpolate(bg.width, bgTargetW, 2)));
bg.x = (((640 - bg.width) / 2) + ((bgTargetW - 640) / 2));
if (bg.width >= bgTargetW){
bg.scaleX = 1;
bg.x = 0;
if (infoBar == null){
if (lang == 0){
infoBar = new InfoBar();
} else {
infoBar = new InfoBarIta();
};
infoBar.x = 659;
infoBar.y = (30 + minesBar.height);
infoBar.useHandCursor = true;
infoBar.mouseEnabled = true;
bg.addChild(infoBar);
infoBar.addEventListener(MouseEvent.MOUSE_OVER, infoOver);
infoBar.addEventListener(MouseEvent.MOUSE_OUT, infoOut);
};
};
} else {
bg.width = int(Math.floor(logInterpolate(bg.width, 0, 2)));
bg.x = (((640 - bg.width) / 2) + ((bgTargetW - 640) / 2));
if (bg.width <= 0){
showScreen(quitTarget);
};
};
};
if (((win) && ((endingLoops == -1)))){
if (bonusButton != null){
bonusButton.scaleX = logInterpolate(bonusButton.scaleX, 0, 2);
bonusLeft.alpha = logInterpolate(bonusLeft.alpha, 0, 2);
if (bonusButton.scaleX <= 0.05){
bg.removeChild(bonusButton);
bg.removeChild(bonusLeft);
nextLevelButton = new ButtonNextLevel();
nextLevelButton.x = 320;
nextLevelButton.y = bonusButton.y;
nextLevelButton.scaleX = 0;
nextLevelButton.addEventListener(MouseEvent.CLICK, mouseClickNext);
nextLevelButton.addEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
nextLevelButton.addEventListener(MouseEvent.MOUSE_OUT, buttonOutListener);
bg.addChild(nextLevelButton);
bonusButton = null;
};
};
if (((!((nextLevelButton == null))) && (!((nextLevelButton.scaleX == 1))))){
nextLevelButton.scaleX = logInterpolate(nextLevelButton.scaleX, 1, 2);
if (nextLevelButton.scaleX >= 1){
nextLevelButton.scaleX = 1;
};
};
};
if (curTime != -1){
if (!timerPaused){
diff = (getTimer() - curTime);
text = "";
min = 0;
sec = 0;
dec = 0;
min = Math.floor((diff / 60000));
if (min < 10){
text = (("0" + min).substr(0, 2) + ":");
} else {
text = (("" + min).substr(0, 2) + ":");
};
sec = Math.floor(((diff % 60000) / 1000));
if (sec < 10){
text = (text + (("0" + sec).substr(0, 2) + ":"));
} else {
text = (text + (("" + sec).substr(0, 2) + ":"));
};
dec = Math.floor((diff % 1000));
if (("" + dec).substr(0, 2).length < 2){
text = (text + ("0" + ("" + dec).substr(0, 2)));
} else {
text = (text + ("" + dec).substr(0, 2));
};
timer.text = text;
timer.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
};
};
if (cascadeTiles.length != 0){
processCascadeVector(false);
};
if (flagActive){
flag = arrFlag[bonusFlagX][bonusFlagY];
if (Math.abs((1 - flag.scaleY)) < 0.2){
flag.scaleY = 1;
};
if (flag.scaleY != 1){
flag.scaleY = logInterpolate(flag.scaleY, 1, 2);
};
if (flag.scaleY == 1){
flagActive = false;
bonusButton.enabled = true;
startTimer();
};
val = ((0xFF * (flag.scaleY - 1)) / 6);
flag.transform.colorTransform = new ColorTransform(1, 1, 1, 1, val, val, val);
};
if (bonusActive){
if (!flagActive){
if (bonus == null){
bonusWait = 0;
if (currentLocation == 1){
bonus = new tumbleweedcla();
} else {
if (currentLocation == 2){
bonus = new pigeoncla();
} else {
if (currentLocation == 3){
bonus = new huskywalkcla();
};
};
};
bonus.x = bonusX;
bonus.y = bonusY;
if ((((bonus.x > bonusTargetX)) || ((((currentLocation == 2)) && ((bonusFlagX > (gridWidth / 2))))))){
bonus.scaleX = -1;
};
bonus.alpha = 0;
bonus.name = "bonus";
bonus.buttonMode = false;
bonus.mouseChildren = true;
bg.addChild(bonus);
bonus.play();
};
if ((((((currentLocation == 2)) && ((bonus.currentFrame == 115)))) || (((((!((currentLocation == 2))) && ((bonus.x == bonusTargetX)))) && ((bonus.y == bonusTargetY)))))){
if ((((currentLocation == 3)) && ((bonus.name == "bonus")))){
bg.removeChild(bonus);
bonus = new huskydiggcla();
bonus.x = bonusTargetX;
bonus.y = bonusTargetY;
bonus.buttonMode = false;
bonus.mouseChildren = true;
if (bonus.x > bonusTargetX){
bonus.scaleX = -1;
};
bg.addChild(bonus);
bonus.play();
};
if (((!((currentLocation == 3))) || (((!((bonusWait == 0))) && (((getTimer() - bonusWait) >= 2000)))))){
if (bonus.scaleX != 2){
bonus.scaleX = (bonus.scaleX + ((2 - bonus.scaleX) / 6));
if (bonus.scaleX > 2){
bonus.scaleX = 2;
};
};
if (bonus.scaleY != 2){
bonus.scaleY = (bonus.scaleY + ((2 - bonus.scaleY) / 6));
if (bonus.scaleY > 2){
bonus.scaleY = 2;
};
};
bonus.alpha = (bonus.alpha - 0.05);
};
if (bonusWait == 0){
bonusWait = getTimer();
if (currentLocation != 3){
bonus.stop();
};
addFlag(bonusFlagX, bonusFlagY);
arrFlag[bonusFlagX][bonusFlagY].scaleY = 6;
arrFlag[bonusFlagX][bonusFlagY].transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF);
flagActive = true;
snd = new FlagSound();
snd.play();
if (currentLocation != 3){
bonus.transform.colorTransform = new ColorTransform(2, 2, 2);
bonus.filters = [new BlurFilter(2, 2, 1)];
};
};
if ((((((((currentLocation == 3)) && (((getTimer() - bonusWait) >= 3500)))) || (((!((currentLocation == 3))) && (((getTimer() - bonusWait) >= 1500)))))) || ((bonus.alpha <= 0)))){
bg.removeChild(bonus);
bonus = null;
bonusWait = 0;
bonusActive = false;
};
} else {
if (bonus.alpha < 1){
bonus.alpha = (bonus.alpha + 0.2);
};
if (bonus.x < bonusTargetX){
bonus.x = (bonus.x + 2);
} else {
if (bonus.x > bonusTargetX){
bonus.x = (bonus.x - 2);
};
};
if ((((currentLocation == 1)) || ((currentLocation == 3)))){
if (bonus.y < bonusTargetY){
bonus.y++;
} else {
if (bonus.y > bonusTargetY){
bonus.y--;
};
};
};
};
};
};
if (PlayerAnim == -1){
return;
};
if ((((Player.currentFrame >= Player.totalFrames)) || ((((PlayerAnim == 5)) && ((explosion.currentFrame >= explosion.totalFrames)))))){
endAnimation(false);
};
if ((((PlayerAnim == 0)) && ((Player.currentFrame == 9)))){
snd = new JumpSound();
snd.play();
};
if (PlayerAnim == 5){
if (explosion.currentFrame <= 2){
whiteFlash.alpha = (explosion.currentFrame / 2);
} else {
if (explosion.currentFrame <= 47){
whiteFlash.alpha = (1 - (Math.log((explosion.currentFrame - 2)) / 3.85));
} else {
whiteFlash.alpha = 0;
};
};
whiteFlash.alpha = (whiteFlash.alpha + ((whiteFlash.alpha * Math.random()) - (whiteFlash.alpha / 8)));
};
break;
case STATUS_ENDING:
if (movEndingScreen.currentFrame == 119){
movEndingScreen.stop();
movEndingScreen.nextFrame();
movEndingScreen.about.getChildByName("logojavartlittle").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
movEndingScreen.about.getChildByName("logojavartlittle").buttonMode = true;
movEndingScreen.about.getChildByName("logoeidos").addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
movEndingScreen.about.getChildByName("logoeidos").buttonMode = true;
movEndingScreen["about"].play();
};
break;
};
}
public function enableGUI(enable:Boolean):void{
if (restartButton != null){
restartButton.enabled = (restartButton.mouseEnabled = enable);
};
if (exitButton != null){
exitButton.enabled = (exitButton.mouseEnabled = enable);
};
if (bonusButton != null){
bonusButton.enabled = (bonusButton.mouseEnabled = ((((((enable) && ((bonusNumber > 0)))) && (!(win)))) && (!(gameOver))));
};
if (nextLevelButton != null){
nextLevelButton.enabled = (nextLevelButton.mouseEnabled = enabled);
};
}
public function mouseDown(event:MouseEvent):void{
}
public function processCascadeVector(processAll:Boolean):void{
var dist:int;
var goOn:Boolean;
var index:int;
var tile:Array;
var tX:int;
var tY:int;
if (cascadeTiles.length != 0){
dist = cascadeTiles[0][2];
goOn = (cascadeTiles[0][3] == 0);
index = 0;
if (processAll){
index = (cascadeTiles.length - 1);
while (index >= 0) {
tile = cascadeTiles[index];
tX = tile[0];
tY = tile[1];
arrTile[tX][tY].gotoAndStop(3);
if (bg.getChildByName(((("number" + tX) + ",") + tY)) != null){
bg.getChildByName(((("number" + tX) + ",") + tY)).alpha = 1;
bg.getChildByName(((("number" + tX) + ",") + tY)).visible = true;
};
cascadeTiles.pop();
index--;
};
} else {
index = 0;
while (((((true) && (!((cascadeTiles.length == 0))))) && ((index < cascadeTiles.length)))) {
tile = cascadeTiles[index];
if (tile[2] > dist){
if (goOn){
goOn = false;
dist = tile[2];
} else {
break;
};
};
tX = tile[0];
tY = tile[1];
if (tile[3] == 0){
arrTile[tX][tY].gotoAndStop(3);
if (((((!((tX == cellTargetX))) || (!((tY == cellTargetY))))) && (!((bg.getChildByName(((("number" + tX) + ",") + tY)) == null))))){
bg.getChildByName(((("number" + tX) + ",") + tY)).alpha = 1;
};
cascadeTiles.splice(index, 1);
if ((((((cellTargetX == tX)) && ((cellTargetY == tY)))) && (!((Player == null))))){
Player.y++;
} else {
if (clic0 == null){
clic0 = new Clic0();
clic0.play();
};
};
} else {
if (tile[3] == 1){
arrTile[tX][tY].gotoAndPlay(4);
if (((((!((tX == cellTargetX))) || (!((tY == cellTargetY))))) && (!((bg.getChildByName(((("number" + tX) + ",") + tY)) == null))))){
bg.getChildByName(((("number" + tX) + ",") + tY)).alpha = 0.5;
};
tile[3] = 0;
cascadeTiles[index] = tile;
if ((((((cellTargetX == tX)) && ((cellTargetY == tY)))) && (!((Player == null))))){
Player.y++;
};
index++;
};
};
};
};
if (cascadeTiles.length == 0){
clic0 = null;
};
};
}
public function endAnimation(end:Boolean):void{
var ii:int;
var jj:int;
switch (PlayerAnim){
case 0:
checkResult = 0;
PlayerAnim = -1;
bg.removeChild(Player);
checkCell(cellTargetX, cellTargetY);
if (!end){
sortCascadeVector();
};
processCascadeVector(end);
if ((((checkResult == 0)) && (!(end)))){
setAnim(1, cellTargetX, cellTargetY, 5, -40);
};
break;
case 1:
bg.removeChild(Player);
PlayerAnim = -1;
showElement(cellTargetX, cellTargetY, true);
break;
case 2:
bg.removeChild(Player);
PlayerAnim = -1;
if (arrFlag[cellTargetX][cellTargetY] == null){
addFlag(cellTargetX, cellTargetY);
} else {
if (arrFlag[cellTargetX][cellTargetY].currentFrame == 1){
arrFlag[cellTargetX][cellTargetY].gotoAndStop(2);
arrTile[cellTargetX][cellTargetY].gotoAndStop(1);
} else {
bg.removeChild(arrFlag[cellTargetX][cellTargetY]);
arrFlag[cellTargetX][cellTargetY] = null;
arrTile[cellTargetX][cellTargetY].addEventListener(MouseEvent.MOUSE_OVER, mouseOverCasella);
arrTile[cellTargetX][cellTargetY].addEventListener(MouseEvent.MOUSE_OUT, mouseOutCasella);
arrTile[cellTargetX][cellTargetY].addEventListener(MouseEvent.CLICK, mouseClickCasella);
arrTile[cellTargetX][cellTargetY].addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
arrTile[cellTargetX][cellTargetY].addEventListener(KeyboardEvent.KEY_UP, keyUp);
flagsNum--;
minesLeft.text = ("" + (minesNum - flagsNum));
minesLeft.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
};
};
showElement((cellTargetX - 1), cellTargetY, true);
break;
case 3:
if (endingLoops == 0){
ChiediNextExit();
endingLoops = -1;
enableGUI(true);
};
if (ywClip == null){
ywClip = new YouWinClip();
ywClip.x = 320;
ywClip.y = 240;
bg.addChild(ywClip);
ywClip.play();
};
if (endingLoops > 0){
endingLoops--;
};
Player.gotoAndPlay(28);
break;
case 4:
if (endingLoops == 0){
ii = 0;
while (ii < gridWidth) {
jj = 0;
while (jj < gridHeight) {
arrTile[ii][jj].useHandCursor = false;
if (arrFlag[ii][jj] != null){
arrFlag[ii][jj].useHandCursor = false;
};
jj++;
};
ii++;
};
goClip = new GameOverClip();
goSound = new GameoverSound();
goSound.play();
goClip.x = 320;
goClip.y = 240;
bg.addChild(goClip);
goClip.play();
endingLoops = -1;
};
if (endingLoops > 0){
endingLoops--;
};
Player.gotoAndPlay(0);
break;
case 5:
bg.removeChild(explosion);
explosion = null;
bg.removeChild(Player);
PlayerAnim = -1;
Player = null;
setAnim(4, cellTargetX, cellTargetY, 0, -40);
break;
};
}
public function pauseTimer():void{
if (timerPaused){
return;
};
timerPaused = true;
pausedTime = getTimer();
}
public function partition(a:Array, left:int, right:int):int{
var i:int = (left - 1);
var j:int = right;
while (true) {
do {
++i;
} while (cascadeTiles[i][2] < cascadeTiles[right][2]);
while (cascadeTiles[right][2] < cascadeTiles[--j][2]) {
if (j == left){
break;
};
};
if (i >= j){
break;
};
swap(i, j);
};
swap(i, right);
return (i);
}
public function switchLocation():void{
switch (currentLocation){
case 1:
bonusNumber = 1;
initLevel(10, 15, 14, 349, 105);
break;
case 2:
initLevel(14, 14, 20, 300, 89);
break;
case 3:
initLevel(15, 17, 25, 320, 70);
break;
};
}
public function mouseClickBandiera(event:MouseEvent):void{
var queryStr:String;
var params:Array;
var inqueryStr:String;
var inparams:Array;
var leftvar:Number;
var rightvar:Number;
if (ctrlDown){
queryStr = String(event.target);
params = queryStr.split("right", 2);
inqueryStr = params[0];
inparams = inqueryStr.split("left", 2);
leftvar = inparams[1];
rightvar = params[1];
setAnim(2, leftvar, rightvar, -15, -45);
};
}
public function addChildByVal(obj:DisplayObject, val:int):void{
var index:int = startIndex;
index = startIndex;
while (index < bg.numChildren) {
if (bg.getChildAt(index).y > val){
break;
};
index++;
};
bg.addChildAt(obj, index);
}
public function mouseOutCasella(event:MouseEvent):void{
event.target.gotoAndStop(1);
}
public function logInterpolate(val:Number, dest:Number, speed:Number):Number{
if (dest > val){
val = (val + ((dest - val) / speed));
if (val > dest){
val = dest;
};
} else {
if (val > dest){
val = (val + ((dest - val) / speed));
if (val < dest){
val = dest;
};
};
};
return (val);
}
private function playAnother(event:Event):void{
switch (event.target){
case goSound:
goSound.close();
goSound = null;
break;
case winSound:
winSound.close();
winSound = null;
break;
};
}
public function GoLink(website:String):void{
var website = website;
var request:URLRequest = new URLRequest(website);
navigateToURL(request, "_blank");
//unresolved jump
var _slot1 = e;
}
public function showElement(x:int, y:int, show:Boolean):void{
if ((((((x >= 0)) && ((x < gridWidth)))) && (!((arrFlag[x][y] == null))))){
arrFlag[x][y].visible = show;
};
if ((((((x >= 0)) && ((x < gridWidth)))) && (!((bg.getChildByName(((("number" + x) + ",") + y)) == null))))){
bg.getChildByName(((("number" + x) + ",") + y)).visible = show;
bg.getChildByName(((("number" + x) + ",") + y)).alpha = 1;
};
}
public function quickSort(a:Array, left:int, right:int):void{
if (right <= left){
return;
};
var i:int = partition(a, left, right);
quickSort(a, left, (i - 1));
quickSort(a, (i + 1), right);
}
public function mouseClickTorna(event:MouseEvent):void{
if (((!(win)) && (!(gameOver)))){
win = true;
};
removeHiScores();
bonusNumber = 1;
currentLocation = 1;
quitTarget = movMenuScreen;
bg.width = (bg.width - 0.1);
bg.removeChild(infoBar);
infoBar = null;
if (bg.contains(timer)){
bg.removeChild(timer);
};
if (bg.contains(minesLeft)){
bg.removeChild(minesLeft);
};
buttonOutListener(null);
if (bg.contains(bonusLeft)){
bg.removeChild(bonusLeft);
};
if (nextLevelButton != null){
nextLevelButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
exitButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
restartButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
if (bonusButton != null){
bonusButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
soundButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
gameStatus = STATUS_GAME;
}
override public function initGame():void{
this.stage.addEventListener(Event.ENTER_FRAME, update);
this.stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
this.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
this.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel);
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
this.stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
movLangScreen["engButton"].addEventListener(MouseEvent.CLICK, onButtonPress);
movLangScreen["engButton"].addEventListener(MouseEvent.CLICK, onButtonDown);
movLangScreen["itaButton"].addEventListener(MouseEvent.CLICK, onButtonPress);
movLangScreen["itaButton"].addEventListener(MouseEvent.CLICK, onButtonDown);
addChild(movLangScreen);
addChild(movTitleScreen);
addChild(movMenuScreen);
addChild(movPlayScreen);
addChild(movHiScoresScreen);
showScreen(null);
}
public function keyUp(event:KeyboardEvent):void{
ctrlDown = false;
}
public function mouseClickNext(event:MouseEvent):void{
var chi:int;
var i:int;
removeHiScores();
if (currentLocation < 3){
currentLocation++;
bonusNumber++;
quitTarget = movPlayScreen;
bg.width = (bg.width - 0.1);
bg.removeChild(infoBar);
infoBar = null;
bg.removeChild(timer);
bg.removeChild(minesLeft);
enableGUI(false);
if (bg.contains(tooltip)){
bg.removeChild(tooltip);
};
if (bg.contains(bonusLeft)){
bg.removeChild(bonusLeft);
};
if (nextLevelButton != null){
nextLevelButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
exitButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
restartButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
if (bonusButton != null){
bonusButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
soundButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
} else {
chi = bg.getChildIndex(soundButton);
i = (chi - 1);
while (i >= 0) {
bg.removeChildAt(i);
i--;
};
bg.removeChild(ywClip);
if (lang == 0){
movEndingScreen = new EndingScreen();
} else {
movEndingScreen = new EndingScreenIta();
};
bg.addChildAt(movEndingScreen, 0);
movEndingScreen.gotoAndPlay(0);
bg.removeChild(nextLevelButton);
bg.removeChild(soundButton);
buttonOutListener(null);
gameStatus = STATUS_ENDING;
};
}
public function ChiediNextExit():void{
var arr:Array = timer.text.split(":");
var score:int = int(Math.round(((((parseInt(arr[0]) * 60) + parseInt(arr[1])) + (parseInt(arr[2]) / 100)) * 100)));
if (lang == 0){
initHiScores((currentLocation - 1), true, score, timer.text, ("Your score is: " + score), 179, 65);
} else {
initHiScores((currentLocation - 1), true, score, timer.text, ("Il tuo punteggio è: " + score), 179, 65);
};
}
public function RemovingAll():void{
var i:int;
PlayerAnim = -1;
totcasok = 0;
flagsNum = 0;
if (bg != null){
i = bg.numChildren;
while (i--) {
bg.removeChildAt(i);
};
};
i = movPlayScreen.numChildren;
while (i--) {
movPlayScreen.removeChildAt(i);
};
}
override public function showMenuScreen():void{
showScreen(movMenuScreen);
}
public function setAnim(anim:int, x:int, y:int, offx:int, offy:int):void{
var _local6:Sound;
if (PlayerAnim != -1){
endAnimation(true);
if (((((!((Player == null))) && (bg.contains(Player)))) && (!(gameOver)))){
bg.removeChild(Player);
};
};
if (((!((checkResult == 0))) && (!((anim == 4))))){
return;
};
switch (anim){
case 0:
showElement(x, y, false);
Player = new pl_jump();
break;
case 1:
showElement(x, y, false);
Player = new pl_ok();
break;
case 2:
showElement((x - 1), y, false);
Player = new pl_flag();
_local6 = new FlagSound();
_local6.play();
break;
case 3:
showElement(x, y, false);
Player = new pl_win();
enableGUI(false);
endingLoops = 5;
break;
case 4:
showElement(x, y, false);
Player = new pl_lose();
endingLoops = 2;
break;
case 5:
showElement(x, y, false);
Player = new pl_lose();
explosion = new Explosion();
explosion.x = ((((20 * x) + tileStartX) - (20 * y)) + 20);
explosion.y = ((((10 * x) + tileStartY) + (10 * y)) + 35);
explosion.play();
whiteFlash = new MovieClip();
whiteFlash.graphics.beginFill(0xFFFFFF, 1);
whiteFlash.graphics.drawRect(0, 0, 640, 480);
whiteFlash.x = 0;
whiteFlash.y = 0;
whiteFlash.mouseEnabled = false;
whiteFlash.alpha = 0;
bg.addChild(whiteFlash);
break;
};
Player.x = ((((20 * x) + tileStartX) - (20 * y)) + offx);
Player.y = ((((10 * x) + tileStartY) + (10 * y)) + offy);
Player.mouseEnabled = false;
Player.visible = true;
Player.gotoAndPlay(1);
addChildByVal(Player, ((Player.y + Player.height) - 10));
if (anim == 5){
Player.gotoAndStop(1);
bg.addChildAt(explosion, (bg.getChildIndex(Player) + 1));
};
cellTargetX = x;
cellTargetY = y;
PlayerAnim = anim;
}
private function swap(i:int, j:int):void{
var swapper:Array = cascadeTiles[i];
cascadeTiles[i] = cascadeTiles[j];
cascadeTiles[j] = swapper;
}
public function buttonOutListener(event:MouseEvent):void{
if (bg.getChildByName("tooltip") != null){
bg.removeChild(bg.getChildByName("tooltip"));
};
if (((!((movEndingScreen == null))) && (movEndingScreen.contains(tooltip)))){
movEndingScreen.removeChild(tooltip);
};
}
public function mouseClickRico(event:MouseEvent):void{
if (((!(win)) && (!(gameOver)))){
win = true;
};
quitTarget = movPlayScreen;
bg.width = (bg.width - 0.1);
bg.removeChild(infoBar);
infoBar = null;
if (bg.contains(timer)){
bg.removeChild(timer);
};
if (bg.contains(minesLeft)){
bg.removeChild(minesLeft);
};
enableGUI(false);
buttonOutListener(null);
if (bg.contains(bonusLeft)){
bg.removeChild(bonusLeft);
};
removeHiScores();
if (nextLevelButton != null){
nextLevelButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
exitButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
restartButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
if (bonusButton != null){
bonusButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
};
soundButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonOverListener);
gameStatus = STATUS_GAME;
}
public function keyDown(event:KeyboardEvent):void{
if (((((((gameOver) || (win))) || (bonusActive))) || (!((gameStatus == STATUS_GAME))))){
return;
};
if (event.keyCode == Keyboard.CONTROL){
ctrlDown = true;
} else {
if (event.keyCode == Keyboard.SPACE){
freeMineBonus(null);
};
};
}
public function addFlag(leftvar:int, rightvar:int):void{
var newFlag:MovieClip;
if (flagsNum < minesNum){
newFlag = new flagclipcla();
newFlag.name = ((("bandileft" + leftvar) + "right") + rightvar);
newFlag.x = (((tileStartX - (20 * rightvar)) + (20 * leftvar)) + 20);
newFlag.y = (((tileStartY + (10 * rightvar)) + (10 * leftvar)) + 20);
newFlag.mouseEnabled = true;
newFlag.buttonMode = true;
newFlag.useHandCursor = true;
addChildByY(newFlag);
newFlag.gotoAndStop(1);
flagsNum++;
minesLeft.text = ("" + (minesNum - flagsNum));
minesLeft.setTextFormat(new TextFormat("Lucida Console", 36, null, true));
newFlag.addEventListener(MouseEvent.CLICK, mouseClickBandiera);
newFlag.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
newFlag.addEventListener(KeyboardEvent.KEY_UP, keyUp);
arrFlag[leftvar][rightvar] = newFlag;
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.MOUSE_OVER, mouseOverCasella);
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.MOUSE_OUT, mouseOutCasella);
arrTile[leftvar][rightvar].removeEventListener(MouseEvent.CLICK, mouseClickCasella);
arrTile[leftvar][rightvar].removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
arrTile[leftvar][rightvar].removeEventListener(KeyboardEvent.KEY_UP, keyUp);
arrTile[leftvar][rightvar].gotoAndStop(4);
};
}
public function mouseWheel(event:MouseEvent):void{
}
public function infoOut(event:MouseEvent):void{
if (infoBar != null){
targetInfo = 639;
};
}
override public function showTitleScreen():void{
showScreen(movTitleScreen);
}
public function showScreen(movScreen:Sprite):void{
var i:int;
var button:SimpleButton;
movTitleScreen.visible = false;
movMenuScreen.visible = false;
movPlayScreen.visible = false;
movHiScoresScreen.visible = false;
movLangScreen.visible = false;
if (movScreen != null){
movScreen.visible = true;
};
switch (movScreen){
case movLangScreen:
movLangScreen.gotoAndPlay(0);
gameStatus = STATUS_LANGUAGE;
break;
case movTitleScreen:
movTitleScreen.alpha = 1;
movTitleScreen["btnNext"].enabled = false;
movTitleScreen["btnNext"].addEventListener(MouseEvent.CLICK, onButtonPress);
movTitleScreen["btnNext"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
movTitleScreen.gotoAndPlay(0);
gameStatus = STATUS_TITLE;
break;
case movMenuScreen:
if (lang == 0){
mainMenu = new menumccla();
} else {
mainMenu = new menumcclaita();
};
movMenuScreen.addChild(mainMenu);
gameStatus = STATUS_MENU;
i = 0;
while (i < mainMenu.numChildren) {
if (mainMenu.getChildAt(i).name.search("button") != -1){
button = SimpleButton(mainMenu.getChildAt(i));
button.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
if (((!((button.name == "buttonSound"))) && (!((button.name == "buttonSoundOff"))))){
button.addEventListener(MouseEvent.CLICK, onButtonPress);
} else {
button.addEventListener(MouseEvent.CLICK, switchSound);
};
button.enabled = false;
};
i++;
};
mainMenu["buttonSound"].visible = (soundOn == 1);
mainMenu["buttonSoundOff"].visible = (soundOn == 0);
mainMenu.play();
break;
case movPlayScreen:
mainMenu = null;
RemovingAll();
switchLocation();
gameStatus = STATUS_GAME;
bgTargetW = bg.width;
bg.width = 0;
bg.x = 320;
break;
};
if ((((((gameStatus == STATUS_GAME)) && ((themeSound == null)))) || ((((gameStatus == STATUS_MENU)) && ((menuTheme == null)))))){
switchTheme = true;
};
}
public function addChildByY(obj:DisplayObject):void{
addChildByVal(obj, obj.y);
}
public function ChiediRetryExit():void{
}
public function buttonOverListener(event:MouseEvent):void{
tooltip = new TextField();
tooltip.name = "tooltip";
tooltip.mouseEnabled = false;
tooltip.selectable = false;
tooltip.autoSize = TextFieldAutoSize.LEFT;
tooltip.y = (soundButton.y - 45);
switch (event.target){
case exitButton:
if (lang == 0){
tooltip.text = "Exit current game";
} else {
tooltip.text = "Abbandona";
};
tooltip.x = 4;
break;
case restartButton:
if (lang == 0){
tooltip.text = "Restart Level";
} else {
tooltip.text = "Ricomincia";
};
tooltip.x = 4;
break;
case bonusButton:
if (lang == 0){
tooltip.text = "Free Mine";
} else {
tooltip.text = "Mina Libera";
};
tooltip.autoSize = TextFieldAutoSize.CENTER;
tooltip.x = int(Math.floor(((640 - tooltip.width) / 2)));
break;
case nextLevelButton:
if (lang == 0){
tooltip.text = "Go to the next level";
} else {
tooltip.text = "Livello Successivo";
};
tooltip.autoSize = TextFieldAutoSize.CENTER;
tooltip.x = int(Math.floor(((640 - tooltip.width) / 2)));
break;
case soundButton:
if (soundOn == 1){
if (lang == 0){
tooltip.text = "Sound OFF";
} else {
tooltip.text = "Suono OFF";
};
} else {
if (lang == 0){
tooltip.text = "Sound ON";
} else {
tooltip.text = "Suono ON";
};
};
tooltip.autoSize = TextFieldAutoSize.RIGHT;
break;
};
tooltip.antiAliasType = AntiAliasType.ADVANCED;
tooltip.setTextFormat(new TextFormat("Impact", 16));
tooltip.filters = [new GlowFilter(0xFFFFFF, 1, 4, 4, 3, 3)];
if (event.target == soundButton){
tooltip.x = (636 - tooltip.width);
};
if (gameStatus == STATUS_GAME){
bg.addChild(tooltip);
} else {
if (gameStatus == STATUS_ENDING){
movEndingScreen.addChild(tooltip);
};
};
}
}
}//package
Section 27
//minesweeper_backgroundcla (minesweeper_backgroundcla)
package {
import mx.core.*;
public class minesweeper_backgroundcla extends MovieClipAsset {
}
}//package
Section 28
//minesweeper_ButtonBonus (minesweeper_ButtonBonus)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonBonus extends ButtonAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 29
//minesweeper_ButtonExit (minesweeper_ButtonExit)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonExit extends ButtonAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 30
//minesweeper_ButtonNextLevel (minesweeper_ButtonNextLevel)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonNextLevel extends ButtonAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 31
//minesweeper_ButtonRestart (minesweeper_ButtonRestart)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonRestart extends ButtonAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 32
//minesweeper_ButtonSoundOff (minesweeper_ButtonSoundOff)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonSoundOff extends ButtonAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 33
//minesweeper_ButtonSoundOn (minesweeper_ButtonSoundOn)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ButtonSoundOn extends ButtonAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 34
//minesweeper_Clic0 (minesweeper_Clic0)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_Clic0 extends SoundAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 35
//minesweeper_ClickSound (minesweeper_ClickSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ClickSound extends SoundAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 36
//minesweeper_EndingScreen (minesweeper_EndingScreen)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_EndingScreen extends MovieClipAsset {
public var logojavartlittle:DisplayObject;
public var logoeidos:DisplayObject;
public var about:DisplayObject;
}
}//package
Section 37
//minesweeper_EndingScreenIta (minesweeper_EndingScreenIta)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_EndingScreenIta extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 38
//minesweeper_Explosion (minesweeper_Explosion)
package {
import mx.core.*;
public class minesweeper_Explosion extends MovieClipAsset {
}
}//package
Section 39
//minesweeper_ExplosionSound (minesweeper_ExplosionSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ExplosionSound extends SoundAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 40
//minesweeper_flagclipcla (minesweeper_flagclipcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_flagclipcla extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 41
//minesweeper_FlagSound (minesweeper_FlagSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_FlagSound extends SoundAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 42
//minesweeper_GameOverClip (minesweeper_GameOverClip)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_GameOverClip extends MovieClipAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 43
//minesweeper_GameoverSound (minesweeper_GameoverSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_GameoverSound extends SoundAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 44
//minesweeper_HiScoresScreen (minesweeper_HiScoresScreen)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_HiScoresScreen extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 45
//minesweeper_huskydiggcla (minesweeper_huskydiggcla)
package {
import mx.core.*;
public class minesweeper_huskydiggcla extends MovieClipAsset {
}
}//package
Section 46
//minesweeper_huskywalkcla (minesweeper_huskywalkcla)
package {
import mx.core.*;
public class minesweeper_huskywalkcla extends MovieClipAsset {
}
}//package
Section 47
//minesweeper_InfoBar (minesweeper_InfoBar)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_InfoBar extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 48
//minesweeper_InfoBarIta (minesweeper_InfoBarIta)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_InfoBarIta extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 49
//minesweeper_JumpSound (minesweeper_JumpSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_JumpSound extends SoundAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 50
//minesweeper_LangScreen (minesweeper_LangScreen)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_LangScreen extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 51
//minesweeper_menumccla (minesweeper_menumccla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_menumccla extends MovieClipAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 52
//minesweeper_menumcclaita (minesweeper_menumcclaita)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_menumcclaita extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 53
//minesweeper_MenuScreen (minesweeper_MenuScreen)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_MenuScreen extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 54
//minesweeper_MenuTheme (minesweeper_MenuTheme)
package {
import mx.core.*;
public class minesweeper_MenuTheme extends SoundAsset {
}
}//package
Section 55
//minesweeper_mineclipcla (minesweeper_mineclipcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_mineclipcla extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 56
//minesweeper_MinesBar (minesweeper_MinesBar)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_MinesBar extends SpriteAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 57
//minesweeper_moscowsnowcla (minesweeper_moscowsnowcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_moscowsnowcla extends SpriteAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 58
//minesweeper_numbersclipcla (minesweeper_numbersclipcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_numbersclipcla extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 59
//minesweeper_pigeoncla (minesweeper_pigeoncla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pigeoncla extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 60
//minesweeper_pl_flag (minesweeper_pl_flag)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pl_flag extends MovieClipAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 61
//minesweeper_pl_jump (minesweeper_pl_jump)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pl_jump extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 62
//minesweeper_pl_lose (minesweeper_pl_lose)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pl_lose extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 63
//minesweeper_pl_ok (minesweeper_pl_ok)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pl_ok extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 64
//minesweeper_pl_win (minesweeper_pl_win)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_pl_win extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 65
//minesweeper_PlayScreen (minesweeper_PlayScreen)
package {
import mx.core.*;
public class minesweeper_PlayScreen extends SpriteAsset {
}
}//package
Section 66
//minesweeper_ThemeSound (minesweeper_ThemeSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_ThemeSound extends SoundAsset {
public var logojavartlittle:DisplayObject;
public var logoeidos:DisplayObject;
public var about:DisplayObject;
}
}//package
Section 67
//minesweeper_tileclip1cla (minesweeper_tileclip1cla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_tileclip1cla extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 68
//minesweeper_tileclip2cla (minesweeper_tileclip2cla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_tileclip2cla extends MovieClipAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 69
//minesweeper_tileclip3cla (minesweeper_tileclip3cla)
package {
import mx.core.*;
public class minesweeper_tileclip3cla extends MovieClipAsset {
}
}//package
Section 70
//minesweeper_tilecollisioncla (minesweeper_tilecollisioncla)
package {
import mx.core.*;
public class minesweeper_tilecollisioncla extends SpriteAsset {
}
}//package
Section 71
//minesweeper_TimerBar (minesweeper_TimerBar)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_TimerBar extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 72
//minesweeper_TitleScreen (minesweeper_TitleScreen)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_TitleScreen extends MovieClipAsset {
public var logojavartlittle:DisplayObject;
public var logoeidos:DisplayObject;
public var about:DisplayObject;
public var btnNext:DisplayObject;
}
}//package
Section 73
//minesweeper_TitleScreenIta (minesweeper_TitleScreenIta)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_TitleScreenIta extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 74
//minesweeper_tumbleweedcla (minesweeper_tumbleweedcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_tumbleweedcla extends MovieClipAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 75
//minesweeper_usadirtcla (minesweeper_usadirtcla)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_usadirtcla extends SpriteAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 76
//minesweeper_WinSound (minesweeper_WinSound)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_WinSound extends SoundAsset {
public var xclose:DisplayObject;
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var buttonMore:DisplayObject;
public var textCredits:DisplayObject;
public var btnNext:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 77
//minesweeper_YouWinClip (minesweeper_YouWinClip)
package {
import flash.display.*;
import mx.core.*;
public class minesweeper_YouWinClip extends MovieClipAsset {
public var help:DisplayObject;
public var logojavartlittle:DisplayObject;
public var buttonPlay:DisplayObject;
public var xclose:DisplayObject;
public var buttonCredits:DisplayObject;
public var about:DisplayObject;
public var javartlogo:DisplayObject;
public var buttonHelp:DisplayObject;
public var logoeidos:DisplayObject;
public var textAbout:DisplayObject;
public var itaButton:DisplayObject;
public var textCredits:DisplayObject;
public var buttonMore:DisplayObject;
public var btnNext:DisplayObject;
public var engButton:DisplayObject;
public var buttonSoundOff:DisplayObject;
public var buttonAbout:DisplayObject;
public var buttonSound:DisplayObject;
}
}//package
Section 78
//minesweeperPreloader (minesweeperPreloader)
package {
import com.morpheme.g5.*;
public dynamic class minesweeperPreloader extends G5Preloader {
public function minesweeperPreloader(){
super("minesweeper", 640, 480);
}
}
}//package