Frame 1
function getNetDebugVersion() {
return(1);
}
function NetDebugConfig() {
}
function attachNetDebugConfigFunctions(ndc) {
ndc.setDebug = function (setval) {
this.m_debug = setval;
};
ndc.getDebug = function () {
return(this.m_debug);
};
for (var _local3 in ndc) {
if (typeof(ndc[_local3]) == "object") {
attachNetDebugConfigFunctions(ndc[_local3]);
}
}
}
function getDefaultNetDebugConfig(iscontroller) {
if (_global.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (iscontroller) {
_local2 = "Controller_Config_Info";
}
_global.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_global.netDebugConfigSO.data.config == undefined) {
_global.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_global.netDebugConfigSO.flush();
return(_global.netDebugConfigSO.data.config);
}
function getRealDefaultNetDebugConfig() {
var _local1 = new NetDebugConfig();
_local1.m_debug = true;
_local1.client = new NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
function NetDebugEvent() {
}
function NetDebugErrorEvent(dataobj) {
this.init();
this.EventType = "NetDebugError";
this.Error = dataobj;
}
function NetDebugTraceEvent(traceobj) {
this.init();
this.EventType = "Trace";
this.Trace = traceobj;
}
function NetDebugTraceNetServicesEvent(w, s, n, m) {
this.init();
this.EventType = "NetServicesTrace";
this.Trace = m;
this.Who = w;
this.Severity = s;
this.Number = n;
}
function NetDebugNCEvent() {
}
function NetDebugResultEvent(resultobj) {
this.init();
this.EventType = "Result";
this.Result = resultobj;
}
function NetDebugStatusEvent(statusobj) {
this.init();
this.EventType = "Status";
this.Status = statusobj;
}
function NetDebugConnectEvent(args) {
this.init();
this.EventType = "Connect";
this.ConnectString = args[0];
if (args[1] != null) {
this.UserName = args[1];
}
if (args[2] != null) {
this.Password = args[2];
}
}
function NetDebugCallEvent(args) {
this.init();
this.EventType = "Call";
this.MethodName = args[0];
this.Parameters = new Array();
var _local4 = args.length;
var _local2 = 2;
while (_local2 < _local4) {
this.Parameters[_local2 - 2] = args[_local2];
_local2++;
}
}
function NetDebugCloseEvent() {
this.init();
this.EventType = "Close";
}
function NetDebugAddHeaderEvent(args) {
this.init();
this.EventType = "AddHeader";
this.HeaderName = args[0];
this.MustUnderstand = args[1];
if (args[2] != null) {
this.HeaderObject = args[2];
}
}
function NetDebugRtmpLogEvent(infoobj) {
this.initDate();
this.EventType = "Trace";
this.Source = "Flash Communication Server";
this.Info = infoobj;
this.Trace = infoobj.description;
}
function NetDebugDuplicateNCDErrorEvent() {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Message = "NCD_ALREADY_RUNNING";
}
function NetDebugFailedSendErrorEvent(ev) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.OriginalEvent = ev;
this.Message = "NCD_FAILED_TO_SEND_EVENT";
}
function NetDebugInfoErrorEvent(infoobj, mes) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Info = infoobj;
if (mes != null) {
this.Message = mes;
}
}
function NetDebugReceiveCallEvent(mName, args) {
this.init();
this.EventType = "ReceivedCall";
this.MethodName = mName;
this.Parameters = args;
}
function netDebugProxyConnect() {
this.attachDebug();
var _local3 = arguments[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (arguments[0].charAt(4) == ":") {
this.m_Protocol = _local3;
} else {
this.m_Protocol = arguments[0].substr(0, 5);
}
} else {
this.m_Protocol = "http";
}
this.sendClientEvent(new NetDebugConnectEvent(arguments));
if (this.isRealTime()) {
this.m_ConnectString = arguments[0];
getNetDebug().sendCommand(new StartRTMPTraceCommand(arguments[0]));
var _local4 = this.realconnect.apply(this, arguments);
this.realcall("@getClientID", new RTMPClientIDResponse(arguments[0], this));
return(_local4);
}
return(this.realconnect.apply(this, arguments));
}
function netDebugProxyCall() {
this.attachDebug();
this.sendClientEvent(new NetDebugCallEvent(arguments));
this.addNetDebugHeader();
if (this.m_Config.app_server) {
arguments[1] = new NetDebugResponseProxy(this, arguments[1]);
return(this.realcall.apply(this, arguments));
}
return(this.realcall.apply(this, arguments));
}
function netDebugProxyClose() {
this.attachDebug();
this.sendClientEvent(new NetDebugCloseEvent());
if (this.isRealTime()) {
getNetDebug().sendCommand(new StopRTMPTraceCommand(this.m_ConnectString, this.m_ClientId));
}
var _local2 = this.realclose();
getNetDebug().removeNetConnection(this);
return(_local2);
}
function netDebugProxyAddHeader() {
this.attachDebug();
this.sendClientEvent(new NetDebugAddHeaderEvent(arguments));
return(this.realaddHeader.apply(this, arguments));
}
function RTMPClientIDResponse(cs, nc) {
this.m_ConnectString = cs;
this.m_NC = nc;
}
function NetDebugResponseProxy(source, original) {
this.m_SourceNC = source;
this.m_OriginalNR = original;
}
function GlobalLocalConnection(iscontroller, receiver, domainname) {
this.maxConnections = 10;
var _local5 = "_NetDebugLocalToDebugMovie";
var _local7 = "_NetDebugLocalToController";
var _local4 = null;
if (iscontroller) {
_local4 = _local7;
this.sendnames = new Array();
this.sendnames.push(_local5);
var _local3 = 0;
while (_local3 < this.maxConnections) {
this.sendnames.push(_local5 + _local3);
_local3++;
}
this.maxConnections = 0;
} else {
_local4 = _local5;
this.sendnames = new Array();
this.sendnames.push(_local7);
}
this.setDomainName(domainname);
if (_global.g_NetDebugLocalConnection == undefined) {
_global.g_NetDebugLocalConnection = new LocalConnection();
_global.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_global.g_NetDebugLocalConnection.m_Receiver = receiver;
_global.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_global.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_global.g_NetDebugLocalConnection.connect(_local4)) {
var _local6 = false;
var _local3 = 0;
while (_local3 < this.maxConnections) {
if (_global.g_NetDebugLocalConnection.connect(_local4 + _local3)) {
_local6 = true;
break;
}
_local3++;
}
if (!_local6) {
if (iscontroller) {
receiver.onReceiveError(new NetDebugDuplicateNCDErrorEvent());
}
}
}
}
}
function LocalCommand() {
}
function UpdateNetDebugConfigCommand(dataobj) {
this.init("updateConfig", dataobj);
}
function GetConfigCommand() {
this.init("getConfig", null);
}
function StartRTMPTraceCommand(cs) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
this.init("startRealTimeTrace", _local3);
}
function AddRTMPClientCommand(cs, cid) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
_local3.clientid = cid;
this.init("addRealTimeClient", _local3);
}
function StopRTMPTraceCommand(cs, cid) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
_local3.clientid = cid;
this.init("stopRealTimeTrace", _local3);
}
function NetDebug() {
this.m_ncs = new Array();
this.m_Config = getDefaultNetDebugConfig();
this.m_glc = new GlobalLocalConnection(false, this);
this.m_glc.sendCommand(new GetConfigCommand());
this.m_NextNewId = 0;
}
function getNetDebug() {
return(_global.netDebugInstance);
}
_global.RsDataProviderClass = function () {
this.init();
};
RsDataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
mx.events.EventDispatcher.initialize(this);
};
RsDataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var _local2 = {eventName:"updateAll"};
viewRef.modelChanged(_local2);
};
RsDataProviderClass.prototype.addItemAt = function (index, value) {
if (!this.checkLocal()) {
return(undefined);
}
if (index < 0) {
return(undefined);
}
if (index < this.length) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
}
this.items[index].__ID__ = this.uniqueID++;
var _local3 = {eventName:"addItems", firstItem:index, lastItem:index};
this.updateViews(_local3);
};
RsDataProviderClass.prototype.addItem = function (value) {
if (!this.checkLocal()) {
return(undefined);
}
this.addItemAt(this.length, value);
};
RsDataProviderClass.prototype.removeItemAt = function (index) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
var _local4 = this.items[index];
this.items.splice(index, 1);
var _local3 = {eventName:"deleteItems", firstItem:index, lastItem:index};
this.updateViews(_local3);
return(_local4);
};
RsDataProviderClass.prototype.removeAll = function () {
if (!this.checkLocal()) {
return(undefined);
}
this.items = new Array();
this.updateViews({eventName:"removeItems", firstItem:0, lastItem:this.length - 1});
};
RsDataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
var _local3 = this.getItemID(index);
this.items[index] = itemObj;
this.items[index].__ID__ = _local3;
this.updateViews({eventName:"updateItems", firstItem:index, lastItem:index});
};
RsDataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
RsDataProviderClass.prototype.addProperty("length", RsDataProviderClass.prototype.getLength, null);
RsDataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
RsDataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
RsDataProviderClass.prototype.sortItems = function (compareFunc, order) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sort(compareFunc);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({eventName:"sort"});
};
RsDataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({eventName:"sort", fieldName:fieldName, order:order});
};
RsDataProviderClass.prototype.updateViews = function (eventObj) {
eventObj.type = "modelChanged";
this.dispatchEvent(eventObj);
var _local4 = this.views.length;
if (_local4 > 0) {
switch (eventObj.eventName) {
case "addItems" :
eventObj.event = "addRows";
break;
case "updateItems" :
eventObj.event = "updateRows";
break;
case "removeItems" :
eventObj.event = "deleteRows";
}
eventObj.firstRow = eventObj.firstItem;
eventObj.lastRow = eventObj.lastItem;
var _local2 = 0;
while (_local2 < _local4) {
this.views[_local2].modelChanged(eventObj);
_local2++;
}
}
};
_global.RecordSet = function (columnNames) {
if (this.mTitles != null) {
this.views = new Array();
return(undefined);
}
this.init();
if (this.serverinfo == null) {
if (this.serverInfo != null) {
this.serverinfo = this.serverInfo;
}
}
if (this.serverinfo == null) {
this.mTitles = columnNames;
return(undefined);
}
if (this.serverinfo.version != 1) {
NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
return(undefined);
}
this.mTitles = this.serverinfo.columnNames;
this.mRecordsAvailable = 0;
this.setData(((this.serverinfo.cursor == null) ? 0 : (this.serverinfo.cursor - 1)), this.serverinfo.initialData);
if (this.serverinfo.initialData.length != this.serverinfo.totalCount) {
this.mRecordSetID = this.serverinfo.id;
if (this.mRecordSetID != null) {
this.serviceName = ((this.serverinfo.serviceName == null) ? "RecordSet" : (this.serverinfo.serviceName));
this.mTotalCount = this.serverinfo.totalCount;
this.mDeliveryMode = "ondemand";
this.mAllNotified = false;
this.mOutstandingRecordCount = 0;
} else {
NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
this.serverinfo = null;
};
RecordSet.prototype = new RsDataProviderClass();
Object.registerClass("RecordSet", RecordSet);
RecordSet.prototype._setParentService = function (service) {
this.gateway_conn = service.nc;
};
RecordSet.prototype.getRecordSetService = function () {
if (this.mRecordSetService == null) {
if (this.gateway_conn == null) {
this.gateway_conn = NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
this.gateway_conn = this.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
this.gateway_conn.setupRecordset();
this.gateway_conn.setDebugId("RecordSet " + this.mRecordSetID);
}
this.mRecordSetService = this.gateway_conn.getService(this.serviceName, this);
if (this.mRecordSetService == null) {
NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
this.mRecordSetService = 0;
}
}
return(this.mRecordSetService);
};
RecordSet.prototype.getColumnNames = function () {
return(this.mTitles);
};
RecordSet.prototype.getLength = function () {
if (this.mRecordSetID != null) {
return(this.mTotalCount);
}
return(this.items.length);
};
RecordSet.prototype.addProperty("length", RecordSet.prototype.getLength, null);
RecordSet.prototype.getItemAt = function (index) {
if ((index < 0) || (index >= this.length)) {
return(null);
}
if (this.mRecordSetID == null) {
return(this.items[index]);
}
this.requestRecord(index);
var _local3 = this.items[index];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
};
RecordSet.prototype.setField = function (index, fieldName, value) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
this.items[index][fieldName] = value;
this.updateViews({eventName:"updateItems", firstItem:index, lastItem:index});
};
RecordSet.prototype.filter = function (filterFunction, context) {
if (!this.checkLocal()) {
return(undefined);
}
var _local4 = new RecordSet(this.mTitles);
var _local5 = this.length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = this.getItemAt(_local3);
if (((_local2 != null) && (_local2 != 1)) && (filterFunction(_local2, context))) {
_local4.addItem(_local2);
}
_local3++;
}
return(_local4);
};
RecordSet.prototype.sort = function (compareFunc) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sort(compareFunc);
this.updateViews({eventName:"sort"});
};
RecordSet.prototype.isLocal = function () {
return(this.mRecordSetID == null);
};
RecordSet.prototype.isFullyPopulated = function () {
return(this.isLocal());
};
RecordSet.prototype.getNumberAvailable = function () {
if (this.isLocal()) {
return(this.length);
}
return(this.mRecordsAvailable);
};
RecordSet.prototype.setDeliveryMode = function (mode, pagesize, numPrefetchPages) {
this.mDeliveryMode = mode;
this.stopFetchAll();
if (mode == "ondemand") {
return(undefined);
}
if (pagesize == null) {
pagesize = this.views[0].getRowCount();
if (pagesize == null) {
pagesize = 25;
}
}
if (mode == "page") {
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
this.mPageSize = pagesize;
this.mNumPrefetchPages = numPrefetchPages;
} else if (mode == "fetchall") {
this.stopFetchAll();
this.startFetchAll(pagesize);
} else {
NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
};
RecordSet.prototype.getRecords_Result = function (info) {
this.setData(info.Cursor - 1, info.Page);
this.mOutstandingRecordCount = this.mOutstandingRecordCount - info.Page.length;
this.updateViews({eventName:"updateItems", firstItem:info.Cursor - 1, lastItem:((info.Cursor - 1) + info.Page.length) - 1});
if ((this.mRecordsAvailable == this.mTotalCount) && (!this.mAllNotified)) {
this.updateViews({eventName:"allRows"});
this.mRecordSetService.release();
this.mAllNotified = true;
this.mRecordSetID = null;
this.mRecordSetService = null;
}
};
RecordSet.prototype.release_Result = function () {
};
RecordSet.prototype.arrayToObject = function (anArray) {
if (this.mTitles == null) {
NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local4 = new Object();
var _local5 = anArray.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = this.mTitles[_local2];
if (_local3 == null) {
_local3 = ("column" + _local2) + 1;
}
_local4[_local3] = anArray[_local2];
_local2++;
}
return(_local4);
};
RecordSet.prototype.setData = function (start, dataArray) {
var _local5 = dataArray.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local2 + start;
var _local4 = this.items[_local3];
if ((_local4 != null) && (_local4 != 1)) {
NetServices.trace("RecordSet", "warning", 106, "Already got record # " + recordIndex);
} else {
this.mRecordsAvailable = this.mRecordsAvailable + 1;
}
this.items[_local3] = this.arrayToObject(dataArray[_local2]);
this.items[_local3].__ID__ = this.uniqueID++;
_local2++;
}
};
RecordSet.prototype.requestOneRecord = function (index) {
if (this.items[index] == null) {
this.getRecordSetService().getRecords(this.mRecordSetID, index + 1, 1);
this.mOutstandingRecordCount++;
this.items[index] = 1;
this.updateViews({eventName:"fetchRows", firstItem:index, lastItem:index});
}
};
RecordSet.prototype.requestRecord = function (index) {
if (this.mDeliveryMode != "page") {
this.requestOneRecord(index);
return(undefined);
}
var _local2 = int(index / this.mPageSize) * this.mPageSize;
var _local3 = (_local2 + (this.mPageSize * (this.mNumPrefetchPages + 1))) - 1;
this.requestRecordRange(_local2, _local3);
};
RecordSet.prototype.requestRecordRange = function (index, lastIndex) {
var _local9 = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= this.length) {
lastIndex = this.length - 1;
}
while (index <= lastIndex) {
while ((index <= lastIndex) && (this.items[index] != null)) {
index++;
}
var _local3 = index;
while ((index <= lastIndex) && (this.items[index] == null)) {
this.mOutstandingRecordCount++;
this.items[index] = 1;
index++;
}
var _local4 = index - 1;
if (_local3 <= _local4) {
this.getRecordSetService().getRecords(this.mRecordSetID, _local3 + 1, (_local4 - _local3) + 1);
_local9 = _local4;
this.updateViews({eventName:"fetchRows", firstItem:_local3, lastItem:_local4});
}
}
return(_local9);
};
RecordSet.prototype.startFetchAll = function (pagesize) {
this.mDataFetcher.disable();
this.mDataFetcher = new RsDataFetcher(this, pagesize);
};
RecordSet.prototype.stopFetchAll = function () {
this.mDataFetcher.disable();
this.mDataFetcher = null;
};
RecordSet.prototype.checkLocal = function () {
if (this.isLocal()) {
return(true);
}
NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(false);
};
_global.RsDataFetcher = function (recordSet, increment) {
this.mRecordSet = recordSet;
this.mRecordSet.addView(this);
this.mIncrement = increment;
this.mNextRecord = 0;
this.mEnabled = true;
this.doNext();
};
RsDataFetcher.prototype.disable = function () {
this.mEnabled = false;
this.mRecordSet.removeView(this);
};
RsDataFetcher.prototype.doNext = function () {
if (!this.mEnabled) {
return(undefined);
}
while (true) {
if (this.mNextRecord >= this.mRecordSet.length) {
return(undefined);
}
this.mHighestRequested = this.mRecordSet.requestRecordRange(this.mNextRecord, (this.mNextRecord + this.mIncrement) - 1);
this.mNextRecord = this.mNextRecord + this.mIncrement;
if (this.mHighestRequested > 0) {
return(undefined);
}
}
};
RsDataFetcher.prototype.modelChanged = function (eventObj) {
if (((eventObj.eventName == "updateItems") && (eventObj.firstItem <= this.mHighestRequested)) && (eventObj.lastItem >= this.mHighestRequested)) {
this.doNext();
}
if (eventObj.eventName == "allRows") {
this.disable();
}
};
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local2 = this.service.client;
result._setParentService(this.service);
var _local3 = this.methodName + "_Result";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](result);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local5 = this.service.client;
var _local6 = this.methodName + "_Status";
if (typeof(_local5[_local6]) == "function") {
_local5[_local6](result);
} else if (typeof(_local5.onStatus) == "function") {
_local5.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: <") + result.level) + "> ") + result.description);
}
};
_global.NetServiceProxy = function (nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
};
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
};
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetConnection.prototype.getService = function (serviceName, client) {
var _local2 = new NetServiceProxy(this, serviceName, client);
return(_local2);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.AppendToGatewayUrl = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.ReplaceGatewayUrl = function (newUrl) {
this.connect(newUrl);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(this.uri);
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices.gatewayUrl = gatewayUrl;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local2 = new NetConnection();
_local2.connect(url);
return(_local2);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
return(null);
}
return(_root._url.substring(0, _local2));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
trace(_local1);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
_global.copyProperties = function (to, from) {
for (var _local3 in from) {
if ((_local3 == "__proto__") || (_local3 == "function")) {
continue;
}
if (typeof(from[_local3]) == "object") {
if (to[_local3] == undefined) {
to[_local3] = new from[_local3].__proto__.constructor();
}
copyProperties(to[_local3], from[_local3]);
} else {
to[_local3] = from[_local3];
}
}
};
_global.copyObject = function (obj) {
if (typeof(obj) == "object") {
var _local1 = new obj.__proto__.constructor();
copyProperties(_local1, obj);
return(_local1);
}
return(obj);
};
_global.objectToStringTree = function (obj, openstr, typesepstr, valuesepstr, closestr) {
var _local1 = new StringLineAdder(obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
return(_local1.getString());
};
_global.objectToListboxTree = function (listbox, obj, openstr, typesepstr, valuesepstr, closestr) {
new ListLineAdder(listbox, obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
};
_global.StringLineAdder = function (obj, renderer) {
this.linerenderer = renderer;
this.output = "";
nestedObjectDump(0, null, obj, this);
};
StringLineAdder.prototype.getString = function () {
return(this.output);
};
StringLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local2 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local2 != null) {
this.output = this.output + (_local2 + newline);
}
return(true);
};
_global.ListLineAdder = function (listbox, obj, renderer) {
this.linerenderer = renderer;
this.output_lb = listbox;
nestedObjectDump(0, null, obj, this);
};
ListLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local2 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local2 != null) {
this.output_lb.addItem(_local2);
}
return(true);
};
_global.TreeLineRenderer = function (pre, typedelim, valuedelim, post) {
this.init(pre, typedelim, valuedelim, post);
};
TreeLineRenderer.prototype.init = function (pre, typedelim, valuedelim, post) {
this.prechar = pre;
this.typechar = typedelim;
this.valuechar = valuedelim;
this.postchar = post;
};
TreeLineRenderer.prototype.getLine = function (level, objname, objtype, objvalue, objnum) {
var _local3 = "";
var _local2 = 0;
while (_local2 < level) {
_local3 = _local3 + "\t";
_local2++;
}
var _local6 = this.valuechar;
if ((objname != null) && (objtype != "object")) {
_local3 = _local3 + (((this.prechar + objtype) + this.typechar) + objname);
} else if (objtype == "object") {
if (typeof(objvalue) == "number") {
_local3 = _local3 + (((this.prechar + objtype) + this.typechar) + objname);
_local3 = _local3 + ((_local6 + "object#") + objvalue);
objvalue = null;
} else {
_local3 = _local3 + (((((this.prechar + objtype) + "#") + objnum) + this.typechar) + objname);
}
} else {
_local3 = _local3 + (this.prechar + objtype);
_local6 = this.typechar;
}
if (objvalue != null) {
_local3 = _local3 + (_local6 + objvalue);
}
_local3 = _local3 + this.postchar;
return(_local3);
};
_global.nestedObjectDump = function (level, objname, obj, lineadder) {
if (level == 0) {
nestedObjectDump.callcount++;
nestedObjectDump.objcount = -1;
}
if (obj == null) {
return(lineadder.addLine(level, objname, "undefined"));
}
if (typeof(obj) == "function") {
return(lineadder.addLine(level, objname, "function"));
}
if (typeof(obj) == "object") {
if ((obj.__nestedObjectDump_id != undefined) && (obj.__nestedObjectDump_ref == nestedObjectDump.callcount)) {
return(lineadder.addLine(level, objname, "object", obj.__nestedObjectDump_id));
}
nestedObjectDump.objcount++;
if (lineadder.addLine(level, objname, "object", null, nestedObjectDump.objcount) == nestedObjectDump.skip) {
return(nestedObjectDump.proceed);
}
obj.__nestedObjectDump_id = nestedObjectDump.objcount;
obj.__nestedObjectDump_ref = nestedObjectDump.callcount;
var _local4 = new Array();
var _local3 = new Array();
for (var _local10 in obj) {
if (((_local10 == "__proto__") || (_local10 == "__nestedObjectDump_id")) || (_local10 == "__nestedObjectDump_ref")) {
continue;
}
if (typeof(obj[_local10]) == "object") {
_local3.push(_local10);
} else {
_local4.push(_local10);
}
}
if ((_local3.length == 0) && (_local4.length == 0)) {
if ((typeof(obj.toString) == "function") && (obj.toString() != "")) {
return(lineadder.addLine(level + 1, null, "string", obj.toString()));
}
if (lineadder.noProps != undefined) {
lineadder.noProps(level + 1);
return(nestedObjectDump.proceed);
}
}
_local4.sort();
_local3.sort();
var _local7 = true;
var _local8 = _local4.length;
var _local2 = 0;
while (_local2 < _local8) {
if (nestedObjectDump(level + 1, _local4[_local2], obj[_local4[_local2]], lineadder) == nestedObjectDump.stop) {
_local7 = false;
break;
}
_local2++;
}
if (_local7) {
var _local9 = _local3.length;
_local2 = 0;
while (_local2 < _local9) {
if (!nestedObjectDump(level + 1, _local3[_local2], obj[_local3[_local2]], lineadder)) {
_local7 = false;
}
_local2++;
}
}
return(nestedObjectDump.proceed);
}
return(lineadder.addLine(level, objname, typeof(obj), obj));
};
nestedObjectDump.proceed = 1;
nestedObjectDump.skip = 2;
nestedObjectDump.stop = 3;
nestedObjectDump.callcount = 0;
nestedObjectDump.objcount = 0;
Object.registerClass("NetDebugConfig", NetDebugConfig);
NetDebugEvent.prototype.init = function () {
this.EventType = "DebugEvent";
this.Source = "Client";
this.MovieUrl = unescape(_root._url);
this.initDate();
};
NetDebugEvent.prototype.initDate = function () {
var _local2 = new Date();
this.Date = _local2;
this.Time = _local2.getTime();
};
NetDebugErrorEvent.prototype = new NetDebugEvent();
NetDebugTraceEvent.prototype = new NetDebugEvent();
NetDebugTraceNetServicesEvent.prototype = new NetDebugEvent();
NetDebugNCEvent.prototype = new NetDebugEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
NetDebugStatusEvent.prototype = new NetDebugNCEvent();
NetDebugConnectEvent.prototype = new NetDebugNCEvent();
NetDebugCallEvent.prototype = new NetDebugNCEvent();
NetDebugCloseEvent.prototype = new NetDebugNCEvent();
NetDebugAddHeaderEvent.prototype = new NetDebugNCEvent();
NetDebugRtmpLogEvent.prototype = new NetDebugNCEvent();
NetDebugDuplicateNCDErrorEvent.prototype = new NetDebugNCEvent();
NetDebugFailedSendErrorEvent.prototype = new NetDebugNCEvent();
NetDebugInfoErrorEvent.prototype = new NetDebugNCEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
_global.StripNCDEventToMinmal = function (ev) {
var _local2 = new Object();
if (ev.EventType != null) {
_local2.EventType = ev.EventType;
}
if (ev.Source != null) {
_local2.Source = ev.Source;
}
if (ev.MovieUrl != null) {
_local2.MovieUrl = ev.MovieUrl;
}
if (ev.Date != null) {
_local2.Date = ev.Date;
}
if (ev.Time != null) {
_local2.Time = ev.Time;
}
if (ev.Protocol != null) {
_local2.Protocol = ev.Protocol;
}
if (ev.DebugId != null) {
_local2.DebugId = ev.DebugId;
}
return(_local2);
};
NetConnection.prototype.attachDebug = function () {
if (!this.m_Attached) {
this.m_Attached = true;
this.m_HeaderAdded = false;
this.m_Config = new NetDebugConfig();
copyProperties(this.m_Config, getNetDebug().m_Config);
this.m_Protocol = "none";
this.m_Id = getNetDebug().addNetConnection(this);
}
};
NetConnection.prototype.sendDebugEvent = function (eventobj) {
eventobj.Protocol = this.m_Protocol;
eventobj.DebugId = this.m_Id;
return(getNetDebug().onEvent(eventobj));
};
NetConnection.prototype.sendServerEvent = function (eventobj) {
eventobj.MovieUrl = unescape(_root._url);
if (!this.sendDebugEvent(eventobj)) {
}
};
NetConnection.prototype.sendClientEvent = function (eventobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
if ((this.m_Config.client.http && (this.m_Protocol == "http")) || (this.m_Config.client.rtmp && (this.m_Protocol.substr(0, 4) == "rtmp"))) {
if (!this.sendDebugEvent(eventobj)) {
}
}
}
};
NetConnection.prototype.addNetDebugHeader = function () {
if (!this.m_HeaderAdded) {
this.m_HeaderAdded = true;
if ((this.m_Config.m_debug && (this.m_Config.app_server.m_debug)) && (this.m_Protocol == "http")) {
this.realaddHeader("amf_server_debug", true, this.m_Config.app_server);
} else {
this.realaddHeader("amf_server_debug", true, undefined);
}
}
};
NetConnection.prototype.updateConfig = function (config) {
this.attachDebug();
copyProperties(this.m_Config, config);
this.m_HeaderAdded = false;
};
NetConnection.prototype.isRealTime = function () {
return(this.m_Protocol.substr(0, 4) == "rtmp");
};
NetConnection.prototype.setupRecordset = function () {
this.attachDebug();
this.m_Config.client.http = this.m_Config.client.recordset;
};
NetConnection.prototype.setDebugId = function (id) {
this.attachDebug();
this.m_Id = id;
};
NetConnection.prototype.getDebugId = function () {
this.attachDebug();
return(this.m_Id);
};
NetConnection.prototype.trace = function (traceobj) {
this.attachDebug();
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
this.sendDebugEvent(new NetDebugTraceEvent(traceobj));
}
};
NetConnection.prototype.getDebugConfig = function () {
this.attachDebug();
return(this.m_Config);
};
if (!NetConnection.prototype.netDebugProxyFunctions) {
NetConnection.prototype.netDebugProxyFunctions = true;
NetConnection.prototype.realconnect = NetConnection.prototype.connect;
NetConnection.prototype.realcall = NetConnection.prototype.call;
NetConnection.prototype.realclose = NetConnection.prototype.close;
NetConnection.prototype.realaddHeader = NetConnection.prototype.addHeader;
NetConnection.prototype.connect = netDebugProxyConnect;
NetConnection.prototype.call = netDebugProxyCall;
NetConnection.prototype.close = netDebugProxyClose;
NetConnection.prototype.addHeader = netDebugProxyAddHeader;
}
RTMPClientIDResponse.prototype.onResult = function (cid) {
this.m_NC.m_ClientId = cid;
getNetDebug().sendCommand(new AddRTMPClientCommand(this.m_ConnectString, cid));
};
NetDebugResponseProxy.prototype.onDebugEvents = function (debugevents) {
var _local3 = debugevents.length;
var _local2 = 0;
while (_local2 < _local3) {
this.m_SourceNC.sendServerEvent(debugevents[_local2]);
_local2++;
}
};
NetDebugResponseProxy.prototype.onResult = function (resultobj) {
this.m_SourceNC.sendClientEvent(new NetDebugResultEvent(resultobj));
this.m_OriginalNR.onResult(resultobj);
};
NetDebugResponseProxy.prototype.onStatus = function (statusobj) {
this.m_SourceNC.sendClientEvent(new NetDebugStatusEvent(statusobj));
if (this.m_OriginalNR.onStatus != undefined) {
this.m_OriginalNR.onStatus(statusobj);
} else {
_global.System.onStatus(statusobj);
}
};
NetDebugResponseProxy.prototype.__resolve = function (name) {
this.m_SourceNC.sendClientEvent(new NetDebugReceiveCallEvent(name, arguments));
this.m_OriginalNR[name].apply(arguments);
};
GlobalLocalConnection.prototype.setDomainName = function (domainname) {
if ((domainname != null) && (domainname != "")) {
this.sendPrefix = domainname + ":";
} else {
this.sendPrefix = "";
}
};
GlobalLocalConnection.prototype.send = function (dataobj) {
return(this.sendRaw("onData", dataobj));
};
GlobalLocalConnection.prototype.sendCommand = function (commandobj) {
return(this.sendRaw("onCommand", commandobj));
};
GlobalLocalConnection.prototype.sendRaw = function (functionname, obj) {
var _local4 = true;
var _local5 = this.sendnames.length;
var _local3 = 0;
while (_local3 < _local5) {
_local4 = _local4 & _global.g_NetDebugLocalConnection.send(this.sendPrefix + this.sendnames[_local3], functionname, obj);
_local3++;
}
return(_local4);
};
LocalCommand.prototype.init = function (commandname, dataobj) {
this.command = commandname;
this.data = dataobj;
};
UpdateNetDebugConfigCommand.prototype = new LocalCommand();
GetConfigCommand.prototype = new LocalCommand();
StartRTMPTraceCommand.prototype = new LocalCommand();
AddRTMPClientCommand.prototype = new LocalCommand();
StopRTMPTraceCommand.prototype = new LocalCommand();
NetDebug.prototype.addNetConnection = function (nc) {
this.m_ncs.push(nc);
return(this.m_NextNewId++);
};
NetDebug.prototype.removeNetConnection = function (nc) {
var _local3 = this.m_ncs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (nc == this.m_ncs[_local2]) {
this.m_ncs.splice(_local2, 1);
break;
}
_local2++;
}
};
NetDebug.prototype.sendDebugEvent = function (eventobj) {
if (!this.m_glc.send(eventobj)) {
this.m_glc.send(new NetDebugFailedSendErrorEvent(StripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
};
NetDebug.prototype.sendCommand = function (commandobj) {
return(this.m_glc.sendCommand(commandobj));
};
NetDebug.prototype.requestNewConfig = function () {
return(this.sendCommand(new GetConfigCommand()));
};
NetDebug.prototype.updateConfig = function (config) {
copyProperties(this.m_Config, config);
var _local3 = this.m_ncs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this.m_ncs[_local2] != null) {
this.m_ncs[_local2].updateConfig(config);
}
_local2++;
}
};
NetDebug.prototype.sendStatus = function (statusobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
return(this.m_glc.send(new NetDebugStatusEvent(statusobj)));
}
};
NetDebug.prototype.onEvent = function (eventobj) {
return(this.sendDebugEvent(eventobj));
};
NetDebug.prototype.onEventError = function (errorobj) {
return(this.sendDebugEvent(new NetDebugErrorEvent(errorobj)));
};
NetDebug.prototype.onReceiveCommand = function (commandobj) {
this[commandobj.command](commandobj.data);
};
NetDebug.prototype.onReceiveError = function (errorobj) {
this.sendDebugEvent(new NetDebugErrorEvent(errorobj));
};
NetDebug.prototype.traceNetServices = function (who, severity, number, message) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceNetServicesEvent(who, severity, number, message))) {
}
}
};
NetDebug.prototype.trace = function (traceobj) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceEvent(traceobj))) {
}
}
};
if (_global.netDebugInstance == undefined) {
_global.netDebugInstance = new NetDebug();
}
NetDebug.trace = function (obj) {
getNetDebug().trace(obj);
};
NetDebug.traceNetServices = function (who, severity, number, message) {
getNetDebug().traceNetServices(who, severity, number, message);
};
NetDebug.getVersion = function () {
return(getNetDebugVersion());
};
NetDebug.globalOnStatus = function (statusobj) {
getNetDebug().sendStatus(statusobj);
};
if (_global.System.onStatus == undefined) {
_global.System.onStatus = NetDebug.globalOnStatus;
}
_global._debug = function () {
var _local3 = {Source:"Client"};
if (arguments.length == 1) {
_local3.eventType = "Event: " + arguments;
_local3.args = arguments;
} else {
_local3.eventType = arguments.shift();
_local3.args = arguments;
}
if (_global.debugFilter.length > 0) {
if (_local3.eventType.indexOf(_global.debugFilter) == -1) {
return(undefined);
}
}
getNetDebug().sendDebugEvent(_local3);
};
_debug("Debugger ON", {});
if (this.inited == undefined) {
this.inited = true;
com.novelgames.flashgames.MainBlobipopDemo.initialize(this);
this.getEnterPosition = function (from_str) {
if (from_str.substr(0, 3) == "bg_") {
from_str = "bacteria_game";
}
_debug("gna chte donne ma p'sition", from_str);
return({x:this.decor.playerPlace._x, y:this.decor.playerPlace._y, cam:this.decor.cam_chamdedal});
};
this.onSpecialCollision = function (instance, chimbo) {
switch (instance) {
case "player_1" :
if (_level0.member_id > 0) {
_level0.server.send("<reqgam p='0' />");
}
break;
case "player_2" :
if (_level0.member_id > 0) {
_level0.server.send("<reqgam p='1' />");
}
break;
case "go_totaj" :
_level0.goto_chimberg("mountain.to_taj");
break;
case "go_chamdedal" :
_level0.goto_chimberg("mountain.chample_dedal");
}
};
this.onSpecialCollisionOut = function (instance, chimbo) {
switch (instance) {
case "player_1" :
case "player_2" :
if (_level0.member_id <= 0) {
break;
}
_level0.server.send("<creqgam/>");
}
};
this.onCustomMessage = function (type, _xml) {
this.kashgame.onCustomMessage(type, _xml);
};
this.cleanBeforeUnload = function () {
clearInterval(decor.cabine.interval);
};
this.prepareToStart = function (chimbo_mc) {
if (this.req0 == "1") {
decor.temoin_p1.gotoAndStop(2);
decor.cabine.socle_p1.play();
} else if (this.req1 == "1") {
decor.temoin_p2.gotoAndStop(2);
decor.cabine.socle_p2.play();
}
};
collclip._xscale = (collclip._yscale = 100);
collclip._x = (collclip._y = 0);
collclip._visible = false;
speCollClip._xscale = (speCollClip._yscale = 100);
speCollClip._x = (speCollClip._y = 0);
speCollClip._visible = false;
decor._xscale = (decor._yscale = 100);
decor._x = (decor._y = 0);
decor.template_character._visible = false;
_level0.chimberg_name = _level0.localString("mountain.bac_expert");
}
stop();
Symbol 15 MovieClip [MuteButton] Frame 1
#initclip 50
Object.registerClass("MuteButton", com.novelgames.flashgames.commonAS2.MuteButton);
#endinitclip
Symbol 118 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 19
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 2
play();
Symbol 180 MovieClip Frame 20
stop();
Symbol 204 MovieClip Frame 30
stop();
Symbol 206 MovieClip [clickDetector] Frame 1
#initclip 37
Object.registerClass("clickDetector", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 13
stop();
Symbol 211 MovieClip Frame 27
stop();
Symbol 211 MovieClip Frame 40
stop();
Symbol 211 MovieClip Frame 53
stop();
Symbol 239 MovieClip [arrow] Frame 1
#initclip 38
Object.registerClass("arrow", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
stop();
Symbol 239 MovieClip [arrow] Frame 10
gotoAndStop (1);
Symbol 271 MovieClip Frame 1
stop();
Symbol 272 MovieClip [Ball] Frame 1
#initclip 39
Object.registerClass("Ball", com.novelgames.flashgames.bouncingAS2.Ball);
#endinitclip
Symbol 309 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 14
stop();
Symbol 309 MovieClip Frame 26
stop();
Symbol 320 MovieClip [weight] Frame 1
#initclip 40
Object.registerClass("weight", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 322 MovieClip [empty] Frame 1
#initclip 41
Object.registerClass("empty", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 360 MovieClip [Game] Frame 1
#initclip 42
Object.registerClass("Game", com.novelgames.flashgames.bouncingAS2.Game);
#endinitclip
Symbol 361 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 376 MovieClip [Explode] Frame 1
#initclip 43
Object.registerClass("Explode", com.novelgames.flashgames.bouncingAS2.Explode);
#endinitclip
Symbol 378 MovieClip [Star] Frame 1
#initclip 44
Object.registerClass("Star", com.novelgames.flashgames.bouncingAS2.Star);
#endinitclip
Symbol 465 MovieClip [Title] Frame 1
#initclip 45
Object.registerClass("Title", com.novelgames.flashgames.commonAS2.Title);
#endinitclip
Symbol 485 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 69
stop();
Symbol 510 MovieClip [Instructions] Frame 1
#initclip 46
Object.registerClass("Instructions", com.novelgames.flashgames.commonAS2.Instructions);
#endinitclip
Symbol 516 MovieClip [MessageLevel] Frame 1
#initclip 47
Object.registerClass("MessageLevel", com.novelgames.flashgames.bouncingAS2.MessageLevel);
#endinitclip
Symbol 530 MovieClip [MessagePlayAgain] Frame 1
#initclip 48
Object.registerClass("MessagePlayAgain", com.novelgames.flashgames.bouncingAS2.MessagePlayAgain);
#endinitclip
Symbol 559 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 85
gotoAndPlay ("loop");
Symbol 565 MovieClip [Message] Frame 1
#initclip 49
Object.registerClass("Message", com.novelgames.flashgames.bouncingAS2.Message);
#endinitclip
Symbol 575 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 103
gotoAndStop (1);
Symbol 577 MovieClip Frame 1
stop();
Symbol 577 MovieClip Frame 103
gotoAndStop (1);
Symbol 631 MovieClip Frame 1
stop();
_level0.gotoTime(this);
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Instance of Symbol 586 MovieClip in Symbol 631 MovieClip Frame 1
onClipEvent (load) {
zsort_me.apply(this);
}
Symbol 634 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 635 MovieClip [__Packages.com.wiicade.Wii] Frame 0
class com.wiicade.Wii
{
static var instance;
var keyboard, lc;
function Wii () {
if (!_global.Wii) {
_global.Wii = this;
} else {
return;
}
wii = System.capabilities.os == "Nintendo Wii";
com.wiicade.WiiRemote.init();
com.wiicade.KeyboardController.init();
com.wiicade.Browser.init();
var _local3 = 0;
while (_local3 < 4) {
remotes[_local3] = new com.wiicade.WiiRemote(_local3);
_local3++;
}
if (!isWii()) {
keyboard = new com.wiicade.KeyboardController(wiicommand);
}
lc = new LocalConnection();
lc.connect("wii");
lc.wiicommand = function (packet) {
_global.Wii.wiicommand(packet);
};
if (isWii()) {
getURL (((("javascript:initializeWiiCadeAPI(20, " + Stage.width) + ", ") + Stage.height) + ");");
}
}
static function getInstance() {
if (!_global.Wii) {
instance = new com.wiicade.Wii();
}
return(_global.Wii);
}
static function init() {
_global.Wii = null;
instance = new com.wiicade.Wii();
}
static function isWii() {
var _local1 = getInstance();
return(_local1.wii || (_local1.virtualized));
}
function wiicommand(packet) {
var _local4 = getInstance();
var _local2 = (4294901760 & packet) >> 16;
var _local3 = packet & 65535;
if (_local2 < 5) {
_local4.remotes[_local2 - 1].buttonsUpdated(_local3);
} else if (_local2 < 9) {
_local4.remotes[_local2 - 5].twistUpdated(_local3);
} else if (_local2 < 13) {
_local4.remotes[_local2 - 9].distanceUpdated(_local3);
} else if (_local2 == 13) {
parseFlags(_local3);
} else if (_local2 < 18) {
parseAttachment(_local3, _local2 - 14);
} else if (_local2 < 22) {
_local4.remotes[_local2 - 18].cursorXUpdated(_local3);
} else if (_local2 < 32) {
_local4.remotes[_local2 - 22].cursorYUpdated(_local3);
}
}
function parseFlags(flags) {
var _local7 = primary;
var _local3;
var _local4;
var _local5 = 8;
primary = flags & 3;
if (primary != _local7) {
getRemote(_local7).updatePrimary(false);
getRemote(primary).updatePrimary(true);
}
virtualized = (4 & _local5) > 0;
var _local2 = 0;
while (_local2 < 4) {
_local3 = getRemote(_local2);
_local4 = (_local5 & flags) > 0;
if (_local3.isConnected() != _local4) {
_local3.connectedUpdated(_local4);
}
_local5 = _local5 << 1;
_local2++;
}
}
function parseAttachment(data, remote) {
var _local4 = getRemote(remote);
var _local3 = _local4.getAttachment();
var _local2;
var _local1;
if ((data & 256) == 0) {
if (!(_local3 instanceof com.wiicade.Nunchuk)) {
_local3 = new com.wiicade.Nunchuk(_local4);
_local4.updateAttachment(_local3);
}
_local3.updateButtons(data & 3);
_local2 = (data & 28) >>> 2;
_local1 = (data & 224) >>> 5;
if ((_local2 & 4) > 0) {
_local2 = _local2 | 65528;
}
if ((_local1 & 4) > 0) {
_local1 = _local1 | 65528;
}
_local2 = Math.floor((_local2 * 128) / 3);
_local1 = Math.floor((_local1 * 128) / 3);
_local3.updateStick(_local2, _local1);
}
}
static function getRemote(identity) {
var _local1 = getInstance();
if ((!_local1.activated[identity]) && (_local1.isWii())) {
getURL (("javascript:activateWiiRemoteFeature(" + identity) + ", null, true);");
_local1.activated[identity] = true;
}
return(_local1.remotes[identity]);
}
static function getPrimaryRemote() {
var _local1 = getInstance();
return(_local1.remotes[_local1.primary]);
}
static var COMMAND_BUTTONS = 1;
static var COMMAND_TWIST = 5;
static var COMMAND_DISTANCE = 9;
static var COMMAND_FLAGS = 13;
static var COMMAND_ATTACH = 14;
static var COMMAND_CURSORX = 18;
static var COMMAND_CURSORY = 22;
var remotes = new Array();
var activated = new Array();
var primary = 0;
var virtualized = false;
var wii = true;
}
Symbol 636 MovieClip [__Packages.com.wiicade.KeyboardController] Frame 0
class com.wiicade.KeyboardController
{
static var keyCodes, buttonCodes;
var callback;
function KeyboardController (callback) {
this.callback = callback;
Key.addListener(this);
Mouse.addListener(this);
if (!keyCodes) {
init();
}
}
static function init() {
keyCodes = new Array();
buttonCodes = new Array();
keyCodes[37] = com.wiicade.WiiRemote.BUTTON_LEFT;
keyCodes[38] = com.wiicade.WiiRemote.BUTTON_UP;
keyCodes[39] = com.wiicade.WiiRemote.BUTTON_RIGHT;
keyCodes[40] = com.wiicade.WiiRemote.BUTTON_DOWN;
keyCodes[65] = com.wiicade.WiiRemote.BUTTON_1;
keyCodes[83] = com.wiicade.WiiRemote.BUTTON_2;
keyCodes[68] = com.wiicade.WiiRemote.BUTTON_A;
keyCodes[32] = com.wiicade.WiiRemote.BUTTON_B;
keyCodes[187] = com.wiicade.WiiRemote.BUTTON_PLUS;
keyCodes[189] = com.wiicade.WiiRemote.BUTTON_MINUS;
buttonCodes[com.wiicade.WiiRemote.BUTTON_LEFT] = 37;
buttonCodes[com.wiicade.WiiRemote.BUTTON_UP] = 38;
buttonCodes[com.wiicade.WiiRemote.BUTTON_RIGHT] = 39;
buttonCodes[com.wiicade.WiiRemote.BUTTON_DOWN] = 40;
buttonCodes[com.wiicade.WiiRemote.BUTTON_1] = 65;
buttonCodes[com.wiicade.WiiRemote.BUTTON_2] = 83;
buttonCodes[com.wiicade.WiiRemote.BUTTON_A] = 68;
buttonCodes[com.wiicade.WiiRemote.BUTTON_B] = 32;
buttonCodes[com.wiicade.WiiRemote.BUTTON_PLUS] = 187;
buttonCodes[com.wiicade.WiiRemote.BUTTON_MINUS] = 189;
}
function onKeyDown() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap | keyCodes[_local2];
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onKeyUp() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap & (~keyCodes[_local2]);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onMouseDown() {
bitmap = bitmap | com.wiicade.WiiRemote.BUTTON_A;
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseUp() {
bitmap = bitmap & (~com.wiicade.WiiRemote.BUTTON_A);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseMove() {
callback((com.wiicade.Wii.COMMAND_CURSORX << 16) | _xmouse);
callback((com.wiicade.Wii.COMMAND_CURSORY << 16) | _ymouse);
}
static function getButtonMappingForKey(keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(keyCodes[keyCode]);
}
static function getKeyMappingForButton(buttonCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(buttonCodes[buttonCode]);
}
static function setKeyMapping(buttonCode, keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
var _local1 = buttonCodes[buttonCode];
var _local2 = keyCodes[keyCode];
if (_local1) {
keyCodes[_local1] = null;
}
if (_local2) {
buttonCodes[_local2] = null;
}
keyCodes[keyCode] = buttonCode;
buttonCodes[buttonCode] = keyCode;
}
var bitmap = 0;
}
Symbol 637 MovieClip [__Packages.com.wiicade.WiiRemote] Frame 0
class com.wiicade.WiiRemote
{
var identity, attachment, activated, dispatchEvent, oldcursorx, oldcursory;
function WiiRemote (identity) {
this.identity = identity;
allowRotate = com.wiicade.Wii.isWii();
attachment = new com.wiicade.Nunchuk(this);
activated = new Array();
if (this.identity == 0) {
primary = true;
connected = true;
}
mx.events.EventDispatcher.initialize(this);
}
static function init() {
}
function getIdentity() {
return(identity);
}
function isPrimary() {
return(primary);
}
function isConnected() {
return(connected);
}
function isRotated() {
return(rotated);
}
function setRotated(rotate) {
rotated = rotate;
}
function getTwistAngle() {
if ((!activated[com.wiicade.Wii.COMMAND_TWIST]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_TWIST + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_TWIST] = true;
}
return(twistAngle);
}
function getDistance() {
if ((!activated[com.wiicade.Wii.COMMAND_DISTANCE]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_DISTANCE + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_DISTANCE] = true;
}
return(distance);
}
function getCursorX() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursorx);
}
function getCursorY() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursory);
}
function isFacingScreen() {
return((cursorx > 0) || (cursory > 0));
}
function isDown(buttonCode) {
if (rotated && (allowRotate)) {
if (buttonCode == BUTTON_UP) {
buttonCode = BUTTON_RIGHT;
} else if (buttonCode == BUTTON_RIGHT) {
buttonCode = BUTTON_DOWN;
} else if (buttonCode == BUTTON_DOWN) {
buttonCode = BUTTON_LEFT;
} else if (buttonCode == BUTTON_LEFT) {
buttonCode = BUTTON_UP;
}
}
return((pressed & buttonCode) > 0);
}
function getAttachment() {
if ((!activated[com.wiicade.Wii.COMMAND_ATTACH]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_ATTACH + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_ATTACH] = true;
}
return(attachment);
}
function buttonsUpdated(bitmap) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = bitmap;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:identity});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:identity});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function twistUpdated(angle) {
var _local2 = twistAngle;
twistAngle = angle;
if (twistAngle != _local2) {
dispatchEvent({type:"twist", angle:angle, identity:identity});
}
}
function distanceUpdated(distance) {
var _local2 = this.distance;
this.distance = distance;
if (this.distance != _local2) {
dispatchEvent({type:"distance", distance:distance, identity:identity});
}
}
function connectedUpdated(connected) {
var _local2 = this.connected;
this.connected = connected;
if (this.connected != _local2) {
if (connected) {
dispatchEvent({type:"connected", identity:identity});
} else {
dispatchEvent({type:"disconnected", identity:identity});
}
}
}
function cursorXUpdated(cursorx) {
oldcursorx = this.cursorx;
this.cursorx = cursorx;
}
function cursorYUpdated(cursory) {
oldcursory = this.cursory;
this.cursory = cursory;
if ((cursorx != oldcursorx) || (this.cursory != oldcursory)) {
dispatchEvent({type:"pointer", cursorx:cursorx, cursory:this.cursory, identity:identity});
}
}
function updatePrimary(primary) {
this.primary = primary;
}
function updateAttachment(attachment) {
this.attachment = attachment;
}
static var BUTTON_UP = 8;
static var BUTTON_DOWN = 4;
static var BUTTON_RIGHT = 2;
static var BUTTON_LEFT = 1;
static var BUTTON_1 = 64;
static var BUTTON_2 = 32;
static var BUTTON_A = 256;
static var BUTTON_B = 128;
static var BUTTON_PLUS = 16;
static var BUTTON_MINUS = 512;
var primary = false;
var connected = false;
var rotated = false;
var allowRotate = true;
var twistAngle = 0;
var distance = 0;
var cursorx = 0;
var cursory = 0;
var pressed = 0;
}
Symbol 638 MovieClip [__Packages.com.wiicade.Nunchuk] Frame 0
class com.wiicade.Nunchuk
{
var parent, dispatchEvent;
function Nunchuk (parent) {
this.parent = parent;
mx.events.EventDispatcher.initialize(this);
}
function isDown(buttonCode) {
return((pressed & buttonCode) > 0);
}
function getStickX() {
return(stickx);
}
function getStickY() {
return(sticky);
}
function updateButtons(buttons) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = buttons;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:parent.getIdentity()});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:parent.getIdentity()});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function updateStick(x, y) {
stickx = x;
sticky = y;
}
static var BUTTON_C = 2;
static var BUTTON_Z = 1;
var pressed = 0;
var stickx = 0;
var sticky = 0;
}
Symbol 639 MovieClip [__Packages.com.wiicade.Browser] Frame 0
class com.wiicade.Browser
{
static var buttonEnabled;
function Browser () {
}
static function init() {
buttonEnabled = new Array();
buttonEnabled[com.wiicade.WiiRemote.BUTTON_LEFT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_UP] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_RIGHT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_DOWN] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_1] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_2] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_A] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_B] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_PLUS] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_MINUS] = false;
}
static function isDefaultEnabled(buttonCode) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
return(buttonEnabled[buttonCode]);
}
static function setDefaultEnabled(buttonCode, enabled) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
buttonEnabled[buttonCode] = enabled;
if (com.wiicade.Wii.isWii()) {
getURL (((("javascript:enableWiiButton(" + buttonCode) + ",") + enabled) + ");");
}
}
static function enableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, true);
}
static function disableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, false);
}
static function enableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, true);
}
static function disableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, false);
}
static function setBackgroundColor(color) {
if (com.wiicade.Wii.isWii()) {
getURL (("javascript:setBackgroundColor(" + color) + ");");
}
}
}
Symbol 640 MovieClip [__Packages.chapatiz.rooms.kashgame.Kashgame] Frame 0
class chapatiz.rooms.kashgame.Kashgame
{
var _room, _decor, _collclip, _gameId, score;
function Kashgame (room, gameId) {
_room = room;
_decor = room.decor;
_collclip = room.collclip;
_gameId = gameId;
_level2.kashgameWindow.gameId = gameId;
}
function endGame(s) {
score = s;
_level0.server.send(("<endgame s=\"" + s) + "\"/>");
}
function onCustomMessage(type, _xml) {
var _local3 = new Array();
for (var _local4 in _xml.attributes) {
_local3[_local4] = _xml.attributes[_local4];
}
if (score >= 0) {
_local3.score = score;
}
_level2.kashgameWindow.open(type, _local3);
}
}
Symbol 641 MovieClip [__Packages.com.novelgames.flashgames.MainBlobipopDemo] Frame 0
class com.novelgames.flashgames.MainBlobipopDemo extends MovieClip
{
var message, title, attachMovie, titleDepth, instructions, game, empty, createEmptyMovieClip, getNextHighestDepth, onEnterFrame, stop;
function MainBlobipopDemo () {
super();
}
static function initialize(movieClip) {
com.novelgames.flashgames.bouncingAS2.Config.GAME_DEMO = true;
_level0.langArray = new Array();
_level0.langArray.BLOBIPOP_LEVEL = "Level";
_level0.langArray.BLOBIPOP_WIN = "Level Complete!";
_level0.langArray.BLOBIPOP_GAMEOVER = "Game Over";
movieClip.__proto__ = com.novelgames.flashgames.MainBlobipopDemo.prototype;
movieClip.stop();
movieClip.gotoTitlePage();
movieClip.message.__proto__ = com.novelgames.flashgames.bouncingAS2.Message.prototype;
movieClip.onEnterFrame = movieClip.checkTitle;
}
function gotoTitlePage() {
removePage();
message.hide();
title = com.novelgames.flashgames.commonAS2.Title(attachMovie("Title", "title", titleDepth));
}
function gotoInstructionsPage() {
removePage();
message.hide();
instructions = com.novelgames.flashgames.commonAS2.Instructions(attachMovie("Instructions", "instructions", titleDepth));
instructions.initialize();
}
function gotoGamePage() {
removePage();
game = com.novelgames.flashgames.bouncingAS2.Game(attachMovie("Game", "game", titleDepth));
game._x = 55;
game._y = 25;
if (empty != undefined) {
return(undefined);
}
createEmptyMovieClip("empty", getNextHighestDepth());
empty.swapDepths(message);
}
function showInstructionsFromGame() {
game.pause();
game._visible = false;
instructions = com.novelgames.flashgames.commonAS2.Instructions(attachMovie("Instructions", "instructions", getNextHighestDepth()));
instructions.swapDepths(titleDepth);
instructions.initialize(true);
}
function hideInstructionsFromGame() {
instructions.swapDepths(game.getDepth());
instructions.removeMovieClip();
instructions = null;
game._visible = true;
game.unpause();
}
function showHighScores() {
trace("showHighScores()");
}
function showEnterHighScore(score) {
showPlayAgain();
trace(("showEnterHighScore(" + score) + ")");
}
function hideMessage() {
message.hide();
}
function showWin() {
message.showWin();
}
function showGameOver() {
message.showGameOver();
}
function showPlayAgain() {
message.showPlayAgain();
}
function showLevel(level) {
message.showLevel(level);
}
function checkTitle() {
if (!title) {
return(undefined);
}
onEnterFrame = null;
(stop());// not popped
titleDepth = title.getDepth();
}
function removePage() {
if (title) {
title.removeMovieClip();
title = null;
}
if (instructions) {
instructions.removeMovieClip();
instructions = null;
}
if (game) {
game.removeMovieClip();
}
}
}
Symbol 642 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Title] Frame 0
class com.novelgames.flashgames.commonAS2.Title extends MovieClip
{
var startButton, highScoresButton, moreGamesButton, _parent, getURL;
function Title () {
super();
startButton.onRelease = function () {
this._parent.startButtonClicked();
};
highScoresButton.onRelease = function () {
this._parent.highScoresButtonClicked();
};
moreGamesButton.onRelease = function () {
this._parent.moreGamesButtonClicked();
};
}
function startButtonClicked() {
_parent.gotoInstructionsPage();
}
function highScoresButtonClicked() {
(getURL("http://uk.chapatiz.com/games/blobipop/", "_blank"));// not popped
}
function moreGamesButtonClicked() {
(getURL("http://uk.chapatiz.com/games", "_blank"));// not popped
}
function infoButtonClicked() {
(getURL("http://uk.chapatiz.com/cms/", "_blank"));// not popped
}
}
Symbol 643 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Instructions] Frame 0
class com.novelgames.flashgames.commonAS2.Instructions extends MovieClip
{
var didacticiel, shownFromGame, _parent;
function Instructions () {
super();
didacticiel.nextBt.onRelease = function () {
this._parent._parent.nextButtonClicked();
};
}
function initialize(shownFromGame) {
if (shownFromGame == undefined) {
shownFromGame = false;
}
this.shownFromGame = shownFromGame;
}
function nextButtonClicked() {
didacticiel.gotoAndStop("page2");
didacticiel.startButton.onRelease = function () {
this._parent._parent.startButtonClicked();
};
}
function startButtonClicked() {
if (!shownFromGame) {
_parent.gotoGamePage();
} else {
_parent.hideInstructionsFromGame();
}
}
}
Symbol 644 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewMovieClip] Frame 0
class com.novelgames.flashgames.commonAS2.NewMovieClip extends MovieClip
{
var _parent, _x, _y, _rotation, _visible, _alpha, _width, _height, _xscale, _yscale, _xmouse, _ymouse, _totalframes, _currentframe, _name, __mask, useHandCursor, __mouseEnabled, __mouseChildren, __numChildren, getInstanceAtDepth, getNextHighestDepth, onRelease, onRollOver, onRollOut, onPress, onReleaseOutside, onMouseMove, onEnterFrame, getURL, createMovieCount, attachMovie, createEmptyMovieClip;
function NewMovieClip () {
super();
}
function get parent() {
return(_parent);
}
function set x(x) {
_x = x;
//return(this.x);
}
function get x() {
return(_x);
}
function set y(y) {
_y = y;
//return(this.y);
}
function get y() {
return(_y);
}
function set rotation(rotation) {
_rotation = rotation;
//return(this.rotation);
}
function get rotation() {
return(_rotation);
}
function set visible(visible) {
_visible = visible;
//return(this.visible);
}
function get visible() {
return(_visible);
}
function set alpha(alpha) {
_alpha = alpha * 100;
//return(this.alpha);
}
function get alpha() {
return(_alpha / 100);
}
function get width() {
return(_width);
}
function set width(width) {
_width = width;
//return(this.width);
}
function get height() {
return(_height);
}
function set height(height) {
_height = height;
//return(this.height);
}
function set scaleX(scaleX) {
_xscale = scaleX * 100;
//return(this.scaleX);
}
function get scaleX() {
return(_xscale / 100);
}
function set scaleY(scaleY) {
_yscale = scaleY * 100;
//return(this.scaleY);
}
function get scaleY() {
return(_yscale / 100);
}
function set mouseX(mouseX) {
_xmouse = mouseX;
//return(this.mouseX);
}
function get mouseX() {
return(_xmouse);
}
function set mouseY(mouseY) {
_ymouse = mouseY;
//return(this.mouseY);
}
function get mouseY() {
return(_ymouse);
}
function get totalFrames() {
return(_totalframes);
}
function get currentFrame() {
return(_currentframe);
}
function get name() {
return(_name);
}
function set mask(mask) {
__mask = mask;
super.setMask(mask);
//return(this.mask);
}
function get mask() {
return(__mask);
}
function set buttonMode(buttonMode) {
useHandCursor = buttonMode;
//return(this.buttonMode);
}
function get buttonMode() {
return(useHandCursor);
}
function set mouseEnabled(mouseEnabled) {
__mouseEnabled = mouseEnabled;
//return(this.mouseEnabled);
}
function get mouseEnabled() {
return(__mouseEnabled);
}
function set mouseChildren(mouseChildren) {
__mouseChildren = mouseChildren;
//return(this.mouseChildren);
}
function get mouseChildren() {
return(__mouseChildren);
}
function get stage() {
return(com.novelgames.flashgames.commonAS2.NewStage.getNewStage());
}
function set numChildren(numChildren) {
__numChildren = numChildren;
//return(this.numChildren);
}
function get numChildren() {
if (__numChildren == undefined) {
__numChildren = 0;
}
return(__numChildren);
}
function get graphics() {
return(this);
}
function startDrag(lockCenter, bounds) {
if (lockCenter == undefined) {
super.startDrag();
} else if (bounds == undefined) {
super.startDrag(lockCenter);
} else {
super.startDrag(lockCenter, bounds.__get__left(), bounds.__get__top(), bounds.__get__right(), bounds.__get__bottom());
}
}
function beginFill(colour, alpha) {
if (alpha == undefined) {
alpha = 1;
}
super.beginFill(colour, alpha * 100);
}
function getBounds(target) {
var _local2 = super.getBounds(target);
return(new com.novelgames.flashgames.commonAS2.Rectangle(_local2.xMin, _local2.yMin, _local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin));
}
function localToGlobal(point) {
var _local2 = {x:point.x, y:point.y};
super.localToGlobal(_local2);
return(_local2);
}
function globalToLocal(point) {
var _local2 = {x:point.x, y:point.y};
super.globalToLocal(_local2);
return(_local2);
}
function hitTestPoint(x, y, shapeFlag) {
if (shapeFlag == undefined) {
return(super.hitTest(x, y));
}
return(super.hitTest(x, y, shapeFlag));
}
function hitTestObject(obj) {
return(super.hitTest(obj));
}
function addChild(movieClip) {
if (movieClip.addedToParent) {
return(undefined);
}
if (movieClip._parent != this) {
trace("wrong addChild: " + [this, movieClip]);
}
addChildAt(movieClip, numChildren);
}
function addChildAt(movieClip, index) {
if (movieClip.addedToParent) {
return(undefined);
}
if (movieClip._parent != this) {
trace("wrong addChildAt: " + [this, movieClip]);
}
movieClip.addedToParent = true;
numChildren = ((numChildren+1));
setChildIndex(movieClip, index);
}
function removeChild(movieClip) {
if (!movieClip.addedToParent) {
return(undefined);
}
removeChildAt(movieClip.getDepth());
}
function removeChildAt(index) {
var _local5 = getInstanceAtDepth(index);
var _local3;
var _local2;
if (!_local5.addedToParent) {
return(undefined);
}
_local5.removeMovieClip();
_local3 = getNextHighestDepth();
_local2 = index + 1;
while (_local2 < _local3) {
getInstanceAtDepth(_local2).swapDepths(_local2 - 1);
_local2++;
}
numChildren = ((numChildren-1));
}
function setChildIndex(child, index) {
var _local3 = child.getDepth();
var _local2;
var _local1;
if (_local3 == index) {
return(undefined);
}
_local2 = ((_local3 < index) ? 1 : -1);
_local1 = _local3;
while (_local1 != index) {
child.swapDepths(_local1 + _local2);
_local1 = _local1 + _local2;
}
}
function getChildIndex(child) {
return(child.getDepth());
}
function addEventListener(type, listenerObject, listenerFunctionName) {
switch (type) {
case com.novelgames.flashgames.commonAS2.MouseEvent.CLICK :
onRelease = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OVER :
onRollOver = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OUT :
onRollOut = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN :
onPress = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_UP :
onRelease = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
onReleaseOutside = onRelease;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_MOVE :
onMouseMove = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.Event.ENTER_FRAME :
onEnterFrame = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
}
}
function removeEventListener(type) {
switch (type) {
case com.novelgames.flashgames.commonAS2.MouseEvent.CLICK :
onRelease = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OVER :
onRollOver = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OUT :
onRollOut = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN :
onPress = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_UP :
onRelease = null;
onReleaseOutside = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_MOVE :
onMouseMove = null;
break;
case com.novelgames.flashgames.commonAS2.Event.ENTER_FRAME :
onEnterFrame = null;
}
}
function navigateToURL(urlRequest, window) {
getURL(urlRequest.url, window);
}
function createMovie(name) {
Debugger.trace("NewMovieClip.createMovie", {arg:arguments}, 1, true);
var _local5 = getNextHighestDepth();
var _local3;
if (createMovieCount == undefined) {
createMovieCount = 0;
}
if (name) {
_local3 = attachMovie(name, (name + "_") + createMovieCount, _local5);
} else {
_local3 = createEmptyMovieClip((name + "_") + createMovieCount, _local5);
_local3.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
}
_local3.addedToParent = false;
createMovieCount++;
return(_local3);
}
function createSound(name) {
return(new com.novelgames.flashgames.commonAS2.NewSound(this, name));
}
function toString() {
return("newMovieClip");
}
var addedToParent = false;
}
Symbol 645 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewStage] Frame 0
class com.novelgames.flashgames.commonAS2.NewStage
{
var addedListener, onKeyDown, onKeyUp;
function NewStage () {
addedListener = false;
onKeyDown = null;
onKeyUp = null;
}
static function getNewStage() {
if (newStage == null) {
newStage = new com.novelgames.flashgames.commonAS2.NewStage();
}
return(newStage);
}
function get stageWidth() {
return(Stage.width);
}
function get stageHeight() {
return(Stage.height);
}
function set focus(object) {
Selection.setFocus(object);
//return(focus);
}
function get focus() {
return(Selection.getFocus());
}
function addEventListener(type, listenerObject, listenerFunctionName) {
if (!addedListener) {
Key.addListener(this);
addedListener = true;
}
switch (type) {
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN :
onKeyDown = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.KeyboardEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP :
onKeyUp = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.KeyboardEvent(this));
};
}
}
function removeEventListener(type) {
switch (type) {
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN :
onKeyDown = null;
break;
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP :
onKeyUp = null;
}
}
static var newStage = null;
}
Symbol 646 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.KeyboardEvent] Frame 0
class com.novelgames.flashgames.commonAS2.KeyboardEvent
{
var target, currentTarget;
function KeyboardEvent (target) {
this.target = target;
currentTarget = target;
}
function get charCode() {
return(Key.getAscii());
}
function get keyCode() {
return(Key.getCode());
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var KEY_DOWN = "keyDown";
static var KEY_UP = "keyUp";
}
Symbol 647 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Rectangle] Frame 0
class com.novelgames.flashgames.commonAS2.Rectangle
{
var x, y, width, height;
function Rectangle (x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
function get left() {
return(x);
}
function set left(left) {
x = left;
//return(this.left);
}
function get top() {
return(y);
}
function set top(top) {
y = top;
//return(this.top);
}
function get right() {
return(x + width);
}
function set right(right) {
width = right - x;
//return(this.right);
}
function get bottom() {
return(y + height);
}
function set bottom(bottom) {
height = bottom - y;
//return(this.bottom);
}
function get size() {
return({x:width, y:height});
}
function set size(size) {
width = size.x;
height = size.y;
//return(this.size);
}
function get topLeft() {
return({x:x, y:y});
}
function set topLeft(topLeft) {
x = topLeft.x;
y = topLeft.y;
//return(this.topLeft);
}
function get bottomRight() {
return({x:x + width, y:y + height});
}
function set bottomRight(bottomRight) {
width = x - bottomRight.x;
height = y - bottomRight.y;
//return(this.bottomRight);
}
}
Symbol 648 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.MouseEvent] Frame 0
class com.novelgames.flashgames.commonAS2.MouseEvent
{
var target, currentTarget;
function MouseEvent (target) {
this.target = target;
currentTarget = target;
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var CLICK = "click";
static var DOUBLE_CLICK = "doubleClick";
static var MOUSE_DOWN = "mouseDown";
static var MOUSE_MOVE = "mouseMove";
static var MOUSE_OUT = "mouseOut";
static var MOUSE_OVER = "mouseOver";
static var MOUSE_UP = "mouseUp";
static var MOUSE_WHEEL = "mouseWheel";
static var ROLL_OUT = "rollOut";
static var ROLL_OVER = "rollOver";
}
Symbol 649 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Event] Frame 0
class com.novelgames.flashgames.commonAS2.Event
{
function Event () {
}
static var ENTER_FRAME = "enterFrame";
}
Symbol 650 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.URLRequest] Frame 0
class com.novelgames.flashgames.commonAS2.URLRequest
{
var url;
function URLRequest (url) {
this.url = url;
}
}
Symbol 651 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewSound] Frame 0
class com.novelgames.flashgames.commonAS2.NewSound extends Sound
{
var attachSound, start;
function NewSound (target, symbolName) {
super(target);
attachSound(symbolName);
}
function play() {
start();
}
}
Symbol 652 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.CommonGame] Frame 0
class com.novelgames.flashgames.commonAS2.CommonGame extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
function CommonGame () {
super();
}
static function get gameStage() {
return(com.novelgames.flashgames.commonAS2.NewStage.getNewStage());
}
function pause() {
com.novelgames.flashgames.commonAS2.NewTimer.pause();
}
function unpause() {
com.novelgames.flashgames.commonAS2.NewTimer.unpause();
}
}
Symbol 653 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Timer] Frame 0
interface com.novelgames.flashgames.commonAS2.Timer
{
}
Symbol 654 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewTimer] Frame 0
class com.novelgames.flashgames.commonAS2.NewTimer implements com.novelgames.flashgames.commonAS2.Timer
{
static var pauseTime;
var delay, repeatCount, currentCount, listenerObject, listenerFunctionName, adjustedStartTime, usingDelay, intervalID;
function NewTimer (delay, repeatCount) {
if (repeatCount == undefined) {
repeatCount = 0;
}
this.delay = delay;
this.repeatCount = repeatCount;
currentCount = 0;
}
static function getTimer() {
if (paused) {
return(pauseTime - totalPausedTime);
}
return(getTimer() - totalPausedTime);
}
static function pause() {
if (paused) {
return(undefined);
}
paused = true;
pauseTime = getTimer();
}
static function unpause() {
if (!paused) {
return(undefined);
}
paused = false;
totalPausedTime = totalPausedTime + (getTimer() - pauseTime);
}
function addEventListener(type, listenerObject, listenerFunctionName) {
if (type != com.novelgames.flashgames.commonAS2.TimerEvent.TIMER) {
return(undefined);
}
this.listenerObject = listenerObject;
this.listenerFunctionName = listenerFunctionName;
}
function removeEventListener(type) {
if (type != com.novelgames.flashgames.commonAS2.TimerEvent.TIMER) {
return(undefined);
}
listenerObject = null;
listenerFunctionName = null;
}
function start() {
adjustedStartTime = getTimer();
usingDelay = delay;
clearInterval(intervalID);
intervalID = setInterval(this, "timerEventListener", delay);
}
function stop() {
clearInterval(intervalID);
}
function toString() {
return(("NewTimer : " + intervalID) + "");
}
function timerEventListener() {
currentCount++;
if (paused) {
clearInterval(intervalID);
usingDelay = Math.max(delay - (getTimer() - adjustedStartTime), 1);
currentCount--;
intervalID = setInterval(this, "timerEventListener", usingDelay);
return(undefined);
}
if ((getTimer() - adjustedStartTime) >= delay) {
adjustedStartTime = getTimer();
if (usingDelay != delay) {
clearInterval(intervalID);
usingDelay = delay;
intervalID = setInterval(this, "timerEventListener", usingDelay);
}
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.TimerEvent());
if ((repeatCount != 0) && (currentCount >= repeatCount)) {
clearInterval(intervalID);
}
} else {
clearInterval(intervalID);
usingDelay = Math.max(delay - (getTimer() - adjustedStartTime), 1);
currentCount--;
intervalID = setInterval(this, "timerEventListener", usingDelay);
}
}
static var paused = false;
static var totalPausedTime = 0;
}
Symbol 655 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.TimerEvent] Frame 0
class com.novelgames.flashgames.commonAS2.TimerEvent
{
function TimerEvent () {
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var TIMER = "timer";
}
Symbol 656 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Game] Frame 0
class com.novelgames.flashgames.bouncingAS2.Game extends com.novelgames.flashgames.commonAS2.CommonGame
{
var clickDetector, weight, ballsHolder, explodesHolder, arrow, starsHolder, rowSpacing, soundShoot, createSound, soundHit, soundGroup, soundWin, soundGameOver, tableau_interface, __score, lastPressed, anim_manette, nextBallAnim, currentLevel, noOfTypes, moveSpeed, ballInfos, startTopY, topY, lastFullRow, balls, ballGeneratedRow, explodes, droppingBalls, _parent, intervalID, __get__parent, ballToShoot, nextBallToShoot, shootingBall, startTime, lastTime, angle, shootDelay, __get__stage, stars;
function Game () {
super();
clickDetector.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
weight.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
ballsHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
explodesHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
arrow.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
starsHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
rowSpacing = (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE * 1.73205080756888) / 2;
score = (0);
arrow.__set__x(ballsHolder.__get__x() + ((com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX * com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) / 2));
arrow.__set__y(com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY);
soundShoot = createSound("SoundShoot");
soundHit = createSound("SoundHit");
soundGroup = createSound("SoundGroup");
soundWin = createSound("SoundWin");
soundGameOver = createSound("SoundGameOver");
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN, this, "moveManette");
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP, this, "moveManette");
tableau_interface.level_clip.levelTitre_txt.text = chapatiz.utils.Localisation.localString("BLOBIPOP_LEVEL", "Niveau");
startLevel(1);
}
function set score(score) {
__score = score;
tableau_interface.panel.scoreText.text = (tableau_interface.panel.scoreText_lo.text = (tableau_interface.panel.scoreText_hi.text = score.toString()));
//return(this.score);
}
function get score() {
return(__score);
}
function moveManette(keyboardEvent) {
if ((Key.isDown(37) && (Key.isDown(39))) || (!(Key.isDown(37) || (Key.isDown(39))))) {
if (lastPressed == 37) {
anim_manette.gotoAndPlay("anim_fixe_gauche");
} else if (lastPressed == 39) {
anim_manette.gotoAndPlay("anim_fixe_droite");
}
lastPressed = undefined;
return(undefined);
}
if (Key.isDown(37) && (lastPressed != 37)) {
lastPressed = 37;
anim_manette.gotoAndPlay("anim_gauche");
return(undefined);
}
if (Key.isDown(39) && (lastPressed != 39)) {
anim_manette.gotoAndPlay("anim_droite");
lastPressed = 39;
return(undefined);
}
}
function startLevel(level) {
var _local7 = com.novelgames.flashgames.bouncingAS2.Config.LEVEL_INITIALROWS + ((level - 1) * com.novelgames.flashgames.bouncingAS2.Config.LEVEL_ROWSINCREASE);
var _local5;
var _local2;
var _local3;
nextBallAnim.gotoAndStop(1);
currentLevel = level;
tableau_interface.level_clip.level_txt.text = (tableau_interface.level_clip.level_txt_hi.text = (tableau_interface.level_clip.level_txt_lo.text = level));
noOfTypes = Math.floor(com.novelgames.flashgames.bouncingAS2.Config.LEVEL_INITIALTYPES + ((level - 1) * com.novelgames.flashgames.bouncingAS2.Config.LEVEL_TYPESINCREASE));
if (noOfTypes > com.novelgames.flashgames.bouncingAS2.Config.BALL_COLOURS.length) {
noOfTypes = com.novelgames.flashgames.bouncingAS2.Config.BALL_COLOURS.length;
}
var _local4 = 0;
while (_local4 < noOfTypes) {
var _local6 = tableau_interface.panel["bulle_" + _local4];
_local6.bulle.bulle.gotoAndStop("bulle_" + com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[_local4]);
_local6.gotoAndPlay("start");
_local4++;
}
var _local9 = tableau_interface.level_clip.bulle;
_local9.bulle.bulle.gotoAndStop("bulle_" + com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[noOfTypes - 1]);
_local9.gotoAndPlay("start");
moveSpeed = com.novelgames.flashgames.bouncingAS2.Config.LEVEL_INITIALMOVESPEED + ((level - 1) * com.novelgames.flashgames.bouncingAS2.Config.LEVEL_MOVESPEEDINCREASE);
ballInfos = new Array();
_local2 = 0;
while (_local2 < _local7) {
if ((_local2 % 2) == 0) {
_local5 = com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX;
} else {
_local5 = com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1;
}
ballInfos[_local2] = new Array();
_local3 = 0;
while (_local3 < _local5) {
ballInfos[_local2][_local3] = Math.floor(Math.random() * noOfTypes);
_local3++;
}
_local2++;
}
startTopY = (-(_local7 - com.novelgames.flashgames.bouncingAS2.Config.BALL_INITIALROWS)) * rowSpacing;
topY = startTopY;
lastFullRow = _local7 - 1;
weight.__set__y(topY);
balls = new Array();
ballGeneratedRow = _local7;
if (explodes) {
_local2 = 0;
while (_local2 < explodes.length) {
explodesHolder.removeChild(explodes[_local2]);
_local2++;
}
}
explodes = new Array();
if (droppingBalls) {
_local2 = 0;
while (_local2 < droppingBalls.length) {
ballsHolder.removeChild(droppingBalls[_local2]);
_local2++;
}
}
droppingBalls = new Array();
generateBalls();
_parent.showLevel(level);
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(com.novelgames.flashgames.bouncingAS2.Config.MESSAGE_LEVELTIME, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "startPlay");
intervalID.start();
}
function generateBalls() {
var _local8 = Math.floor((-topY) / rowSpacing) - 1;
var _local6;
var _local5;
var _local7;
var _local10;
var _local9;
var _local4;
var _local3;
var _local2;
if (_local8 < 0) {
_local8 = 0;
}
if (ballGeneratedRow <= _local8) {
return(undefined);
}
_local7 = (topY + ((ballGeneratedRow - 1) * rowSpacing)) + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2);
_local3 = ballGeneratedRow - 1;
while (_local3 >= _local8) {
if ((_local3 % 2) == 0) {
_local6 = com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX;
_local5 = com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2;
} else {
_local6 = com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1;
_local5 = com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE;
}
if (!balls[_local3]) {
balls[_local3] = new Array();
}
_local2 = 0;
while (_local2 < _local6) {
if ((!balls[_local3][_local2]) && (ballInfos[_local3][_local2] != -1)) {
_local4 = com.novelgames.flashgames.bouncingAS2.Ball(ballsHolder.createMovie("Ball"));
_local4.setType(ballInfos[_local3][_local2]);
_local4.__set__x(_local5);
_local4.__set__y(_local7);
ballsHolder.addChild(_local4);
balls[_local3][_local2] = _local4;
}
_local5 = _local5 + com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE;
_local2++;
}
_local7 = _local7 - rowSpacing;
_local3--;
}
ballGeneratedRow = _local8;
}
function startPlay(timerEvent) {
intervalID.stop();
__get__parent().hideMessage();
generateNextBallToShoot();
ballToShoot = nextBallToShoot;
ballToShoot.__set__y(com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY);
nextBallAnim.bulle_2.setType(ballToShoot.type);
generateNextBallToShoot();
nextBallAnim.bulle_1.setType(nextBallToShoot.type);
nextBallAnim.gotoAndPlay("pass");
shootingBall = null;
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN, this, "shootBall");
startTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
lastTime = startTime;
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "onPlayTime");
intervalID.start();
}
function generateNextBallToShoot() {
nextBallToShoot = com.novelgames.flashgames.bouncingAS2.Ball(ballsHolder.createMovie("Ball"));
var _local2;
var _local3;
do {
_local2 = Math.floor(Math.random() * ballInfos.length);
_local3 = Math.floor(Math.random() * ballInfos[_local2].length);
} while (ballInfos[_local2][_local3] < 0);
nextBallToShoot.setType(ballInfos[_local2][_local3]);
nextBallToShoot.__set__x(arrow.__get__x() - ballsHolder.__get__x());
nextBallToShoot.__set__y(arrow.__get__y() + com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE);
ballsHolder.addChild(nextBallToShoot);
}
function onPlayTime(timerEvent) {
var _local2 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
var _local3 = (_local2 - lastTime) / 1000;
updateAngle();
moveBalls(_local2, true);
moveShootingBall(_local3);
moveExplodes(_local2);
moveDroppingBalls(_local2);
checkGameOver();
lastTime = _local2;
timerEvent.updateAfterEvent();
}
function updateAngle() {
angle = arrow.rotation;
angle = angle - (Key.isDown(37) ? 3 : 0);
angle = angle + (Key.isDown(39) ? 3 : 0);
if (angle < com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTMINANGLE) {
angle = com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTMINANGLE;
} else if (angle > com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTMAXANGLE) {
angle = com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTMAXANGLE;
}
arrow.__set__rotation(angle);
}
function moveBalls(time, shouldGenerateBalls) {
var _local4;
var _local3;
var _local2;
topY = startTopY + ((moveSpeed * (time - startTime)) / 1000);
weight.__set__y(topY);
_local4 = (topY + ((balls.length - 1) * rowSpacing)) + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2);
_local3 = balls.length - 1;
while (_local3 >= 0) {
if (_local4 < ((-com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) / 2)) {
break;
}
_local2 = 0;
while (_local2 < balls[_local3].length) {
if (!balls[_local3][_local2]) {
} else {
balls[_local3][_local2].y = _local4;
}
_local2++;
}
_local4 = _local4 - rowSpacing;
_local3--;
}
if (shouldGenerateBalls) {
generateBalls();
}
}
function shootBall(keyboardEvent) {
if (shootingBall) {
return(undefined);
}
if (!Key.isDown(32)) {
return(undefined);
}
shootingBall = ballToShoot;
shootingBall.speedX = Math.sin((angle * Math.PI) / 180) * com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTSPEED;
shootingBall.speedY = (-Math.cos((angle * Math.PI) / 180)) * com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTSPEED;
shootingBall.angle = angle;
ballToShoot = nextBallToShoot;
nextBallAnim.bulle_3.setType(shootingBall.type);
nextBallAnim.bulle_2.setType(ballToShoot.type);
ballToShoot.__set__y(com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY);
generateNextBallToShoot();
nextBallAnim.bulle_1.setType(nextBallToShoot.type);
nextBallAnim.gotoAndPlay("throw");
arrow.gotoAndPlay("shoot");
shootDelay = 0;
soundShoot.play();
}
function moveShootingBall(seconds) {
var _local6;
var _local4;
var _local10;
var _local9;
var _local8;
var _local2;
var _local3;
var _local7;
var _local5;
if (!shootingBall) {
return(undefined);
}
if (shootDelay >= com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTDELAY) {
_local6 = Math.floor((com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTSPEED * seconds) / com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) + 1;
_local4 = (shootingBall.speedX * seconds) / _local6;
_local10 = (shootingBall.speedY * seconds) / _local6;
_local9 = ((_local4 > 0) ? (Math.abs(shootingBall.angle)) : (-Math.abs(shootingBall.angle)));
_local7 = false;
_local8 = new flash.geom.Point(shootingBall.__get__x(), shootingBall.__get__y());
_local2 = _local8.clone();
_local5 = 0;
while (_local5 < _local6) {
_local2.x = _local2.x + _local4;
if (_local2.__get__x() <= (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2)) {
_local2.__set__x(com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE - _local2.__get__x());
_local4 = -_local4;
shootingBall.speedX = -shootingBall.speedX;
} else if (_local2.__get__x() >= ((com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE * com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) - (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2))) {
_local2.__set__x((((com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE * com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) * 2) - com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) - _local2.__get__x());
_local4 = -_local4;
shootingBall.speedX = -shootingBall.speedX;
}
_local2.y = _local2.y + _local10;
_local3 = getStickPosition(_local8, _local2, _local9);
if ((_local3 == null) && (_local2.__get__y() <= (topY + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2)))) {
_local3 = new flash.geom.Point(Math.floor(_local2.__get__x() / com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE), 0);
if ((ballInfos.length > 0) && (ballInfos[0][_local3.__get__x()] != -1)) {
_local3.__set__x((_local3.__get__x()+1));
}
}
if (_local3) {
_local2 = getXYFromPosition(_local3);
addBallInfo(_local3.__get__x(), _local3.__get__y(), shootingBall);
_local7 = true;
break;
}
_local5++;
}
shootingBall.__set__x(_local2.x);
shootingBall.__set__y(_local2.y);
if (_local7) {
soundHit.play();
shootingBall = null;
checkDestroy(_local3.__get__x(), _local3.__get__y());
}
} else {
shootDelay++;
}
}
function getStickPosition(startBallPoint, ballPoint, angle) {
var _local5 = getHitPosition(ballPoint);
var _local6;
var _local4;
var _local2;
var _local3;
if (!_local5) {
return(null);
}
_local6 = getXYFromPosition(_local5);
_local4 = getStickDirections(_local6, ballPoint, angle);
_local3 = 0;
while (_local3 < _local4.length) {
_local2 = getStickPositionFromDirection(_local5, _local4[_local3]);
if (!getPositionIsValid(_local2)) {
} else if (!getPositionIsOccupied(_local2)) {
return(_local2);
}
_local3++;
}
trace("NULL!!!!");
return(null);
}
function getHitPosition(ballPoint) {
var _local4 = new flash.geom.Point(0, 0);
var _local7;
var _local6;
var _local2;
var _local3;
_local6 = Math.floor(((ballPoint.__get__y() - topY) - com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) / rowSpacing) - 1;
if (_local6 < 0) {
_local6 = 0;
}
_local7 = _local6 + 2;
if (_local6 >= ballInfos.length) {
_local6 = ballInfos.length - 1;
}
_local4.__set__y((topY + (_local7 * rowSpacing)) + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2));
_local2 = _local7;
while (_local2 >= _local6) {
if ((_local2 % 2) == 0) {
_local4.__set__x(com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2);
} else {
_local4.__set__x(com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE);
}
if (ballInfos[_local2]) {
_local3 = 0;
while (_local3 < ballInfos[_local2].length) {
if (ballInfos[_local2][_local3] != -1) {
if (flash.geom.Point.distance(_local4, ballPoint) < com.novelgames.flashgames.bouncingAS2.Config.BALL_HITSIZE) {
return(new flash.geom.Point(_local3, _local2));
}
}
_local4.x = _local4.x + com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE;
_local3++;
}
}
_local4.y = _local4.y - rowSpacing;
_local2--;
}
return(null);
}
function getXYFromPosition(position) {
var _local4;
var _local3;
_local4 = (((position.__get__y() % 2) == 0) ? ((com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2) + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE * position.__get__x())) : (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE * position.__get__x())));
_local3 = (topY + (position.__get__y() * rowSpacing)) + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2);
return(new flash.geom.Point(_local4, _local3));
}
function getStickDirections(hitBallPoint, ballPoint, angle) {
var _local6 = new Array();
var _local7 = new Array();
var _local4;
var _local3;
var _local2;
var _local10;
if (angle <= -60) {
_local3 = new flash.geom.Point(1, -1);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2), hitBallPoint.__get__y() - rowSpacing);
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
if (angle >= 60) {
_local3 = new flash.geom.Point(-1, -1);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() - (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2), hitBallPoint.__get__y() - rowSpacing);
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
if (angle <= 0) {
_local3 = new flash.geom.Point(1, 0);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() + com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE, hitBallPoint.__get__y());
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
if (angle >= 0) {
_local3 = new flash.geom.Point(-1, 0);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() - com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE, hitBallPoint.__get__y());
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
if (angle <= 60) {
_local3 = new flash.geom.Point(1, 1);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2), hitBallPoint.__get__y() + rowSpacing);
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
if (angle >= -60) {
_local3 = new flash.geom.Point(-1, 1);
_local4 = new flash.geom.Point(hitBallPoint.__get__x() - (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2), hitBallPoint.__get__y() + rowSpacing);
_local2 = flash.geom.Point.distance(_local4, ballPoint);
insertDistanceSortedDirection(_local6, _local7, _local3, _local2);
}
return(_local6);
}
function insertDistanceSortedDirection(directions, distances, direction, distance) {
var _local1;
_local1 = 0;
while (_local1 < distances.length) {
if (distance < distances[_local1]) {
break;
}
_local1++;
}
directions.splice(_local1, 0, direction);
distances.splice(_local1, 0, distance);
}
function getStickPositionFromDirection(hitPosition, stickDirection) {
var _local3;
var _local4;
_local4 = hitPosition.__get__y() + stickDirection.__get__y();
if (stickDirection.__get__y() == 0) {
_local3 = hitPosition.__get__x() + stickDirection.__get__x();
} else if ((hitPosition.__get__y() % 2) == 0) {
_local3 = ((stickDirection.__get__x() == -1) ? (hitPosition.__get__x() - 1) : (hitPosition.__get__x()));
} else {
_local3 = ((stickDirection.__get__x() == -1) ? (hitPosition.__get__x()) : (hitPosition.__get__x() + 1));
}
return(new flash.geom.Point(_local3, _local4));
}
function getPositionIsValid(position) {
if (position.__get__y() < 0) {
return(false);
}
if (position.__get__x() < 0) {
return(false);
}
if ((position.__get__y() % 2) == 0) {
if (position.__get__x() >= com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) {
return(false);
}
} else if (position.__get__x() >= (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1)) {
return(false);
}
return(true);
}
function getPositionIsOccupied(position) {
if (!ballInfos[position.__get__y()]) {
return(false);
}
return((ballInfos[position.__get__y()][position.__get__x()] != undefined) && (ballInfos[position.__get__y()][position.__get__x()] != -1));
}
function addBallInfo(x, y, ball) {
var _local4;
var _local2;
if (!ballInfos[y]) {
ballInfos[y] = new Array();
_local4 = (((y % 2) == 0) ? (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) : (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1));
_local2 = 0;
while (_local2 < _local4) {
ballInfos[y][_local2] = -1;
_local2++;
}
}
if (!balls[y]) {
balls[y] = new Array();
_local4 = (((y % 2) == 0) ? (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) : (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1));
_local2 = 0;
while (_local2 < _local4) {
balls[y][_local2] = null;
_local2++;
}
}
ballInfos[y][x] = ball.type;
balls[y][x] = ball;
}
function checkDestroy(x, y) {
var _local7 = getGroupPoints(x, y);
var _local9;
var _local10;
var _local4;
var _local8 = Number.MAX_VALUE;
var _local2;
var _local6;
if (_local7.length < com.novelgames.flashgames.bouncingAS2.Config.GROUPSIZE) {
return(undefined);
}
_local9 = com.novelgames.flashgames.bouncingAS2.Config.SCORE_GROUP + ((_local7.length - com.novelgames.flashgames.bouncingAS2.Config.GROUPSIZE) * com.novelgames.flashgames.bouncingAS2.Config.SCORE_EXTRABALL);
score = score + _local9;
_local2 = 0;
while (_local2 < _local7.length) {
x = _local7[_local2].x;
y = _local7[_local2].y;
if (balls[y][x]) {
_local4 = com.novelgames.flashgames.bouncingAS2.Explode(explodesHolder.createMovie("Explode"));
_local4.x = balls[y][x].x;
_local4.y = balls[y][x].y;
_local4.startTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
_local4.bulle.bulle.gotoAndStop("bulle_" + com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[balls[y][x].type]);
_local4.body.gotoAndStop(com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[balls[y][x].type]);
_local4.mood.gotoAndStop(com.novelgames.flashgames.bouncingAS2.Config.MOOD_ARRAY[Math.round(Math.random() * com.novelgames.flashgames.bouncingAS2.Config.MOOD_ARRAY.length)]);
_local4.bulle_frame_1.gotoAndStop(com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[balls[y][x].type]);
_local4.bulle_frame_2.gotoAndStop(com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[balls[y][x].type]);
explodes.push(_local4);
explodesHolder.addChild(_local4);
ballsHolder.removeChild(balls[y][x]);
balls[y][x] = null;
}
ballInfos[y][x] = -1;
if (y < _local8) {
_local8 = y;
}
_local2++;
}
if (_local8 <= lastFullRow) {
lastFullRow = _local8 - 1;
}
checkDrop();
_local2 = ballInfos.length - 1;
while (_local2 >= 0) {
_local6 = 0;
while (_local6 < ballInfos[_local2].length) {
if (ballInfos[_local2][_local6] != -1) {
break;
}
_local6++;
}
if (_local6 >= ballInfos[_local2].length) {
balls.splice(_local2, 1);
ballInfos.splice(_local2, 1);
}
_local2--;
}
soundGroup.play();
checkWin();
}
function getGroupPoints(x, y) {
var _local5 = ballInfos[y][x];
explodeType = _local5;
var _local4 = new Array();
var _local6;
_local4.push(new flash.geom.Point(x, y));
_local6 = 0;
while (_local6 < _local4.length) {
x = _local4[_local6].x;
y = _local4[_local6].y;
if ((x > 0) && (ballInfos[y][x - 1] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x - 1, y));
}
if ((x < (ballInfos[y].length - 1)) && (ballInfos[y][x + 1] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x + 1, y));
}
if ((y % 2) == 0) {
if (y > 0) {
if ((x > 0) && (ballInfos[y - 1][x - 1] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x - 1, y - 1));
}
if ((x < (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1)) && (ballInfos[y - 1][x] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x, y - 1));
}
}
if (y < (ballInfos.length - 1)) {
if ((x > 0) && (ballInfos[y + 1][x - 1] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x - 1, y + 1));
}
if ((x < (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1)) && (ballInfos[y + 1][x] == _local5)) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x, y + 1));
}
}
} else {
if (ballInfos[y - 1][x] == _local5) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x, y - 1));
}
if (ballInfos[y - 1][x + 1] == _local5) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x + 1, y - 1));
}
if (y < (ballInfos.length - 1)) {
if (ballInfos[y + 1][x] == _local5) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x, y + 1));
}
if (ballInfos[y + 1][x + 1] == _local5) {
addNonDuplicatePoint(_local4, new flash.geom.Point(x + 1, y + 1));
}
}
}
_local6++;
}
return(_local4);
}
function addNonDuplicatePoint(points, point) {
var _local1;
_local1 = 0;
while (_local1 < points.length) {
if ((points[_local1].x == point.__get__x()) && (points[_local1].y == point.__get__y())) {
return(undefined);
}
_local1++;
}
points.push(point);
}
function checkDrop() {
var _local6 = new Array();
var _local9 = new Array();
var _local11;
var _local12 = new Array();
var _local13;
var _local10;
var _local4;
var _local3;
var _local15;
var _local14;
var _local7;
var _local8;
var _local2;
var _local5;
_local2 = 0;
while (_local2 < ballInfos[lastFullRow + 1].length) {
if (ballInfos[lastFullRow + 1][_local2] == -1) {
} else {
_local6.push(new flash.geom.Point(_local2, lastFullRow + 1));
}
_local2++;
}
_local2 = 0;
while (_local2 < _local6.length) {
_local4 = _local6[_local2].x;
_local3 = _local6[_local2].y;
if ((_local4 > 0) && (ballInfos[_local3][_local4 - 1] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 - 1, _local3));
}
if ((_local4 < (ballInfos[_local3].length - 1)) && (ballInfos[_local3][_local4 + 1] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 + 1, _local3));
}
if ((_local3 % 2) == 0) {
if (_local3 > (lastFullRow + 1)) {
if ((_local4 > 0) && (ballInfos[_local3 - 1][_local4 - 1] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 - 1, _local3 - 1));
}
if ((_local4 < (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1)) && (ballInfos[_local3 - 1][_local4] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4, _local3 - 1));
}
}
if (_local3 < (ballInfos.length - 1)) {
if ((_local4 > 0) && (ballInfos[_local3 + 1][_local4 - 1] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 - 1, _local3 + 1));
}
if ((_local4 < (com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX - 1)) && (ballInfos[_local3 + 1][_local4] != -1)) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4, _local3 + 1));
}
}
} else {
if (_local3 > (lastFullRow + 1)) {
if (ballInfos[_local3 - 1][_local4] != -1) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4, _local3 - 1));
}
if (ballInfos[_local3 - 1][_local4 + 1] != -1) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 + 1, _local3 - 1));
}
}
if (_local3 < (ballInfos.length - 1)) {
if (ballInfos[_local3 + 1][_local4] != -1) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4, _local3 + 1));
}
if (ballInfos[_local3 + 1][_local4 + 1] != -1) {
addNonDuplicatePoint(_local6, new flash.geom.Point(_local4 + 1, _local3 + 1));
}
}
}
_local2++;
}
_local2 = lastFullRow + 1;
while (_local2 < ballInfos.length) {
_local9[_local2] = new Array();
_local2++;
}
_local2 = 0;
while (_local2 < _local6.length) {
_local9[_local6[_local2].y][_local6[_local2].x] = true;
_local2++;
}
_local11 = 0;
_local10 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
_local2 = lastFullRow + 1;
while (_local2 < ballInfos.length) {
_local5 = 0;
while (_local5 < ballInfos[_local2].length) {
if (ballInfos[_local2][_local5] == -1) {
} else if (_local9[_local2][_local5]) {
} else {
if (balls[_local2][_local5]) {
balls[_local2][_local5].startTime = _local10;
balls[_local2][_local5].startY = balls[_local2][_local5].y;
droppingBalls.push(balls[_local2][_local5]);
} else {
_local7 = com.novelgames.flashgames.bouncingAS2.Ball(ballsHolder.createMovie("Ball"));
_local8 = getXYFromPosition(new flash.geom.Point(_local5, _local2));
_local7.setType(ballInfos[_local2][_local5]);
_local7.__set__x(_local8.x);
_local7.__set__y(_local8.y);
_local7.startTime = _local10;
_local7.startY = _local8.y;
ballsHolder.addChild(_local7);
droppingBalls.push(_local7);
}
ballInfos[_local2][_local5] = -1;
_local11++;
}
_local5++;
}
_local2++;
}
_local13 = _local12.length * com.novelgames.flashgames.bouncingAS2.Config.SCORE_DROP;
score = score + _local13;
}
function moveExplodes(time) {
var _local3;
var _local2;
_local2 = 0;
while (_local2 < explodes.length) {
_local3 = (time - explodes[_local2].startTime) / com.novelgames.flashgames.bouncingAS2.Config.EXPLODE_TIME;
if (_local3 >= 1) {
explodesHolder.removeChild(explodes[_local2]);
explodes.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function moveDroppingBalls(time) {
var _local3;
var _local2;
_local2 = 0;
while (_local2 < droppingBalls.length) {
_local3 = (time - droppingBalls[_local2].startTime) / 1000;
droppingBalls[_local2].y = droppingBalls[_local2].startY + (((com.novelgames.flashgames.bouncingAS2.Config.BALL_DROPACCELERATION * _local3) * _local3) / 2);
if (droppingBalls[_local2].y > (__get__stage().__get__stageHeight() + (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2))) {
ballsHolder.removeChild(droppingBalls[_local2]);
droppingBalls.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function checkWin() {
var _local5;
var _local6;
var _local2;
var _local4;
var _local3;
if (ballInfos.length > 0) {
return(undefined);
}
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN, this, "shootBall");
ballsHolder.removeChild(ballToShoot);
ballsHolder.removeChild(nextBallToShoot);
_local5 = Math.floor((com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY - topY) / com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE);
if (_local5 <= 0) {
_local5 = 1;
}
stars = new Array();
_local4 = 0;
while (_local4 < _local5) {
_local3 = 0;
while (_local3 < com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) {
_local2 = com.novelgames.flashgames.bouncingAS2.Star(starsHolder.createMovie("Star"));
_local2.x = (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2) + (_local3 * com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE);
_local2.y = (com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY - (com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE / 2)) - (_local4 * com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE);
_local2.visible = false;
starsHolder.addChild(_local2);
stars[(_local4 * com.novelgames.flashgames.bouncingAS2.Config.BALL_DIMENSIONX) + _local3] = _local2;
_local3++;
}
_local4++;
}
_parent.showWin();
soundWin.play();
intervalID.stop();
startTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
lastTime = startTime;
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "onWinTime");
intervalID.start();
}
function onWinTime(timerEvent) {
var _local4 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
var _local3;
var _local2;
moveExplodes(_local4);
moveDroppingBalls(_local4);
_local2 = 0;
while (_local2 < stars.length) {
_local3 = (_local4 - startTime) - (_local2 * com.novelgames.flashgames.bouncingAS2.Config.STAR_APPEARINTERVAL);
if ((_local3 <= 0) || (_local3 >= com.novelgames.flashgames.bouncingAS2.Config.STAR_APPEARTIME)) {
stars[_local2].visible = false;
} else {
if (((lastTime - startTime) - (_local2 * com.novelgames.flashgames.bouncingAS2.Config.STAR_APPEARINTERVAL)) <= 0) {
stars[_local2].visible = true;
score = score + com.novelgames.flashgames.bouncingAS2.Config.SCORE_STAR;
}
stars[_local2].alpha = 1 - (_local3 / com.novelgames.flashgames.bouncingAS2.Config.STAR_APPEARTIME);
}
_local2++;
}
if (_local3 >= com.novelgames.flashgames.bouncingAS2.Config.STAR_APPEARTIME) {
_local2 = 0;
while (_local2 < stars.length) {
starsHolder.removeChild(stars[_local2]);
_local2++;
}
intervalID.stop();
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(com.novelgames.flashgames.bouncingAS2.Config.MESSAGE_WINTIME, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "startNextLevel");
intervalID.start();
}
lastTime = _local4;
timerEvent.updateAfterEvent();
}
function startNextLevel(timerEvent) {
intervalID.stop();
if (((currentLevel + 1) >= 6) && (com.novelgames.flashgames.bouncingAS2.Config.GAME_DEMO)) {
setGameOver();
} else {
startLevel(currentLevel + 1);
}
}
function setGameOver() {
trace("Game OOOOOVER");
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN, this, "shootBall");
if (ballToShoot) {
ballsHolder.removeChild(ballToShoot);
}
if (nextBallToShoot) {
ballsHolder.removeChild(nextBallToShoot);
}
if (shootingBall) {
ballsHolder.removeChild(shootingBall);
}
_parent.showGameOver();
startTopY = topY;
moveSpeed = com.novelgames.flashgames.bouncingAS2.Config.BALL_GAMEOVERSPEED;
soundGameOver.play();
intervalID.stop();
startTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
lastTime = startTime;
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "onGameOverTime");
intervalID.start();
}
function checkGameOver() {
var _local2;
if (((topY + ((ballInfos.length - 1) * rowSpacing)) + com.novelgames.flashgames.bouncingAS2.Config.BALL_SIZE) <= com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY) {
return(undefined);
}
trace("GAME OVER");
com.novelgames.flashgames.commonAS2.Keyboard.addEventListener(com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN, this, "shootBall");
if (ballToShoot) {
ballsHolder.removeChild(ballToShoot);
}
if (nextBallToShoot) {
ballsHolder.removeChild(nextBallToShoot);
}
if (shootingBall) {
ballsHolder.removeChild(shootingBall);
}
_parent.showGameOver();
startTopY = topY;
moveSpeed = com.novelgames.flashgames.bouncingAS2.Config.BALL_GAMEOVERSPEED;
soundGameOver.play();
intervalID.stop();
startTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
lastTime = startTime;
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "onGameOverTime");
intervalID.start();
}
function onGameOverTime(timerEvent) {
var _local2 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
var _local3 = false;
if ((((_local2 - startTime) * com.novelgames.flashgames.bouncingAS2.Config.BALL_GAMEOVERSPEED) / 1000) >= ((com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY - startTopY) - (ballGeneratedRow * rowSpacing))) {
_local2 = startTime + ((((com.novelgames.flashgames.bouncingAS2.Config.BALL_SHOOTY - startTopY) - (ballGeneratedRow * rowSpacing)) * 1000) / com.novelgames.flashgames.bouncingAS2.Config.BALL_GAMEOVERSPEED);
_local3 = true;
}
moveBalls(_local2, false);
weight.__set__y(topY + (ballGeneratedRow * rowSpacing));
moveExplodes(_local2);
moveDroppingBalls(_local2);
lastTime = _local2;
if (_local3) {
intervalID.stop();
intervalID = new com.novelgames.flashgames.commonAS2.NewTimer(com.novelgames.flashgames.bouncingAS2.Config.MESSAGE_GAMEOVERTIME, 0);
intervalID.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "showPlayAgain");
intervalID.start();
}
timerEvent.updateAfterEvent();
}
function showPlayAgain(timerEvent) {
intervalID.stop();
Object(__get__parent()).showEnterHighScore(score);
}
}
Symbol 657 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Ball] Frame 0
class com.novelgames.flashgames.bouncingAS2.Ball extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var bulle, type, bacType;
function Ball () {
super();
bulle.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
}
function setType(type) {
this.type = type;
bacType = new Number();
displayType(this, type, bacType);
}
function displayType(mc, col, bacType) {
mc.bulle.gotoAndStop("bulle_" + com.novelgames.flashgames.bouncingAS2.Config.ARRAY_COLOR[col]);
}
}
Symbol 658 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Config] Frame 0
class com.novelgames.flashgames.bouncingAS2.Config
{
function Config () {
}
static var BALL_SIZE = 25;
static var BALL_HITSIZE = 21;
static var BALL_DIMENSIONX = 8;
static var BALL_INITIALROWS = 6;
static var BALL_COLOURS = [16711680, 16776960, 255, 65280, 16711935, 65535, 16750848];
static var BALL_SHOOTY = 345;
static var BALL_SHOOTMINANGLE = -82;
static var BALL_SHOOTMAXANGLE = 82;
static var BALL_SHOOTSPEED = 1000;
static var BALL_SHOOTDELAY = 6;
static var BALL_DROPACCELERATION = 1000;
static var BALL_GAMEOVERSPEED = 500;
static var GROUPSIZE = 3;
static var EXPLODE_DEGREES = 90;
static var EXPLODE_TIME = 600;
static var STAR_APPEARTIME = 500;
static var STAR_APPEARINTERVAL = 10;
static var LEVEL_INITIALROWS = 6;
static var LEVEL_ROWSINCREASE = 2;
static var LEVEL_INITIALTYPES = 3;
static var LEVEL_TYPESINCREASE = 0.34;
static var LEVEL_INITIALMOVESPEED = 2;
static var LEVEL_MOVESPEEDINCREASE = 0.12;
static var MESSAGE_LEVELTIME = 1000;
static var MESSAGE_WINTIME = 1000;
static var MESSAGE_GAMEOVERTIME = 1000;
static var SCORE_GROUP = 100;
static var SCORE_EXTRABALL = 50;
static var SCORE_DROP = 50;
static var SCORE_STAR = 10;
static var ARRAY_COLOR = ["rouge", "jaune", "bleu", "mauve", "vert", "violet", "orange", "gameover"];
static var TYPE_BAC_NORMAL = 2;
static var MOOD_ARRAY = ["normal", "happy", "LOL", "unhappy", "crying", "blink", "vener", "langue", "malade"];
}
Symbol 659 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Keyboard] Frame 0
class com.novelgames.flashgames.commonAS2.Keyboard
{
static var listenerArray;
function Keyboard () {
}
static function addEventListener(type, listenerObject, listenerFunctionName) {
if (listenerArray == undefined) {
listenerArray = new Array();
Key.addListener({onKeyDown:chapatiz.utils.Delegate.create(com.novelgames.flashgames.commonAS2.Keyboard, onKeyMove, com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN), onKeyUp:chapatiz.utils.Delegate.create(com.novelgames.flashgames.commonAS2.Keyboard, onKeyMove, com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP)});
}
if (listenerArray[type] == undefined) {
listenerArray[type] = new Array();
}
listenerArray[type].push({target:listenerObject, func:listenerObject[listenerFunctionName]});
}
static function removeEventListener(type, listenerObject, listenerFunctionName) {
if (listenerArray[type] == undefined) {
return(undefined);
}
for (var _local3 in listenerArray[type]) {
if (listenerArray[type][_local3].func == listenerObject[listenerFunctionName]) {
delete listenerArray[type][_local3];
}
}
}
static function onKeyMove(type) {
if (listenerArray[type] == undefined) {
return(undefined);
}
for (var _local2 in listenerArray[type]) {
listenerArray[type][_local2].func.apply(listenerArray[type][_local2].target, [new com.novelgames.flashgames.commonAS2.KeyboardEvent(com.novelgames.flashgames.commonAS2.Keyboard)]);
}
}
static var LEFT = 37;
static var RIGHT = 39;
static var UP = 38;
static var DOWN = 40;
static var SPACE = 32;
static var BACKSPACE = 8;
static var SHIFT = 16;
static var ENTER = 13;
}
Symbol 660 MovieClip [__Packages.chapatiz.utils.Delegate] Frame 0
class chapatiz.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local3 = arguments.callee.args;
return(_local4.apply(_local2, arguments.concat(_local3)));
};
_local2.target = obj;
_local2.func = func;
_local2.args = arguments.slice(2);
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 661 MovieClip [__Packages.chapatiz.utils.Localisation] Frame 0
class chapatiz.utils.Localisation
{
function Localisation () {
}
static function localString(strKey, defaultStr) {
if ((_level0.langArray == undefined) || (_level0.langArray[strKey] == undefined)) {
return(defaultStr);
}
return(_level0.langArray[strKey]);
}
}
Symbol 662 MovieClip [__Packages.flash.geom.Point] Frame 0
class flash.geom.Point extends Object
{
var _x, _y;
function Point (x, y) {
super();
this.x = (((x != undefined) ? (x) : 0));
this.y = (((y != undefined) ? (y) : 0));
}
function get length() {
return(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
}
function get x() {
return(_x);
}
function set x(num) {
_x = num;
//return(x);
}
function get y() {
return(_y);
}
function set y(num) {
_y = num;
//return(y);
}
static function distance(pt1, pt2) {
return(Math.sqrt(Math.pow(pt2.__get__x() - pt1.__get__x(), 2) + Math.pow(pt2.__get__y() - pt1.__get__y(), 2)));
}
function clone() {
return(new flash.geom.Point(x, y));
}
function equals(toCompare) {
return((x == toCompare.x) && (y == toCompare.y));
}
function normalize(length) {
}
function offset(dx, dy) {
x = x + dx;
y = y + dy;
}
function substract(v) {
return(new flash.geom.Point(x - v.__get__x(), y - v.__get__y()));
}
function toString() {
return(((("( x=" + x) + " , y=") + y) + " )");
}
}
Symbol 663 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Explode] Frame 0
class com.novelgames.flashgames.bouncingAS2.Explode extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
function Explode () {
super();
}
}
Symbol 664 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Star] Frame 0
class com.novelgames.flashgames.bouncingAS2.Star extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
function Star () {
super();
}
}
Symbol 665 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.Message] Frame 0
class com.novelgames.flashgames.bouncingAS2.Message extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var stop, level, gotoAndStop, messageLevel, createMovie, addChild, winTxt, winTxt_shadow1, winTxt_shadow2, gameoverAnim, messagePlayAgain, removeChild, __get__parent, getURL;
function Message () {
super();
(stop());// not popped
}
function showLevel(level) {
this.level = level;
(gotoAndStop("hide"));// not popped
messageLevel = com.novelgames.flashgames.bouncingAS2.MessageLevel(createMovie("MessageLevel"));
messageLevel.levelTxt_shadow.text = chapatiz.utils.Localisation.localString("BLOBIPOP_LEVEL", "Niveau");
messageLevel.levelTxt.text = messageLevel.levelTxt_shadow.text;
messageLevel.levelText.text = level.toString();
addChild(messageLevel);
}
function showWin() {
(gotoAndStop("win"));// not popped
winTxt.text = chapatiz.utils.Localisation.localString("BLOBIPOP_WIN", "Niveau gagn\u00E9 !");
winTxt_shadow1.text = winTxt.text;
winTxt_shadow2.text = winTxt.text;
}
function showGameOver() {
(gotoAndStop("gameOver"));// not popped
gameoverAnim.gameoverMc.gameoverTxt.text = chapatiz.utils.Localisation.localString("BLOBIPOP_GAMEOVER", "Game Over");
gameoverAnim.gameoverMc.gameoverTxt_shadow1.text = gameoverAnim.gameoverMc.gameoverTxt.text;
gameoverAnim.gameoverMc.gameoverTxt_shadow2.text = gameoverAnim.gameoverMc.gameoverTxt.text;
}
function showPlayAgain() {
(gotoAndStop("hide"));// not popped
messagePlayAgain = com.novelgames.flashgames.bouncingAS2.MessagePlayAgain(createMovie("MessagePlayAgain"));
messagePlayAgain.playAgainButton.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "playAgainButtonClicked");
messagePlayAgain.homeButton.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "homeButtonClicked");
messagePlayAgain.gotoChapButton.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "gotoChapButtonClicked");
addChild(messagePlayAgain);
}
function hide() {
if (messageLevel) {
removeChild(messageLevel);
messageLevel = undefined;
}
if (messagePlayAgain) {
removeChild(messagePlayAgain);
messagePlayAgain = undefined;
}
(gotoAndStop("hide"));// not popped
}
function playAgainButtonClicked(mouseEvent) {
__get__parent().gotoGamePage();
}
function gotoChapButtonClicked(mouseEvent) {
trace("getURL chap");
(getURL("http://uk.chapatiz.com", "_blank"));// not popped
}
function homeButtonClicked(mouseEvent) {
__get__parent().gotoTitlePage();
}
}
Symbol 666 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.MessageLevel] Frame 0
class com.novelgames.flashgames.bouncingAS2.MessageLevel extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var levelText;
function MessageLevel () {
super();
levelText.__proto__ = com.novelgames.flashgames.commonAS2.NewTextField.prototype;
}
}
Symbol 667 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewTextField] Frame 0
class com.novelgames.flashgames.commonAS2.NewTextField extends TextField
{
var _x, _y, _rotation, _visible, _alpha, _width, _height, scroll, maxscroll;
function NewTextField () {
super();
}
function set x(x) {
_x = x;
//return(this.x);
}
function get x() {
return(_x);
}
function set y(y) {
_y = y;
//return(this.y);
}
function get y() {
return(_y);
}
function set rotation(rotation) {
_rotation = rotation;
//return(this.rotation);
}
function get rotation() {
return(_rotation);
}
function set visible(visible) {
_visible = visible;
//return(this.visible);
}
function get visible() {
return(_visible);
}
function set alpha(alpha) {
_alpha = alpha * 100;
//return(this.alpha);
}
function get alpha() {
return(_alpha / 100);
}
function get width() {
return(_width);
}
function set width(width) {
_width = width;
//return(this.width);
}
function get height() {
return(_height);
}
function set height(height) {
_height = height;
//return(this.height);
}
function set scrollV(scrollV) {
scroll = scrollV;
//return(this.scrollV);
}
function get scrollV() {
return(scroll);
}
function set maxScrollV(maxScrollV) {
maxscroll = maxScrollV;
//return(this.maxScrollV);
}
function get maxScrollV() {
return(maxscroll);
}
function setTextFormat(textFormat, beginIndex, endIndex) {
if ((beginIndex == undefined) || (endIndex == undefined)) {
super.setTextFormat(textFormat);
} else {
super.setTextFormat(beginIndex, endIndex, textFormat);
}
}
}
Symbol 668 MovieClip [__Packages.com.novelgames.flashgames.bouncingAS2.MessagePlayAgain] Frame 0
class com.novelgames.flashgames.bouncingAS2.MessagePlayAgain extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var playAgainButton, homeButton, gotoChapButton;
function MessagePlayAgain () {
super();
playAgainButton.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
homeButton.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
gotoChapButton.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
}
}
Symbol 669 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.MuteButton] Frame 0
class com.novelgames.flashgames.commonAS2.MuteButton extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop;
function MuteButton () {
super();
if (new Sound().getVolume() == 0) {
showOff();
} else {
showOn();
}
}
function onPress() {
if (new Sound().getVolume() == 0) {
new Sound().setVolume(100);
showOn();
} else {
new Sound().setVolume(0);
showOff();
}
}
function showOff() {
(gotoAndStop("off"));// not popped
}
function showOn() {
(gotoAndStop("on"));// not popped
}
}