Frame 1
Stage.showMenu = false;
Frame 2
var perc = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
pb.gotoAndStop(perc);
pbtext.text = perc + "%";
Frame 3
if (perc < 100) {
gotoAndPlay (2);
}
Frame 4
apreloaderholder._visible = false;
Frame 5
apreloaderholder.removeMovieClip();
apreloaderholdersound.removeMovieClip();
Frame 6
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("7ea56a00", this, 10301, true);
Frame 7
var Application = new Application(this);
stop();
Symbol 32 MovieClip [mcCIntroScreen] Frame 1
#initclip 114
Object.registerClass("mcCIntroScreen", CIntroScreen);
#endinitclip
Symbol 32 MovieClip [mcCIntroScreen] Frame 108
_global.__DISPATCH({type:"endScreen", name:this._name});
stop();
Symbol 1061 MovieClip [__Packages.CScreen] Frame 0
class CScreen extends MovieClip
{
var _visible;
function CScreen () {
super();
_visible = false;
}
function show() {
_visible = true;
}
function hide() {
_visible = false;
}
}
Symbol 1062 MovieClip [__Packages.CIntroScreen] Frame 0
class CIntroScreen extends CScreen
{
function CIntroScreen () {
super();
}
}
Symbol 1063 MovieClip [__Packages.Thumbrack] Frame 0
class Thumbrack extends MovieClip
{
var arThumb, origheight, _height, origwidth, _width, depth, ctrTween, cpos, cwidth, dz;
function Thumbrack () {
super();
arThumb = new Array();
origheight = _height;
origwidth = _width;
EventCenter.access().addEventListener("thumbMovement", this);
depth = 0;
ctrTween = 0;
EventCenter.access().addEventListener("goleft", this);
EventCenter.access().addEventListener("goright", this);
}
function endslide() {
ctrTween--;
}
function goleft() {
if (ctrTween > 0) {
return(undefined);
}
if (cpos <= 0) {
cpos = 0;
return(undefined);
}
var _local3 = 0;
while (_local3 < arThumb.length) {
var _local2 = arThumb[_local3];
var _local5 = Math.floor(_local3 / 5);
var _local4 = (_local3 % 5) * 0.05;
if (_local5 >= (cpos + 3)) {
ctrTween++;
_local2.slideTo(_local2._x + thumbspace, _local2._y, tt, "easeOutExpo", p1 + _local4, mx.utils.Delegate.create(this, endslide));
_local2.fadeOut(1, "easeOutExpo", p1 + _local4);
} else if (_local5 <= (cpos - 1)) {
ctrTween++;
_local2.slideTo(_local2._x + thumbspace, _local2._y, tt, "easeOutExpo", p3 + _local4, mx.utils.Delegate.create(this, endslide));
_local2.fadeOut(0, "easeOutExpo", 0);
_local2.fadeIn(1, "easeOutExpo", p3 + _local4);
} else {
ctrTween++;
_local2.slideTo(_local2._x + thumbspace, _local2._y, tt, "easeOutExpo", p2 + _local4, mx.utils.Delegate.create(this, endslide));
}
_local3++;
}
cpos--;
}
function goright() {
if (ctrTween > 0) {
return(undefined);
}
if (cpos >= (cwidth - 4)) {
cpos = cwidth - 4;
return(undefined);
}
var _local3 = 0;
while (_local3 < arThumb.length) {
var _local2 = arThumb[_local3];
var _local5 = Math.floor(_local3 / 5);
var _local4 = (_local3 % 5) * 0.05;
if (_local5 <= cpos) {
ctrTween++;
_local2.slideTo(_local2._x - thumbspace, _local2._y, tt, "easeOutExpo", p1 + _local4, mx.utils.Delegate.create(this, endslide));
_local2.fadeOut(1, "easeOutExpo", p1 + _local4);
} else if (_local5 >= (cpos + 4)) {
ctrTween++;
_local2.slideTo(_local2._x - thumbspace, _local2._y, tt, "easeOutExpo", p3 + _local4, mx.utils.Delegate.create(this, endslide));
_local2.fadeOut(0, "easeOutExpo", 0);
_local2.fadeIn(1, "easeOutExpo", p3 + _local4);
} else {
ctrTween++;
_local2.slideTo(_local2._x - thumbspace, _local2._y, tt, "easeOutExpo", p2 + _local4, mx.utils.Delegate.create(this, endslide));
}
_local3++;
}
cpos++;
}
function addThumb(thumbdata) {
var _local4 = "item" + String(depth);
var _local2 = dz.attachMovie(thumbdata.identifier, _local4, depth, {_x:0, _y:0});
if (thumbdata.height == -1) {
thumbdata.height = _local2._height;
}
_local2._y = thumbdata.height * depth;
arThumb.push(_local2);
depth++;
return(_local2);
}
function thumbMovement(o) {
if (o.horz == false) {
var _local2 = Number(o.param);
_local2 = ((dz._height - origheight) / 100) * _local2;
dz._y = -_local2;
} else {
var _local3 = Number(o.param);
_local3 = ((dz._width - origwidth) / 100) * _local3;
dz._x = -_local3;
}
}
var thumbsize = 68;
var thumbspace = 72.3;
var p1 = 0;
var p2 = 0.35;
var p3 = 0.7;
var tt = 0.7;
}
Symbol 1064 MovieClip [__Packages.EventCenter] Frame 0
class EventCenter
{
static var _instance;
var _eventSource;
function EventCenter () {
_eventSource = {};
mx.events.EventDispatcher.initialize(_eventSource);
}
static function access() {
if (_instance == undefined) {
_instance = new EventCenter();
}
return(_instance);
}
function addEventListener(type, listener) {
_eventSource.addEventListener(type, listener);
}
function removeEventListener(type, listener) {
_eventSource.removeEventListener(type, listener);
}
function dispatchEvent(event) {
_eventSource.dispatchEvent(event);
}
function _dispatchEvent(event) {
_eventSource.dispatchEvent(event);
}
function broadcast(_type, _target, _data) {
var _local2 = {type:_type, target:_target, data:_data};
_eventSource.dispatchEvent(_local2);
}
}
Symbol 1065 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 1066 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1067 MovieClip [__Packages.Scrollbar] Frame 0
class Scrollbar extends MovieClip
{
var _name, Thumb;
function Scrollbar () {
super();
if (_name == "horz") {
Thumb.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.startDrag(true, 409, 0, 20, 0);
this.iScroller = setInterval(this._parent.mouseMovement, 5, this._parent);
}
};
} else {
Thumb.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.startDrag(true, 0, 387);
this.iScroller = setInterval(this._parent.mouseMovement, 5, this._parent);
}
};
}
Thumb.onMouseUp = function () {
this.stopDrag();
clearInterval(this.iScroller);
};
}
function mouseMovement(_this) {
if (_this._name == "horz") {
var _local3 = _this.Thumb._x - 20;
if (_local3 < 0) {
_local3 = 0;
}
if (_local3 > 409) {
_local3 = 409;
}
var _local6 = (_local3 / 387) * 100;
_global.__DISPATCH({type:"thumbMovement", param:_local6, horz:true});
} else {
var _local2 = _this.Thumb._y;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 387) {
_local2 = 387;
}
var _local5 = (_local2 / 387) * 100;
_global.__DISPATCH({type:"thumbMovement", param:_local5, horz:false});
}
}
var tumbheight = 387;
}
Symbol 1068 MovieClip [__Packages.CContinueGameScreen] Frame 0
class CContinueGameScreen extends CScreen
{
var txTournamentStatus, mcflag, txTeamName, ctr, onEnterFrame, txBtc, Btc;
function CContinueGameScreen (tipeview) {
super();
if (_global.AppStarted == undefined) {
return;
}
txTournamentStatus.text = CTournament.ins().getToutnamentStatus();
var _local4 = CTeamManager.ins().currentTeam;
mcflag.toid = _local4.flagid;
mcflag.setFlag(_local4.flagid);
txTeamName.text = (_local4.teamname + " - ") + GroupName[_local4.group];
ctr = 0;
onEnterFrame = function () {
if (this.ctr > 1) {
this.onEnterFrame = null;
this.CreateList();
}
this.ctr++;
};
if (CTournament.ins().gameover) {
txBtc.text = "END";
Btc.onRelease = function () {
_global.__DISPATCH({type:"endScreen", name:this._parent._name, tonew:true});
};
} else {
txBtc.text = "Continue";
Btc.onRelease = function () {
_global.__DISPATCH({type:"endScreen", name:this._parent._name, tonew:false});
};
}
}
function CreateList() {
}
var GroupName = new Array("Group A", "Group B", "Group C", "Group D", "Group E", "Group F", "Group G", "Group H");
}
Symbol 1069 MovieClip [__Packages.CTournament] Frame 0
class CTournament
{
static var _oI;
var tournamentPhase, currentGroupFixture, gameover, secondRoundMatches, quarterFinalMatches, semiFinalMatches, FinalMatches, firstRoundMatches, currentMatch;
function CTournament () {
tournamentPhase = -1;
}
function newTournament() {
tournamentPhase = 1;
currentGroupFixture = 0;
gameover = false;
createFirstRoundMatches();
secondRoundMatches = new Array();
quarterFinalMatches = new Array();
semiFinalMatches = new Array();
FinalMatches = new Array();
gotoNextMatch();
}
function endTournament() {
gameover = true;
}
function createFirstRoundMatches() {
firstRoundMatches = new Array();
currentMatch = null;
var _local2 = 0;
while (_local2 < 8) {
var _local6 = CTeamManager.ins().teams[(_local2 * 4) + 0];
var _local5 = CTeamManager.ins().teams[(_local2 * 4) + 1];
var _local4 = CTeamManager.ins().teams[(_local2 * 4) + 2];
var _local3 = CTeamManager.ins().teams[(_local2 * 4) + 3];
_local6.restartTeam(_local2);
_local5.restartTeam(_local2);
_local4.restartTeam(_local2);
_local3.restartTeam(_local2);
firstRoundMatches.push(new CMatch(_local2, _local6, _local4));
firstRoundMatches.push(new CMatch(_local2, _local5, _local3));
firstRoundMatches.push(new CMatch(_local2, _local6, _local5));
firstRoundMatches.push(new CMatch(_local2, _local3, _local4));
firstRoundMatches.push(new CMatch(_local2, _local3, _local6));
firstRoundMatches.push(new CMatch(_local2, _local4, _local5));
_local2++;
}
}
function createSecondRoundMatches() {
secondRoundMatches = new Array();
currentMatch = null;
var _local2;
var _local6;
var _local7;
var _local8;
var _local9;
var _local3 = 0;
while (_local3 < 8) {
var _local5 = firstRoundMatches[_local3 * 6];
var _local4 = firstRoundMatches[(_local3 * 6) + 1];
_local2 = new Array();
_local2.push(_local5.team1);
_local2.push(_local5.team2);
_local2.push(_local4.team1);
_local2.push(_local4.team2);
_local2.sortOn("points", Array.NUMERIC | Array.DESCENDING);
_local6 = _local2[0];
_local7 = _local2[1];
_local5 = firstRoundMatches[(_local3 + 1) * 6];
_local4 = firstRoundMatches[((_local3 + 1) * 6) + 1];
_local2 = new Array();
_local2.push(_local5.team1);
_local2.push(_local5.team2);
_local2.push(_local4.team1);
_local2.push(_local4.team2);
_local2.sortOn("points", Array.NUMERIC | Array.DESCENDING);
_local8 = _local2[0];
_local9 = _local2[1];
secondRoundMatches.push(new CMatch(0, _local6, _local9));
secondRoundMatches.push(new CMatch(0, _local8, _local7));
_local3 = _local3 + 2;
}
}
function createQuarterFinalMatches() {
quarterFinalMatches = new Array();
currentMatch = null;
quarterFinalMatches.push(new CMatch(0, winnerof(secondRoundMatches[0]), winnerof(secondRoundMatches[2])));
quarterFinalMatches.push(new CMatch(0, winnerof(secondRoundMatches[1]), winnerof(secondRoundMatches[3])));
quarterFinalMatches.push(new CMatch(0, winnerof(secondRoundMatches[4]), winnerof(secondRoundMatches[6])));
quarterFinalMatches.push(new CMatch(0, winnerof(secondRoundMatches[5]), winnerof(secondRoundMatches[7])));
}
function createSemiFinalMatches() {
semiFinalMatches = new Array();
currentMatch = null;
semiFinalMatches.push(new CMatch(0, winnerof(quarterFinalMatches[0]), winnerof(quarterFinalMatches[2])));
semiFinalMatches.push(new CMatch(0, winnerof(quarterFinalMatches[1]), winnerof(quarterFinalMatches[3])));
}
function createFinalMatches() {
FinalMatches = new Array();
currentMatch = null;
FinalMatches.push(new CMatch(0, winnerof(semiFinalMatches[0]), winnerof(semiFinalMatches[1])));
}
function winnerof(ma) {
if (ma.scoreteam1 > ma.scoreteam2) {
return(ma.team1);
}
return(ma.team2);
}
function finishedPhase() {
while (tournamentPhase < 8) {
nextPhase();
}
}
function nextPhase() {
var _local2 = "";
tournamentPhase++;
gotoNextMatch();
switch (tournamentPhase) {
case 4 :
createSecondRoundMatches();
currentMatch = inCurrentMatches();
_local2 = "";
if (currentMatch == null) {
gameover = true;
} else {
_local2 = "Congratulation, You have been qualified for playoff round!";
}
break;
case 5 :
createQuarterFinalMatches();
currentMatch = inCurrentMatches();
_local2 = "";
if (currentMatch == null) {
gameover = true;
} else {
_local2 = "Congratulation, You're going to the quarter final!";
}
break;
case 6 :
createSemiFinalMatches();
currentMatch = inCurrentMatches();
_local2 = "";
if (currentMatch == null) {
gameover = true;
} else {
_local2 = "Congratulation, You're going to semi final!";
}
break;
case 7 :
createFinalMatches();
currentMatch = inCurrentMatches();
_local2 = "";
if (currentMatch == null) {
gameover = true;
} else {
_local2 = "Congratulation, You're going to final!";
}
break;
case 8 :
_local2 = "";
gameover = true;
}
return(_local2);
}
function gotoNextMatch() {
switch (tournamentPhase) {
case 1 :
case 2 :
case 3 :
case 4 :
var _local3 = false;
for ( ; (!_local3) && (currentGroupFixture < 6) ; currentGroupFixture++) {
var _local2 = inCurrentMatches();
if (_local2 != null) {
if (_local2.played) {
simulateMatches();
continue;
}
_local3 = true;
currentMatch = _local2;
return(undefined);
} else {
simulateMatches();
}
}
break;
case 5 :
case 6 :
case 7 :
case 8 :
simulateMatches();
}
}
function inCurrentMatches() {
if (tournamentPhase < 4) {
var _local2 = 0;
while (_local2 < 8) {
var _local3 = firstRoundMatches[(_local2 * 6) + currentGroupFixture];
if ((_local3.team1 == CTeamManager.ins().currentTeam) || (_local3.team2 == CTeamManager.ins().currentTeam)) {
return(_local3);
}
_local2++;
}
} else {
switch (tournamentPhase) {
case 4 :
var _local2 = 0;
while (_local2 < secondRoundMatches.length) {
var _local3 = secondRoundMatches[_local2];
if ((_local3.team1 == CTeamManager.ins().currentTeam) || (_local3.team2 == CTeamManager.ins().currentTeam)) {
return(_local3);
}
_local2++;
}
break;
case 5 :
_local2 = 0;
while (_local2 < quarterFinalMatches.length) {
var _local3 = quarterFinalMatches[_local2];
if ((_local3.team1 == CTeamManager.ins().currentTeam) || (_local3.team2 == CTeamManager.ins().currentTeam)) {
return(_local3);
}
_local2++;
}
break;
case 6 :
_local2 = 0;
while (_local2 < semiFinalMatches.length) {
var _local3 = semiFinalMatches[_local2];
if ((_local3.team1 == CTeamManager.ins().currentTeam) || (_local3.team2 == CTeamManager.ins().currentTeam)) {
return(_local3);
}
_local2++;
}
break;
case 7 :
_local2 = 0;
for(;;){
if (_local2 >= FinalMatches.length) {
break;
}
var _local3 = FinalMatches[_local2];
if ((_local3.team1 == CTeamManager.ins().currentTeam) || (_local3.team2 == CTeamManager.ins().currentTeam)) {
return(_local3);
}
_local2++;
};
}
return(null);
}
return(null);
}
function simulateMatches() {
if (tournamentPhase < 5) {
var _local2 = 0;
while (_local2 < 8) {
var _local3 = firstRoundMatches[(_local2 * 6) + currentGroupFixture];
if (_local3 != currentMatch) {
_local3.randomMatch(true);
}
_local3.calculateResult();
_local2++;
}
} else {
switch (tournamentPhase) {
case 5 :
var _local2 = 0;
while (_local2 < secondRoundMatches.length) {
var _local3 = secondRoundMatches[_local2];
if (_local3 != currentMatch) {
_local3.randomMatch(false);
}
_local3.calculateResult();
_local2++;
}
break;
case 6 :
_local2 = 0;
while (_local2 < quarterFinalMatches.length) {
var _local3 = quarterFinalMatches[_local2];
if (_local3 != currentMatch) {
_local3.randomMatch(false);
}
_local3.calculateResult();
_local2++;
}
break;
case 7 :
_local2 = 0;
while (_local2 < semiFinalMatches.length) {
var _local3 = semiFinalMatches[_local2];
if (_local3 != currentMatch) {
_local3.randomMatch(false);
}
_local3.calculateResult();
_local2++;
}
break;
case 8 :
_local2 = 0;
for(;;){
if (_local2 >= FinalMatches.length) {
break;
}
var _local3 = FinalMatches[_local2];
if (_local3 != currentMatch) {
_local3.randomMatch(false);
}
_local3.calculateResult();
_local2++;
};
}
}
}
function getTournamentMatchData(mat) {
var _local2 = new Object();
var _local3 = getMatchFronCurrentMatchSet(mat);
_local2.team1 = _local3.team1.teamname;
_local2.team2 = _local3.team2.teamname;
_local2.teamwin = _local3.teamwin.teamname;
return(_local2);
}
function getTournamentGroupData(grp) {
var _local2 = new Object();
var _local5 = firstRoundMatches[grp * 6];
var _local4 = firstRoundMatches[(grp * 6) + 1];
var _local10 = firstRoundMatches[(grp * 6) + 2];
var _local9 = firstRoundMatches[(grp * 6) + 3];
var _local8 = firstRoundMatches[(grp * 6) + 4];
var _local7 = firstRoundMatches[(grp * 6) + 5];
_local2.nat1 = _local5.team1.teamname;
_local2.nat3 = _local5.team2.teamname;
_local2.nat2 = _local4.team1.teamname;
_local2.nat4 = _local4.team2.teamname;
_local2.a1 = _local5.scoreteam1;
_local2.a2 = _local5.scoreteam2;
_local2.b1 = _local4.scoreteam1;
_local2.b2 = _local4.scoreteam2;
_local2.c1 = _local10.scoreteam1;
_local2.c2 = _local10.scoreteam2;
_local2.d1 = _local9.scoreteam1;
_local2.d2 = _local9.scoreteam2;
_local2.e1 = _local8.scoreteam1;
_local2.e2 = _local8.scoreteam2;
_local2.f1 = _local7.scoreteam1;
_local2.f2 = _local7.scoreteam2;
var _local3 = new Array();
_local3.push(_local5.team1);
_local3.push(_local5.team2);
_local3.push(_local4.team1);
_local3.push(_local4.team2);
_local3.sortOn("points", Array.NUMERIC | Array.DESCENDING);
_local2.win1 = _local3[0].teamname;
_local2.win2 = _local3[1].teamname;
_local2.win3 = _local3[2].teamname;
_local2.win4 = _local3[3].teamname;
_local2.w1 = _local3[0].won;
_local2.w2 = _local3[1].won;
_local2.w3 = _local3[2].won;
_local2.w4 = _local3[3].won;
_local2.t1 = _local3[0].tied;
_local2.t2 = _local3[1].tied;
_local2.t3 = _local3[2].tied;
_local2.t4 = _local3[3].tied;
_local2.l1 = _local3[0].lost;
_local2.l2 = _local3[1].lost;
_local2.l3 = _local3[2].lost;
_local2.l4 = _local3[3].lost;
_local2.p1 = _local3[0].score;
_local2.p2 = _local3[1].score;
_local2.p3 = _local3[2].score;
_local2.p4 = _local3[3].score;
return(_local2);
}
function getMatchFronCurrentMatchSet(mat) {
switch (tournamentPhase) {
case 4 :
return(secondRoundMatches[mat]);
case 5 :
return(quarterFinalMatches[mat]);
case 6 :
return(semiFinalMatches[mat]);
case 7 :
return(FinalMatches[mat]);
}
}
function numMatchSet() {
switch (tournamentPhase) {
case 4 :
return(16);
case 5 :
return(8);
case 6 :
return(4);
case 7 :
return(2);
}
}
function getToutnamentStatus() {
switch (tournamentPhase) {
case 1 :
return("First Round - fixture 1");
case 2 :
return("First Round - fixture 2");
case 3 :
return("First Round - fixture 3");
case 4 :
return("Playoff - Second Round");
case 5 :
return("Playoff - Quarter Finals");
case 6 :
return("Playoff - Semi Finals");
case 7 :
return("Playoff - Finals");
case 8 :
return("World Champion");
}
}
static function _buildInstance() {
_oI = new CTournament();
return(_oI);
}
static function ins() {
return(((_oI instanceof CTournament) ? (_oI) : (_buildInstance())));
}
}
Symbol 1070 MovieClip [__Packages.CMatch] Frame 0
class CMatch
{
var played, round, totalkick1, totalkick2, scoreteam1, scoreteam2, team1, team2, teamwin;
function CMatch (group, _team1, _team2) {
played = false;
round = 1;
totalkick1 = CSessionManager.ins().numPlayPerGame;
totalkick2 = CSessionManager.ins().numPlayPerGame;
scoreteam1 = 0;
scoreteam2 = 0;
team1 = _team1;
team2 = _team2;
}
function tied() {
if (scoreteam1 == scoreteam2) {
return(true);
}
return(false);
}
function endRound(kicks) {
if (kicks == undefined) {
kicks = true;
}
if (round == 1) {
if (kicks) {
totalkick1--;
}
round = 2;
} else {
if (kicks) {
totalkick2--;
}
round = 1;
}
}
function addScore() {
if (round == 1) {
scoreteam1++;
} else {
scoreteam2++;
}
played = true;
}
function addScorea(sc1, sc2) {
scoreteam1 = sc1;
scoreteam2 = sc2;
played = true;
round = 2;
}
function randomMatch(cantied) {
played = true;
if (!cantied) {
while (tied()) {
scoreteam1 = Math.floor(Math.random() * CSessionManager.ins().numPlayPerGame);
scoreteam2 = Math.floor(Math.random() * CSessionManager.ins().numPlayPerGame);
}
} else {
scoreteam1 = Math.floor(Math.random() * CSessionManager.ins().numPlayPerGame);
scoreteam2 = Math.floor(Math.random() * CSessionManager.ins().numPlayPerGame);
}
round = 2;
}
function calculateResult() {
if (CTournament.ins().tournamentPhase > 4) {
return(undefined);
}
if (scoreteam1 == scoreteam2) {
team1.tied++;
team2.tied++;
} else if (scoreteam1 > scoreteam2) {
teamwin = team1;
team1.gap = team1.gap + (scoreteam1 - scoreteam2);
team1.won++;
team2.lost++;
} else {
teamwin = team2;
team2.gap = team2.gap + (scoreteam2 - scoreteam1);
team2.won++;
team1.lost++;
}
team1.goalin = team1.goalin + scoreteam1;
team2.goalin = team2.goalin + scoreteam2;
team1.calculateScore();
team2.calculateScore();
}
}
Symbol 1071 MovieClip [__Packages.CTeam] Frame 0
class CTeam
{
var id, flagid, teamname, shirtcolor1, pantscolor1, shirtcolor2, pantscolor2, goalie, cornerkicker, kicker, group, won, lost, tied, score, gap, points, goalin;
function CTeam (_id, _flagid, _teamname, _shirtcolor1, _pantscolor1, _shirtcolor2, _pantscolor2, _goalie, _cornerkicker, _kicker) {
id = _id;
flagid = _flagid;
teamname = _teamname;
shirtcolor1 = _shirtcolor1;
pantscolor1 = _pantscolor1;
shirtcolor2 = _shirtcolor2;
pantscolor2 = _pantscolor2;
goalie = _goalie;
cornerkicker = _cornerkicker;
kicker = _kicker;
}
function restartTeam(_group) {
group = _group;
won = 0;
lost = 0;
tied = 0;
score = 0;
gap = 0;
points = 0;
goalin = 0;
}
function calculateScore() {
score = (won * 3) + tied;
points = ((score * 1000) + (gap * 100)) + (goalin * 10);
}
}
Symbol 1072 MovieClip [__Packages.CSessionManager] Frame 0
class CSessionManager
{
static var _oI;
var sndOverallVolume, sndMusicVolume, sndEffectsVolume, numPlayPerGame;
function CSessionManager (_mcroot) {
sndOverallVolume = 90;
sndMusicVolume = 70;
sndEffectsVolume = 80;
numPlayPerGame = 3;
}
function saveSession() {
}
function loadSession() {
}
static function _buildInstance() {
_oI = new CSessionManager();
return(_oI);
}
static function ins() {
return(((_oI instanceof CSessionManager) ? (_oI) : (_buildInstance())));
}
var firstTimeOffense = true;
var firstTimeDefense = true;
var firstTimer = true;
var justEndTutorial = 0;
}
Symbol 1073 MovieClip [__Packages.CTeamManager] Frame 0
class CTeamManager
{
static var _oI;
var teams, currentTeam;
function CTeamManager () {
teams = new Array();
EventCenter.access().addEventListener("changeTeam", this);
}
function addTeam(id, flagid, teamname, shirtcolor1, pantscolor1, shirtcolor2, pantscolor2, goalie, cornerkicker, kicker) {
var _local2 = new CTeam(id, flagid, teamname, shirtcolor1, pantscolor1, shirtcolor2, pantscolor2, goalie, cornerkicker, kicker);
teams.push(_local2);
}
function randomTeam2() {
var _local2 = 0;
while (_local2 < 32) {
var _local3 = Math.floor(Math.random() * 32);
var _local4;
_local4 = teams[_local2];
teams[_local2] = teams[_local3];
teams[_local3] = _local4;
_local2++;
}
}
function randomTeam() {
var _local2 = 0;
while (_local2 < 32) {
var _local3 = Math.floor(Math.random() * 32);
var _local4;
var _local5 = teams[_local2].id;
teams[_local2].id = teams[_local3].id;
teams[_local3].id = _local5;
_local4 = teams[_local2];
teams[_local2] = teams[_local3];
teams[_local3] = _local4;
_local2++;
}
}
function changeTeam(event) {
currentTeam = teams[event.id - 1];
_global.__DISPATCH({type:"teamChanged"});
}
function getTeam() {
return(teams);
}
static function _buildInstance() {
_oI = new CTeamManager();
return(_oI);
}
static function ins() {
return(((_oI instanceof CTeamManager) ? (_oI) : (_buildInstance())));
}
}
Symbol 1074 MovieClip [__Packages.CContinueGameScreen1] Frame 0
class CContinueGameScreen1 extends CContinueGameScreen
{
var sbar, mcPlayoff, bt1, txPlayoff, ListGroup, GroupName;
function CContinueGameScreen1 () {
super();
if (_global.AppStarted == undefined) {
return;
}
sbar.horz = false;
if ((CTournament.ins().tournamentPhase < 4) && (CTournament.ins().tournamentPhase > -1)) {
mcPlayoff._visible = false;
bt1._visible = false;
txPlayoff._visible = false;
} else {
mcPlayoff._visible = true;
bt1._visible = true;
txPlayoff._visible = true;
if (CTournament.ins().gameover) {
txPlayoff.text = "Playoff Result";
} else {
txPlayoff.text = "Playoff Schedule";
}
}
bt1.onRelease = function () {
_global.__DISPATCH({type:"menuAccess", name:"ContinueGame2"});
};
}
function CreateList() {
var _local5 = false;
var _local4 = 0;
while (_local4 < 8) {
var _local2 = ListGroup.addThumb({identifier:"tgroup", height:-1});
if (_local5) {
_local2.gotoAndStop(2);
}
_local5 = !_local5;
_local2.groupname = GroupName[_local4];
var _local3 = CTournament.ins().getTournamentGroupData(_local4);
_local2.marker._visible = false;
_local2.nat1 = _local3.nat1;
_local2.nat2 = _local3.nat2;
_local2.nat3 = _local3.nat3;
_local2.nat4 = _local3.nat4;
_local2.a1 = _local3.a1;
_local2.a2 = _local3.a2;
_local2.b1 = _local3.b1;
_local2.b2 = _local3.b2;
_local2.c1 = _local3.c1;
_local2.c2 = _local3.c2;
_local2.d1 = _local3.d1;
_local2.d2 = _local3.d2;
_local2.e1 = _local3.e1;
_local2.e2 = _local3.e2;
_local2.f1 = _local3.f1;
_local2.f2 = _local3.f2;
_local2.win1 = _local3.win1;
_local2.w1 = _local3.w1;
_local2.t1 = _local3.t1;
_local2.l1 = _local3.l1;
_local2.p1 = _local3.p1;
_local2.win2 = _local3.win2;
_local2.w2 = _local3.w2;
_local2.t2 = _local3.t2;
_local2.l2 = _local3.l2;
_local2.p2 = _local3.p2;
_local2.win3 = _local3.win3;
_local2.w3 = _local3.w3;
_local2.t3 = _local3.t3;
_local2.l3 = _local3.l3;
_local2.p3 = _local3.p3;
_local2.win4 = _local3.win4;
_local2.w4 = _local3.w4;
_local2.t4 = _local3.t4;
_local2.l4 = _local3.l4;
_local2.p4 = _local3.p4;
_local4++;
}
}
}
Symbol 1075 MovieClip [__Packages.CContinueGameScreen2] Frame 0
class CContinueGameScreen2 extends CContinueGameScreen
{
var sbar, bt2, ListGroup;
function CContinueGameScreen2 () {
super();
if (_global.AppStarted == undefined) {
return;
}
sbar.horz = true;
bt2.onRelease = function () {
_global.__DISPATCH({type:"menuAccess", name:"ContinueGame1"});
};
}
function CreateList() {
var _local10 = CTournament.ins().numMatchSet();
var _local2 = ListGroup.addThumb({identifier:"tPairMatch", height:-1});
if (CTournament.ins().tournamentPhase >= 4) {
var _local6 = CTournament.ins().secondRoundMatches;
var _local5 = 0;
var _local3 = 1;
var _local4 = 1;
while (_local4 <= 16) {
_local2["a" + _local4] = _local6[_local5]["team" + _local3].teamname;
_local2["sa" + _local4] = _local6[_local5]["scoreteam" + _local3];
_local2["fa" + _local4]._visible = true;
_local2["fa" + _local4].toid = _local6[_local5]["team" + _local3].flagid;
_local2["fa" + _local4].setFlag(_local6[_local5]["team" + _local3].flagid);
_local3++;
if (_local3 > 2) {
_local3 = 1;
_local5++;
}
_local4++;
}
} else {
var _local4 = 1;
while (_local4 <= 16) {
_local2["a" + _local4] = "";
_local2["sa" + _local4] = "";
_local2["fa" + _local4]._visible = false;
_local4++;
}
}
if (CTournament.ins().tournamentPhase >= 5) {
var _local6 = CTournament.ins().quarterFinalMatches;
var _local5 = 0;
var _local3 = 1;
var _local4 = 1;
while (_local4 <= 8) {
_local2["b" + _local4] = _local6[_local5]["team" + _local3].teamname;
_local2["sb" + _local4] = _local6[_local5]["scoreteam" + _local3];
_local2["fb" + _local4]._visible = true;
_local2["fb" + _local4].toid = _local6[_local5]["team" + _local3].flagid;
_local2["fb" + _local4].setFlag(_local6[_local5]["team" + _local3].flagid);
_local3++;
if (_local3 > 2) {
_local3 = 1;
_local5++;
}
_local4++;
}
} else {
var _local4 = 1;
while (_local4 <= 16) {
_local2["b" + _local4] = "";
_local2["sb" + _local4] = "";
_local2["fb" + _local4]._visible = false;
_local4++;
}
}
if (CTournament.ins().tournamentPhase >= 6) {
var _local6 = CTournament.ins().semiFinalMatches;
var _local5 = 0;
var _local3 = 1;
var _local4 = 1;
while (_local4 <= 4) {
_local2["c" + _local4] = _local6[_local5]["team" + _local3].teamname;
_local2["sc" + _local4] = _local6[_local5]["scoreteam" + _local3];
_local2["fc" + _local4]._visible = true;
_local2["fc" + _local4].toid = _local6[_local5]["team" + _local3].flagid;
_local2["fc" + _local4].setFlag(_local6[_local5]["team" + _local3].flagid);
_local3++;
if (_local3 > 2) {
_local3 = 1;
_local5++;
}
_local4++;
}
} else {
var _local4 = 1;
while (_local4 <= 4) {
_local2["c" + _local4] = "";
_local2["sc" + _local4] = "";
_local2["fc" + _local4]._visible = false;
_local4++;
}
}
if (CTournament.ins().tournamentPhase >= 7) {
var _local6 = CTournament.ins().FinalMatches;
var _local5 = 0;
var _local3 = 1;
var _local4 = 1;
while (_local4 <= 2) {
_local2["d" + _local4] = _local6[_local5]["team" + _local3].teamname;
_local2["sd" + _local4] = _local6[_local5]["scoreteam" + _local3];
_local2["fd" + _local4]._visible = true;
_local2["fd" + _local4].toid = _local6[_local5]["team" + _local3].flagid;
_local2["fd" + _local4].setFlag(_local6[_local5]["team" + _local3].flagid);
_local3++;
if (_local3 > 2) {
_local3 = 1;
_local5++;
}
_local4++;
}
} else {
var _local4 = 1;
while (_local4 <= 2) {
_local2["d" + _local4] = "";
_local2["sd" + _local4] = "";
_local2["fd" + _local4]._visible = false;
_local4++;
}
}
if (CTournament.ins().tournamentPhase >= 8) {
var _local7 = CTournament.ins().winnerof(CTournament.ins().FinalMatches[0]);
_local2.champ = _local7.teamname;
_local2.fchamp._visible = true;
_local2.fchamp.toid = _local7.flagid;
_local2.fchamp.setFlag(_local7.flagid);
} else {
_local2.champ = "";
_local2.fchamp._visible = false;
}
}
}
Symbol 1076 MovieClip [__Packages.CCreditsScreen] Frame 0
class CCreditsScreen extends CScreen
{
function CCreditsScreen () {
super();
}
}
Symbol 1077 MovieClip [__Packages.CGameOverScreen] Frame 0
class CGameOverScreen extends CScreen
{
var txChamp, fc1, fc2, fc3, fc4, fc5, gotoAndStop, _name;
function CGameOverScreen () {
super();
if (_global.AppStarted == undefined) {
return;
}
CTournament.ins().endTournament();
CTournament.ins().finishedPhase();
if (CTournament.ins().tournamentPhase == 8) {
var _local4 = CTournament.ins().winnerof(CTournament.ins().FinalMatches[0]);
if (_local4 == CTeamManager.ins().currentTeam) {
txChamp._visible = true;
fc1._visible = true;
fc2._visible = true;
fc3._visible = true;
fc4._visible = true;
fc5._visible = true;
txChamp.text = _local4.teamname;
fc1.toid = _local4.flagid;
fc1.setFlag(_local4.flagid);
fc2.toid = _local4.flagid;
fc2.setFlag(_local4.flagid);
fc3.toid = _local4.flagid;
fc3.setFlag(_local4.flagid);
fc4.toid = _local4.flagid;
fc4.setFlag(_local4.flagid);
fc5.toid = _local4.flagid;
fc5.setFlag(_local4.flagid);
gotoAndStop(2);
}
} else {
txChamp._visible = false;
fc1._visible = false;
fc2._visible = false;
fc3._visible = false;
fc4._visible = false;
fc5._visible = false;
}
}
function endButton() {
_global.__DISPATCH({type:"endScreen", name:_name});
}
}
Symbol 1078 MovieClip [__Packages.CGameScreen] Frame 0
class CGameScreen extends CScreen
{
var gamedz, KeteranganMain, ingamemenu, tutomode, _game, enddialog, txGoal1, txGoal2, blTeam1, blTeam2, gotoAndPlay, _visible, gotoAndStop, _name, txTourStatus, KeteranganPlayer, txYouPlay, team1, team2, txTeam1, txTeam2, flag1, flag2;
function CGameScreen () {
super();
if (_global.AppStarted == undefined) {
return;
}
gamedz._xscale = 125;
gamedz._yscale = 125;
KeteranganMain._visible = false;
ingamemenu._visible = false;
tutomode._visible = false;
tutomode.stop();
_game = new game(gamedz);
EventCenter.access().addEventListener("endGame", this);
EventCenter.access().addEventListener("changeScore", this);
EventCenter.access().addEventListener("updateBallCounter", this);
EventCenter.access().addEventListener("inGameHelp", this);
EventCenter.access().addEventListener("inGameMenu", this);
}
function inGameMenu(o) {
switch (o.name) {
case "showmenu" :
if (ingamemenu._visible) {
ingamemenu._visible = false;
} else {
ingamemenu._visible = true;
}
break;
case "StartNewGame" :
enddialog.gotoAndStop(2);
ingamemenu._visible = false;
break;
case "stopdialog" :
enddialog.gotoAndStop(1);
ingamemenu._visible = false;
break;
case "AddThisGames" :
_global.__DISPATCH({type:"menuAccess", name:"AddThisGames"});
ingamemenu._visible = false;
break;
case "PlayMoreGames" :
_global.__DISPATCH({type:"menuAccess", name:"PlayMoreGames"});
ingamemenu._visible = false;
break;
case "Options" :
_global.__DISPATCH({type:"menuAccess", name:"Options", tembus:true});
ingamemenu._visible = false;
break;
case "Help" :
_global.__DISPATCH({type:"menuAccess", name:"Help", tembus:true});
ingamemenu._visible = false;
break;
case "Credits" :
_global.__DISPATCH({type:"menuAccess", name:"Credits", tembus:true});
ingamemenu._visible = false;
break;
case "showtuto" :
trace("siapa sih yang nge show ");
tutomode._visible = true;
tutomode.play();
break;
case "hidetuto" :
tutomode.stop();
tutomode._visible = false;
}
}
function inGameHelp(o) {
SoundManager.ins().playHeartput();
switch (o.param) {
case "endtutorial" :
KeteranganMain.gotoAndStop("endtutorial");
break;
case "firsttimer" :
KeteranganMain.gotoAndStop("firsttimer");
break;
case "aiming" :
KeteranganMain.gotoAndStop("aiming");
break;
case "doneaiming" :
KeteranganMain.gotoAndStop("doneaiming");
break;
case "power" :
KeteranganMain.gotoAndStop("power");
break;
case "cross" :
KeteranganMain.gotoAndStop("cross");
break;
case "moving" :
KeteranganMain.gotoAndStop("moving");
break;
case "moving2" :
KeteranganMain.gotoAndStop("moving2");
break;
case "shoot" :
KeteranganMain.gotoAndStop("shoot");
break;
case "stop" :
KeteranganMain.gotoAndStop(1);
break;
case "keeperwait" :
KeteranganMain.gotoAndStop("keeperwait");
break;
case "keepermove" :
KeteranganMain.gotoAndStop("keepermove");
break;
case "keepercatch" :
KeteranganMain.gotoAndStop("keepercatch");
}
}
function changeScore() {
var _local2 = CTournament.ins().currentMatch;
txGoal1.text = String(_local2.scoreteam1);
txGoal2.text = String(_local2.scoreteam2);
}
function updateBallCounter() {
var _local4 = CTournament.ins().currentMatch;
var _local3 = CSessionManager.ins().numPlayPerGame;
blTeam1.gotoAndStop(_local4.totalkick1 + 1);
blTeam2.gotoAndStop(_local4.totalkick2 + 1);
var _local2 = 1;
while (_local2 <= 10) {
if (_local2 <= _local3) {
blTeam1["bb" + _local2]._visible = true;
blTeam2["bb" + _local2]._visible = true;
} else {
blTeam1["bb" + _local2]._visible = false;
blTeam2["bb" + _local2]._visible = false;
}
_local2++;
}
}
function startshow() {
prepareMatch();
gotoAndPlay(2);
var _local2 = CTournament.ins().currentMatch;
if (CTeamManager.ins().currentTeam == _local2.team1) {
if (_local2.round == 1) {
_game.introgame(true);
} else {
_game.introgame(false);
}
} else if (_local2.round == 1) {
_game.introgame(false);
} else {
_game.introgame(true);
}
}
function show() {
_visible = true;
SoundManager.ins().fadeAmbience(true);
startshow();
_game.initgame();
}
function hide() {
_visible = false;
gotoAndStop(1);
_game.endgame();
}
function endGame(ob) {
var _local3 = CTournament.ins().currentMatch;
if (_game.playtimeover()) {
if (_local3.round == 1) {
_local3.endRound();
startshow();
} else if (_local3.tied() && (CTournament.ins().tournamentPhase > 3)) {
_local3.totalkick1 = 1;
_local3.totalkick2 = 2;
_local3.endRound();
startshow();
} else {
_global.__DISPATCH({type:"endScreen", name:_name});
}
} else {
if (ob.h1 || (ob.h2)) {
_local3.endRound(false);
} else {
_local3.endRound(true);
}
startshow();
}
}
function prepareMatch() {
var _local2 = CTournament.ins().currentMatch;
updateBallCounter();
txTourStatus.text = CTournament.ins().getToutnamentStatus();
if (CTeamManager.ins().currentTeam == _local2.team1) {
if (_local2.round == 1) {
KeteranganPlayer.txRemark.text = "YOU PLAY OFFENSE!!";
txYouPlay.text = "You Play Offense";
} else {
KeteranganPlayer.txRemark.text = "YOU PLAY DEFENSE!!";
txYouPlay.text = "You Play Defense";
}
} else if (_local2.round == 1) {
KeteranganPlayer.txRemark.text = "YOU PLAY DEFENSE!!";
txYouPlay.text = "You Play Defense";
} else {
KeteranganPlayer.txRemark.text = "YOU PLAY OFFENSE!!";
txYouPlay.text = "You Play Offense";
}
txGoal1.text = String(_local2.scoreteam1);
txGoal2.text = String(_local2.scoreteam2);
team1.text = _local2.team1.teamname;
team2.text = _local2.team2.teamname;
txTeam1.text = _local2.team1.teamname;
txTeam2.text = _local2.team2.teamname;
flag1.toid = _local2.team1.flagid;
flag1.setFlag(_local2.team1.flagid);
flag2.toid = _local2.team2.flagid;
flag2.setFlag(_local2.team2.flagid);
if (_local2.round == 1) {
KeteranganPlayer.name1.text = _local2.team1.cornerkicker;
KeteranganPlayer.name2.text = _local2.team1.kicker;
KeteranganPlayer.name3.text = _local2.team2.goalie;
KeteranganPlayer.flag1.toid = _local2.team1.flagid;
KeteranganPlayer.flag1.setFlag(_local2.team1.flagid);
KeteranganPlayer.flag2.toid = _local2.team1.flagid;
KeteranganPlayer.flag2.setFlag(_local2.team1.flagid);
KeteranganPlayer.flag3.toid = _local2.team2.flagid;
KeteranganPlayer.flag3.setFlag(_local2.team2.flagid);
} else {
KeteranganPlayer.name1.text = _local2.team2.cornerkicker;
KeteranganPlayer.name2.text = _local2.team2.kicker;
KeteranganPlayer.name3.text = _local2.team1.goalie;
KeteranganPlayer.flag1.toid = _local2.team2.flagid;
KeteranganPlayer.flag1.setFlag(_local2.team2.flagid);
KeteranganPlayer.flag2.toid = _local2.team2.flagid;
KeteranganPlayer.flag2.setFlag(_local2.team2.flagid);
KeteranganPlayer.flag3.toid = _local2.team1.flagid;
KeteranganPlayer.flag3.setFlag(_local2.team1.flagid);
}
}
}
Symbol 1079 MovieClip [__Packages.game] Frame 0
class game
{
var mcParent, playtime, gameon, def_playtime, world, iRender, cornercam, keeper, kicker, AutoAim, AutoKick, AutoCatch, cornerkicker, mball, carrow, xrot, GamePhase, iIncomingBall, iCelebrate, cam, screen, _t, _fps;
function game (mc) {
mcParent = mc;
setup3d();
playtime = 0;
gameon = true;
def_playtime = CSessionManager.ins().numPlayPerGame;
world.addEventListener(sandy.core.World3D.onRenderEVENT, this, renderWorld);
iRender = setInterval(this, "renderWorldnow", 10);
EventCenter.access().addEventListener("gameevent", this);
kickerHint = false;
keeperHint = false;
var _local2 = new Object();
_local2.ob = this;
_local2.onKeyDown = function () {
this.ob.cekkey();
};
Key.addListener(_local2);
}
function introgame(human) {
gameon = true;
purgegame = false;
if (!cornercam) {
switchcam();
}
keeper.setLevel(0);
kicker.setLevel(0);
AILevel = 0;
kickerHint = false;
keeperHint = false;
if (human) {
AutoAim = false;
AutoKick = false;
AutoCatch = true;
if (CTournament.ins().tournamentPhase > 3) {
keeper.setLevel(1);
AILevel = 1;
}
cornerkicker.setHuman(true);
if (CSessionManager.ins().firstTimeOffense) {
CSessionManager.ins().firstTimeOffense = false;
_global.__DISPATCH({type:"inGameMenu", name:"showtuto"});
CSessionManager.ins().justEndTutorial++;
kickerHint = true;
} else {
_global.__DISPATCH({type:"inGameMenu", name:"hidetuto"});
}
} else {
AutoAim = true;
AutoKick = true;
AutoCatch = false;
if (CTournament.ins().tournamentPhase > 3) {
kicker.setLevel(1);
AILevel = 1;
}
cornerkicker.setHuman(false);
if (CSessionManager.ins().firstTimeDefense) {
CSessionManager.ins().firstTimeDefense = false;
_global.__DISPATCH({type:"inGameMenu", name:"showtuto"});
CSessionManager.ins().justEndTutorial++;
keeperHint = true;
} else {
_global.__DISPATCH({type:"inGameMenu", name:"hidetuto"});
}
}
mball.reset();
mball.show();
carrow.hide();
kicker.restart();
kicker.hide();
keeper.restart();
keeper.hide();
cornerkicker.restart();
cornerkicker.show();
}
function initgame() {
pumpgame(G_START);
}
function startgame() {
xrot = 0;
pumpgame(GX_WHISTLE);
}
function endgame() {
gameon = false;
SoundManager.ins().fadeAmbience(false);
GamePhase = -1;
}
function gameevent(event) {
if (purgegame) {
return(undefined);
}
switch (event.param) {
case "cheat" :
var _local3 = CTournament.ins().currentMatch;
if (CTeamManager.ins().currentTeam == _local3.team1) {
if (event.win) {
_local3.addScorea(1, 0);
} else {
_local3.addScorea(0, 1);
}
} else if (event.win) {
_local3.addScorea(0, 1);
} else {
_local3.addScorea(1, 0);
}
_local3.round = 2;
_local3.totalkick1 = 0;
_local3.totalkick2 = 0;
playtime = def_playtime * 2;
pumpgame(G_RESTART);
break;
case "dialogendgame" :
KillTheGame();
_global.__DISPATCH({type:"inGameMenu", name:"stopdialog"});
break;
case "dialognoendgame" :
_global.__DISPATCH({type:"inGameMenu", name:"stopdialog"});
break;
case "skiptutorial" :
CSessionManager.ins().firstTimeOffense = false;
CSessionManager.ins().firstTimeDefense = false;
CSessionManager.ins().justEndTutorial = 0;
kickerHint = false;
keeperHint = false;
_global.__DISPATCH({type:"inGameMenu", name:"hidetuto"});
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
pumpgame(G_WHISTLE);
break;
case "playtutorial" :
pumpgame(G_WHISTLE);
break;
case "startgamealready" :
if (AutoAim) {
event.obyek.indicator._visible = true;
} else {
event.obyek.indicator._visible = false;
}
startgame();
break;
case "playambience" :
break;
case "cornerkick" :
pumpgame(G_CORNERSHOOT);
break;
case "transition" :
pumpgame(G_TRANSITION);
break;
case "finishtransition" :
pumpgame(G_TIMING);
break;
case "shooting" :
pumpgame(G_SHOOTING);
break;
case "shoot" :
pumpgame(GX_SHOOT);
break;
case "headingcontact" :
var _local5 = kicker.getPosition();
var _local4 = mball.getPosition();
var _local9 = Math.abs(_local5.x - _local4.x);
var _local8 = Math.abs((_local5.y + _local4.y) + 2.5);
var _local7 = Math.abs(_local5.z - _local4.z);
if (((_local9 < 2) && (_local8 < 0.8)) && (_local7 < 0.5)) {
kicker.makeshoot();
}
break;
case "volleycontact" :
_local5 = kicker.getPosition();
_local4 = mball.getPosition();
_local9 = Math.abs(_local5.x - _local4.x);
_local8 = Math.abs(_local5.y - _local4.y);
_local7 = Math.abs(_local5.z - _local4.z);
if (((_local9 < 1.5) && (_local8 < 1.5)) && (_local7 < 1)) {
kicker.makeshoot();
}
break;
case "backflipcontact" :
_local5 = kicker.getPosition();
_local4 = mball.getPosition();
_local9 = Math.abs(_local5.x - _local4.x);
_local8 = Math.abs((_local5.y + _local4.y) + 2);
_local7 = Math.abs(_local5.z - _local4.z);
if (((_local9 < 2) && (_local8 < 1)) && (_local7 < 1.1)) {
kicker.makeshoot();
}
break;
case "divecontact" :
_local5 = kicker.getPosition();
_local4 = mball.getPosition();
_local9 = Math.abs(_local5.x - _local4.x);
_local8 = Math.abs(_local5.y + _local4.y);
_local7 = Math.abs(_local5.z - _local4.z);
if (((_local9 < 5) && (_local8 < 1.5)) && (_local7 < 1)) {
kicker.makeshoot();
}
break;
case "chestvolleycontact" :
_local5 = kicker.getPosition();
_local4 = mball.getPosition();
_local9 = Math.abs(_local5.x - _local4.x);
_local8 = Math.abs((_local5.y + _local4.y) + 0.5);
_local7 = Math.abs(_local5.z - _local4.z);
if (((_local9 < 1) && (_local8 < 2)) && (_local7 < 1.2)) {
mball.haltedit();
SoundManager.ins().playKick();
}
break;
case "chestvolleykick" :
if (mball.halted) {
kicker.makeshoot();
}
break;
case "heading" :
case "volley" :
case "dive" :
case "backflip" :
case "chestvolley" :
kicker.toidle();
break;
case "ballout" :
if (GamePhase != G_WINLOOSE) {
keeper.win();
kicker.loose();
pumpgame(G_WINLOOSE);
}
break;
case "goal" :
keeper.loose();
kicker.win();
SoundManager.ins().playVictory();
if ((!kickerHint) && (!keeperHint)) {
CTournament.ins().currentMatch.addScore();
_global.__DISPATCH({type:"changeScore"});
}
pumpgame(G_WINLOOSE);
break;
case "loose" :
keeper.win();
kicker.loose();
pumpgame(G_WINLOOSE);
break;
case "enteringhurdle" :
if (!keeper.cekGoal(mball)) {
mball.deflect();
mball.ingoalsequence = 5;
kicker.loose();
pumpgame(G_WINLOOSE);
} else {
SoundManager.ins().playGoal();
_global.__DISPATCH({type:"gameevent", param:"goal"});
mball.ingoalsequence = 4;
}
}
}
function setIncomingBallTimer() {
var _local2 = 0;
((AILevel == 0) ? (_local2 = 2200) : (_local2 = 1700));
if (kickerHint) {
_local2 = _local2 + 2500;
}
iIncomingBall = setInterval(this, "IncomingBall", _local2);
}
function IncomingBall() {
clearInterval(iIncomingBall);
if ((!kickerHint) && (!keeperHint)) {
pumpgame(G_RECEIVING);
}
}
function endwhistle() {
pumpgame(GX_AIM);
}
function pumpgame(phase) {
if (phase == undefined) {
GamePhase++;
phase = GamePhase;
} else {
GamePhase = phase;
}
switch (phase) {
case G_START :
playtime = 0;
break;
case GX_WHISTLE :
if (CSessionManager.ins().firstTimer) {
_global.__DISPATCH({type:"inGameHelp", param:"firsttimer"});
CSessionManager.ins().firstTimer = false;
return(undefined);
}
if (CSessionManager.ins().justEndTutorial == 3) {
_global.__DISPATCH({type:"inGameHelp", param:"endtutorial"});
_global.__DISPATCH({type:"inGameMenu", name:"hidetuto"});
return(undefined);
}
if (CSessionManager.ins().justEndTutorial == 2) {
CSessionManager.ins().justEndTutorial++;
}
pumpgame(G_WHISTLE);
break;
case G_WHISTLE :
if (kickerHint) {
_global.__DISPATCH({type:"inGameHelp", param:"aiming"});
}
if (keeperHint) {
_global.__DISPATCH({type:"inGameHelp", param:"keeperwait"});
}
SoundManager.ins().playWhistle();
EventCenter.access().addEventListener("endwhistle", this);
if (!AutoKick) {
carrow.show();
mball.hide();
} else {
mball.show();
carrow.hide();
}
cornerkicker.show();
break;
case GX_AIM :
if (((!kickerHint) && (!keeperHint)) && (CSessionManager.ins().justEndTutorial != 3)) {
pumpgame(G_AIM);
}
break;
case G_POWER :
if (kickerHint) {
_global.__DISPATCH({type:"inGameHelp", param:"power"});
}
carrow.powering();
break;
case G_CORNERKICK :
carrow.unpowering();
mball.show();
carrow.hide();
cornerkicker.setHuman(false);
cornerkicker.kick();
break;
case G_CORNERSHOOT :
if (kickerHint) {
_global.__DISPATCH({type:"inGameHelp", param:"cross"});
}
SoundManager.ins().playKick();
mball.shoot(carrow.power, carrow.rx, carrow.ry);
break;
case G_TRANSITION :
mball.hide();
mcParent._parent.latar.gotoAndPlay(2);
mcParent._parent.indicator._visible = false;
mcParent._visible = false;
switchcam();
if (AutoKick) {
kicker.startrun();
}
break;
case G_TIMING :
if (kickerHint) {
_global.__DISPATCH({type:"inGameHelp", param:"moving"});
pumpgame(GX_RECEIVING);
}
if (keeperHint) {
_global.__DISPATCH({type:"inGameHelp", param:"keepermove"});
}
if ((!kickerHint) && (!keeperHint)) {
setIncomingBallTimer();
}
mcParent._visible = true;
kicker.show();
keeper.show();
if (AutoKick) {
kicker.action();
kicker.setHuman(false);
keeper.setHuman(true);
} else {
kicker.setHuman(true);
keeper.setHuman(false);
}
break;
case GX_RECEIVING :
break;
case GX2_RECEIVING :
mball.show();
break;
case G_RECEIVING :
if (kickerHint) {
setIncomingBallTimer();
}
mball.show();
if (AutoKick) {
mball.startTrajectoryCounter(3);
}
break;
case G_SHOOTING :
mball.ingoalsequence = 1;
break;
case GX_SHOOT :
if (keeperHint) {
_global.__DISPATCH({type:"inGameHelp", param:"keepercatch"});
} else {
pumpgame(G_SHOOT);
}
break;
case G_SHOOT :
SoundManager.ins().playKick();
kicker.setHuman(false);
if (AutoCatch) {
keeper.catchball(mball);
keeper.startcatch();
}
break;
case G_WINLOOSE :
iCelebrate = setInterval(this, "endCelebrate", 3000);
break;
case G_RESTART :
if (SoundManager.ins().goalplayed) {
SoundManager.ins().fadeGoal(false);
}
mball.reset();
cornerkicker.hide();
kicker.setHuman(false);
kicker.hide();
keeper.setHuman(false);
keeper.hide();
mball.hide();
carrow.hide();
mcParent._parent.latar.gotoAndStop(1);
if (!cornercam) {
switchcam();
}
if ((!keeperHint) && (!kickerHint)) {
playtime++;
_global.__DISPATCH({type:"updateBallCounter"});
}
var _local5 = keeperHint;
keeperHint = false;
var _local4 = kickerHint;
kickerHint = false;
_global.__DISPATCH({type:"endGame", h1:_local5, h2:_local4});
GamePhase = G_GAMEOVER;
}
}
function playtimeover() {
if (playtime >= (def_playtime * 2)) {
return(true);
}
return(false);
}
function endCelebrate() {
clearInterval(iCelebrate);
pumpgame(G_RESTART);
}
function renderWorld() {
if (GamePhase == G_CORNERSHOOT) {
mball.render();
return(undefined);
}
if (GamePhase == G_RECEIVING) {
mball.render();
return(undefined);
}
if (GamePhase == G_SHOOTING) {
mball.render();
return(undefined);
}
if (GamePhase == G_SHOOT) {
mball.render();
return(undefined);
}
if (GamePhase == G_WINLOOSE) {
mball.render();
return(undefined);
}
}
function renderWorldnow() {
if (!gameon) {
return(undefined);
}
if (GamePhase == G_AIM) {
if (AutoAim) {
if ((!kickerHint) && (!keeperHint)) {
carrow.autoAim(false);
} else {
carrow.autoAim(true);
}
pumpgame(G_CORNERKICK);
}
if (Key.isDown(38)) {
carrow.up();
}
if (Key.isDown(40)) {
carrow.down();
}
if (Key.isDown(37)) {
carrow.left();
}
if (Key.isDown(39)) {
carrow.right();
}
return(undefined);
}
if (GamePhase == G_TIMING) {
if (AutoKick) {
kicker.cekrun();
} else {
kicker.cekinput();
}
if (!AutoCatch) {
keeper.cekinputA(mball);
}
return(undefined);
}
if (GamePhase == GX2_RECEIVING) {
kicker.cekinput(false);
return(undefined);
}
if (GamePhase == G_RECEIVING) {
if (AutoKick) {
kicker.cekrun();
} else {
kicker.cekinput();
}
if (!AutoCatch) {
keeper.cekinputA(mball);
}
return(undefined);
}
if (GamePhase == G_SHOOTING) {
if (!AutoCatch) {
keeper.cekinputA(mball);
}
return(undefined);
}
if (GamePhase == GX_SHOOT) {
return(undefined);
}
if (GamePhase == G_SHOOT) {
if (!AutoCatch) {
keeper.cekinputA(mball);
}
mball.cekinggoal();
return(undefined);
}
if (GamePhase == G_WINLOOSE) {
mball.cekinggoal();
return(undefined);
}
}
function cekkey() {
var _local3 = Key.getCode();
if (kickerHint) {
if (((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(38))) || (Key.isDown(40))) {
if (GamePhase == GX_AIM) {
pumpgame(G_AIM);
_global.__DISPATCH({type:"inGameHelp", param:"doneaiming"});
return(undefined);
}
}
if ((_local3 == 192) || (_local3 == 13)) {
if (GamePhase == GX_RECEIVING) {
pumpgame(GX2_RECEIVING);
_global.__DISPATCH({type:"inGameHelp", param:"moving2"});
return(undefined);
}
if (GamePhase == GX2_RECEIVING) {
pumpgame(G_RECEIVING);
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
return(undefined);
}
return(undefined);
}
}
if (keeperHint) {
if ((_local3 == 192) || (_local3 == 13)) {
if (GamePhase == G_TIMING) {
pumpgame(G_RECEIVING);
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
return(undefined);
}
if (GamePhase == GX_SHOOT) {
pumpgame(G_SHOOT);
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
return(undefined);
}
if (GamePhase == GX_AIM) {
pumpgame(G_AIM);
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
return(undefined);
}
}
}
if (Key.isDown(32)) {
switch (GamePhase) {
case G_AIM :
pumpgame(G_POWER);
break;
case G_POWER :
pumpgame(G_CORNERKICK);
break;
case G_SHOOTING :
case G_SHOOT :
if (AutoCatch) {
break;
}
keeper.spacehit(mball);
}
}
if ((_local3 == 192) || (_local3 == 13)) {
if (GamePhase == GX_WHISTLE) {
pumpgame(G_WHISTLE);
_global.__DISPATCH({type:"inGameHelp", param:"stop"});
CSessionManager.ins().justEndTutorial = 0;
return(undefined);
}
}
}
function switchcam() {
if (cornercam) {
cam.setPosition(28.339, 4.808, 0);
cam.rotateX(2);
cam.rotateY(90);
} else {
cam.setPosition(50, 5.5, -51);
cam.rotateY(-90);
cam.rotateX(-2);
}
cornercam = !cornercam;
}
function setup3d() {
world = sandy.core.World3D.getInstance();
screen = new sandy.view.ClipScreen(mcParent.createEmptyMovieClip("screen", 1), 640, 400);
cam = new sandy.view.Camera3D(620, screen);
cam.setPosition(50, 5.5, -51);
cam.rotateX(-10);
cornercam = true;
world.addCamera(cam);
var _local2 = new sandy.core.group.Group();
world.setRootGroup(_local2);
mball = new CBall(_local2, mcParent);
carrow = new CArrow(_local2, mcParent);
cornerkicker = new CCornerKicker(_local2, mcParent);
keeper = new CKeeper(_local2, mcParent);
kicker = new CKicker(_local2, mcParent, mball);
world.render();
}
function createField(bg, x, y, z) {
var _local4 = new sandy.primitive.Plane3D(90, 120, 5, "tri");
var _local6 = new sandy.skin.MixedSkin(65280, 80, 0, 100, 1);
_local4.setSkin(_local6);
var _local1 = new sandy.core.group.TransformGroup();
var _local2 = new sandy.core.group.TransformGroup();
var _local5 = new sandy.core.transform.Transform3D();
var _local3 = new sandy.core.transform.Transform3D();
_local5.rot(0, 0, 0);
_local3.translate(x, y, z);
_local1.setTransform(_local5);
_local2.setTransform(_local3);
_local1.addChild(_local4);
_local2.addChild(_local1);
bg.addChild(_local2);
}
function setupfps() {
mcParent.createTextField("fps", 10000, 0, 200, 50, 20);
mcParent.fps.size = 14;
mcParent.fps.color = 16777215 /* 0xFFFFFF */;
_t = getTimer();
_fps = 0;
}
function KillTheGame() {
_global.__DISPATCH({type:"inGameHelp", param:"stopdialog"});
CSessionManager.ins().firstTimeOffense = false;
CSessionManager.ins().firstTimeDefense = false;
kickerHint = false;
keeperHint = false;
var _local3 = CTournament.ins().currentMatch;
if (CTeamManager.ins().currentTeam == _local3.team1) {
_local3.addScorea(1, 0);
} else {
_local3.addScorea(0, 1);
}
_local3.round = 2;
_local3.totalkick1 = 0;
_local3.totalkick2 = 0;
playtime = def_playtime * 2;
CTournament.ins().endTournament();
pumpgame(G_RESTART);
purgegame = true;
}
static var G_START = 1;
static var G_WHISTLE = 2;
static var G_AIM = 3;
static var G_POWER = 4;
static var G_CORNERKICK = 5;
static var G_CORNERSHOOT = 6;
static var G_TRANSITION = 7;
static var G_TIMING = 8;
static var G_RECEIVING = 9;
static var G_SHOOTING = 10;
static var G_SHOOT = 11;
static var G_WINLOOSE = 12;
static var G_GAMEOVER = 13;
static var G_RESTART = 30;
static var GX_WHISTLE = 102;
static var GX_AIM = 103;
static var GX_RECEIVING = 109;
static var GX2_RECEIVING = 110;
static var GX_SHOOT = 111;
var kickerHint = false;
var keeperHint = false;
var AILevel = 0;
var purgegame = false;
}
Symbol 1080 MovieClip [__Packages.sandy.view.IScreen] Frame 0
interface sandy.view.IScreen
{
}
Symbol 1081 MovieClip [__Packages.sandy.view.Camera3D] Frame 0
class sandy.view.Camera3D
{
var _p, is, _nFocal, _vOut, _vSide, _vUp, _nRoll, _nTilt, _nYaw, _rDim, _mt, _mp, m, _mv, _compiled, _oInt;
function Camera3D (nFoc, s) {
_p = new sandy.core.data.Vector();
is = s;
_nFocal = nFoc;
_vOut = new sandy.core.data.Vector(0, 0, 1);
_vSide = new sandy.core.data.Vector(1, 0, 0);
_vUp = new sandy.core.data.Vector(0, 1, 0);
_nRoll = 0;
_nTilt = 0;
_nYaw = 0;
is.setCamera(this);
_rDim = is.getSize();
_mt = (_mp = (m = (_mv = sandy.core.data.Matrix4.createIdentity())));
_compiled = false;
__loadSimpleProjection();
_oInt = null;
}
function moveSideways(d) {
_compiled = false;
_p.x = _p.x + (_vSide.x * d);
_p.y = _p.y + (_vSide.y * d);
_p.z = _p.z + (_vSide.z * d);
}
function moveUpwards(d) {
_compiled = false;
_p.x = _p.x + (_vUp.x * d);
_p.y = _p.y + (_vUp.y * d);
_p.z = _p.z + (_vUp.z * d);
}
function moveForward(d) {
_compiled = false;
_p.x = _p.x + (_vOut.x * d);
_p.y = _p.y + (_vOut.y * d);
_p.z = _p.z + (_vOut.z * d);
}
function moveHorizontally(d) {
_compiled = false;
_p.x = _p.x + (_vOut.x * d);
_p.z = _p.z + (_vOut.z * d);
}
function moveVertically(d) {
_compiled = false;
_p.y = _p.y - d;
}
function translate(px, py, pz) {
_compiled = false;
_p.x = _p.x + px;
_p.y = _p.y - py;
_p.z = _p.z + pz;
}
function moveLateraly(d) {
_compiled = false;
_p.x = _p.x + d;
}
function rotateAxis(ax, ay, az, nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = Math.sqrt(((ax * ax) + (ay * ay)) + (az * az));
var _local3 = sandy.math.Matrix4Math.axisRotation(ax / _local2, ay / _local2, az / _local2, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local3, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local3, _vUp);
sandy.math.Matrix4Math.vectorMult3x3(_local3, _vOut);
}
function lookAt(px, py, pz) {
_compiled = false;
_vOut = sandy.math.VectorMath.sub(new sandy.core.data.Vector(px, -py, pz), _p);
sandy.math.VectorMath.normalize(_vOut);
_vSide = sandy.math.VectorMath.cross(_vOut, new sandy.core.data.Vector(0, -1, 0));
sandy.math.VectorMath.normalize(_vSide);
_vUp = sandy.math.VectorMath.cross(_vOut, _vSide);
sandy.math.VectorMath.normalize(_vUp);
}
function rotateX(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(1, 0, 0, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vUp);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vOut);
}
function rotateY(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(0, 1, 0, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vUp);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vOut);
}
function rotateZ(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(0, 0, 1, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vUp);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vOut);
}
function tilt(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(_vSide.x, _vSide.y, _vSide.z, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vUp);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vOut);
}
function pan(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(_vUp.x, _vUp.y, _vUp.z, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vOut);
}
function roll(nAngle) {
_compiled = false;
nAngle = (nAngle + 360) % 360;
var _local2 = sandy.math.Matrix4Math.axisRotation(_vOut.x, _vOut.y, _vOut.z, nAngle);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vSide);
sandy.math.Matrix4Math.vectorMult3x3(_local2, _vUp);
}
function setPosition(x, y, z) {
_compiled = false;
_p.x = x;
_p.y = -y;
_p.z = z;
}
function getXOffset(Void) {
return(_rDim.width / 2);
}
function getYOffset(Void) {
return(_rDim.height / 2);
}
function getPosition(Void) {
return(new sandy.core.data.Vector(_p.x, -_p.y, _p.z));
}
function setScreen(s) {
is = s;
_rDim = is.getSize();
is.setCamera(this);
}
function setFocal(n) {
_compiled = false;
_nFocal = n;
__loadSimpleProjection();
}
function getFocal(Void) {
return(_nFocal);
}
function setInterpolator(i) {
if ((i.getType() == sandy.core.transform.TransformType.__get__PATH_INTERPOLATION()) || (i.getType() == sandy.core.transform.TransformType.__get__TRANSLATION_INTERPOLATION())) {
removeInterpolator();
_oInt = i;
_oInt.addEventListener(sandy.events.InterpolationEvent.onProgressEVENT, this, __onInterpolation);
return(true);
}
return(false);
}
function removeInterpolator(Void) {
if (null == _oInt) {
return(false);
}
_oInt.removeEventListener(sandy.events.InterpolationEvent.onProgressEVENT, this);
delete _oInt;
_oInt = null;
return(true);
}
function isModified(Void) {
return(_compiled == false);
}
function compile(Void) {
if (!_compiled) {
_mt = __updateRotationMatrix();
_mt = sandy.math.Matrix4Math.multiply(_mt, sandy.math.Matrix4Math.translation(-_p.x, -_p.y, -_p.z));
m = sandy.math.Matrix4Math.multiply(_mp, _mt);
_compiled = true;
}
}
function getProjectionMatrix(Void) {
return(_mp);
}
function getTransformMatrix(Void) {
return(_mt);
}
function __loadPerspective(fovy, aspect, zNear, zFar) {
var _local5 = sandy.util.NumberUtil.toRadian(fovy / 2);
var _local4 = 1 / Math.tan(_local5);
_mp.n11 = _local4 / aspect;
_mp.n12 = 0;
_mp.n13 = 0;
_mp.n14 = 0;
_mp.n21 = 0;
_mp.n22 = _local4;
_mp.n23 = 0;
_mp.n24 = 0;
_mp.n31 = 0;
_mp.n32 = 0;
_mp.n33 = (zFar + zNear) / (zNear - zFar);
_mp.n34 = ((2 * zFar) * zNear) / (zNear - zFar);
_mp.n41 = 0;
_mp.n42 = 0;
_mp.n43 = -1;
_mp.n44 = 0;
}
function __loadPerspective2(left, right, top, bottom, zNear, zFar) {
_mp.n11 = (2 * zNear) / (right - left);
_mp.n12 = 0;
_mp.n13 = (right + left) / (right - left);
_mp.n14 = 0;
_mp.n21 = 0;
_mp.n22 = (2 * zNear) / (top - bottom);
_mp.n23 = (top + bottom) / (top - bottom);
_mp.n24 = 0;
_mp.n31 = 0;
_mp.n32 = 0;
_mp.n33 = (zFar + zNear) / (zNear - zFar);
_mp.n34 = ((2 * zFar) * zNear) / (zNear - zFar);
_mp.n41 = 0;
_mp.n42 = 0;
_mp.n43 = -1;
_mp.n44 = 0;
}
function math_matrix4d_frustum(par_d_left, par_d_right, par_d_bottom, par_d_top, par_d_z_near, par_d_z_far) {
var _local2;
var _local6;
var _local4;
delete _mp;
_mp = sandy.core.data.Matrix4.createZero();
_local2 = par_d_right - par_d_left;
_local6 = par_d_top - par_d_bottom;
_local4 = par_d_z_near - par_d_z_far;
_mp.n11 = (2 * par_d_z_near) / _local2;
_mp.n22 = (2 * par_d_z_near) / _local6;
_mp.n31 = (par_d_right + par_d_left) / _local2;
_mp.n32 = (par_d_top + par_d_bottom) / _local2;
_mp.n33 = (par_d_z_far + par_d_z_near) / _local4;
_mp.n43 = ((par_d_z_far * par_d_z_near) * 2) / _local4;
_mp.n34 = -1;
_mp.n44 = 0;
}
function math_matrix4d_perspective(par_d_field_of_view, par_d_aspect_ratio, par_d_z_near, par_d_z_far) {
var _local4;
var _local3;
par_d_field_of_view = sandy.util.NumberUtil.toRadian(par_d_field_of_view);
par_d_field_of_view = par_d_field_of_view * 0.5;
_local3 = (par_d_z_near * Math.sin(par_d_field_of_view)) / Math.cos(par_d_field_of_view);
_local4 = par_d_aspect_ratio * _local3;
math_matrix4d_frustum(-_local4, _local4, -_local3, _local3, par_d_z_near, par_d_z_far);
}
function __loadSimpleProjection(Void) {
_mp.n12 = (_mp.n13 = (_mp.n14 = (_mp.n21 = (_mp.n23 = (_mp.n24 = (_mp.n31 = (_mp.n32 = (_mp.n34 = (_mp.n41 = (_mp.n42 = (_mp.n44 = 0)))))))))));
_mp.n11 = (_mp.n22 = (_mp.n33 = _nFocal));
_mp.n43 = 1;
}
function __updateRotationMatrix(Void) {
return(new sandy.core.data.Matrix4(_vSide.x, _vSide.y, _vSide.z, 0, _vUp.x, _vUp.y, _vUp.z, 0, _vOut.x, _vOut.y, _vOut.z, 0, 0, 0, 0, 1));
}
function __onInterpolation(e) {
var _local2 = sandy.core.transform.Interpolator3D(e.getTarget()).getMatrix();
_p.x = _local2.n14;
_p.y = _local2.n24;
_p.z = _local2.n34;
_compiled = false;
}
}
Symbol 1082 MovieClip [__Packages.sandy.core.data.Matrix4] Frame 0
class sandy.core.data.Matrix4
{
var n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44;
function Matrix4 () {
if (arguments.length === 16) {
n11 = arguments[0];
n12 = arguments[1];
n13 = arguments[2];
n14 = arguments[3];
n21 = arguments[4];
n22 = arguments[5];
n23 = arguments[6];
n24 = arguments[7];
n31 = arguments[8];
n32 = arguments[9];
n33 = arguments[10];
n34 = arguments[11];
n41 = arguments[12];
n42 = arguments[13];
n43 = arguments[14];
n44 = arguments[15];
} else {
n11 = (n22 = (n33 = (n44 = 1)));
n12 = (n13 = (n14 = (n21 = (n23 = (n24 = (n31 = (n32 = (n34 = (n41 = (n42 = (n43 = 0)))))))))));
}
}
static function createIdentity(Void) {
return(new sandy.core.data.Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1));
}
static function createZero(Void) {
return(new sandy.core.data.Matrix4(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}
function toString(Void) {
var _local2 = new String("Matrix4\n");
_local2 = _local2 + (((((((n11 + "\t") + n12) + "\t") + n13) + "\t") + n14) + newline);
_local2 = _local2 + (((((((n21 + "\t") + n22) + "\t") + n23) + "\t") + n24) + newline);
_local2 = _local2 + (((((((n31 + "\t") + n32) + "\t") + n33) + "\t") + n34) + newline);
_local2 = _local2 + (((((((n41 + "\t") + n42) + "\t") + n43) + "\t") + n44) + newline);
return(_local2);
}
}
Symbol 1083 MovieClip [__Packages.sandy.view.Frustum] Frame 0
class sandy.view.Frustum
{
var aPlanes;
function Frustum () {
aPlanes = new Array();
}
static function get INSIDE() {
return(1);
}
static function get OUTSIDE() {
return(-1);
}
static function get INTERSECT() {
return(0);
}
function extractPlanes(comboMatrix, normalize) {
aPlanes[0].a = comboMatrix.n14 + comboMatrix.n11;
aPlanes[0].b = comboMatrix.n24 + comboMatrix.n21;
aPlanes[0].c = comboMatrix.n34 + comboMatrix.n31;
aPlanes[0].d = comboMatrix.n44 + comboMatrix.n41;
aPlanes[1].a = comboMatrix.n14 - comboMatrix.n11;
aPlanes[1].b = comboMatrix.n24 - comboMatrix.n21;
aPlanes[1].c = comboMatrix.n34 - comboMatrix.n31;
aPlanes[1].d = comboMatrix.n44 - comboMatrix.n41;
aPlanes[2].a = comboMatrix.n14 - comboMatrix.n12;
aPlanes[2].b = comboMatrix.n24 - comboMatrix.n22;
aPlanes[2].c = comboMatrix.n34 - comboMatrix.n32;
aPlanes[2].d = comboMatrix.n44 - comboMatrix.n42;
aPlanes[3].a = comboMatrix.n14 + comboMatrix.n12;
aPlanes[3].b = comboMatrix.n24 + comboMatrix.n22;
aPlanes[3].c = comboMatrix.n34 + comboMatrix.n32;
aPlanes[3].d = comboMatrix.n44 + comboMatrix.n42;
aPlanes[4].a = comboMatrix.n13;
aPlanes[4].b = comboMatrix.n23;
aPlanes[4].c = comboMatrix.n33;
aPlanes[4].d = comboMatrix.n43;
aPlanes[5].a = comboMatrix.n14 - comboMatrix.n13;
aPlanes[5].b = comboMatrix.n24 - comboMatrix.n23;
aPlanes[5].c = comboMatrix.n34 - comboMatrix.n33;
aPlanes[5].d = comboMatrix.n44 - comboMatrix.n43;
if (normalize == true) {
sandy.math.PlaneMath.normalizePlane(aPlanes[0]);
sandy.math.PlaneMath.normalizePlane(aPlanes[1]);
sandy.math.PlaneMath.normalizePlane(aPlanes[2]);
sandy.math.PlaneMath.normalizePlane(aPlanes[3]);
sandy.math.PlaneMath.normalizePlane(aPlanes[4]);
sandy.math.PlaneMath.normalizePlane(aPlanes[5]);
}
}
function pointInFrustum(p) {
var _local2 = 0;
while (_local2 < 6) {
if (sandy.math.PlaneMath.classifyPoint(aPlanes[_local2], p) == sandy.math.PlaneMath.__get__NEGATIVE()) {
return(OUTSIDE);
}
_local2++;
}
return(INSIDE);
}
function sphereInFrustum(s) {
var _local3;
var _local4 = s.getRadius();
var _local5 = s.getCenter();
var _local2 = 0;
while (_local2 < 6) {
_local3 = sandy.math.PlaneMath.distanceToPoint(aPlanes[_local2], _local5);
if (_local3 < (-_local4)) {
return(OUTSIDE);
}
if (_local3 < _local4) {
return(INTERSECT);
}
_local2++;
}
return(INSIDE);
}
function boxInFrustum(box) {
var _local7 = INSIDE;
var _local4;
var _local3;
var _local5 = 0;
while (_local5 < 6) {
_local4 = 0;
_local3 = 0;
var _local2 = 0;
while ((_local2 < 8) && ((_local3 == 0) || (_local4 == 0))) {
if (sandy.math.PlaneMath.distanceToPoint(aPlanes[_local5], box.getVertex(_local2))) {
_local4++;
} else {
_local3++;
}
_local2++;
}
if (!_local3) {
return(OUTSIDE);
}
if (_local4) {
_local7 = INTERSECT;
}
_local5++;
}
return(_local7);
}
}
Symbol 1084 MovieClip [__Packages.sandy.math.PlaneMath] Frame 0
class sandy.math.PlaneMath
{
function PlaneMath () {
}
static function get NEGATIVE() {
return(-1);
}
static function get ON_PLANE() {
return(0);
}
static function get POSITIVE() {
return(1);
}
static function normalizePlane(plane) {
var _local2;
_local2 = Math.sqrt(((plane.a * plane.a) + (plane.b * plane.b)) + (plane.c * plane.c));
plane.a = plane.a / _local2;
plane.b = plane.b / _local2;
plane.c = plane.c / _local2;
plane.d = plane.d / _local2;
}
static function distanceToPoint(plane, pt) {
return((((plane.a * pt.x) + (plane.b * pt.y)) + (plane.c * pt.z)) + plane.d);
}
static function classifyPoint(plane, pt) {
var _local1;
_local1 = distanceToPoint(plane, pt);
if (_local1 < 0) {
return(NEGATIVE);
}
if (_local1 > 0) {
return(POSITIVE);
}
return(ON_PLANE);
}
}
Symbol 1085 MovieClip [__Packages.sandy.core.data.Plane] Frame 0
class sandy.core.data.Plane
{
var a, b, c, d;
function Plane (a, b, c, d) {
this.a = a || 0;
this.b = b || 0;
this.c = c || 0;
this.d = d || 0;
}
function toString(Void) {
return((((((("Plane : " + a) + ",") + b) + ",") + c) + ",") + d);
}
}
Symbol 1086 MovieClip [__Packages.sandy.core.data.Vector] Frame 0
class sandy.core.data.Vector
{
var x, y, z;
function Vector (px, py, pz) {
x = px || 0;
y = py || 0;
z = pz || 0;
}
function toString(Void) {
return((((("Vector4 : " + x) + ",") + y) + ",") + z);
}
}
Symbol 1087 MovieClip [__Packages.sandy.math.Matrix4Math] Frame 0
class sandy.math.Matrix4Math
{
function Matrix4Math () {
}
static function multiply3x3(m1, m2) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
var _local18 = m1.n11;
var _local21 = m2.n11;
var _local13 = m1.n21;
var _local19 = m2.n21;
var _local8 = m1.n31;
var _local14 = m2.n31;
var _local15 = m1.n12;
var _local20 = m2.n12;
var _local9 = m1.n22;
var _local16 = m2.n22;
var _local5 = m1.n32;
var _local10 = m2.n32;
var _local11 = m1.n13;
var _local17 = m2.n13;
var _local6 = m1.n23;
var _local12 = m2.n23;
var _local4 = m1.n33;
var _local7 = m2.n33;
_local1.n11 = ((_local18 * _local21) + (_local15 * _local19)) + (_local11 * _local14);
_local1.n12 = ((_local18 * _local20) + (_local15 * _local16)) + (_local11 * _local10);
_local1.n13 = ((_local18 * _local17) + (_local15 * _local12)) + (_local11 * _local7);
_local1.n21 = ((_local13 * _local21) + (_local9 * _local19)) + (_local6 * _local14);
_local1.n22 = ((_local13 * _local20) + (_local9 * _local16)) + (_local6 * _local10);
_local1.n23 = ((_local13 * _local17) + (_local9 * _local12)) + (_local6 * _local7);
_local1.n31 = ((_local8 * _local21) + (_local5 * _local19)) + (_local4 * _local14);
_local1.n32 = ((_local8 * _local20) + (_local5 * _local16)) + (_local4 * _local10);
_local1.n33 = ((_local8 * _local17) + (_local5 * _local12)) + (_local4 * _local7);
return(_local1);
}
static function multiply(m1, m2) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
var _local24;
var _local27;
var _local19;
var _local25;
var _local13;
var _local20;
var _local33;
var _local35;
var _local21;
var _local26;
var _local14;
var _local22;
var _local8;
var _local15;
var _local31;
var _local34;
var _local16;
var _local23;
var _local9;
var _local17;
var _local5;
var _local10;
var _local29;
var _local32;
var _local11;
var _local18;
var _local6;
var _local12;
var _local4;
var _local7;
var _local28;
var _local30;
_local24 = m1.n11;
_local27 = m2.n11;
_local21 = m1.n12;
_local25 = m2.n21;
_local16 = m1.n13;
_local20 = m2.n31;
_local11 = m1.n14;
_local35 = m2.n41;
_local1.n11 = (((_local24 * _local27) + (_local21 * _local25)) + (_local16 * _local20)) + (_local11 * _local35);
_local26 = m2.n12;
_local22 = m2.n22;
_local15 = m2.n32;
_local34 = m2.n42;
_local1.n12 = (((_local24 * _local26) + (_local21 * _local22)) + (_local16 * _local15)) + (_local11 * _local34);
_local23 = m2.n13;
_local17 = m2.n23;
_local10 = m2.n33;
_local32 = m2.n43;
_local1.n13 = (((_local24 * _local23) + (_local21 * _local17)) + (_local16 * _local10)) + (_local11 * _local32);
_local18 = m2.n14;
_local12 = m2.n24;
_local7 = m2.n34;
_local30 = m2.n44;
_local1.n14 = (((_local24 * _local18) + (_local21 * _local12)) + (_local16 * _local7)) + (_local11 * _local30);
_local19 = m1.n21;
_local14 = m1.n22;
_local9 = m1.n23;
_local6 = m1.n24;
_local1.n21 = (((_local19 * _local27) + (_local14 * _local25)) + (_local9 * _local20)) + (_local6 * _local35);
_local1.n22 = (((_local19 * _local26) + (_local14 * _local22)) + (_local9 * _local15)) + (_local6 * _local34);
_local1.n23 = (((_local19 * _local23) + (_local14 * _local17)) + (_local9 * _local10)) + (_local6 * _local32);
_local1.n24 = (((_local19 * _local18) + (_local14 * _local12)) + (_local9 * _local7)) + (_local6 * _local30);
_local13 = m1.n31;
_local8 = m1.n32;
_local5 = m1.n33;
_local4 = m1.n34;
_local1.n31 = (((_local13 * _local27) + (_local8 * _local25)) + (_local5 * _local20)) + (_local4 * _local35);
_local1.n32 = (((_local13 * _local26) + (_local8 * _local22)) + (_local5 * _local15)) + (_local4 * _local34);
_local1.n33 = (((_local13 * _local23) + (_local8 * _local17)) + (_local5 * _local10)) + (_local4 * _local32);
_local1.n34 = (((_local13 * _local18) + (_local8 * _local12)) + (_local5 * _local7)) + (_local4 * _local30);
_local33 = m1.n41;
_local31 = m1.n42;
_local29 = m1.n43;
_local28 = m1.n44;
_local1.n41 = (((_local33 * _local27) + (_local31 * _local25)) + (_local29 * _local20)) + (_local28 * _local35);
_local1.n42 = (((_local33 * _local26) + (_local31 * _local22)) + (_local29 * _local15)) + (_local28 * _local34);
_local1.n43 = (((_local33 * _local23) + (_local31 * _local17)) + (_local29 * _local10)) + (_local28 * _local32);
_local1.n44 = (((_local33 * _local18) + (_local31 * _local12)) + (_local29 * _local7)) + (_local28 * _local30);
return(_local1);
}
static function addMatrix(m1, m2) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
_local1.n11 = m1.n11 + m2.n11;
_local1.n12 = m1.n12 + m2.n12;
_local1.n13 = m1.n13 + m2.n13;
_local1.n14 = m1.n14 + m2.n14;
_local1.n21 = m1.n21 + m2.n21;
_local1.n22 = m1.n22 + m2.n22;
_local1.n23 = m1.n23 + m2.n23;
_local1.n24 = m1.n24 + m2.n24;
_local1.n31 = m1.n31 + m2.n31;
_local1.n32 = m1.n32 + m2.n32;
_local1.n33 = m1.n33 + m2.n33;
_local1.n34 = m1.n34 + m2.n34;
_local1.n41 = m1.n41 + m2.n41;
_local1.n42 = m1.n42 + m2.n42;
_local1.n43 = m1.n43 + m2.n43;
_local1.n44 = m1.n44 + m2.n44;
return(_local1);
}
static function clone(m) {
return(new sandy.core.data.Matrix4(m.n11, m.n12, m.n13, m.n14, m.n21, m.n22, m.n23, m.n24, m.n31, m.n32, m.n33, m.n34, m.n41, m.n42, m.n43, m.n44));
}
static function vectorMult(m, v) {
var _local5;
var _local4;
var _local3;
_local5 = v.x;
_local4 = v.y;
_local3 = v.z;
v.x = (((_local5 * m.n11) + (_local4 * m.n12)) + (_local3 * m.n13)) + m.n14;
v.y = (((_local5 * m.n21) + (_local4 * m.n22)) + (_local3 * m.n23)) + m.n24;
v.z = (((_local5 * m.n31) + (_local4 * m.n32)) + (_local3 * m.n33)) + m.n34;
}
static function vectorMult3x3(m, v) {
var _local5;
var _local4;
var _local3;
_local5 = v.x;
_local4 = v.y;
_local3 = v.z;
v.x = ((_local5 * m.n11) + (_local4 * m.n12)) + (_local3 * m.n13);
v.y = ((_local5 * m.n21) + (_local4 * m.n22)) + (_local3 * m.n23);
v.z = ((_local5 * m.n31) + (_local4 * m.n32)) + (_local3 * m.n33);
}
static function projectVector(mp, v) {
var _local3 = 1 / ((((v.x * mp.n41) + (v.y * mp.n42)) + (v.z * mp.n43)) + mp.n44);
vectorMult(mp, v);
v.x = v.x * _local3;
v.y = v.y * _local3;
v.z = 0;
}
static function eulerRotation(ax, ay, az) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
ax = sandy.util.NumberUtil.toRadian(ax);
ay = sandy.util.NumberUtil.toRadian(ay);
az = sandy.util.NumberUtil.toRadian(az);
var _local6 = Math.cos(ax);
var _local5 = Math.sin(ax);
var _local4 = Math.cos(ay);
var _local7 = Math.sin(ay);
var _local2 = Math.cos(az);
var _local3 = Math.sin(az);
var _local12 = _local6 * _local7;
var _local11 = _local5 * _local7;
_local1.n11 = _local4 * _local2;
_local1.n12 = (-_local4) * _local3;
_local1.n13 = _local7;
_local1.n21 = (_local11 * _local2) + (_local6 * _local3);
_local1.n22 = ((-_local11) * _local3) + (_local6 * _local2);
_local1.n23 = (-_local5) * _local4;
_local1.n31 = ((-_local12) * _local2) + (_local5 * _local3);
_local1.n32 = (_local12 * _local3) + (_local5 * _local2);
_local1.n33 = _local6 * _local4;
return(_local1);
}
static function rotationX(angle) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
var _local2 = _aCos[int(angle)];
var _local3 = _aSin[int(angle)];
_local1.n22 = _local2;
_local1.n23 = _local3;
_local1.n32 = -_local3;
_local1.n33 = _local2;
return(_local1);
}
static function rotationY(angle) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
var _local2 = _aCos[int(angle)];
var _local3 = _aSin[int(angle)];
_local1.n11 = _local2;
_local1.n13 = -_local3;
_local1.n31 = _local3;
_local1.n33 = _local2;
return(_local1);
}
static function rotationZ(angle) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
var _local2 = _aCos[int(angle)];
var _local3 = _aSin[int(angle)];
_local1.n11 = _local2;
_local1.n12 = _local3;
_local1.n21 = -_local3;
_local1.n22 = _local2;
return(_local1);
}
static function axisRotationVector(v, angle) {
return(axisRotation(v.x, v.y, v.z, angle));
}
static function axisRotation(u, v, w, angle) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
angle = sandy.util.NumberUtil.toRadian(angle);
var _local3 = Math.cos(angle);
var _local5 = Math.sin(angle);
var _local2 = 1 - _local3;
var _local14 = (u * v) * _local2;
var _local12 = (v * w) * _local2;
var _local13 = (u * w) * _local2;
var _local8 = _local5 * w;
var _local9 = _local5 * v;
var _local10 = _local5 * u;
_local1.n11 = _local3 + ((u * u) * _local2);
_local1.n12 = (-_local8) + _local14;
_local1.n13 = _local9 + _local13;
_local1.n21 = _local8 + _local14;
_local1.n22 = _local3 + ((v * v) * _local2);
_local1.n23 = (-_local10) + _local12;
_local1.n31 = (-_local9) + _local13;
_local1.n32 = _local10 + _local12;
_local1.n33 = _local3 + ((w * w) * _local2);
return(_local1);
}
static function translation(nTx, nTy, nTz) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
_local1.n14 = nTx;
_local1.n24 = nTy;
_local1.n34 = nTz;
return(_local1);
}
static function translationVector(v) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
_local1.n14 = v.x;
_local1.n24 = v.y;
_local1.n34 = v.z;
return(_local1);
}
static function scale(nXScale, nYScale, nZScale) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
_local1.n11 = nXScale;
_local1.n22 = nYScale;
_local1.n33 = nZScale;
return(_local1);
}
static function scaleVector(v) {
var _local1 = sandy.core.data.Matrix4.createIdentity();
_local1.n11 = v.x;
_local1.n22 = v.y;
_local1.n33 = v.z;
return(_local1);
}
static function det(m) {
return((((((((m.n11 * m.n22) - (m.n21 * m.n12)) * ((m.n33 * m.n44) - (m.n42 * m.n34))) - (((m.n11 * m.n32) - (m.n31 * m.n12)) * ((m.n23 * m.n44) - (m.n41 * m.n24)))) + (((m.n11 * m.n42) - (m.n41 * m.n12)) * ((m.n23 * m.n34) - (m.n33 * m.n24)))) + (((m.n21 * m.n32) - (m.n31 * m.n22)) * ((m.n13 * m.n44) - (m.n43 * m.n14)))) - (((m.n21 * m.n42) - (m.n41 * m.n22)) * ((m.n13 * m.n34) - (m.n33 * m.n14)))) + (((m.n31 * m.n42) - (m.n41 * m.n32)) * ((m.n13 * m.n24) - (m.n23 * m.n14))));
}
static function getTrace(m) {
return(((m.n11 + m.n22) + m.n33) + m.n44);
}
static function getInverse(m) {
var _local1 = det(m);
if (Math.abs(_local1) < 0.001) {
return(null);
}
_local1 = 1 / _local1;
var _local14 = m.n11;
var _local11 = m.n21;
var _local8 = m.n31;
var _local18 = m.n41;
var _local12 = m.n12;
var _local9 = m.n22;
var _local5 = m.n32;
var _local17 = m.n42;
var _local10 = m.n13;
var _local6 = m.n23;
var _local3 = m.n33;
var _local16 = m.n43;
var _local7 = m.n14;
var _local4 = m.n24;
var _local2 = m.n34;
var _local15 = m.n44;
return(new sandy.core.data.Matrix4(_local1 * (((_local9 * ((_local3 * _local15) - (_local16 * _local2))) + (_local5 * ((_local16 * _local4) - (_local6 * _local15)))) + (_local17 * ((_local6 * _local2) - (_local3 * _local4)))), _local1 * (((_local6 * ((_local8 * _local15) - (_local18 * _local2))) + (_local3 * ((_local18 * _local4) - (_local11 * _local15)))) + (_local16 * ((_local11 * _local2) - (_local8 * _local4)))), _local1 * (((_local4 * ((_local8 * _local17) - (_local18 * _local5))) + (_local2 * ((_local18 * _local9) - (_local11 * _local17)))) + (_local15 * ((_local11 * _local5) - (_local8 * _local9)))), _local1 * (((_local11 * ((_local17 * _local3) - (_local5 * _local16))) + (_local8 * ((_local9 * _local16) - (_local17 * _local6)))) + (_local18 * ((_local5 * _local6) - (_local9 * _local3)))), _local1 * (((_local5 * ((_local10 * _local15) - (_local16 * _local7))) + (_local17 * ((_local3 * _local7) - (_local10 * _local2)))) + (_local12 * ((_local16 * _local2) - (_local3 * _local15)))), _local1 * (((_local3 * ((_local14 * _local15) - (_local18 * _local7))) + (_local16 * ((_local8 * _local7) - (_local14 * _local2)))) + (_local10 * ((_local18 * _local2) - (_local8 * _local15)))), _local1 * (((_local2 * ((_local14 * _local17) - (_local18 * _local12))) + (_local15 * ((_local8 * _local12) - (_local14 * _local5)))) + (_local7 * ((_local18 * _local5) - (_local8 * _local17)))), _local1 * (((_local8 * ((_local17 * _local10) - (_local12 * _local16))) + (_local18 * ((_local12 * _local3) - (_local5 * _local10)))) + (_local14 * ((_local5 * _local16) - (_local17 * _local3)))), _local1 * (((_local17 * ((_local10 * _local4) - (_local6 * _local7))) + (_local12 * ((_local6 * _local15) - (_local16 * _local4)))) + (_local9 * ((_local16 * _local7) - (_local10 * _local15)))), _local1 * (((_local16 * ((_local14 * _local4) - (_local11 * _local7))) + (_local10 * ((_local11 * _local15) - (_local18 * _local4)))) + (_local6 * ((_local18 * _local7) - (_local14 * _local15)))), _local1 * (((_local15 * ((_local14 * _local9) - (_local11 * _local12))) + (_local7 * ((_local11 * _local17) - (_local18 * _local9)))) + (_local4 * ((_local18 * _local12) - (_local14 * _local17)))), _local1 * (((_local18 * ((_local9 * _local10) - (_local12 * _local6))) + (_local14 * ((_local17 * _local6) - (_local9 * _local16)))) + (_local11 * ((_local12 * _local16) - (_local17 * _local10)))), _local1 * (((_local12 * ((_local3 * _local4) - (_local6 * _local2))) + (_local9 * ((_local10 * _local2) - (_local3 * _local7)))) + (_local5 * ((_local6 * _local7) - (_local10 * _local4)))), _local1 * (((_local10 * ((_local8 * _local4) - (_local11 * _local2))) + (_local6 * ((_local14 * _local2) - (_local8 * _local7)))) + (_local3 * ((_local11 * _local7) - (_local14 * _local4)))), _local1 * (((_local7 * ((_local8 * _local9) - (_local11 * _local5))) + (_local4 * ((_local14 * _local5) - (_local8 * _local12)))) + (_local2 * ((_local11 * _local12) - (_local14 * _local9)))), _local1 * (((_local14 * ((_local9 * _local3) - (_local5 * _local6))) + (_local11 * ((_local5 * _local10) - (_local12 * _local3)))) + (_local8 * ((_local12 * _local6) - (_local9 * _local10))))));
}
static function preCalc() {
if (_bIsPrecalculed) {
return(true);
}
_bIsPrecalculed = true;
var _local1 = 0;
while (_local1 < 360) {
_aSin[_local1] = Math.sin((_local1 * Math.PI) / 180);
_aCos[_local1] = Math.cos((_local1 * Math.PI) / 180);
_local1++;
}
return(true);
}
static var _aSin = new Array(360);
static var _aCos = new Array(360);
static var _bIsPrecalculed = false;
static var _bMatrixExtends = preCalc();
}
Symbol 1088 MovieClip [__Packages.sandy.util.NumberUtil] Frame 0
class sandy.util.NumberUtil
{
function NumberUtil () {
}
static function get TWO_PI() {
return(__TWO_PI);
}
static function get PI() {
return(__PI);
}
static function get HALF_PI() {
return(__HALF_PI);
}
static function get TO_DEGREE() {
return(__TO_DREGREE);
}
static function get TO_RADIAN() {
return(__TO_RADIAN);
}
static function isZero(n) {
return(_fABS(n) < TOL);
}
static function areEqual(n, m) {
return(_fABS(n - m) < TOL);
}
static function toDegree(n) {
return(n * TO_DEGREE);
}
static function toRadian(n) {
return(n * TO_RADIAN);
}
static function constrain(n, min, max) {
return(Math.max(Math.min(n, max), min));
}
static var __TWO_PI = (Math.PI*2);
static var __PI = Math.PI;
static var __HALF_PI = (Math.PI/2);
static var __TO_DREGREE = 57.2957795130823;
static var __TO_RADIAN = (Math.PI/180);
static var TOL = 0.0001;
static var _fABS = Math.abs;
}
Symbol 1089 MovieClip [__Packages.sandy.math.VectorMath] Frame 0
class sandy.math.VectorMath
{
function VectorMath () {
}
static function getNorm(v) {
return(Math.sqrt(((v.x * v.x) + (v.y * v.y)) + (v.z * v.z)));
}
static function negate(v) {
return(new sandy.core.data.Vector(-v.x, -v.y, -v.z));
}
static function addVector(v, w) {
return(new sandy.core.data.Vector(v.x + w.x, v.y + w.y, v.z + w.z));
}
static function sub(v, w) {
return(new sandy.core.data.Vector(v.x - w.x, v.y - w.y, v.z - w.z));
}
static function pow(v, pow) {
return(new sandy.core.data.Vector(Math.pow(v.x, pow), Math.pow(v.x, pow), Math.pow(v.x, pow)));
}
static function scale(v, n) {
return(new sandy.core.data.Vector(v.x * n, v.y * n, v.z * n));
}
static function dot(v, w) {
return(((v.x * w.x) + (v.y * w.y)) + (w.z * v.z));
}
static function cross(w, v) {
return(new sandy.core.data.Vector((w.y * v.z) - (w.z * v.y), (w.z * v.x) - (w.x * v.z), (w.x * v.y) - (w.y * v.x)));
}
static function normalize(v) {
var _local1 = getNorm(v);
if ((_local1 == 0) || (_local1 == 1)) {
return(false);
}
v.x = v.x / _local1;
v.y = v.y / _local1;
v.z = v.z / _local1;
return(true);
}
static function getAngle(v, w) {
var _local1 = dot(v, w) / (getNorm(v) * getNorm(w));
var _local2 = 1 - (_local1 * _local1);
if (_local2 < 0) {
trace(" wrong " + _local1);
_local2 = 0;
}
return(Math.atan2(Math.sqrt(_local2), _local1));
}
static function clone(v) {
return(new sandy.core.data.Vector(v.x, v.y, v.z));
}
}
Symbol 1090 MovieClip [__Packages.com.bourre.events.IEventDispatcher] Frame 0
interface com.bourre.events.IEventDispatcher
{
}
Symbol 1091 MovieClip [__Packages.com.bourre.events.IEvent] Frame 0
interface com.bourre.events.IEvent
{
}
Symbol 1092 MovieClip [__Packages.com.bourre.events.EventType] Frame 0
class com.bourre.events.EventType extends String
{
function EventType (s) {
super(s);
}
}
Symbol 1093 MovieClip [__Packages.sandy.core.transform.ITransform3D] Frame 0
interface sandy.core.transform.ITransform3D extends com.bourre.events.IEventDispatcher
{
}
Symbol 1094 MovieClip [__Packages.sandy.core.transform.TransformType] Frame 0
class sandy.core.transform.TransformType
{
var _value;
function TransformType (value) {
_value = value;
}
static function get NONE() {
return(__none);
}
static function get TRANSLATION() {
return(__translation);
}
static function get ROTATION() {
return(__rotation);
}
static function get SCALE() {
return(__scale);
}
static function get MIXED() {
return(__mixed);
}
static function get SCALE_INTERPOLATION() {
return(__scale_interpolation);
}
static function get ROTATION_INTERPOLATION() {
return(__rotation_interpolation);
}
static function get TRANSLATION_INTERPOLATION() {
return(__translation_interpolation);
}
static function get PATH_INTERPOLATION() {
return(__path_interpolation);
}
static function get VERTEX_INTERPOLATION() {
return(__vertex_interpolation);
}
function toString() {
return("mb.sandy.core.transfrom.TransformType:" + _value);
}
function getValue(Void) {
return(_value);
}
static var __none = new sandy.core.transform.TransformType(0);
static var __translation = new sandy.core.transform.TransformType(1);
static var __rotation = new sandy.core.transform.TransformType(2);
static var __scale = new sandy.core.transform.TransformType(3);
static var __mixed = new sandy.core.transform.TransformType(7);
static var __scale_interpolation = new sandy.core.transform.TransformType(4);
static var __rotation_interpolation = new sandy.core.transform.TransformType(5);
static var __translation_interpolation = new sandy.core.transform.TransformType(6);
static var __path_interpolation = new sandy.core.transform.TransformType(7);
static var __vertex_interpolation = new sandy.core.transform.TransformType(8);
}
Symbol 1095 MovieClip [__Packages.sandy.core.transform.Interpolator3D] Frame 0
interface sandy.core.transform.Interpolator3D extends sandy.core.transform.ITransform3D
{
}
Symbol 1096 MovieClip [__Packages.com.bourre.events.BasicEvent] Frame 0
class com.bourre.events.BasicEvent implements com.bourre.events.IEvent
{
var _e, _oT;
function BasicEvent (e, oT) {
_e = e;
_oT = oT;
}
function getType() {
return(_e);
}
function setType(e) {
_e = e;
}
function getTarget() {
return(_oT);
}
function setTarget(oT) {
_oT = oT;
}
function toString() {
return((com.bourre.log.PixlibStringifier.stringify(this) + " : ") + getType());
}
}
Symbol 1097 MovieClip [__Packages.com.bourre.log.Stringifier] Frame 0
interface com.bourre.log.Stringifier
{
}
Symbol 1098 MovieClip [__Packages.com.bourre.log.BasicStringifier] Frame 0
class com.bourre.log.BasicStringifier implements com.bourre.log.Stringifier
{
function BasicStringifier () {
}
function stringify(target) {
return((("'" + com.bourre.utils.ClassUtils.getFullyQualifiedClassName(target)) + com.bourre.core.HashCodeFactory.getKey(target)) + "'");
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
}
Symbol 1099 MovieClip [__Packages.com.bourre.utils.ClassUtils] Frame 0
class com.bourre.utils.ClassUtils
{
function ClassUtils () {
}
static function getClassName(o) {
var _local1 = getFullyQualifiedClassName(o);
return(_local1.substr(_local1.lastIndexOf(".") + 1));
}
static function inheritsFromClass(o, clazz) {
var _local1 = ((typeof(o) == "function") ? (Function(o).prototype) : (o.__proto__));
while (_local1 = _local1.__proto__ , _local1) {
if (clazz.prototype === _local1) {
return(true);
}
}
return(false);
}
static function implementsInterface(o, interfaze) {
if (inheritsFromClass(o, interfaze)) {
return(false);
}
return(o instanceof interfaze);
}
static function getFullyQualifiedClassName(o) {
o = ((typeof(o) == "function") ? (Function(o).prototype) : (o.__proto__));
return((_containsKey(o) ? (_getFullyQualifiedClassName(o)) : (_buildPath("", _global, o))));
}
static function _buildPath(s, pack, o) {
for (var _local5 in pack) {
var _local1 = pack[_local5];
if (_local1.__constructor__ === Object) {
var _local5 = _buildPath((s + _local5) + ".", _local1, o);
if (_local5) {
return(_local5);
}
} else if (_local1.prototype === o) {
_setFullyQualifiedClassName(o, s + _local5);
return(s + _local5);
}
}
}
static function _containsKey(o) {
return(Boolean(o.__fullyQualifiedClassName.length > 0));
}
static function _getFullyQualifiedClassName(o) {
return(o.__fullyQualifiedClassName);
}
static function _setFullyQualifiedClassName(o, s) {
o.__fullyQualifiedClassName = s;
_global.ASSetPropFlags(o, ["__fullyQualifiedClassName"], 7, 1);
}
}
Symbol 1100 MovieClip [__Packages.com.bourre.core.HashCodeFactory] Frame 0
class com.bourre.core.HashCodeFactory
{
function HashCodeFactory () {
}
static function getNextKEY() {
return(_nKEY++);
}
static function getNextName() {
return(String(_nKEY + 1));
}
static function getKey(o) {
if (o.__KEY == null) {
o.__KEY = getNextKEY();
_global.ASSetPropFlags(o, ["__KEY"], 7, 1);
}
return(o.__KEY);
}
static function previewNextKey() {
return(_nKEY + 1);
}
static function buildInstance(sPackage, aArgs, factoryMethod, singletonAccess) {
var clazz = eval ("_global." + sPackage);
if (!clazz) {
com.bourre.log.PixlibDebug.FATAL(("'_global." + sPackage) + "' class is not available in the current swf");
return(null);
}
var o;
if (factoryMethod) {
if (singletonAccess) {
var i = clazz[singletonAccess].call();
if (!i) {
com.bourre.log.PixlibDebug.FATAL(((("'_global." + sPackage) + ".") + singletonAccess) + "()' singleton access failed.");
return(null);
}
o = i[factoryMethod].apply(i, aArgs);
if (!o) {
com.bourre.log.PixlibDebug.FATAL(((((("'_global." + sPackage) + ".") + singletonAccess) + "().") + factoryMethod) + "()' factory method call failed.");
return(null);
}
} else {
o = clazz[factoryMethod].apply(clazz, aArgs);
if (!o) {
com.bourre.log.PixlibDebug.FATAL(((("'_global." + sPackage) + ".") + factoryMethod) + "()' factory method call failed.");
return(null);
}
}
} else {
o = {__constructor__:clazz, __proto__:clazz.prototype};
clazz.apply(o, aArgs);
}
return(o);
}
static function isSameObject(a, b) {
return(getKey(a) == getKey(b));
}
static var _nKEY = 0;
}
Symbol 1101 MovieClip [__Packages.com.bourre.log.LogChannel] Frame 0
class com.bourre.log.LogChannel extends com.bourre.events.EventType
{
function LogChannel (s) {
super(s);
}
}
Symbol 1102 MovieClip [__Packages.com.bourre.log.PixlibDebug] Frame 0
class com.bourre.log.PixlibDebug
{
function PixlibDebug () {
}
static function DEBUG(o) {
if (isOn) {
com.bourre.log.Logger.LOG(o, com.bourre.log.LogLevel.DEBUG, channel);
}
}
static function INFO(o) {
if (isOn) {
com.bourre.log.Logger.LOG(o, com.bourre.log.LogLevel.INFO, channel);
}
}
static function WARN(o) {
if (isOn) {
com.bourre.log.Logger.LOG(o, com.bourre.log.LogLevel.WARN, channel);
}
}
static function ERROR(o) {
if (isOn) {
com.bourre.log.Logger.LOG(o, com.bourre.log.LogLevel.ERROR, channel);
}
}
static function FATAL(o) {
if (isOn) {
com.bourre.log.Logger.LOG(o, com.bourre.log.LogLevel.FATAL, channel);
}
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
static var isOn = true;
static var channel = new com.bourre.log.LogChannel(com.bourre.utils.ClassUtils.getFullyQualifiedClassName(new com.bourre.log.PixlibDebug()));
}
Symbol 1103 MovieClip [__Packages.com.bourre.log.Logger] Frame 0
class com.bourre.log.Logger
{
static var _oI;
var _oEB, _oLevel;
function Logger () {
_oEB = new com.bourre.events.EventBroadcaster(this);
_oLevel = com.bourre.log.LogLevel.DEBUG;
}
static function getInstance() {
return(((_oI != undefined) ? (_oI) : (_init())));
}
static function LOG(o, oLevel, channel) {
getInstance().log(o, oLevel, channel);
}
static function SETLEVEL(oLevel) {
getInstance()._oLevel = oLevel;
}
static function GETLEVEL() {
return(getInstance()._oLevel);
}
function addLogListener(listener, channel) {
if (!channel) {
_oEB.addListener(listener, listener.onLog);
} else {
_oEB.addEventListener(channel, listener, listener.onLog);
}
}
function removeLogListener(listener, channel) {
if (!channel) {
_oEB.removeListener(listener);
} else {
_oEB.removeEventListener(channel, listener);
}
}
function log(logContent, oLevel, channel) {
if (oLevel == undefined) {
oLevel = com.bourre.log.LogLevel.DEBUG;
}
if (oLevel.isEnabled()) {
_oEB.broadcastEvent(new com.bourre.log.LogEvent(oLevel, logContent, channel));
}
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
static function _init() {
_oI = new com.bourre.log.Logger();
return(_oI);
}
}
Symbol 1104 MovieClip [__Packages.com.bourre.log.LogLevel] Frame 0
class com.bourre.log.LogLevel extends Number
{
var _sName, _nLevel;
function LogLevel (sName, nLevel) {
super(nLevel);
_sName = sName;
_nLevel = nLevel;
}
function getName() {
return(_sName);
}
function getLevel() {
return(_nLevel);
}
function isEnabled() {
return(_nLevel >= com.bourre.log.Logger.GETLEVEL());
}
function toString() {
return(((((com.bourre.log.PixlibStringifier.stringify(this) + "[") + getName()) + ":") + this) + "]");
}
static var DEBUG = new com.bourre.log.LogLevel("DEBUG", 0);
static var INFO = new com.bourre.log.LogLevel("INFO", 1);
static var WARN = new com.bourre.log.LogLevel("WARN", 2);
static var ERROR = new com.bourre.log.LogLevel("ERROR", 3);
static var FATAL = new com.bourre.log.LogLevel("FATAL", 4);
}
Symbol 1105 MovieClip [__Packages.com.bourre.events.EventBroadcaster] Frame 0
class com.bourre.events.EventBroadcaster implements com.bourre.events.IEventDispatcher
{
static var _oI;
var _oOwner, _oL, _aAll, _oE;
function EventBroadcaster (owner) {
_oOwner = (owner ? (owner) : this);
_init();
}
static function getInstance() {
return(((_oI instanceof com.bourre.events.EventBroadcaster) ? (_oI) : (_buildInstance())));
}
function getListenerArray(t) {
return(((t == undefined) ? (_aAll) : (_oL[t])));
}
function listenerArrayExists(t) {
return(_oL[t] != undefined);
}
function addListener(oL, f) {
if (f) {
oL = _getEventProxy.apply(this, arguments);
}
if (_aAll.insert(oL)) {
_clean((f ? (com.bourre.core.HashCodeFactory.getKey(oL.t)) : (com.bourre.core.HashCodeFactory.getKey(oL))));
}
}
function removeListener(oL) {
_clean(com.bourre.core.HashCodeFactory.getKey(oL));
_aAll.remove(oL);
}
function removeAllListeners() {
_init();
}
function addEventListener(t, oL) {
var _local6 = arguments[2];
if (_local6) {
oL = _getEventProxy.apply(this, arguments.splice(1));
}
if (!_aAll.listenerExists(oL)) {
if (!listenerArrayExists(t)) {
_oL[t] = new com.bourre.events.ListenerArray();
}
if (getListenerArray(t).insert(oL)) {
var _local4 = (_local6 ? (com.bourre.core.HashCodeFactory.getKey(oL.t)) : (com.bourre.core.HashCodeFactory.getKey(oL)));
if (_oE[_local4] == undefined) {
_oE[_local4] = new Object();
}
_oE[_local4][t] = oL;
}
}
}
function removeEventListener(t, oL) {
if (listenerArrayExists(t)) {
var _local3 = getListenerArray(t);
if (_local3.remove(oL)) {
delete _oE[com.bourre.core.HashCodeFactory.getKey(oL)][t];
if (_local3.isEmpty()) {
delete _oL[t];
}
}
}
}
function removeAllEventListeners(t) {
if (listenerArrayExists(t)) {
delete _oL[t];
for (var _local3 in _oE) {
delete _oE[_local3][t];
}
}
}
function broadcastEvent(e) {
if (e.getTarget() == undefined) {
e.setTarget(_oOwner);
}
var _local3 = getListenerArray(e.getType());
if (_local3 != undefined) {
_broadcast(_local3, e);
}
if (_aAll.length > 0) {
_broadcast(_aAll, e);
}
}
function dispatchEvent(o) {
var _local3 = new com.bourre.events.DynBasicEvent(o.type, o.target);
for (var _local4 in o) {
if ((o[_local4] != "type") && (o[_local4] != "target")) {
_local3[_local4] = o[_local4];
}
}
broadcastEvent(_local3);
}
function isEmpty() {
var _local2;
do {
if ((in _oL) == null) {
break;
}
_local2 = in _oL;
} while (!_local2);
do {
} while ("isEmpty" != null);
return((_aAll.length == 0) && (_local2 == undefined));
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
static function _buildInstance() {
_oI = new com.bourre.events.EventBroadcaster();
return(_oI);
}
function _init() {
_oL = new Object();
_aAll = new com.bourre.events.ListenerArray();
_oE = new Object();
}
function _broadcast(aL, e) {
var _local5 = aL.length;
while (_local5-- , _local5 > -1) {
var _local2 = aL[_local5];
var _local4 = typeof(_local2);
if ((_local4 == "object") || (_local4 == "movieclip")) {
if (_local2.handleEvent != undefined) {
_local2.handleEvent(e);
} else {
_local2[String(e.getType())](e);
}
} else {
_local2.apply(this, [e]);
}
}
}
function _clean(key) {
if (_oE[key] != undefined) {
var _local2 = _oE[key];
for (var _local3 in _local2) {
removeEventListener(_local3, _local2[_local3]);
}
delete _oE[key];
}
}
function _getEventProxy(oL, f) {
return(com.bourre.commands.Delegate.create.apply(com.bourre.commands.Delegate, [oL, f].concat(arguments.splice(2))));
}
static var _bInitialization = com.bourre.core.HashCodeFactory;
}
Symbol 1106 MovieClip [__Packages.com.bourre.events.ListenerArray] Frame 0
class com.bourre.events.ListenerArray extends Array
{
var splice, length, push;
function ListenerArray () {
super();
splice.apply(this, [0, 0].concat(arguments));
}
function getIndex(oL) {
if (typeof(oL) == "function") {
oL = oL.t;
}
var _local3 = length;
while (_local3-- , _local3 > -1) {
var _local2 = this[_local3];
if (_local2 == oL) {
return(_local3);
}
if (typeof(_local2) == "function") {
if (_local2.t == oL) {
return(_local3);
}
}
}
return(-1);
}
function listenerExists(oL) {
return(getIndex(oL) != -1);
}
function insert(oL) {
if (!listenerExists(oL)) {
push(oL);
return(true);
}
return(false);
}
function remove(oL) {
var _local2 = getIndex(oL);
if (_local2 != -1) {
splice(_local2, 1);
return(true);
}
return(false);
}
function isEmpty() {
return(length < 1);
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
}
Symbol 1107 MovieClip [__Packages.com.bourre.events.DynBasicEvent] Frame 0
class com.bourre.events.DynBasicEvent extends com.bourre.events.BasicEvent
{
var _e, _oT;
function DynBasicEvent (s, oT) {
super(new com.bourre.events.EventType(s), oT);
}
function get type() {
return(_e.toString());
}
function set type(s) {
_e = new com.bourre.events.EventType(s);
//return(type);
}
function get target() {
return(_oT);
}
function set target(oT) {
_oT = oT;
//return(target);
}
function toString() {
return((com.bourre.log.PixlibStringifier.stringify(this) + " : ") + type);
}
}
Symbol 1108 MovieClip [__Packages.com.bourre.commands.Command] Frame 0
interface com.bourre.commands.Command
{
}
Symbol 1109 MovieClip [__Packages.com.bourre.transitions.IFrameListener] Frame 0
interface com.bourre.transitions.IFrameListener
{
}
Symbol 1110 MovieClip [__Packages.com.bourre.commands.Delegate] Frame 0
class com.bourre.commands.Delegate implements com.bourre.commands.Command, com.bourre.transitions.IFrameListener
{
var _o, _f, _a, _fProxy;
function Delegate (o, f) {
_o = o;
_f = f;
_a = arguments.splice(2);
_fProxy = Function(create.apply(this, [_o].concat([_f], _a)));
}
function handleEvent(e) {
return(_f.apply(_o, [e].concat(_a)));
}
static function create(o, f) {
var _local2 = function () {
var _local3 = arguments.callee.t;
var _local2 = arguments.callee.f;
var _local4 = arguments.concat(arguments.callee.a);
return(_local2.apply(_local3, _local4));
};
_local2.t = o;
_local2.f = f;
_local2.a = arguments.splice(2);
return(_local2);
}
function getScope() {
return(_o);
}
function getFunction() {
return(_fProxy);
}
function callFunction() {
return(_fProxy());
}
function execute(e) {
_fProxy();
}
function setArguments() {
if (arguments.length > 0) {
_a = arguments;
_fProxy.a = _a;
}
}
function addArguments() {
if (arguments.length > 0) {
_a = _a.concat(arguments);
_fProxy.a = _a;
}
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
function onEnterFrame() {
_fProxy();
}
}
Symbol 1111 MovieClip [__Packages.com.bourre.log.LogListener] Frame 0
interface com.bourre.log.LogListener
{
}
Symbol 1112 MovieClip [__Packages.com.bourre.log.LogEvent] Frame 0
class com.bourre.log.LogEvent extends com.bourre.events.BasicEvent
{
var level, content, timestamp;
function LogEvent (oLevel, oContent, channel) {
super((channel ? (channel) : (onLogEVENT)));
level = oLevel;
content = oContent;
timestamp = new Date().getTime();
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
static var onLogEVENT = new com.bourre.events.EventType("onLog");
}
Symbol 1113 MovieClip [__Packages.com.bourre.log.PixlibStringifier] Frame 0
class com.bourre.log.PixlibStringifier
{
function PixlibStringifier () {
}
static function setStringifier(o) {
_STRINGIFIER = o;
}
static function getStringifier() {
return(_STRINGIFIER);
}
static function stringify(target) {
return(_STRINGIFIER.stringify(target));
}
static var _STRINGIFIER = new com.bourre.log.BasicStringifier();
}
Symbol 1114 MovieClip [__Packages.sandy.events.TransformEvent] Frame 0
class sandy.events.TransformEvent extends com.bourre.events.BasicEvent
{
var _nType;
function TransformEvent (e, oT, type) {
super(e, oT);
_nType = type;
}
function geTransformType(Void) {
return(_nType);
}
static var onStartEVENT = new com.bourre.events.EventType("onStart");
static var onEndEVENT = new com.bourre.events.EventType("onEnd");
}
Symbol 1115 MovieClip [__Packages.sandy.events.InterpolationEvent] Frame 0
class sandy.events.InterpolationEvent extends sandy.events.TransformEvent
{
var _nPercent;
function InterpolationEvent (e, oT, type, percent) {
super(e, oT, type);
_nPercent = percent;
}
function getPercent(Void) {
return(_nPercent);
}
static var onProgressEVENT = new com.bourre.events.EventType("onProgress");
static var onPauseEVENT = new com.bourre.events.EventType("onPause");
static var onResumeEVENT = new com.bourre.events.EventType("onResume");
}
Symbol 1116 MovieClip [__Packages.sandy.util.Rectangle] Frame 0
class sandy.util.Rectangle
{
var x, y, width, height;
function Rectangle (px, py, pwidth, pheight) {
x = px || 0;
y = py || 0;
width = pwidth || 0;
height = pheight || 0;
}
}
Symbol 1117 MovieClip [__Packages.sandy.view.ClipScreen] Frame 0
class sandy.view.ClipScreen implements sandy.view.IScreen
{
var _bgColor, _mc, _sRect, _c;
function ClipScreen (mc, w, h, bgColor) {
_bgColor = ((bgColor == undefined) ? 16777215 : (bgColor));
_mc = mc;
_sRect = new sandy.util.Rectangle(0, 0, w, h);
_mc.scrollRect = _sRect;
}
function setCamera(c) {
_c = c;
}
function setSize(r) {
_sRect = r;
_mc.scrollRect = r;
}
function getSize(Void) {
return(_sRect);
}
function getClip(Void) {
return(_mc);
}
function render(a) {
_mc.child.removeMovieClip();
var _local5 = _mc.createEmptyMovieClip("child", 0);
var _local2 = a.length;
while (_local2-- , _local2 > -1) {
var _local4 = a[_local2].face;
var _local3 = _local5.createEmptyMovieClip("c_" + _local2, _local2);
_local4.render(_local3);
}
}
function dispose(Void) {
_mc.removeMovieClip();
}
}
Symbol 1118 MovieClip [__Packages.sandy.core.face.Face] Frame 0
interface sandy.core.face.Face extends com.bourre.events.IEventDispatcher
{
}
Symbol 1119 MovieClip [__Packages.sandy.core.data.UVCoord] Frame 0
class sandy.core.data.UVCoord
{
var u, v;
function UVCoord (nU, nV) {
u = nU;
v = nV;
}
function toString(Void) {
return("sandy.core.data.UVCoord");
}
}
Symbol 1120 MovieClip [__Packages.sandy.skin.Skin] Frame 0
interface sandy.skin.Skin extends com.bourre.events.IEventDispatcher
{
}
Symbol 1121 MovieClip [__Packages.sandy.skin.SkinType] Frame 0
class sandy.skin.SkinType
{
var _value;
function SkinType (value) {
_value = value;
}
static function get NONE() {
return(__none);
}
static function get SIMPLE_COLOR() {
return(__simple_color);
}
static function get MIXED() {
return(__mixed);
}
static function get SIMPLE_LINE() {
return(__simple_line);
}
static function get TEXTURE() {
return(__texture);
}
static function get ZLIGHTEN() {
return(__zlighten);
}
static function get MOVIE() {
return(__movie);
}
static function get VIDEO() {
return(__video);
}
function toString() {
return("sandy.skin.SkinType:" + _value);
}
function getValue(Void) {
return(_value);
}
static var __none = new sandy.skin.SkinType(-1);
static var __simple_color = new sandy.skin.SkinType(0);
static var __mixed = new sandy.skin.SkinType(1);
static var __simple_line = new sandy.skin.SkinType(2);
static var __texture = new sandy.skin.SkinType(3);
static var __zlighten = new sandy.skin.SkinType(4);
static var __movie = new sandy.skin.SkinType(5);
static var __video = new sandy.skin.SkinType(6);
}
Symbol 1122 MovieClip [__Packages.sandy.core.World3D] Frame 0
class sandy.core.World3D
{
static var _inst;
var _eRender, _eStart, _oEB, _light, _isRunning, _aCams, _oRoot, _mProj, _oCam, _bGlbCache, _aObjects, _aMatrix, _aCache;
function World3D () {
_eRender = new com.bourre.events.BasicEvent(onRenderEVENT);
_eStart = new com.bourre.events.BasicEvent(onStartEVENT);
_oEB = new com.bourre.events.EventBroadcaster(this);
_light = new sandy.core.light.Light3D(new sandy.core.data.Vector(0, 0, 1), 50);
_isRunning = false;
_aCams = [];
com.bourre.transitions.FPSBeacon.getInstance().addFrameListener(new com.bourre.commands.Delegate(this, __onEnterFrame));
}
function addEventListener(t, o) {
_oEB.addEventListener.apply(_oEB, arguments);
}
function removeEventListener(e, oL) {
_oEB.removeEventListener(e, oL);
}
static function getInstance() {
if (_inst === undefined) {
_inst = new sandy.core.World3D();
}
return(_inst);
}
function addCamera(cam) {
return(_aCams.push(cam) - 1);
}
function getCameraList(Void) {
return(_aCams);
}
function getCamera(id) {
if (((!id) || (id < 0)) || (id >= _aCams.length)) {
id = 0;
}
return(_aCams[id]);
}
function setLight(l) {
_oEB.broadcastEvent(new com.bourre.events.BasicEvent(onLightUpdatedEVENT));
_light = l;
}
function getLight(Void) {
return(_light);
}
function setRootGroup(objGroup) {
_oRoot = objGroup;
}
function getRootGroup(Void) {
return(_oRoot);
}
function render(Void) {
if (_isRunning == false) {
_isRunning = true;
_oEB.broadcastEvent(_eStart);
com.bourre.transitions.FPSBeacon.getInstance().start();
}
}
function stop(Void) {
com.bourre.transitions.FPSBeacon.getInstance().stop();
_isRunning = false;
}
function __onEnterFrame(Void) {
_oEB.broadcastEvent(_eRender);
__render();
}
function getCurrentProjectionMatrix(Void) {
return(_mProj);
}
function getCurrentCamera(Void) {
return(_oCam);
}
function __render(Void) {
var _local10;
var _local33;
var _local7;
var _local6;
var _local5;
var _local4;
var _local30;
var _local29;
var _local34;
var _local35;
var _local14;
var _local12;
var _local22;
var _local28;
var _local13;
var _local23;
var _local19;
var _local27;
var _local24;
var _local20;
var _local17;
var _local26;
var _local21;
var _local18;
var _local16;
var _local25;
var _local3;
var _local9;
var _local15;
var _local8;
var _local2;
var _local37;
var _local36;
_local35 = _aCams.length;
if ((!_local35) || (_oRoot == null)) {
return(undefined);
}
_bGlbCache = false;
_aObjects = [];
_aMatrix = [];
_aCache = [];
sandy.core.buffer.MatrixBuffer.init();
__parseTree(_oRoot, _oRoot.isModified());
_local34 = _aObjects.length;
_local10 = _local34;
while (_local10-- , _local10 > -1) {
_local8 = _aObjects[_local10];
if (_aCache[_local10] == true) {
_local3 = _aMatrix[_local10];
if (_local3) {
_local9 = _local8.aPoints;
_local14 = _local3.n11;
_local12 = _local3.n21;
_local22 = _local3.n31;
_local13 = _local3.n12;
_local23 = _local3.n22;
_local19 = _local3.n32;
_local24 = _local3.n13;
_local20 = _local3.n23;
_local17 = _local3.n33;
_local21 = _local3.n14;
_local18 = _local3.n24;
_local16 = _local3.n34;
_local7 = _local9.length;
while (_local7-- , _local7 > -1) {
_local2 = _local9[_local7];
_local6 = _local2.x;
_local5 = _local2.y;
_local4 = _local2.z;
_local2.tx = (((_local6 * _local14) + (_local5 * _local13)) + (_local4 * _local24)) + _local21;
_local2.ty = (((_local6 * _local12) + (_local5 * _local23)) + (_local4 * _local20)) + _local18;
_local2.tz = (((_local6 * _local22) + (_local5 * _local19)) + (_local4 * _local17)) + _local16;
}
} else {
_local9 = _local8.aPoints;
_local7 = _local9.length;
while (_local7-- , _local7 > -1) {
_local2 = _local9[_local7];
_local2.tx = _local2.x;
_local2.ty = _local2.y;
_local2.tz = _local2.z;
}
}
}
}
_local33 = _local35;
while (_local33-- , _local33 > -1) {
_local15 = _aCams[_local33];
_oCam = _local15;
if (_bGlbCache || (_local15.isModified())) {
_local15.compile();
_local30 = _local15.getXOffset();
_local29 = _local15.getYOffset();
_local3 = _local15.m;
_mProj = _local3;
_local14 = _local3.n11;
_local12 = _local3.n21;
_local22 = _local3.n31;
_local28 = _local3.n41;
_local13 = _local3.n12;
_local23 = _local3.n22;
_local19 = _local3.n32;
_local27 = _local3.n42;
_local24 = _local3.n13;
_local20 = _local3.n23;
_local17 = _local3.n33;
_local26 = _local3.n43;
_local21 = _local3.n14;
_local18 = _local3.n24;
_local16 = _local3.n34;
_local25 = _local3.n44;
_local10 = _local34;
while (_local10-- , _local10 > -1) {
_local8 = sandy.core.Object3D(_aObjects[_local10]);
_local9 = _local8.aPoints;
_local7 = _local9.length;
while (_local7-- , _local7 > -1) {
_local2 = _local9[_local7];
_local6 = _local2.tx;
_local5 = _local2.ty;
_local4 = _local2.tz;
var _local11 = 1 / ((((_local6 * _local28) + (_local5 * _local27)) + (_local4 * _local26)) + _local25);
_local2.sx = (((_local2.wx = (((_local6 * _local14) + (_local5 * _local13)) + (_local4 * _local24)) + _local21)) * _local11) + _local30;
_local2.sy = (((_local2.wy = (((_local6 * _local12) + (_local5 * _local23)) + (_local4 * _local20)) + _local18)) * _local11) + _local29;
_local2.wz = (((_local6 * _local22) + (_local5 * _local19)) + (_local4 * _local17)) + _local16;
}
_local8.render();
}
var _local32 = sandy.core.buffer.ZBuffer.sort();
var _local31 = _local15.is;
_local31.render(_local32);
sandy.core.buffer.ZBuffer.dispose();
} else {
_local10 = _local34;
while (_local10-- , _local10 > -1) {
_local8 = sandy.core.Object3D(_aObjects[_local10]);
if (_local8.needRefresh()) {
_local8.refresh();
}
}
}
}
}
function __parseTree(n, cache) {
var _local4 = n.getChildList();
var _local3 = n.isModified();
_bGlbCache = _bGlbCache || (_local3);
var _local2 = _local4.length;
if (!_local2) {
_aObjects.push(n);
_aCache.push(cache || (_local3));
_aMatrix.push(sandy.core.buffer.MatrixBuffer.getCurrentMatrix());
} else {
n.render();
while (_local2-- , _local2 > -1) {
__parseTree(_local4[_local2], cache || (_local3));
}
n.dispose();
}
n.setModified(false);
return(undefined);
}
static var onRenderEVENT = new com.bourre.events.EventType("onRender");
static var onStartEVENT = new com.bourre.events.EventType("onStart");
static var onStopEVENT = new com.bourre.events.EventType("onStop");
static var onLightUpdatedEVENT = new com.bourre.events.EventType("onLightUpdated");
static var onInitCacheEVENT = new com.bourre.events.EventType("onInitCache");
}
Symbol 1123 MovieClip [__Packages.sandy.core.light.Light3D] Frame 0
class sandy.core.light.Light3D
{
var dir, _power;
function Light3D (d, pow) {
dir = d;
setPower(pow);
}
function setPower(n) {
_power = sandy.util.NumberUtil.constrain(n, 0, MAX_POWER);
}
function getPower(Void) {
return(_power);
}
function setDirection(x, y, z) {
dir.x = x;
dir.y = y;
dir.z = z;
}
static var MAX_POWER = 150;
}
Symbol 1124 MovieClip [__Packages.com.bourre.transitions.IFrameBeacon] Frame 0
interface com.bourre.transitions.IFrameBeacon
{
}
Symbol 1125 MovieClip [__Packages.com.bourre.transitions.FPSBeacon] Frame 0
class com.bourre.transitions.FPSBeacon implements com.bourre.transitions.IFrameBeacon
{
static var _oB;
var _mc, _f, broadcastMessage, _listeners, addListener, removeListener;
function FPSBeacon () {
AsBroadcaster.initialize(this);
_mc = _level0.createEmptyMovieClip("__mcBeacon", 9997);
_f = com.bourre.commands.Delegate.create(this, broadcastMessage, onEnterFrameEVENT);
}
static function getInstance() {
if (!_oB) {
_oB = new com.bourre.transitions.FPSBeacon();
}
return(_oB);
}
static function release() {
_oB.stop();
_oB._mc.removeMovieClip();
delete _oB;
}
function start() {
_mc.onEnterFrame = _f;
}
function stop() {
delete _mc.onEnterFrame;
}
function isPlaying() {
return(_mc.onEnterFrame == _f);
}
function addFrameListener(oL) {
if (_listeners.length < 1) {
start();
}
addListener(oL);
}
function removeFrameListener(oL) {
removeListener(oL);
if (_listeners.length < 1) {
stop();
}
}
function toString() {
return(com.bourre.log.PixlibStringifier.stringify(this));
}
static var onEnterFrameEVENT = new com.bourre.events.EventType("onEnterFrame");
}
Symbol 1126 MovieClip [__Packages.sandy.core.group.Node] Frame 0
class sandy.core.group.Node extends com.bourre.events.EventBroadcaster
{
var _parent, _aChilds, _id, _modified;
function Node () {
super(this);
_parent = null;
_aChilds = [];
_id = _ID_++;
setModified(true);
}
function getId(Void) {
return(_id);
}
function isParent(n) {
return((_parent == n) && (n != undefined));
}
function isModified(Void) {
return(_modified);
}
function setModified(b) {
_modified = b;
}
function setParent(n) {
if (undefined == n) {
return(false);
}
_parent = n;
setModified(true);
return(true);
}
function getParent(Void) {
return(_parent);
}
function hasParent(Void) {
return(undefined != _parent);
}
function addChild(child) {
child.setParent(this);
setModified(true);
_aChilds.push(child);
}
function getChildList(Void) {
return(_aChilds);
}
function getChild(index) {
return(_aChilds[index]);
}
function removeChild(child) {
if (!child.isParent(this)) {
return(false);
}
var _local3 = false;
var _local2 = 0;
while ((_local2 < _aChilds.length) && (!_local3)) {
if (_aChilds[_local2] == child) {
_aChilds.splice(_local2, 1);
setModified(true);
_local3 = true;
}
_local2++;
}
return(_local3);
}
function destroy() {
if (hasParent()) {
_parent.removeChild(this);
}
var _local2 = _aChilds.length;
while (_local2-- , _local2 > -1) {
_aChilds[_local2].destroy();
delete _aChilds[_local2];
}
delete _aChilds;
_parent = null;
}
function remove() {
var _local2 = _aChilds.length;
_parent.removeChild(this, false);
while (_local2-- , _local2 > -1) {
_parent.addChild(_aChilds[_local2], false);
}
delete _aChilds;
_parent = null;
setModified(true);
}
static var _ID_ = 0;
}
Symbol 1127 MovieClip [__Packages.sandy.core.group.INode] Frame 0
interface sandy.core.group.INode
{
}
Symbol 1128 MovieClip [__Packages.sandy.core.group.Group] Frame 0
class sandy.core.group.Group extends sandy.core.group.Node implements sandy.core.group.INode
{
function Group () {
super();
}
function render(Void) {
}
function dispose(Void) {
}
}
Symbol 1129 MovieClip [__Packages.sandy.core.group.Leaf] Frame 0
class sandy.core.group.Leaf extends sandy.core.group.Node implements sandy.core.group.INode
{
function Leaf () {
super();
}
function addChild(child) {
}
function getChildList(Void) {
return(null);
}
function getChild(index) {
return(null);
}
function removeChild(child) {
return(false);
}
function toString(Void) {
return("sandy.core.group.Leaf");
}
function render(Void) {
}
function dispose(Void) {
}
}
Symbol 1130 MovieClip [__Packages.sandy.events.SkinEvent] Frame 0
class sandy.events.SkinEvent extends com.bourre.events.BasicEvent
{
var _type;
function SkinEvent (e, oT, type) {
super(e, oT);
_type = type;
}
function getSkinType(Void) {
return(_type);
}
static var onUpdateEVENT = new com.bourre.events.EventType("onUpdateEVENT");
}
Symbol 1131 MovieClip [__Packages.sandy.skin.BasicSkin] Frame 0
class sandy.skin.BasicSkin extends com.bourre.events.EventBroadcaster
{
var _eOnUpdate, _filters, _useLight, broadcastEvent;
function BasicSkin (Void) {
super();
_eOnUpdate = new sandy.events.SkinEvent(sandy.events.SkinEvent.onUpdateEVENT, this, getType());
_filters = [];
_useLight = false;
}
function getType(Void) {
return(sandy.skin.SkinType.__get__NONE());
}
function setLightingEnable(bool) {
if (_useLight != bool) {
_useLight = bool;
broadcastEvent(_eOnUpdate);
}
}
function set filters(a) {
_filters = a;
broadcastEvent(_eOnUpdate);
//return(filters);
}
function get filters() {
return(_filters);
}
static var onUpdateEVENT = sandy.events.SkinEvent.onUpdateEVENT;
}
Symbol 1132 MovieClip [__Packages.sandy.skin.SimpleLineSkin] Frame 0
class sandy.skin.SimpleLineSkin extends sandy.skin.BasicSkin implements sandy.skin.Skin
{
var _thickness, _color, _alpha, broadcastEvent, _eOnUpdate, _filters;
function SimpleLineSkin (t, c, a) {
super();
_thickness = (isNaN(t) ? 2 : (t));
_color = (isNaN(c) ? 0 : (c));
_alpha = (isNaN(a) ? 100 : (a));
}
function set alpha(n) {
_alpha = n;
broadcastEvent(_eOnUpdate);
//return(alpha);
}
function set color(n) {
_color = n;
broadcastEvent(_eOnUpdate);
//return(color);
}
function set thickness(n) {
_thickness = n;
broadcastEvent(_eOnUpdate);
//return(thickness);
}
function get alpha() {
return(_alpha);
}
function get color() {
return(_color);
}
function get thickness() {
return(_thickness);
}
function getType(Void) {
return(sandy.skin.SkinType.__get__SIMPLE_LINE());
}
function begin(f, mc) {
mc.filters = _filters;
mc.lineStyle(thickness, color, alpha);
}
function end(f, mc) {
}
function toString(Void) {
return("sandy.skin.SimpleLineSkin");
}
}
Symbol 1133 MovieClip [__Packages.sandy.core.Object3D] Frame 0
class sandy.core.Object3D extends sandy.core.group.Leaf
{
var aPoints, _aFaces, _aUv, enableBackFaceCulling, _bEv, _needRedraw, _s, _sb, setModified, broadcastEvent;
function Object3D () {
super();
aPoints = new Array();
_aFaces = new Array();
_aUv = new Array();
enableBackFaceCulling = true;
_bEv = false;
_needRedraw = false;
setSkin(DEFAULT_SKIN, true);
setBackSkin(DEFAULT_SKIN, true);
}
static function get DEFAULT_SKIN() {
return(_DEFAUT_SKIN);
}
function toString(Void) {
return("sandy.core.Object3D");
}
function getSkin(Void) {
return(_s);
}
function getPosition(Void) {
var _local2 = aPoints[0];
return(new sandy.core.data.Vector(_local2.tx - _local2.x, _local2.ty - _local2.y, _local2.tz - _local2.z));
}
function getBackSkin(Void) {
return(_sb);
}
function setSkin(s, bOverWrite) {
_s.removeEventListener(sandy.events.SkinEvent.onUpdateEVENT, this);
bOverWrite = ((bOverWrite == undefined) ? false : (bOverWrite));
var _local4 = _aFaces;
var _local3 = _local4.length;
while (_local3-- , _local3 > -1) {
var _local2 = _local4[_local3];
if (bOverWrite || (_local2.getSkin() == _s)) {
_local2.setSkin(s);
}
}
_s = s;
_s.addEventListener(sandy.events.SkinEvent.onUpdateEVENT, this, __onSkinUpdated);
return(true);
}
function setBackSkin(s, bOverWrite) {
_s.removeEventListener(sandy.events.SkinEvent.onUpdateEVENT, this);
bOverWrite = ((bOverWrite == undefined) ? false : (bOverWrite));
var _local4 = _aFaces;
var _local3 = _local4.length;
while (_local3-- , _local3 > -1) {
var _local2 = _local4[_local3];
if (bOverWrite || (_local2.getBackSkin() == _sb)) {
_local2.setBackSkin(s);
}
}
_sb = s;
_s.addEventListener(sandy.events.SkinEvent.onUpdateEVENT, this, __onSkinUpdated);
return(true);
}
function enableEvents(b) {
_bEv = b;
var _local2;
for (_local2 in _aFaces) {
sandy.core.face.Face(_aFaces[_local2]).enableEvents(b);
}
}
function swapCulling(Void) {
var _local2;
for (_local2 in _aFaces) {
sandy.core.face.Face(_aFaces[_local2]).swapCulling();
}
}
function addUVCoordinate(x, y) {
setModified(true);
var _local2 = new sandy.core.data.UVCoord(x, y);
_aUv.push(_local2);
return(_local2);
}
function addPoint(px, py, pz) {
setModified(true);
return(aPoints.push(new sandy.core.data.Vertex(px, py, pz)));
}
function render(Void) {
var _local5;
var _local8;
var _local3 = _aFaces;
var _local4;
var _local2;
for (_local4 in _local3) {
_local2 = _local3[_local4];
_local5 = _local2.getZAverage();
if (_local2.getMinDepth() > 100) {
if (_local2.isVisible() || (!enableBackFaceCulling)) {
sandy.core.buffer.ZBuffer.push({face:_local2, depth:_local5});
}
}
}
_needRedraw = false;
}
function refresh(Void) {
var _local3;
var _local2 = _aFaces;
for (_local3 in _local2) {
_local2[_local3].refresh();
}
_needRedraw = false;
}
function getBounds(Void) {
return(sandy.core.data.BBox.create(this));
}
function addFace(f) {
f.setSkin(_s);
f.setBackSkin(_sb);
_aFaces.push(f);
f.addEventListener(sandy.events.ObjectEvent.onPressEVENT, this, __onPressed);
f.addEventListener(sandy.events.ObjectEvent.onRollOverEVENT, this, __onRollOver);
f.addEventListener(sandy.events.ObjectEvent.onRollOutEVENT, this, __onRollOut);
setModified(true);
}
function getFaces() {
return(_aFaces);
}
function needRefresh(Void) {
return(_needRedraw);
}
function __onPressed(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onPressEVENT, this));
}
function __onRollOver(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onRollOverEVENT, this));
}
function __onRollOut(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onRollOutEVENT, this));
}
function __onSkinUpdated(e) {
_needRedraw = true;
}
static var _DEFAUT_SKIN = new sandy.skin.SimpleLineSkin();
}
Symbol 1134 MovieClip [__Packages.sandy.core.data.Vertex] Frame 0
class sandy.core.data.Vertex extends sandy.core.data.Vector
{
var tx, ty, tz, wx, wy, wz, sy, sx, z, y, x;
function Vertex (px, py, pz, ptx, pty, ptz) {
super(px, py, pz);
tx = ((undefined == ptx) ? (px) : (ptx));
ty = ((undefined == pty) ? (py) : (pty));
tz = ((undefined == ptz) ? (pz) : (ptz));
wx = tx;
wy = ty;
wz = tz;
sy = (sx = 0);
}
function getTransformVector(Void) {
return(new sandy.core.data.Vector(tx, ty, tz));
}
function getWorldVector(Void) {
return(new sandy.core.data.Vector(wx, wy, wz));
}
function toString(Void) {
return((((((((((((((((((((("Vertex : x:" + x) + " y:") + y) + " z:") + z) + "\ntx:") + tx) + " ty:") + ty) + " tz:") + tz) + "\nwx:") + wx) + " wy:") + wy) + " wz:") + wz) + " \nsx:") + sx) + " sy:") + sy);
}
}
Symbol 1135 MovieClip [__Packages.sandy.core.buffer.ZBuffer] Frame 0
class sandy.core.buffer.ZBuffer
{
function ZBuffer () {
}
static function push(o) {
_a.push(o);
}
static function sort(Void) {
_a.sortOn("depth", Array.NUMERIC | Array.DESCENDING);
return(_a);
}
static function dispose(Void) {
delete _a;
_a = new Array();
}
static var _a = new Array();
}
Symbol 1136 MovieClip [__Packages.sandy.core.data.BBox] Frame 0
class sandy.core.data.BBox
{
var owner, min, max, _aCorners;
function BBox (pobj, pmin, pmax) {
owner = pobj;
min = ((undefined == pmin) ? (new sandy.core.data.Vertex()) : (new sandy.core.data.Vertex(pmin.x, pmin.y, pmin.z)));
max = ((undefined == pmax) ? (new sandy.core.data.Vertex()) : (new sandy.core.data.Vertex(pmax.x, pmax.y, pmax.z)));
_aCorners = [];
}
static function create(obj) {
var _local7;
var _local6;
var _local4;
var _local5;
var _local3;
var _local2;
var _local9 = obj.aPoints;
var _local8 = _local9.length;
_local5 = _local9[0].wx;
_local7 = _local5;
_local3 = _local9[0].wy;
_local6 = _local3;
_local2 = _local9[0].wz;
_local4 = _local2;
while (_local8-- , _local8 > 0) {
var _local1 = _local9[_local8];
if (_local1.wx < _local7) {
_local7 = _local1.wx;
} else if (_local1.wx > _local5) {
_local5 = _local1.wx;
}
if (_local1.wy < _local6) {
_local6 = _local1.wy;
} else if (_local1.wy > _local3) {
_local3 = _local1.wy;
}
if (_local1.wz < _local4) {
_local4 = _local1.wz;
} else if (_local1.wz > _local2) {
_local2 = _local1.wz;
}
}
return(new sandy.core.data.BBox(obj, new sandy.core.data.Vector(_local7, _local6, _local4), new sandy.core.data.Vector(_local5, _local3, _local2)));
}
function getCenter(Void) {
return(new sandy.core.data.Vector((max.x + min.x) / 2, (max.y + min.y) / 2, (max.z + min.z) / 2));
}
function getSize(Void) {
return(new sandy.core.data.Vector(Math.abs(max.x - min.x), Math.abs(max.y - min.y), Math.abs(max.z - min.z)));
}
function getCorners(b) {
if (!b) {
return(_aCorners);
}
return((_aCorners = [new sandy.core.data.Vertex(min.x, max.y, max.z), sandy.math.VertexMath.clone(max), new sandy.core.data.Vertex(max.x, min.y, max.z), new sandy.core.data.Vertex(min.x, min.y, max.z), new sandy.core.data.Vertex(min.x, max.y, min.z), new sandy.core.data.Vertex(max.x, max.y, min.z), new sandy.core.data.Vertex(max.x, min.y, min.z), sandy.math.VertexMath.clone(min)]));
}
function toString(Void) {
return("sandy.core.data.BBox");
}
}
Symbol 1137 MovieClip [__Packages.sandy.math.VertexMath] Frame 0
class sandy.math.VertexMath extends sandy.math.VectorMath
{
function VertexMath () {
super();
}
static function negate(v) {
return(new sandy.core.data.Vertex(-v.x, -v.y, -v.z));
}
static function dot(v, w) {
return(((v.tx * w.tx) + (v.ty * w.ty)) + (w.tz * v.tz));
}
static function addVertex(v, w) {
return(new sandy.core.data.Vertex(v.x + w.x, v.y + w.y, v.z + w.z));
}
static function sub(v, w) {
return(new sandy.core.data.Vertex(v.x - w.x, v.y - w.y, v.z - w.z, v.tx - w.tx, v.ty - w.ty, v.tz - w.tz));
}
static function cross(w, v) {
return(new sandy.core.data.Vertex((w.y * v.z) - (w.z * v.y), (w.z * v.x) - (w.x * v.z), (w.x * v.y) - (w.y * v.x)));
}
static function clone(v) {
return(new sandy.core.data.Vertex(v.x, v.y, v.z));
}
}
Symbol 1138 MovieClip [__Packages.sandy.events.ObjectEvent] Frame 0
class sandy.events.ObjectEvent extends com.bourre.events.BasicEvent
{
function ObjectEvent (e, oT) {
super(e, oT);
}
static var onPressEVENT = new com.bourre.events.EventType("onPress");
static var onRollOverEVENT = new com.bourre.events.EventType("onRollOver");
static var onRollOutEVENT = new com.bourre.events.EventType("onRollOut");
}
Symbol 1139 MovieClip [__Packages.sandy.core.buffer.MatrixBuffer] Frame 0
class sandy.core.buffer.MatrixBuffer
{
function MatrixBuffer () {
}
static function push(m) {
if (_c) {
_c = sandy.math.Matrix4Math.multiply(_c, m);
} else {
_c = m;
}
_b.push(_c);
return(_c);
}
static function getCurrentMatrix(Void) {
return(_c);
}
static function pop(Void) {
_c = _b[_b.length - 2];
return(sandy.core.data.Matrix4(_b.pop()));
}
static function init(Void) {
delete _b;
delete _c;
_b = [];
_c = null;
}
static var _b = new Array();
static var _c = null;
}
Symbol 1140 MovieClip [__Packages.CBall] Frame 0
class CBall
{
var mcParent, mybg, camswitched, ctrNT, halted, bx, by, bz, ball, mcBall, bTrans, mcBallShadow, bsTrans, markball, bmTrans, xTanda, tgTrajectoryLine, power, Aangle, Bangle, terus, yVel, xVel, zVel, arBallTrajectories, idNT, ingoalsequence;
function CBall (bg, _mcParent) {
mcParent = _mcParent;
mybg = bg;
camswitched = false;
createBall();
createShadow();
createMarker();
ctrNT = -1;
halted = false;
}
function createBall() {
bx = def_bx;
by = def_by;
bz = def_bz;
ball = new sandy.core.Sprite2D(0.03);
mcBall = mcParent.attachMovie("ball", "ball", mcParent.getNextHighestDepth());
mcBall._visible = false;
var _local3 = new sandy.skin.MovieSkin(mcBall);
ball.setSkin(_local3);
var _local2 = new sandy.core.group.TransformGroup();
bTrans = new sandy.core.transform.Transform3D();
bTrans.translate(bx, by, bz);
_local2.setTransform(bTrans);
_local2.addChild(ball);
mybg.addChild(_local2);
}
function getPosition() {
var _local2 = ball.getPosition();
return(_local2);
}
function createShadow() {
bx = def_bx;
by = def_by;
bz = def_bz;
var _local3 = new sandy.primitive.Plane3D(0.5, 0.5, 1, "tri");
mcBallShadow = mcParent.attachMovie("ballshadow", "ballshadow", mcParent.getNextHighestDepth());
mcBallShadow._visible = false;
var _local4 = new sandy.skin.MovieSkin(mcBallShadow);
_local3.setSkin(_local4);
var _local2 = new sandy.core.group.TransformGroup();
bsTrans = new sandy.core.transform.Transform3D();
bsTrans.translate(bx, -0.1, bz);
_local2.setTransform(bsTrans);
_local2.addChild(_local3);
mybg.addChild(_local2);
}
function createMarker() {
markball = new sandy.primitive.Plane3D(1, 1, 1, "tri");
var _local3 = mcParent.attachMovie("bayball", "bayball", mcParent.getNextHighestDepth());
_local3._visible = false;
var _local4 = new sandy.skin.MovieSkin(_local3);
markball.setSkin(_local4);
var _local2 = new sandy.core.group.TransformGroup();
bmTrans = new sandy.core.transform.Transform3D();
bmTrans.translate(def_bx + 2, 0, def_bz - 2);
_local2.setTransform(bmTrans);
_local2.addChild(markball);
mybg.addChild(_local2);
}
function createTanda() {
var _local3 = new sandy.primitive.Box(0.1, 0.1, 0.1, "tri");
var _local4 = new sandy.skin.SimpleColorSkin(65535, 100);
_local3.setSkin(_local4);
var _local2 = new sandy.core.group.TransformGroup();
xTanda = new sandy.core.transform.Transform3D();
xTanda.translate(54, 0, 4.2);
_local2.setTransform(xTanda);
_local2.addChild(_local3);
mybg.addChild(_local2);
}
function createTrajectoryLine(vs1, vs2) {
var _local2 = new sandy.primitive.Line3D(vs1, vs2);
_local2.setSkin(new sandy.skin.SimpleLineSkin(1, 0, 30));
tgTrajectoryLine = new sandy.core.group.TransformGroup();
tgTrajectoryLine.addChild(_local2);
mybg.addChild(tgTrajectoryLine);
}
function deleteTrajectoryLine() {
tgTrajectoryLine.destroy();
}
function shoot(_power, anglex, angley) {
power = _power;
Aangle = ((anglex * -1) * Math.PI) / 180;
Bangle = ((angley * -1) * Math.PI) / 180;
terus = true;
yVel = Math.sin(Aangle) * power;
var _local2 = Math.cos(Aangle) * power;
xVel = Math.sin(Bangle) * _local2;
zVel = Math.cos(Bangle) * _local2;
}
function makeshoot(power, anglex, angley) {
Aangle = ((anglex * -1) * Math.PI) / 180;
Bangle = ((angley * -1) * Math.PI) / 180;
terus = true;
yVel = Math.sin(Aangle) * power;
var _local3 = Math.cos(Aangle) * power;
xVel = Math.sin(Bangle) * _local3;
zVel = Math.cos(Bangle) * _local3;
_global.__DISPATCH({type:"gameevent", param:"shoot"});
halted = false;
}
function haltedit() {
xVel = 0;
zVel = 0;
halted = true;
}
function deflect() {
yVel = yVel / 3;
xVel = -(xVel / 3);
zVel = -(zVel / 3);
}
function makeBallTrajectories() {
arBallTrajectories = new Array();
var _local3 = new Object();
_local3.bx = bx;
_local3.by = by;
_local3.bz = bz;
_local3.xVel = xVel;
_local3.yVel = yVel;
_local3.zVel = zVel;
_local3.power = power;
_local3.Aangle = Aangle;
var _local7 = new sandy.core.data.Vector(bx, 0, bz);
var _local5 = false;
var _local4 = 20;
while (!_local5) {
var _local2 = new CBallPoint(mybg, mcParent, _local3, _local4);
_local4 = _local4 + 3;
if (_local2.obax2.by <= 0) {
_local5 = true;
bmTrans.translate(_local2.obax2.bx, 0, _local2.obax2.bz);
}
arBallTrajectories.push(_local2);
_local3 = _local2.obax2;
}
var _local6 = new sandy.core.data.Vector(_local3.bx, 0, _local3.bz);
createTrajectoryLine(_local7, _local6);
}
function clearBallTrajectories() {
var _local2 = 0;
while (_local2 < arBallTrajectories.length) {
arBallTrajectories[_local2].destroy();
delete arBallTrajectories[_local2];
_local2++;
}
deleteTrajectoryLine();
}
function getNearestBallTrajectories(kp) {
var _local5 = new sandy.core.data.Vector(0, 0, 0);
var _local6 = 100;
idNT = 0;
var _local2 = 0;
while (_local2 < arBallTrajectories.length) {
var _local3 = CBallPoint(arBallTrajectories[_local2]).getPosition();
var _local4 = Math.abs(kp.z - _local3.z);
if (_local4 < _local6) {
idNT = _local2;
_local6 = _local4;
_local5.x = _local3.x;
_local5.y = _local3.y;
_local5.z = _local3.z;
}
_local2++;
}
return(_local5);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getRandomPos() {
if (arBallTrajectories.length > 10) {
var _local4 = -1;
var _local2 = 10;
while ((_local4 == -1) && (_local2 < arBallTrajectories.length)) {
var _local3 = CBallPoint(arBallTrajectories[_local2]).getPosition();
if (_local3.y < 3) {
_local4 = _local2;
}
_local2++;
}
var _local6 = randRange(_local4, arBallTrajectories.length - 1);
} else {
var _local6 = arBallTrajectories.length - 1;
}
var _local5 = arBallTrajectories[_local6].getPosition();
if (_local5.y > 2) {
_local5.x = _local5.x + randRange(-0.5, 0.5);
} else {
_local5.x = _local5.x + randRange(0, 0);
}
_local5.y = 0;
return(_local5);
}
function startTrajectoryCounter(nwait) {
ctrNT = 0;
idNT = idNT - nwait;
}
function reset() {
bx = def_bx;
by = def_by;
bz = def_bz;
bTrans.translate(def_bx, def_by, def_bz);
bsTrans.translate(def_bx, -0.1, def_bz);
bmTrans.translate(def_bx + 2, 0, def_bz - 2);
clearBallTrajectories();
camswitched = false;
halted = false;
ingoalsequence = 0;
ctrNT = -1;
}
function render(rat) {
if (!terus) {
return(undefined);
}
if (rat == undefined) {
rat = 0.01;
}
yVel = yVel - gravity;
bx = bx + (xVel * rat);
by = by + (yVel * rat);
bz = bz + (zVel * rat);
if (ctrNT != -1) {
ctrNT++;
if (ctrNT == idNT) {
_global.__DISPATCH({type:"kickerevent", param:"shoot"});
}
}
if ((bz > -10) && (!camswitched)) {
camswitched = true;
makeBallTrajectories();
_global.__DISPATCH({type:"gameevent", param:"transition"});
}
if (by < def_by) {
by = def_by;
power = power * 0.6;
yVel = Math.sin(Aangle) * power;
xVel = xVel * friction;
zVel = zVel * friction;
if (power < 0.1) {
power = 0;
if (Math.abs(xVel) < 1) {
xVel = 0;
}
if (Math.abs(yVel) < 1) {
yVel = 0;
}
if (Math.abs(zVel) < 1) {
zVel = 0;
}
if (((xVel == 0) && (yVel == 0)) && (zVel == 0)) {
terus = false;
_global.__DISPATCH({type:"gameevent", param:"ballout"});
}
}
}
if (((bz > 14) || (bx > 70)) || (bx < 30)) {
terus = false;
_global.__DISPATCH({type:"gameevent", param:"ballout"});
}
bTrans.translate(bx, by, bz);
bsTrans.translate(bx, -0.1, bz);
}
function cekinggoal() {
if (ingoalsequence == 4) {
if ((((bx > 58) || (bz > 4.2)) || (bz < -3.2)) || (by > 3)) {
if (bx > 58) {
bx = 58;
}
if (bz > 3.2) {
bz = 3.2;
}
if (bz < -3.2) {
bz = -3.2;
}
xVel = 0;
zVel = 0;
ingoalsequence = 5;
}
}
if (ingoalsequence == 3) {
_global.__DISPATCH({type:"gameevent", param:"enteringhurdle"});
}
if (ingoalsequence == 2) {
if (bx > 54.5) {
if ((((bx < 58) && (bz <= 4.2)) && (bz > -3.2)) and (by < 3)) {
ingoalsequence = 3;
} else {
_global.__DISPATCH({type:"gameevent", param:"loose"});
ingoalsequence = 0;
}
}
}
if (ingoalsequence == 1) {
if (bx > 50) {
ingoalsequence = 2;
_global.__DISPATCH({type:"keeperevent", param:"ballclosing"});
}
}
}
function hide() {
mcBallShadow.gotoAndStop(2);
mcBall.gotoAndStop(2);
}
function show() {
mcBallShadow.gotoAndStop(1);
mcBall.gotoAndStop(1);
}
var count = 0;
var def_bx = 54.8;
var def_by = 0.1;
var def_bz = -38.5;
var gravity = 0.9;
var friction = 0.95;
}
Symbol 1141 MovieClip [__Packages.sandy.core.transform.Transform3D] Frame 0
class sandy.core.transform.Transform3D extends com.bourre.events.EventBroadcaster implements sandy.core.transform.ITransform3D
{
var _m, _type, _bModified;
function Transform3D (Void) {
super(this);
_m = sandy.core.data.Matrix4.createIdentity();
_type = sandy.core.transform.TransformType.NONE;
}
function rotX(pAngle) {
var _local2 = (pAngle + 360) % 360;
_m = sandy.math.Matrix4Math.rotationX(_local2);
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function rotY(pAngle) {
var _local2 = (pAngle + 360) % 360;
_m = sandy.math.Matrix4Math.rotationY(_local2);
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function rotZ(pAngle) {
var _local2 = (pAngle + 360) % 360;
_m = sandy.math.Matrix4Math.rotationZ(_local2);
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function rot(px, py, pz) {
px = (px + 360) % 360;
py = (py + 360) % 360;
pz = (pz + 360) % 360;
_m = sandy.math.Matrix4Math.eulerRotation(px, py, pz);
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function rotVector(v) {
rot(v.x, v.y, v.z);
__dispatch();
}
function rotAxis(pAxis, pAngle) {
var _local3 = (pAngle + 360) % 360;
sandy.math.VectorMath.normalize(pAxis);
_m = sandy.math.Matrix4Math.axisRotation(pAxis.x, pAxis.y, pAxis.z, _local3);
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function rotAxisWithReference(axis, ref, pAngle) {
var _local3 = (pAngle + 360) % 360;
_m = sandy.math.Matrix4Math.translation(ref.x, -ref.y, ref.z);
_m = sandy.math.Matrix4Math.multiply(_m, sandy.math.Matrix4Math.axisRotation(axis.x, axis.y, axis.z, _local3));
_m = sandy.math.Matrix4Math.multiply(_m, sandy.math.Matrix4Math.translation(-ref.x, ref.y, -ref.z));
_type = sandy.core.transform.TransformType.ROTATION;
__dispatch();
}
function scaleX(pVal) {
_m = sandy.math.Matrix4Math.scale(pVal, 0, 0);
_type = sandy.core.transform.TransformType.SCALE;
__dispatch();
}
function scaleY(pVal) {
_m = sandy.math.Matrix4Math.scale(0, pVal, 0);
_type = sandy.core.transform.TransformType.SCALE;
__dispatch();
}
function scaleZ(pVal) {
_m = sandy.math.Matrix4Math.scale(0, 0, pVal);
_type = sandy.core.transform.TransformType.SCALE;
__dispatch();
}
function scale(px, py, pz) {
_m = sandy.math.Matrix4Math.scale(px, py, pz);
_type = sandy.core.transform.TransformType.SCALE;
__dispatch();
}
function scaleVector(v) {
scale(v.x, v.y, v.z);
__dispatch();
}
function translateX(val) {
_m = sandy.math.Matrix4Math.translation(val, 0, 0);
_type = sandy.core.transform.TransformType.TRANSLATION;
__dispatch();
}
function translateY(val) {
_m = sandy.math.Matrix4Math.translation(0, val, 0);
_type = sandy.core.transform.TransformType.TRANSLATION;
__dispatch();
}
function translateZ(val) {
_m = sandy.math.Matrix4Math.translation(0, 0, val);
_type = sandy.core.transform.TransformType.TRANSLATION;
__dispatch();
}
function translate(tx, ty, tz) {
_m = sandy.math.Matrix4Math.translation(tx, -ty, tz);
_type = sandy.core.transform.TransformType.TRANSLATION;
__dispatch();
}
function translateVector(v) {
translate(v.x, v.y, v.z);
__dispatch();
}
function getType(Void) {
return(_type);
}
function getMatrix(Void) {
return(_m);
}
function combineMatrix(m) {
_m = sandy.math.Matrix4Math.multiply(_m, m);
_type = sandy.core.transform.TransformType.MIXED;
__dispatch();
}
function combineTransform(t) {
_m = sandy.math.Matrix4Math.multiply(_m, t.getMatrix());
_type = sandy.core.transform.TransformType.MIXED;
__dispatch();
}
function __dispatch(Void) {
setModified(true);
}
function isModified(Void) {
return(_bModified);
}
function setModified(b) {
_bModified = b;
}
static var onUpdateEVENT = new com.bourre.events.EventType("onUpdate");
}
Symbol 1142 MovieClip [__Packages.sandy.core.Sprite2D] Frame 0
class sandy.core.Sprite2D extends sandy.core.Object3D
{
var _nScale, aPoints, _aFaces, enableBackFaceCulling, setModified, _s, __onPressed, __onRollOver, __onRollOut;
function Sprite2D (pScale) {
super();
super.addPoint(0, 0, 0);
super.addPoint(1, 1, 1);
_nScale = ((undefined == pScale) ? 1 : (pScale));
createFace();
}
function setSkin(s) {
return(super.setSkin(s, true));
}
function setBackSkin(s, bOverWrite) {
return(false);
}
function getScale(Void) {
return(_nScale);
}
function getScaleVector(Void) {
return(new sandy.core.data.Vector(aPoints[1].tx - aPoints[0].tx, aPoints[1].ty - aPoints[0].ty, aPoints[1].tz - aPoints[0].tz));
}
function setScale(n) {
if (n) {
_nScale = n;
}
}
function render(Void) {
var _local2 = _aFaces[0];
var _local3 = _local2._va.wz;
if (_local3 > 100) {
if ((!enableBackFaceCulling) || (_local2.isVisible())) {
sandy.core.buffer.ZBuffer.push({face:_local2, depth:_local3});
}
}
setModified(false);
}
function createFace(Void) {
setModified(true);
var _local2 = new sandy.core.face.Sprite2DFace(this, aPoints[0]);
_local2.setSkin(sandy.skin.TextureSkin(_s));
_aFaces[0] = _local2;
_local2.addEventListener(sandy.events.ObjectEvent.onPressEVENT, this, __onPressed);
_local2.addEventListener(sandy.events.ObjectEvent.onRollOverEVENT, this, __onRollOver);
_local2.addEventListener(sandy.events.ObjectEvent.onRollOutEVENT, this, __onRollOut);
return(_local2);
}
function addPoint(x, y, z) {
}
}
Symbol 1143 MovieClip [__Packages.sandy.skin.TextureSkin] Frame 0
class sandy.skin.TextureSkin extends sandy.skin.BasicSkin implements sandy.skin.Skin
{
var _p, _cmf, _texture, _w, _h, broadcastEvent, _eOnUpdate, _useLight, _tmp, _filters;
function TextureSkin (t) {
super();
texture = (t);
_p = new flash.geom.Point(0, 0);
_cmf = new flash.filters.ColorMatrixFilter();
}
function set texture(b) {
_texture = b;
_w = b.width;
_h = b.height;
broadcastEvent(_eOnUpdate);
//return(texture);
}
function get texture() {
return(_texture);
}
function getType(Void) {
return(sandy.skin.SkinType.__get__TEXTURE());
}
function begin(f, mc) {
var _local5 = f._va.sx;
var _local4 = f._va.sy;
var _local16 = f._vb.sx;
var _local14 = f._vb.sy;
var _local15 = f._vc.sx;
var _local12 = f._vc.sy;
if (!((_w > 0) && (_h > 0))) {
return(undefined);
}
var _local18 = {a:(_local16 - _local5) / _w, b:(_local14 - _local4) / _w, c:(_local15 - _local5) / _h, d:(_local12 - _local4) / _h, tx:_local5, ty:_local4};
if (undefined == f.tMat) {
var _local3 = f.aUv;
var _local7 = _local3[0].u * _w;
var _local6 = _local3[0].v * _h;
var _local23 = _local3[1].u * _w;
var _local21 = _local3[1].v * _h;
var _local22 = _local3[2].u * _w;
var _local20 = _local3[2].v * _h;
var _local11 = new flash.geom.Matrix((_local23 - _local7) / _w, (_local21 - _local6) / _w, (_local22 - _local7) / _h, (_local20 - _local6) / _h, _local7, _local6);
_local11.invert();
f.tMat = _local11;
}
var _local13 = f.tMat;
var _local9 = __concat(_local13, _local18);
if (_useLight == true) {
_tmp = _texture.clone();
var _local10 = sandy.core.World3D.getInstance().getLight();
var _local17 = 0.01 * _local10.getPower();
var _local19 = _local17 - sandy.math.VectorMath.dot(_local10.dir, f.createNormale());
_cmf.matrix = __getBrightnessTransform(_local19);
_tmp.applyFilter(_tmp, _tmp.rectangle, _p, _cmf);
mc.filters = _filters;
mc.beginBitmapFill(_tmp, _local9, false, false);
} else {
mc.filters = _filters;
mc.beginBitmapFill(_texture, _local9, false, false);
}
}
function __getBrightnessTransform(scale) {
var _local2 = scale;
var _local1 = 0;
return(new Array(_local2, 0, 0, 0, _local1, 0, _local2, 0, 0, _local1, 0, 0, _local2, 0, _local1, 0, 0, 0, 1, _local1));
}
function end(f, mc) {
mc.endFill();
}
function toString(Void) {
return("sandy.skin.TextureSkin");
}
function __concat(m1, m2) {
var _local2 = {};
_local2.a = m1.a * m2.a;
_local2.d = m1.d * m2.d;
_local2.b = (_local2.c = 0);
_local2.ty = (m1.ty * m2.d) + m2.ty;
_local2.tx = (m1.tx * m2.a) + m2.tx;
if ((((m1.b != 0) || (m1.c != 0)) || (m2.b != 0)) || (m2.c != 0)) {
_local2.a = _local2.a + (m1.b * m2.c);
_local2.d = _local2.d + (m1.c * m2.b);
_local2.b = _local2.b + ((m1.a * m2.b) + (m1.b * m2.d));
_local2.c = _local2.c + ((m1.c * m2.a) + (m1.d * m2.c));
_local2.tx = _local2.tx + (m1.ty * m2.c);
_local2.ty = _local2.ty + (m1.tx * m2.b);
}
return(_local2);
}
}
Symbol 1144 MovieClip [__Packages.sandy.core.face.TriFace3D] Frame 0
class sandy.core.face.TriFace3D extends com.bourre.events.EventBroadcaster implements sandy.core.face.Face
{
var _o, _va, _vb, _vc, aUv, _bfc, _id, _bEv, _s, _sb, _vn, _bV, _mc, broadcastEvent;
function TriFace3D (oref, pt1, pt2, pt3) {
super(this);
_o = oref;
_va = pt1;
_vb = pt2;
_vc = pt3;
aUv = new Array();
_bfc = 1;
_id = _ID_++;
}
function getVertex(Void) {
return([_va, _vb, _vc]);
}
function getId(Void) {
return(_id);
}
function enableEvents(b) {
_bEv = b;
}
function clone(Void) {
return(new sandy.core.face.TriFace3D(_o, _va, _vb, _vc));
}
function setSkin(s) {
_s = s;
}
function getSkin(Void) {
return(_s);
}
function setBackSkin(s) {
_sb = s;
}
function getBackSkin(Void) {
return(_sb);
}
function setUVCoordinates(a, b, c) {
aUv.push(a, b, c);
}
function createNormale(Void) {
var _local5;
var _local6;
var _local4 = _va;
var _local2 = _vb;
var _local3 = _vc;
_local5 = new sandy.core.data.Vector(_local2.tx - _local4.tx, _local2.ty - _local4.ty, _local2.tz - _local4.tz);
_local6 = new sandy.core.data.Vector(_local2.tx - _local3.tx, _local2.ty - _local3.ty, _local2.tz - _local3.tz);
_vn = sandy.math.VectorMath.cross(_local5, _local6);
sandy.math.VectorMath.normalize(_vn);
return(_vn);
}
function setNormale(n) {
_vn = n;
}
function isVisible(Void) {
return((_bV = (_bfc * (((_vb.sx - _va.sx) * (_vc.sy - _va.sy)) - ((_vb.sy - _va.sy) * (_vc.sx - _va.sx)))) > 0));
}
function render(mc) {
_mc = mc;
if (_bEv) {
__prepareEvents(mc);
}
(_bV ? (_s.begin(this, mc)) : (_sb.begin(this, mc)));
mc.moveTo(_va.sx, _va.sy);
mc.lineTo(_vb.sx, _vb.sy);
mc.lineTo(_vc.sx, _vc.sy);
mc.lineTo(_va.sx, _va.sy);
(_bV ? (_s.end(this, mc)) : (_sb.end(this, mc)));
}
function refresh(Void) {
_mc.clear();
(_bV ? (_s.begin(this, _mc)) : (_sb.begin(this, _mc)));
_mc.moveTo(_va.sx, _va.sy);
_mc.lineTo(_vb.sx, _vb.sy);
_mc.lineTo(_vc.sx, _vc.sy);
_mc.lineTo(_va.sx, _va.sy);
(_bV ? (_s.end(this, _mc)) : (_sb.end(this, _mc)));
}
function getZAverage(Void) {
return(((_va.wz + _vb.wz) + _vc.wz) / 3);
}
function getMinDepth(Void) {
return(Math.min(_va.wz, Math.min(_vb.wz, _vc.wz)));
}
function getMaxDepth(Void) {
return(Math.max(_va.wz, Math.max(_vb.wz, _vc.wz)));
}
function toString(Void) {
return(new String("sandy.core.face.TriFace3D"));
}
function swapCulling(Void) {
_bfc = _bfc * -1;
}
function __prepareEvents(mc) {
mc.onPress = com.bourre.commands.Delegate.create(this, __onPressed);
mc.onRollOver = com.bourre.commands.Delegate.create(this, __onRollOver);
mc.onRollOut = com.bourre.commands.Delegate.create(this, __onRollOut);
}
function __onPressed(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onPressEVENT, this));
}
function __onRollOver(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onRollOverEVENT, this));
}
function __onRollOut(e) {
broadcastEvent(new sandy.events.ObjectEvent(sandy.events.ObjectEvent.onRollOutEVENT, this));
}
static var _ID_ = 0;
}
Symbol 1145 MovieClip [__Packages.sandy.core.face.Sprite2DFace] Frame 0
class sandy.core.face.Sprite2DFace extends sandy.core.face.TriFace3D
{
var _va, _mc, _bEv, __prepareEvents, _s, _o;
function Sprite2DFace (oref, pt) {
super(oref, pt);
}
function getVertex(Void) {
return([_va]);
}
function isVisible(Void) {
return(true);
}
function render(mc) {
_mc = mc;
if (_bEv) {
__prepareEvents(mc);
}
var _local3 = sandy.skin.TextureSkin(_s);
mc.attachBitmap(_local3.__get__texture(), 1);
var _local5 = sandy.core.Sprite2D(_o).getScaleVector();
var _local4 = sandy.core.Sprite2D(_o).getScale();
var _local7 = sandy.core.World3D.getInstance().getCurrentCamera();
var _local6 = (100 * _local7.getFocal()) / (_local7.getFocal() + _va.wz);
mc._width = mc._width * ((_local4 * _local5.x) * _local6);
mc._height = mc._height * ((_local4 * _local5.y) * _local6);
mc._x = _va.sx - (mc._width / 2);
mc._y = _va.sy - (mc._height / 2);
mc.filters = _local3.filters;
}
function refresh(Void) {
_mc.clear();
var _local2 = sandy.skin.TextureSkin(_s);
_mc.attachBitmap(_local2.__get__texture(), 1);
var _local4 = sandy.core.Sprite2D(_o).getScaleVector();
var _local3 = sandy.core.Sprite2D(_o).getScale();
var _local6 = sandy.core.World3D.getInstance().getCurrentCamera();
var _local5 = (100 * _local6.getFocal()) / (_local6.getFocal() + _va.wz);
_mc._width = _local2.__get__texture().width * ((_local3 * _local4.x) * _local5);
_mc._height = _local2.__get__texture().height * ((_local3 * _local4.y) * _local5);
_mc._x = _va.sx - (_mc._width / 2);
_mc._y = _va.sy - (_mc._height / 2);
_mc.filters = _local2.filters;
}
function setSkin(s) {
if (s instanceof sandy.skin.TextureSkin) {
_s = s;
}
}
function getSkin(Void) {
return(sandy.skin.TextureSkin(_s));
}
function getZAverage(Void) {
return(_va.wz);
}
function getMinDepth(Void) {
return(_va.wz);
}
function getMaxDepth(Void) {
return(_va.wz);
}
}
Symbol 1146 MovieClip [__Packages.sandy.primitive.Primitive3D] Frame 0
interface sandy.primitive.Primitive3D
{
}
Symbol 1147 MovieClip [__Packages.sandy.primitive.Plane3D] Frame 0
class sandy.primitive.Plane3D extends sandy.core.Object3D implements sandy.primitive.Primitive3D
{
var _h, _lg, _q, _mode, aPoints, addUVCoordinate, _aUv, addFace, aNormals;
function Plane3D (h, lg, q, mode) {
super();
_h = ((undefined == h) ? 6 : (Number(h)));
_lg = ((undefined == lg) ? 6 : (Number(lg)));
_q = ((((undefined == q) || (q <= 0)) || (q > 10)) ? 1 : (Number(q)));
_mode = (((undefined == mode) || ((mode != "tri") && (mode != "quad"))) ? "tri" : (mode));
generate();
}
function generate(Void) {
var _local13 = _h / 2;
var _local9 = _lg / 2;
var _local14 = _h / _q;
var _local10 = _lg / _q;
var _local5;
var _local12;
var _local8;
var _local11;
var _local7;
var _local2;
var _local4 = -_local13;
var _local15 = false;
var _local6;
do {
var _local3 = -_local9;
do {
_local5 = new sandy.core.data.Vertex(_local3, 0, _local4);
_local12 = aPoints.push(_local5) - 1;
_local5 = new sandy.core.data.Vertex(_local3 + _local10, 0, _local4);
_local8 = aPoints.push(_local5) - 1;
_local5 = new sandy.core.data.Vertex(_local3 + _local10, 0, _local4 + _local14);
_local11 = aPoints.push(_local5) - 1;
_local5 = new sandy.core.data.Vertex(_local3, 0, _local4 + _local14);
_local7 = aPoints.push(_local5) - 1;
addUVCoordinate((_local3 + _local9) / _lg, (_local4 + _local13) / _h);
addUVCoordinate(((_local3 + _local9) + _local10) / _lg, (_local4 + _local13) / _h);
addUVCoordinate(((_local3 + _local9) + _local10) / _lg, ((_local4 + _local13) + _local14) / _h);
addUVCoordinate((_local3 + _local9) / _lg, ((_local4 + _local13) + _local14) / _h);
if (_mode == "tri") {
_local2 = new sandy.core.face.TriFace3D(this, aPoints[_local12], aPoints[_local7], aPoints[_local8]);
_local2.setUVCoordinates(_aUv[_local12], _aUv[_local7], _aUv[_local8]);
addFace(_local2);
if (!_local15) {
_local6 = _local2.createNormale();
aNormals.push(_local6);
_local15 = true;
} else {
_local2.setNormale(_local6);
}
_local2 = new sandy.core.face.TriFace3D(this, aPoints[_local7], aPoints[_local11], aPoints[_local8]);
_local2.setUVCoordinates(_aUv[_local7], _aUv[_local11], _aUv[_local8]);
addFace(_local2);
_local2.setNormale(_local6);
} else if (_mode == "quad") {
_local2 = new sandy.core.face.QuadFace3D(this, aPoints[_local12], aPoints[_local7], aPoints[_local11], aPoints[_local8]);
_local2.setUVCoordinates(_aUv[_local12], _aUv[_local7], _aUv[_local11], _aUv[_local8]);
addFace(_local2);
if (!_local15) {
_local6 = _local2.createNormale();
aNormals.push(_local6);
_local15 = true;
} else {
_local2.setNormale(_local6);
}
}
_local3 = _local3 + _local10;
} while (_local3 < (_local9 - 1));
_local4 = _local4 + _local14;
} while (_local4 < (_local13 - 1));
}
}
Symbol 1148 MovieClip [__Packages.sandy.core.face.QuadFace3D] Frame 0
class sandy.core.face.QuadFace3D extends sandy.core.face.TriFace3D
{
var _vd, _va, _vb, _vc, _mc, _bEv, __prepareEvents, _bV, _sb, _s;
function QuadFace3D (oref, pt1, pt2, pt3, pt4) {
super(oref, pt1, pt2, pt3);
_vd = pt4;
}
function getVertex(Void) {
return([_va, _vb, _vc, _vd]);
}
function setSkin(s) {
if (s.getType() == sandy.skin.SkinType.__get__TEXTURE()) {
trace("WARNING: Sandy::QuadFace3D The perspective bitmap distortion may not be correct");
}
super.setSkin(s);
}
function render(mc) {
_mc = mc;
if (_bEv) {
__prepareEvents(mc);
}
(_bV ? (_s.begin(this, mc)) : (_sb.begin(this, mc)));
mc.moveTo(_va.sx, _va.sy);
mc.lineTo(_vb.sx, _vb.sy);
mc.lineTo(_vc.sx, _vc.sy);
mc.lineTo(_vd.sx, _vd.sy);
mc.lineTo(_va.sx, _va.sy);
(_bV ? (_s.end(this, mc)) : (_sb.end(this, mc)));
}
function refresh(Void) {
_mc.clear();
(_bV ? (_s.begin(this, _mc)) : (_sb.begin(this, _mc)));
_mc.moveTo(_va.sx, _va.sy);
_mc.lineTo(_vb.sx, _vb.sy);
_mc.lineTo(_vc.sx, _vc.sy);
_mc.lineTo(_vd.sx, _vd.sy);
_mc.lineTo(_va.sx, _va.sy);
(_bV ? (_s.end(this, _mc)) : (_sb.end(this, _mc)));
}
function getZAverage(Void) {
return((((_va.wz + _vb.wz) + _vc.wz) + _vd.wz) / 4);
}
function getMinDepth(Void) {
return(Math.min(_vd.wz, super.getMinDepth()));
}
function getMaxDepth(Void) {
return(Math.max(_vd.wz, super.getMaxDepth()));
}
function toString(Void) {
return(new String("sandy.core.face.QuadFace3D"));
}
}
Symbol 1149 MovieClip [__Packages.sandy.core.group.TransformGroup] Frame 0
class sandy.core.group.TransformGroup extends sandy.core.group.Node implements sandy.core.group.INode
{
var _t, _modified;
function TransformGroup (transform) {
super();
_t = ((undefined == transform) ? null : (transform));
}
function setTransform(t) {
_t = t;
setModified(true);
}
function getTransform(Void) {
return(_t);
}
function isModified(Void) {
return(_modified || (_t.isModified()));
}
function setModified(b) {
super.setModified(b);
_t.setModified(b);
}
function render(Void) {
if (_t) {
var _local2 = _t.getMatrix();
if (_local2) {
sandy.core.buffer.MatrixBuffer.push(_local2);
}
}
}
function dispose(Void) {
if (_t) {
var _local2 = _t.getMatrix();
if (_local2) {
sandy.core.buffer.MatrixBuffer.pop();
}
}
}
function toString(Void) {
return("sandy.core.group.TransformGroup");
}
}
Symbol 1150 MovieClip [__Packages.sandy.skin.MovieSkin] Frame 0
class sandy.skin.MovieSkin extends sandy.skin.TextureSkin
{
var _mc, _texture, __set__texture;
function MovieSkin (mc, b) {
super(new flash.display.BitmapData(mc._width - 2, mc._height - 2, false));
_mc = mc;
b = ((undefined == b) ? false : (b));
if (false == b) {
sandy.core.World3D.getInstance().addEventListener(sandy.core.World3D.onRenderEVENT, this, updateTexture);
} else {
_mc.stop();
}
}
function getType(Void) {
return(sandy.skin.SkinType.__get__MOVIE());
}
function getMovie(Void) {
return(_mc);
}
function toString(Void) {
return("sandy.skin.MovieSkin");
}
function updateTexture(Void) {
_texture.dispose();
__set__texture(sandy.util.BitmapUtil.movieToBitmap(_mc, true));
}
}
Symbol 1151 MovieClip [__Packages.sandy.util.BitmapUtil] Frame 0
class sandy.util.BitmapUtil
{
function BitmapUtil () {
}
static function movieToBitmap(mc, pTransparent, pColor) {
var _local3;
pTransparent = ((pTransparent == undefined) ? true : (pTransparent));
if ((pTransparent == true) && (pColor == undefined)) {
pColor = 16711884 /* 0xFF00CC */;
}
if (pColor) {
_local3 = new flash.display.BitmapData(mc._width, mc._height, pTransparent, pColor);
} else {
_local3 = new flash.display.BitmapData(mc._width, mc._height, pTransparent);
}
_local3.draw(mc);
return(_local3);
}
static function getScaledBitmap(b, scalex, scaley) {
scaley = ((undefined == scaley) ? (scalex) : (scaley));
var _local2 = new flash.display.BitmapData(scalex * b.width, scaley * b.height);
_local2.draw(b, new flash.geom.Matrix(scalex, 0, scaley, 0));
return(_local2);
}
}
Symbol 1152 MovieClip [__Packages.sandy.primitive.Box] Frame 0
class sandy.primitive.Box extends sandy.core.Object3D implements sandy.primitive.Primitive3D
{
var _h, _lg, _radius, _q, _mode, aPoints, aNormals, _aFaces, addUVCoordinate, addFace;
function Box (rad, h, lg, mode, quality) {
super();
_h = ((h === undefined) ? 6 : (h));
_lg = ((lg === undefined) ? 6 : (lg));
_radius = ((rad === undefined) ? 100 : (rad));
_q = ((((undefined == quality) || (quality <= 0)) || (quality > 10)) ? 1 : (int(quality)));
_mode = (((undefined == mode) || ((mode != "tri") && (mode != "quad"))) ? "tri" : (mode));
generate();
}
function generate(Void) {
aPoints = [];
aNormals = [];
_aFaces = [];
var _local2 = (-_h) / 2;
var _local4 = _radius / 2;
var _local3 = _lg / 2;
var _local16 = new sandy.core.data.Vertex(-_local4, -_local2, _local3);
aPoints.push(_local16);
var _local15 = new sandy.core.data.Vertex(_local4, -_local2, _local3);
aPoints.push(_local15);
var _local14 = new sandy.core.data.Vertex(_local4, _local2, _local3);
aPoints.push(_local14);
var _local13 = new sandy.core.data.Vertex(-_local4, _local2, _local3);
aPoints.push(_local13);
var _local12 = new sandy.core.data.Vertex(-_local4, -_local2, -_local3);
aPoints.push(_local12);
var _local11 = new sandy.core.data.Vertex(_local4, -_local2, -_local3);
aPoints.push(_local11);
var _local10 = new sandy.core.data.Vertex(_local4, _local2, -_local3);
aPoints.push(_local10);
var _local9 = new sandy.core.data.Vertex(-_local4, _local2, -_local3);
aPoints.push(_local9);
var _local8 = addUVCoordinate(0, 0);
var _local7 = addUVCoordinate(1, 0);
var _local6 = addUVCoordinate(0, 1);
var _local5 = addUVCoordinate(1, 1);
__tesselate(_local16, _local15, _local14, _local13, _local8, _local7, _local5, _local6, _q - 1);
__tesselate(_local12, _local9, _local10, _local11, _local7, _local5, _local6, _local8, _q - 1);
__tesselate(_local14, _local10, _local9, _local13, _local7, _local5, _local6, _local8, _q - 1);
__tesselate(_local16, _local12, _local11, _local15, _local6, _local5, _local7, _local8, _q - 1);
__tesselate(_local16, _local13, _local9, _local12, _local7, _local5, _local6, _local8, _q - 1);
__tesselate(_local15, _local11, _local10, _local14, _local8, _local7, _local5, _local6, _q - 1);
}
function __tesselate(p0, p1, p2, p3, uv0, uv1, uv2, uv3, level) {
var _local8;
if (level == 0) {
if (_mode == "tri") {
_local8 = new sandy.core.face.TriFace3D(this, p0, p1, p3);
_local8.setUVCoordinates(uv0, uv1, uv3);
addFace(_local8);
_local8 = new sandy.core.face.TriFace3D(this, p2, p3, p1);
_local8.setUVCoordinates(uv2, uv3, uv1);
addFace(_local8);
} else if (_mode == "quad") {
_local8 = new sandy.core.face.QuadFace3D(this, p0, p1, p2, p3);
_local8.setUVCoordinates(uv0, uv1, uv2, uv3);
addFace(_local8);
}
} else {
var _local17 = new sandy.core.data.Vertex((p0.x + p1.x) / 2, (p0.y + p1.y) / 2, (p0.z + p1.z) / 2);
var _local15 = new sandy.core.data.Vertex((p1.x + p2.x) / 2, (p1.y + p2.y) / 2, (p1.z + p2.z) / 2);
var _local14 = new sandy.core.data.Vertex((p2.x + p3.x) / 2, (p2.y + p3.y) / 2, (p2.z + p3.z) / 2);
var _local16 = new sandy.core.data.Vertex((p3.x + p0.x) / 2, (p3.y + p0.y) / 2, (p3.z + p0.z) / 2);
var _local11 = new sandy.core.data.Vertex((((p0.x + p1.x) + p2.x) + p3.x) / 4, (((p0.y + p1.y) + p2.y) + p3.y) / 4, (((p0.z + p1.z) + p2.z) + p3.z) / 4);
aPoints.push(_local17, _local15, _local14, _local16, _local11);
var _local21 = addUVCoordinate((uv0.u + uv1.u) / 2, (uv0.v + uv1.v) / 2);
var _local19 = addUVCoordinate((uv1.u + uv2.u) / 2, (uv1.v + uv2.v) / 2);
var _local18 = addUVCoordinate((uv2.u + uv3.u) / 2, (uv2.v + uv3.v) / 2);
var _local20 = addUVCoordinate((uv3.u + uv0.u) / 2, (uv3.v + uv0.v) / 2);
var _local12 = addUVCoordinate((((uv0.u + uv1.u) + uv2.u) + uv3.u) / 4, (((uv0.v + uv1.v) + uv2.v) + uv3.v) / 4);
__tesselate(_local11, _local16, p0, _local17, _local12, _local20, uv0, _local21, level - 1);
__tesselate(_local11, _local17, p1, _local15, _local12, _local21, uv1, _local19, level - 1);
__tesselate(_local11, _local15, p2, _local14, _local12, _local19, uv2, _local18, level - 1);
__tesselate(_local11, _local14, p3, _local16, _local12, _local18, uv3, _local20, level - 1);
}
}
}
Symbol 1153 MovieClip [__Packages.sandy.skin.SimpleColorSkin] Frame 0
class sandy.skin.SimpleColorSkin extends sandy.skin.BasicSkin implements sandy.skin.Skin
{
var _color, _alpha, broadcastEvent, _eOnUpdate, _filters, _useLight;
function SimpleColorSkin (c, a) {
super();
_color = (isNaN(c) ? 0 : (c));
_alpha = (isNaN(a) ? 100 : (a));
}
function set alpha(n) {
_alpha = n;
broadcastEvent(_eOnUpdate);
//return(alpha);
}
function set color(n) {
_color = n;
broadcastEvent(_eOnUpdate);
//return(color);
}
function get alpha() {
return(_alpha);
}
function get color() {
return(_color);
}
function getType(Void) {
return(sandy.skin.SkinType.__get__SIMPLE_COLOR());
}
function begin(face, mc) {
mc.filters = _filters;
var _local2 = _color;
if (_useLight) {
var _local8 = sandy.core.World3D.getInstance().getLight();
var _local9 = face.createNormale();
var _local10 = _local8.dir;
var _local4 = _local8.getPower() / 100;
var _local5 = (_local2 >> 16) & 255;
var _local7 = (_local2 >> 8) & 255;
var _local3 = _local2 & 255;
var _local6 = -sandy.math.VectorMath.dot(_local10, _local9);
_local5 = sandy.util.NumberUtil.constrain(_local5 * (_local6 + _local4), 0, 255);
_local7 = sandy.util.NumberUtil.constrain(_local7 * (_local6 + _local4), 0, 255);
_local3 = sandy.util.NumberUtil.constrain(_local3 * (_local6 + _local4), 0, 255);
_local2 = ((_local5 << 16) | (_local7 << 8)) | _local3;
}
mc.beginFill(_local2, _alpha);
}
function end(f, mc) {
mc.endFill();
}
function toString(Void) {
return("sandy.skin.SimpleColorSkin");
}
}
Symbol 1154 MovieClip [__Packages.sandy.primitive.Line3D] Frame 0
class sandy.primitive.Line3D extends sandy.core.Object3D implements sandy.primitive.Primitive3D
{
var aPoints, _aFaces, addFace;
function Line3D (deb, fin) {
super();
if (arguments.length < 2) {
trace("Line3D::Number of arguments to low");
} else {
var _local4 = 0;
while (_local4 < arguments.length) {
aPoints.push(new sandy.core.data.Vertex(arguments[_local4].x, -arguments[_local4].y, arguments[_local4].z));
_local4++;
}
generate();
}
}
function generate(Void) {
_aFaces = [];
var _local3 = aPoints.length;
var _local2 = 0;
while (_local2 < (_local3 - 1)) {
addFace(new sandy.core.face.Edge3D(this, aPoints[_local2], aPoints[_local2 + 1]));
_local2++;
}
}
function setSkin(s, bOverWrite) {
bOverWrite = ((bOverWrite == undefined) ? false : (bOverWrite));
super.setSkin(s, bOverWrite);
return(true);
}
}
Symbol 1155 MovieClip [__Packages.sandy.core.face.Edge3D] Frame 0
class sandy.core.face.Edge3D extends sandy.core.face.TriFace3D
{
var _va, _vb, _s, _vn, _mc;
function Edge3D (oref, a, b) {
super(oref, a, b, b);
}
function getVertex(Void) {
return([_va, _vb]);
}
function enableEvents(b) {
}
function setSkin(s) {
if (s instanceof sandy.skin.SimpleLineSkin) {
_s = s;
}
}
function getSkin(Void) {
return(sandy.skin.SimpleLineSkin(_s));
}
function setBackSkin(s) {
}
function getBackSkin(Void) {
return(null);
}
function setUVCoordinates(a, b, c) {
}
function createNormale(Void) {
return(null);
}
function setNormale(n) {
_vn = n;
}
function isVisible(Void) {
return(true);
}
function render(mc) {
_mc = mc;
_s.begin(this, mc);
mc.moveTo(_va.sx, _va.sy);
mc.lineTo(_vb.sx, _vb.sy);
_s.end(this, mc);
}
function refresh(Void) {
_mc.clear();
_s.begin(this, _mc);
_mc.moveTo(_va.sx, _va.sy);
_mc.lineTo(_vb.sx, _vb.sy);
_s.end(this, _mc);
}
function toString(Void) {
return(new String("sandy.core.face.Edge3D"));
}
}
Symbol 1156 MovieClip [__Packages.CBallPoint] Frame 0
class CBallPoint
{
var obax2, axes;
function CBallPoint (bg, mcParent, obax, alp) {
obax2 = new Object();
obax2.bx = obax.bx;
obax2.by = obax.by;
obax2.bz = obax.bz;
obax2.xVel = obax.xVel;
obax2.yVel = obax.yVel;
obax2.zVel = obax.zVel;
obax2.power = obax.power;
obax2.Aangle = obax.Aangle;
calc(obax2);
var _local3 = new sandy.primitive.Line3D(new sandy.core.data.Vector(obax.bx, obax.by, obax.bz), new sandy.core.data.Vector(obax2.bx, obax2.by, obax2.bz));
_local3.setSkin(new sandy.skin.SimpleLineSkin(2, 65280, alp));
axes = new sandy.core.group.Group();
axes.addChild(_local3);
bg.addChild(axes);
}
function getPosition() {
var _local2 = new sandy.core.data.Vector(obax2.bx, obax2.by, obax2.bz);
return(_local2);
}
function calc(ob) {
var _local3 = 0.01;
ob.yVel = ob.yVel - gravity;
ob.bx = ob.bx + (ob.xVel * _local3);
ob.by = ob.by + (ob.yVel * _local3);
ob.bz = ob.bz + (ob.zVel * _local3);
if (ob.by < def_by) {
ob.by = 0;
}
}
function destroy() {
axes.destroy();
}
var count = 0;
var gravity = 0.9;
var def_bx = 54.8;
var def_by = 0.1;
var def_bz = -38.5;
}
Symbol 1157 MovieClip [__Packages.CArrow] Frame 0
class CArrow
{
var mybg, mcParent, tb, mcArrow, rotation1, rotation2, translation, rx, ry, rz, power;
function CArrow (bg, _mcParent) {
mybg = bg;
mcParent = _mcParent;
tb = 3;
createArrow();
}
function createArrow() {
var _local5 = new sandy.primitive.Plane3D(4, 1, 1, "tri");
mcArrow = mcParent.attachMovie("arrow", "arrow", mcParent.getNextHighestDepth());
mcArrow._visible = false;
var _local6 = new sandy.skin.MovieSkin(mcArrow);
_local5.setSkin(_local6);
var _local3 = new sandy.core.group.TransformGroup();
var _local2 = new sandy.core.group.TransformGroup();
var _local4 = new sandy.core.group.TransformGroup();
rotation1 = new sandy.core.transform.Transform3D();
rotation2 = new sandy.core.transform.Transform3D();
translation = new sandy.core.transform.Transform3D();
rx = 0;
ry = 0;
rz = 0;
rotation1.rot(rx, ry, rz);
rotation2.rot(rx, ry, rz);
translation.translate(def_bx, def_by, def_bz);
_local3.setTransform(rotation1);
_local2.setTransform(rotation2);
_local4.setTransform(translation);
_local3.addChild(_local5);
_local2.addChild(_local3);
_local4.addChild(_local2);
mybg.addChild(_local4);
resetArrow();
}
function powering() {
mcArrow.gotoAndPlay(2);
}
function ihatemath(sc, f1, f2, g1, g2) {
return((((sc - f1) / (f2 - f1)) * (g2 - g1)) + g1);
}
function unpowering() {
var _local2 = rx;
var _local5 = mcArrow._currentframe;
var _local9 = 67;
var _local7 = 83;
var _local8 = 55;
var _local6 = 67;
var _local3 = ihatemath(_local2, upperlimit, lowerlimit, _local9, _local8);
var _local4 = ihatemath(_local2, upperlimit, lowerlimit, _local7, _local6);
power = ihatemath(_local5, 0, 20, _local3, _local4);
mcArrow.gotoAndStop(1);
}
function resetArrow() {
rx = upperlimit;
ry = rightlimit;
rotation1.rotX(rx);
rotation2.rotY(ry);
}
function up() {
rx = rx + tb;
if (rx > upperlimit) {
rx = upperlimit;
}
rotation1.rotX(rx);
}
function down() {
rx = rx - tb;
if (rx < lowerlimit) {
rx = lowerlimit;
}
rotation1.rotX(rx);
}
function left() {
ry = ry + tb;
if (ry > leftlimit) {
ry = leftlimit;
}
rotation2.rotY(ry);
}
function right() {
ry = ry - tb;
if (ry < rightlimit) {
ry = rightlimit;
}
rotation2.rotY(ry);
}
function hide() {
translation.translate(def_bx - 50, def_by, def_bz);
}
function show() {
resetArrow();
translation.translate(def_bx, def_by, def_bz);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function autoAim(pasti) {
if (pasti) {
mcArrow.gotoAndStop(8);
rx = -30;
ry = 18;
} else {
mcArrow.gotoAndStop(randRange(3, 16));
rx = randRange(-20, -40);
ry = randRange(9, 15);
}
rotation1.rotX(rx);
rotation2.rotY(ry);
}
var def_bx = 54.8;
var def_by = 0;
var def_bz = -38.5;
var upperlimit = -20;
var lowerlimit = -40;
var leftlimit = 20;
var rightlimit = 9;
}
Symbol 1158 MovieClip [__Packages.CCornerKicker] Frame 0
class CCornerKicker
{
var mybg, mcParent, bx, by, bz, mcKicker, bTrans;
function CCornerKicker (bg, _mcParent) {
mybg = bg;
mcParent = _mcParent;
createAnim();
}
function createAnim() {
bx = def_bx;
by = def_by;
bz = def_bz;
var _local3 = new sandy.core.Sprite2D(0.1);
mcKicker = mcParent.attachMovie("cornerkicker", "cornerkicker", mcParent.getNextHighestDepth());
mcKicker._visible = false;
var _local4 = new sandy.skin.MovieSkin(mcKicker);
_local3.setSkin(_local4);
mcKicker.gotoAndStop(1);
var _local6 = new sandy.core.group.TransformGroup();
var _local5 = new sandy.core.group.TransformGroup();
var _local2 = new sandy.core.group.TransformGroup();
_local2 = new sandy.core.group.TransformGroup();
bTrans = new sandy.core.transform.Transform3D();
bTrans.translate(bx, by, bz);
_local2.setTransform(bTrans);
_local2.addChild(_local3);
mybg.addChild(_local2);
}
function hide() {
mcKicker.gotoAndStop(1);
}
function show() {
mcKicker.gotoAndStop(2);
}
function restart() {
mcKicker.gotoAndStop(1);
}
function kick() {
mcKicker.gotoAndPlay(2);
}
function setHuman(human) {
if (human == true) {
mcKicker.indicator._visible = true;
} else {
mcKicker.indicator._visible = false;
}
}
var def_bx = 54.5;
var def_by = 0;
var def_bz = -37.5;
}
Symbol 1159 MovieClip [__Packages.CKicker] Frame 0
class CKicker
{
var mball, mybg, mcParent, AutoKick, mcKicker, bx, by, bz, mark, bTrans, todo, AutoRun, xrunto, zrunto, angley, anglex, power;
function CKicker (bg, _mcParent, _mball) {
mball = _mball;
mybg = bg;
mcParent = _mcParent;
createMarker();
tbmc = 0.3;
AutoKick = false;
EventCenter.access().addEventListener("kickerevent", this);
}
function createAnim() {
mcKicker = mcParent.attachMovie("kicker", "kicker", mcParent.getNextHighestDepth());
mcKicker._x = 260;
mcKicker._y = 387;
mcKicker._visible = false;
}
function createMarker() {
bx = def_bx;
by = def_by;
bz = def_bz;
mark = new sandy.core.Sprite2D(0.09);
mcKicker = mcParent.attachMovie("kicker", "kicker", mcParent.getNextHighestDepth());
mcKicker.gotoAndStop(1);
mcKicker._visible = false;
var _local3 = new sandy.skin.MovieSkin(mcKicker);
mark.setSkin(_local3);
var _local2 = new sandy.core.group.TransformGroup();
bTrans = new sandy.core.transform.Transform3D();
bTrans.translate(def_bx, 0, def_bz);
_local2.setTransform(bTrans);
_local2.addChild(mark);
mybg.addChild(_local2);
}
function restart() {
mcKicker.gotoAndStop(1);
}
function hide() {
bTrans.translate(def_bx, def_by, def_bz);
AutoKick = false;
mcKicker.gotoAndStop(1);
mcKicker._visible = false;
}
function show() {
bx = def_bx;
by = def_by;
bz = def_bz;
bTrans.translate(bx, by, bz);
mcKicker.gotoAndPlay(2);
kickerstate = KS_IDLE;
}
function getPosition() {
var _local2 = mark.getPosition();
return(_local2);
}
function win() {
switch (randRange(1, 6)) {
case 1 :
mcKicker.gotoAndPlay("win");
break;
case 2 :
case 3 :
mcKicker.gotoAndPlay("win2");
break;
case 4 :
case 5 :
case 6 :
mcKicker.gotoAndPlay("win3");
}
}
function loose() {
switch (randRange(1, 4)) {
case 1 :
mcKicker.gotoAndPlay("loose");
break;
case 2 :
case 3 :
case 4 :
mcKicker.gotoAndPlay("loose2");
}
}
function toidle() {
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
}
function doaction() {
switch (todo) {
case "backflip" :
_global.__DISPATCH({type:"gameevent", param:"shooting"});
kickerstate = KS_BACKFLIP;
mcKicker.gotoAndPlay("backflip");
break;
case "heading" :
_global.__DISPATCH({type:"gameevent", param:"shooting"});
kickerstate = KS_HEADING;
mcKicker.gotoAndPlay("heading");
break;
case "chestvolley" :
_global.__DISPATCH({type:"gameevent", param:"shooting"});
kickerstate = KS_CHESTVOLLEY;
mcKicker.gotoAndPlay("chestvolley");
break;
case "dive" :
_global.__DISPATCH({type:"gameevent", param:"shooting"});
kickerstate = KS_DIVE;
mcKicker.gotoAndPlay("dive");
break;
case "volley" :
_global.__DISPATCH({type:"gameevent", param:"shooting"});
kickerstate = KS_VOLLEY;
mcKicker.gotoAndPlay("volley");
}
}
function action() {
var _local7 = mball.getPosition();
var _local8 = mball.markball.getPosition();
var _local3 = mark.getPosition();
var _local5 = (near = mball.getNearestBallTrajectories(_local3));
var _local2 = _local5.x - _local3.x;
var _local4 = _local5.y - _local3.y;
var _local6 = _local5.z - _local3.z;
todo = "nothing";
if ((((_local6 > -0.5) && (_local4 < 3.3)) && (_local2 > -1)) && (_local2 < 6)) {
if (_local4 >= 2) {
if (_local2 < 0) {
todo = "backflip";
} else {
todo = "heading";
}
} else if (_local2 > 3) {
todo = "dive";
} else if (_local2 < 0) {
todo = "backflip";
} else if (_local4 > 1) {
todo = "chestvolley";
} else if (_local4 < 1) {
todo = "volley";
} else {
todo = "chestvolley";
}
}
if (!AutoKick) {
doaction();
}
}
function startrun() {
AutoRun = true;
AutoKick = true;
var _local2 = mball.getRandomPos();
xrunto = _local2.x;
zrunto = _local2.z;
}
function autoRunAction() {
if (bx > xrunto) {
bx = bx - tbmc;
}
if (bx < xrunto) {
bx = bx + tbmc;
}
if (bz > zrunto) {
bz = bz - tbmc;
}
if (bz < zrunto) {
bz = bz + tbmc;
}
if (kickerstate == KS_IDLE) {
kickerstate = KS_RUNUP;
mcKicker.gotoAndPlay("runuploop");
}
bTrans.translate(bx, by, bz);
if ((Math.abs(bx - xrunto) < 0.5) && (Math.abs(bz - zrunto) < 0.5)) {
action();
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
AutoRun = false;
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function autokicklevel1() {
if (bz > 1) {
angley = -90 - randRange(0, 45);
} else {
angley = -90 + randRange(0, 45);
}
((Math.random() < 0.5) ? ((anglex = anglex + 10)) : ((anglex = anglex - 10)));
}
function autokicklevel2() {
if (bz > 1) {
if (bz > 5) {
angley = -110 - randRange(0, 30);
} else {
angley = -90 - randRange(0, 30);
}
} else if (bz > -1) {
angley = -90 + randRange(0, 30);
} else {
angley = -70 + randRange(0, 30);
}
((Math.random() < 0.5) ? ((anglex = anglex + 5)) : ((anglex = anglex - 5)));
}
function setLevel(level) {
AI_KICKERSHOOTLR = level;
}
function makeshoot() {
power = 80;
anglex = 0;
angley = -90;
if (AutoKick) {
if (AI_KICKERSHOOTLR == 0) {
autokicklevel1();
} else {
autokicklevel2();
}
} else {
if (Key.isDown(37)) {
angley = angley + 15;
}
if (Key.isDown(39)) {
angley = angley - 16;
}
if (Key.isDown(38)) {
anglex = anglex - 15;
}
if (Key.isDown(40)) {
anglex = anglex + 10;
}
}
mball.makeshoot(power, anglex, angley);
}
function cekrun() {
if (AutoRun) {
autoRunAction();
return(undefined);
}
}
function cekinput(canspace) {
if (canspace == undefined) {
canspace = true;
}
if (kickerstate == KS_IDLE) {
if (Key.isDown(38)) {
kickerstate = KS_RUNUP;
mcKicker.gotoAndPlay("runuploop");
}
if (Key.isDown(40)) {
kickerstate = KS_RUNDOWN;
mcKicker.gotoAndPlay("rundownloop");
}
if (Key.isDown(37)) {
kickerstate = KS_RUNLEFT;
mcKicker.gotoAndPlay("runleftloop");
}
if (Key.isDown(39)) {
kickerstate = KS_RUNRIGHT;
mcKicker.gotoAndPlay("runrightloop");
}
if (Key.isDown(32) && (canspace)) {
action();
}
return(undefined);
}
if (kickerstate == KS_RUNRIGHT) {
if (Key.isDown(38)) {
bx = bx + tbmc;
}
if (Key.isDown(40)) {
bx = bx - tbmc;
}
if (Key.isDown(32)) {
action();
}
if (Key.isDown(39)) {
bz = bz - tbmc;
bTrans.translate(bx, by, bz);
} else {
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
}
return(undefined);
}
if (kickerstate == KS_RUNLEFT) {
if (Key.isDown(38)) {
bx = bx + tbmc;
}
if (Key.isDown(40)) {
bx = bx - tbmc;
}
if (Key.isDown(32)) {
action();
}
if (Key.isDown(37)) {
bz = bz + tbmc;
bTrans.translate(bx, by, bz);
} else {
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
}
return(undefined);
}
if (kickerstate == KS_RUNUP) {
if (Key.isDown(37)) {
bz = bz + tbmc;
}
if (Key.isDown(39)) {
bz = bz - tbmc;
}
if (Key.isDown(32)) {
action();
}
if (Key.isDown(38)) {
bx = bx + tbmc;
bTrans.translate(bx, by, bz);
} else {
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
}
return(undefined);
}
if (kickerstate == KS_RUNDOWN) {
if (Key.isDown(37)) {
bz = bz + tbmc;
}
if (Key.isDown(39)) {
bz = bz - tbmc;
}
if (Key.isDown(32)) {
action();
}
if (Key.isDown(40)) {
bx = bx - tbmc;
bTrans.translate(bx, by, bz);
} else {
kickerstate = KS_IDLE;
mcKicker.gotoAndStop("idle");
}
return(undefined);
}
}
function kickerevent(ob) {
switch (ob.param) {
case "shoot" :
doaction(todo);
break;
case "runright" :
mcKicker.gotoAndPlay("runrightloop");
break;
case "runleft" :
mcKicker.gotoAndPlay("runleftloop");
break;
case "rundown" :
mcKicker.gotoAndPlay("rundownloop");
break;
case "runup" :
mcKicker.gotoAndPlay("runuploop");
break;
case "addup" :
bx = bx + ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "adddown" :
bx = bx - ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "addleft" :
bz = bz + ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "addright" :
bz = bz - ob.tbmc;
bTrans.translate(bx, by, bz);
}
}
function setHuman(human) {
if (human) {
mcKicker.indicator._visible = true;
} else {
mcKicker.indicator._visible = false;
}
}
var def_bx = 39;
var def_by = 0;
var def_bz = 1;
var tbmc = 1;
var zInner = 0.4;
var zOuter = 1.1;
var xInner = 1;
var xOuter = 2;
var KS_IDLE = 1;
var KS_RUNRIGHT = 2;
var KS_RUNLEFT = 3;
var KS_RUNUP = 4;
var KS_RUNDOWN = 5;
var KS_HEADING = 6;
var KS_VOLLEY = 7;
var KS_DIVE = 8;
var KS_BACKFLIP = 9;
var KS_CHESTVOLLEY = 10;
var kickerstate = 0;
var AI_KICKERSHOOTLR = 0;
}
Symbol 1160 MovieClip [__Packages.CKeeper] Frame 0
class CKeeper
{
var mybg, mcParent, AutoCatch, bx, by, bz, mcKeeper, bTrans, todo, doing;
function CKeeper (bg, _mcParent) {
mybg = bg;
mcParent = _mcParent;
createMarker();
AutoCatch = false;
EventCenter.access().addEventListener("keeperevent", this);
}
function createMarker() {
bx = def_bx;
by = def_by;
bz = def_bz;
var _local3 = new sandy.core.Sprite2D(0.26);
mcKeeper = mcParent.attachMovie("keeper", "keeper", mcParent.getNextHighestDepth());
mcKeeper._visible = false;
mcKeeper.gotoAndStop(1);
var _local4 = new sandy.skin.MovieSkin(mcKeeper);
_local3.setSkin(_local4);
var _local2 = new sandy.core.group.TransformGroup();
bTrans = new sandy.core.transform.Transform3D();
bTrans.translate(def_bx, 0, def_bz);
_local2.setTransform(bTrans);
_local2.addChild(_local3);
mybg.addChild(_local2);
}
function startcatch() {
AutoCatch = true;
}
function cekinput(mball) {
if (Key.isDown(38) && (Key.isDown(37))) {
todo = "upleft";
return(undefined);
}
if (Key.isDown(38) && (Key.isDown(39))) {
todo = "upright";
return(undefined);
}
if (Key.isDown(40) && (Key.isDown(37))) {
todo = "downleft";
return(undefined);
}
if (Key.isDown(40) && (Key.isDown(39))) {
todo = "downright";
return(undefined);
}
if (Key.isDown(37)) {
todo = "downleft";
return(undefined);
}
if (Key.isDown(39)) {
todo = "downright";
return(undefined);
}
if (Key.isDown(38)) {
todo = "jump";
return(undefined);
}
if (Key.isDown(40)) {
todo = "block";
return(undefined);
}
}
function cekinputA(mball) {
if (doing != "") {
return(undefined);
}
if (Key.isDown(37)) {
todo = "left";
}
if (Key.isDown(39)) {
todo = "right";
}
doAction();
}
function spacehit(mball) {
cekinput(mball);
doAction();
}
function setLevel(level) {
AI_KEEPERJUMPRANDOM = level;
}
function catchball(mball) {
if (AI_KEEPERJUMPRANDOM == 0) {
catchball1(mball);
} else {
catchball2(mball);
}
}
function catchball1(mball) {
var _local3 = randRange(1, 6);
var _local2 = bx - mball.bx;
if (_local2 > 9) {
catchball2(mball);
return(undefined);
}
switch (_local3) {
case 1 :
todo = "jump";
break;
case 2 :
todo = "block";
break;
case 3 :
todo = "downleft";
break;
case 4 :
todo = "upleft";
break;
case 5 :
todo = "downright";
break;
case 6 :
todo = "upright";
}
}
function catchball2(mball) {
var _local4 = Math.atan2(mball.xVel, mball.zVel);
var _local6 = bx - mball.bx;
var _local5 = _local6 / Math.tan(_local4);
var _local2 = mball.bz + _local5;
if (Math.abs(_local2 - bz) < 1) {
if (Math.random() < 0.5) {
todo = "jump";
return(undefined);
}
todo = "block";
return(undefined);
}
if (_local2 > bz) {
if (Math.random() <= 0.5) {
todo = "downleft";
return(undefined);
}
todo = "upleft";
return(undefined);
}
if (Math.random() <= 0.5) {
todo = "downright";
return(undefined);
}
todo = "upright";
return(undefined);
}
function cekGoal(mball) {
switch (doing) {
case "" :
case "left" :
case "right" :
if (((mball.bz <= (bz + 0.5)) && (mball.bz > (bz - 0.5))) && (mball.by <= 2)) {
return(false);
}
break;
case "jump" :
if ((((mball.bz <= (bz + 1)) && (mball.bz > (bz - 1))) && (mball.by > 0.7)) && (mball.by < 3)) {
return(false);
}
break;
case "block" :
if (((mball.bz <= (bz + 1)) && (mball.bz > (bz - 1))) && (mball.by <= 2)) {
return(false);
}
break;
case "downleft" :
if (((mball.bz > bz) && (mball.bz < (bz + 3))) && (mball.by <= 1.5)) {
return(false);
}
break;
case "upleft" :
if ((((mball.bz > bz) && (mball.bz < (bz + 3))) && (mball.by > 1.5)) && (mball.by <= 3)) {
return(false);
}
break;
case "upright" :
if ((((mball.bz < bz) && (mball.bz > (bz - 3))) && (mball.by > 1.5)) && (mball.by <= 3)) {
return(false);
}
break;
case "downright" :
if (!(((mball.bz < bz) && (mball.bz > (bz - 3))) && (mball.by <= 1.5))) {
break;
}
return(false);
}
return(true);
}
function doAction() {
switch (todo) {
case "downleft" :
mcKeeper.gotoAndPlay("downleft");
doing = todo;
break;
case "downright" :
mcKeeper.gotoAndPlay("downright");
doing = todo;
break;
case "upleft" :
mcKeeper.gotoAndPlay("upleft");
doing = todo;
break;
case "upright" :
mcKeeper.gotoAndPlay("upright");
doing = todo;
break;
case "win" :
mcKeeper.gotoAndPlay("win");
doing = todo;
break;
case "win2" :
mcKeeper.gotoAndPlay("win2");
doing = todo;
break;
case "loose" :
mcKeeper.gotoAndPlay("loose");
doing = todo;
break;
case "loose2" :
mcKeeper.gotoAndPlay("loose2");
doing = todo;
break;
case "jump" :
mcKeeper.gotoAndPlay("jump");
doing = todo;
break;
case "block" :
mcKeeper.gotoAndPlay("block");
doing = todo;
break;
case "left" :
mcKeeper.gotoAndPlay("left");
doing = todo;
break;
case "right" :
mcKeeper.gotoAndPlay("right");
doing = todo;
}
todo = "";
}
function win() {
afterAct = 1;
}
function loose() {
afterAct = -1;
}
function hide() {
bTrans.translate(def_bx - 50, def_by, def_bz);
}
function show() {
bx = def_bx;
by = def_by;
bz = def_bz;
bTrans.translate(bx, by, bz);
mcKeeper.gotoAndPlay("idle");
todo = "";
doing = "";
}
function restart() {
mcKeeper.gotoAndStop(1);
}
function keeperevent(ob) {
switch (ob.param) {
case "idle" :
mcKeeper.gotoAndPlay("idle");
doing = "";
break;
case "downleft" :
case "downright" :
case "upleft" :
case "upright" :
case "jump" :
case "block" :
if (afterAct != 0) {
if (afterAct == -1) {
afterAct = 0;
((Math.random() < 0.5) ? ((todo = "loose")) : ((todo = "loose2")));
doAction();
} else {
afterAct = 0;
((Math.random() < 0.5) ? ((todo = "win")) : ((todo = "win2")));
doAction();
}
} else {
mcKeeper.stop();
}
break;
case "addup" :
bx = bx + ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "adddown" :
bx = bx - ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "addleft" :
bz = bz + ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "addright" :
bz = bz - ob.tbmc;
bTrans.translate(bx, by, bz);
break;
case "ballclosing" :
if (!AutoCatch) {
break;
}
doAction();
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function setHuman(human) {
if (human) {
mcKeeper.indicator._visible = true;
} else {
mcKeeper.indicator._visible = false;
}
}
var def_bx = 54.8;
var def_by = 0;
var def_bz = 0.1;
var afterAct = 0;
var AI_KEEPERJUMPRANDOM = 1;
}
Symbol 1161 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager
{
static var _oI;
var mcRoot, mcSpeaker, bgm, ambience, ambience2, goal, whistle, kick, an1, an2, an3, an4, mouseover, mousedown, heartput, goalplayed, loopbgm, ibgm, iambience, iambience2, igoal, lastVolM, lastVolE;
function SoundManager (_mcRoot) {
mcRoot = _root;
}
function addSpeaker() {
var _local3 = {_x:772.1, _y:1.5};
mcSpeaker = mcRoot.attachMovie("speaker", "speaker", 1000, _local3);
mcSpeaker.show();
mcSpeaker.gotoAndStop(1);
mcSpeaker.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.toggleSound();
}
};
mcSpeaker.toggleSound = function () {
if (this._currentframe == 1) {
this.gotoAndStop(2);
SoundManager.ins().MusicMute();
} else {
SoundManager.ins().MusicOn();
this.gotoAndStop(1);
}
};
}
function loadSounds() {
mcRoot.createEmptyMovieClip("mcSoundAll", 10000);
mcRoot.mcSoundAll.createEmptyMovieClip("mcSound", 10000);
mcRoot.mcSoundAll.createEmptyMovieClip("mcSound2", 10001);
mcRoot.mcSoundAll.createEmptyMovieClip("mcSound3", 10002);
mcRoot.mcSoundAll.createEmptyMovieClip("mcSound4", 10003);
bgm = new Sound(mcRoot.mcSoundAll.mcSound);
bgm.attachSound("bgm");
ambience = new Sound(mcRoot.mcSoundAll.mcSound2);
ambience.attachSound("ambience");
ambience2 = new Sound(mcRoot.mcSoundAll.mcSound2);
ambience2.attachSound("oi");
goal = new Sound(mcRoot.mcSoundAll.mcSound3);
goal.attachSound("goal");
whistle = new Sound(mcRoot.mcSoundAll.mcSound.group4);
whistle.attachSound("wistleshort");
kick = new Sound(mcRoot.mcSoundAll.mcSound.group4);
kick.attachSound("kick");
an1 = new Sound(mcRoot.mcSoundAll.mcSound.group4);
an1.attachSound("an1");
an2 = new Sound(mcRoot.mcSoundAll.mcSound.group4);
an2.attachSound("an4");
an3 = new Sound(mcRoot.mcSoundAll.mcSound.group4);
an3.attachSound("an3");
an4 = new Sound(mcRoot.mcSoundAll.mcSound.group4);
an4.attachSound("an4");
mouseover = new Sound(mcRoot.mcSoundAll.mcSound.group4);
mouseover.attachSound("mouseover");
mousedown = new Sound(mcRoot.mcSoundAll.mcSound.group4);
mousedown.attachSound("mousedown");
heartput = new Sound(mcRoot.mcSoundAll.mcSound.group4);
heartput.attachSound("heartput");
goalplayed = false;
}
function setOverallVolume() {
bgm.setVolume(CSessionManager.ins().sndMusicVolume);
ambience.setVolume(CSessionManager.ins().sndEffectsVolume);
ambience2.setVolume(CSessionManager.ins().sndEffectsVolume);
goal.setVolume(CSessionManager.ins().sndEffectsVolume);
whistle.setVolume(CSessionManager.ins().sndEffectsVolume);
kick.setVolume(CSessionManager.ins().sndEffectsVolume);
mouseover.setVolume(CSessionManager.ins().sndEffectsVolume);
mousedown.setVolume(CSessionManager.ins().sndEffectsVolume);
heartput.setVolume(CSessionManager.ins().sndEffectsVolume);
}
function setMusicVolume() {
bgm.setVolume(CSessionManager.ins().sndMusicVolume);
}
function setEffectVolume() {
ambience.setVolume(CSessionManager.ins().sndEffectsVolume);
ambience2.setVolume(CSessionManager.ins().sndEffectsVolume);
goal.setVolume(CSessionManager.ins().sndEffectsVolume);
whistle.setVolume(CSessionManager.ins().sndEffectsVolume);
kick.setVolume(CSessionManager.ins().sndEffectsVolume);
mouseover.setVolume(CSessionManager.ins().sndEffectsVolume);
mousedown.setVolume(CSessionManager.ins().sndEffectsVolume);
heartput.setVolume(CSessionManager.ins().sndEffectsVolume);
}
function playBGM() {
bgm.setVolume(CSessionManager.ins().sndMusicVolume);
bgm.onSoundComplete = mx.utils.Delegate.create(this, completeBGM);
bgm.stop();
bgm.start(0);
loopbgm = true;
}
function completeBGM() {
if (loopbgm) {
bgm.start(0);
}
}
function stopBGM() {
bgm.stop();
loopbgm = false;
}
function fadeBGM(fadein) {
if (fadein) {
playBGM();
bgm.setVolume(0);
ibgm = setInterval(this, "fadinginbgm", 100);
} else {
ibgm = setInterval(this, "fadingoutbgm", 100);
}
}
function fadinginbgm() {
var _local2 = bgm.getVolume();
_local2 = _local2 + 5;
bgm.setVolume(_local2);
if (_local2 >= CSessionManager.ins().sndMusicVolume) {
_local2 = CSessionManager.ins().sndMusicVolume;
clearInterval(ibgm);
}
}
function fadingoutbgm() {
var _local2 = bgm.getVolume();
_local2 = _local2 - 5;
bgm.setVolume(_local2);
if (_local2 <= 0) {
_local2 = 0;
clearInterval(ibgm);
bgm.stop();
}
}
function playWhistle() {
whistle.start();
whistle.onSoundComplete = completeWhistle;
}
function completeWhistle() {
_global.__DISPATCH({type:"endwhistle"});
}
function stopWhistle() {
whistle.stop();
}
function playKick() {
kick.start();
}
function stopKick() {
kick.stop();
}
function playMouseover() {
mouseover.start();
}
function stopMouseover() {
mouseover.stop();
}
function playMousedown() {
mousedown.start();
}
function stopMousedown() {
mousedown.stop();
}
function playHeartput() {
heartput.start();
}
function stopHeartput() {
heartput.stop();
}
function playAmbience2() {
ambience2.start(0, 2);
}
function stopAmbience2() {
ambience2.stop();
}
function playVictory() {
switch (randRange(1, 4)) {
case 1 :
an1.start();
break;
case 2 :
an2.start();
break;
case 3 :
an3.start();
break;
case 4 :
an4.start();
}
}
function stopVictory() {
an1.stop();
an2.stop();
an3.stop();
an4.stop();
}
function fadinginambience2() {
if (Math.random() < 0.3) {
ambience2.start(0, 1);
}
}
function fadeAmbience(fadein) {
if (fadein) {
ambience.start(0, 1000);
ambience.setVolume(0);
iambience = setInterval(this, "fadinginambience", 100);
iambience2 = setInterval(this, "fadinginambience2", 3000);
} else {
iambience = setInterval(this, "fadingoutambience", 100);
}
}
function fadinginambience() {
var _local2 = ambience.getVolume();
_local2 = _local2 + 5;
ambience.setVolume(_local2);
if (_local2 >= CSessionManager.ins().sndEffectsVolume) {
_local2 = CSessionManager.ins().sndEffectsVolume;
clearInterval(iambience);
}
}
function fadingoutambience() {
var _local2 = ambience.getVolume();
_local2 = _local2 - 5;
ambience.setVolume(_local2);
if (_local2 <= 0) {
_local2 = 0;
clearInterval(iambience);
clearInterval(iambience2);
ambience.stop();
}
}
function playGoal() {
goalplayed = true;
goal.start();
goal.setVolume(CSessionManager.ins().sndEffectsVolume);
}
function stopGoal() {
goalplayed = false;
goal.stop("goal");
}
function fadeGoal(fadein) {
if (fadein) {
goalplayed = true;
goal.start(0);
goal.setVolume(0);
} else {
if (goal.getVolume() == 0) {
return(undefined);
}
igoal = setInterval(this, "fadingoutgoal", 100);
}
}
function fadingingoal() {
var _local2 = goal.getVolume();
_local2 = _local2 + 5;
goal.setVolume(_local2);
if (_local2 >= 80) {
_local2 = 80;
clearInterval(igoal);
}
}
function fadingoutgoal() {
var _local2 = goal.getVolume();
_local2 = _local2 - 10;
goal.setVolume(_local2);
if (_local2 <= 0) {
_local2 = 0;
clearInterval(igoal);
igoal = undefined;
goal.setVolume(0);
goal.stop("goal");
goalplayed = false;
}
}
function MusicMute() {
lastVolM = CSessionManager.ins().sndMusicVolume;
lastVolE = CSessionManager.ins().sndEffectsVolume;
CSessionManager.ins().sndMusicVolume = 0;
CSessionManager.ins().sndEffectsVolume = 0;
setMusicVolume();
setEffectVolume();
}
function MusicOn() {
CSessionManager.ins().sndMusicVolume = lastVolM;
CSessionManager.ins().sndEffectsVolume = lastVolE;
setMusicVolume();
setEffectVolume();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
static function _buildInstance() {
_oI = new SoundManager();
return(_oI);
}
static function ins() {
return(((_oI instanceof SoundManager) ? (_oI) : (_buildInstance())));
}
}
Symbol 1162 MovieClip [__Packages.sandy.skin.MixedSkin] Frame 0
class sandy.skin.MixedSkin extends sandy.skin.BasicSkin implements sandy.skin.Skin
{
var _colorLine, _alphaLine, _thickness, _colorBkg, _alphaBkg, _useLight, __set__filters, broadcastEvent, _eOnUpdate, _filters;
function MixedSkin (cb, ab, cl, al, tl) {
super();
_colorLine = (isNaN(cl) ? 0 : (cl));
_alphaLine = (isNaN(al) ? 100 : (al));
_thickness = (isNaN(tl) ? 2 : (tl));
_colorBkg = (isNaN(cb) ? 15658734 : (cb));
_alphaBkg = (isNaN(ab) ? 100 : (ab));
_useLight = false;
__set__filters([]);
}
function set alphaBkg(n) {
_alphaBkg = n;
broadcastEvent(_eOnUpdate);
//return(alphaBkg);
}
function set colorBkg(n) {
_colorBkg = n;
broadcastEvent(_eOnUpdate);
//return(colorBkg);
}
function set thickness(n) {
_thickness = n;
broadcastEvent(_eOnUpdate);
//return(thickness);
}
function set alphaLine(n) {
_alphaLine = n;
broadcastEvent(_eOnUpdate);
//return(alphaLine);
}
function set colorLine(n) {
_colorLine = n;
broadcastEvent(_eOnUpdate);
//return(colorLine);
}
function get alphaBkg() {
return(_alphaBkg);
}
function get colorBkg() {
return(_colorBkg);
}
function get thickness() {
return(_thickness);
}
function get alphaLine() {
return(_alphaLine);
}
function get colorLine() {
return(_colorLine);
}
function getType(Void) {
return(sandy.skin.SkinType.__get__MIXED());
}
function begin(face, mc) {
mc.filters = _filters;
var _local2 = _colorBkg;
if (_useLight) {
var _local8 = sandy.core.World3D.getInstance().getLight();
var _local10 = face.createNormale();
var _local11 = _local8.dir;
var _local4 = _local8.getPower() / 100;
var _local5 = (_local2 >> 16) & 255;
var _local7 = (_local2 >> 8) & 255;
var _local3 = _local2 & 255;
var _local6 = -sandy.math.VectorMath.dot(_local11, _local10);
_local5 = sandy.util.NumberUtil.constrain(_local5 * (_local6 + _local4), 0, 255);
_local7 = sandy.util.NumberUtil.constrain(_local7 * (_local6 + _local4), 0, 255);
_local3 = sandy.util.NumberUtil.constrain(_local3 * (_local6 + _local4), 0, 255);
_local2 = ((_local5 << 16) | (_local7 << 8)) | _local3;
}
mc.lineStyle(_thickness, _colorLine, _alphaLine);
mc.beginFill(_local2, _alphaBkg);
}
function end(f, mc) {
mc.endFill();
}
function toString(Void) {
return("sandy.skin.MixedSkin");
}
}
Symbol 1163 MovieClip [__Packages.CPreGameScreen] Frame 0
class CPreGameScreen extends CScreen
{
var remark, txSide1, txSide2, flag1, txTeamName1, txCornerKicker1, txKicker1, txGoalie1, mcUniform1, flag2, txTeamName2, txCornerKicker2, txKicker2, txGoalie2, mcUniform2;
function CPreGameScreen () {
super();
if (_global.AppStarted == undefined) {
return;
}
fillTeamData();
}
function fillTeamData() {
var _local4 = CTournament.ins().currentMatch;
var _local3 = _local4.team1;
var _local2 = _local4.team2;
if (CTeamManager.ins().currentTeam == _local4.team1) {
if (_local4.round == 1) {
remark.text = "Offense Team , Press Play When You're Ready";
} else {
remark.text = "Defense Team , Press Play When You're Ready";
}
} else if (_local4.round == 1) {
remark.text = "Defense Team , Press Play When You're Ready";
} else {
remark.text = "Offense Team , Press Play When You're Ready";
}
if (_local4.round == 1) {
txSide1.text = "OFFENSE";
txSide2.text = "DEFENSE";
} else {
txSide1.text = "DEFENSE";
txSide2.text = "OFFENSE";
}
flag1.toid = _local3.flagid;
flag1.setFlag(_local3.flagid);
txTeamName1.text = _local3.teamname;
txCornerKicker1.text = _local3.cornerkicker;
txKicker1.text = _local3.kicker;
txGoalie1.text = _local3.goalie;
mcUniform1.shirt.gotoAndStop(_local3.shirtcolor1);
mcUniform1.pants.gotoAndStop(_local3.pantscolor1);
flag2.toid = _local2.flagid;
flag2.setFlag(_local2.flagid);
txTeamName2.text = _local2.teamname;
txCornerKicker2.text = _local2.cornerkicker;
txKicker2.text = _local2.kicker;
txGoalie2.text = _local2.goalie;
mcUniform2.shirt.gotoAndStop(_local2.shirtcolor2);
mcUniform2.pants.gotoAndStop(_local2.pantscolor2);
}
}
Symbol 1164 MovieClip [__Packages.CResultScreen] Frame 0
class CResultScreen extends CScreen
{
var round, txVictory, txTitle, txClose, txCongrats, txTeamName1, flag1, mcUniform1, txTeamName2, flag2, mcUniform2, txScore1, txScore2;
function CResultScreen () {
super();
if (_global.AppStarted == undefined) {
return;
}
fillTeamData();
}
function fillTeamData() {
var _local2 = CTournament.ins().currentMatch;
round = _local2.round;
var _local4 = _local2.team1;
var _local3 = _local2.team2;
if (CTeamManager.ins().currentTeam == _local2.team1) {
if (_local2.scoreteam1 == _local2.scoreteam2) {
txVictory.text = "TIED MATCH";
} else if (_local2.scoreteam1 > _local2.scoreteam2) {
txVictory.text = "VICTORY !";
} else {
txVictory.text = "YOU LOOSE";
}
} else if (_local2.scoreteam1 == _local2.scoreteam2) {
txVictory.text = "TIED MATCH";
} else if (_local2.scoreteam2 > _local2.scoreteam1) {
txVictory.text = "VICTORY !";
} else {
txVictory.text = "YOU LOOSE";
}
txTitle.text = "Match Result";
txClose.text = "End Match";
txCongrats.text = CTournament.ins().nextPhase();
txTeamName1.text = _local4.teamname;
flag1.toid = _local4.flagid;
mcUniform1.shirt.gotoAndStop(_local4.shirtcolor1);
mcUniform1.pants.gotoAndStop(_local4.pantscolor1);
txTeamName2.text = _local3.teamname;
flag2.toid = _local3.flagid;
mcUniform2.shirt.gotoAndStop(_local3.shirtcolor2);
mcUniform2.pants.gotoAndStop(_local3.pantscolor2);
txScore1.text = String(_local2.scoreteam1);
txScore2.text = String(_local2.scoreteam2);
}
}
Symbol 1165 MovieClip [__Packages.CMenuScreen] Frame 0
class CMenuScreen extends CScreen
{
function CMenuScreen () {
super();
}
}
Symbol 1166 MovieClip [__Packages.CDialogScreen] Frame 0
class CDialogScreen extends CScreen
{
var _name;
function CDialogScreen () {
super();
}
function select(yes) {
_global.__DISPATCH({type:"endScreen", name:_name, select:yes});
}
}
Symbol 1167 MovieClip [__Packages.CNewGameScreen] Frame 0
class CNewGameScreen extends CScreen
{
var ctr, onEnterFrame, txTeamName, myflag, txCornerKicker, txKicker, txGoalie, mcUniform1, mcUniform2, _name, ListTeam;
function CNewGameScreen () {
super();
if (_global.AppStarted == undefined) {
return;
}
ctr = 0;
onEnterFrame = function () {
if (this.ctr > 1) {
this.onEnterFrame = null;
this.CreateList();
_global.__DISPATCH({type:"changeTeam", id:1});
}
this.ctr++;
};
EventCenter.access().addEventListener("teamChanged", this);
_global.__DISPATCH({type:"changeTeam", id:1});
}
function teamChanged(event) {
var _local2 = CTeamManager.ins().currentTeam;
txTeamName.text = _local2.teamname;
myflag.toid = _local2.flagid;
myflag.setFlag(_local2.flagid);
txCornerKicker.text = _local2.cornerkicker;
txKicker.text = _local2.kicker;
txGoalie.text = _local2.goalie;
mcUniform1.shirt.gotoAndStop(_local2.shirtcolor1);
mcUniform1.pants.gotoAndStop(_local2.pantscolor1);
mcUniform2.shirt.gotoAndStop(_local2.shirtcolor2);
mcUniform2.pants.gotoAndStop(_local2.pantscolor2);
SoundManager.ins().playMouseover();
}
function selectTeam() {
CTournament.ins().newTournament();
_global.__DISPATCH({type:"endScreen", name:_name});
}
function CreateList() {
CTeamManager.ins().randomTeam();
var _local6 = CTeamManager.ins().teams;
var _local5 = 0;
while (_local5 < _local6.length) {
var _local4 = CTeam(_local6[_local5]);
var _local3 = ListTeam.addThumb({identifier:"ItemList", height:25});
_local3.id = _local4.id;
_local3.txJudul.text = _local4.teamname;
_local3.flag.toid = _local4.flagid;
_local3.onPress = function () {
_global.__DISPATCH({type:"changeTeam", id:this.id});
};
_local5++;
}
}
}
Symbol 1168 MovieClip [__Packages.CSlider] Frame 0
class CSlider extends MovieClip
{
var origwidth, _width, dragging, _xmouse, slidebar;
function CSlider () {
super();
origwidth = _width;
dragging = false;
}
function onPress() {
_global.__DISPATCH({type:"sliderpress", param:this});
if (!dragging) {
setWidth();
}
dragging = true;
}
function onRelease() {
_global.__DISPATCH({type:"sliderrelease", param:this});
dragging = false;
}
function onReleaseOutside() {
_global.__DISPATCH({type:"sliderrelease", param:this});
dragging = false;
}
function setWidth() {
var _local2 = _xmouse;
if (_local2 > origwidth) {
_local2 = origwidth;
}
slidebar._width = _local2;
}
function setVal(val) {
slidebar._width = val * (origwidth / 100);
}
function getVal() {
return((slidebar._width / origwidth) * 100);
}
function onMouseMove() {
if (!dragging) {
return(undefined);
}
_global.__DISPATCH({type:"slidermove", param:this});
setWidth();
}
}
Symbol 1169 MovieClip [__Packages.COptionsScreen] Frame 0
class COptionsScreen extends CScreen
{
var _visible, slVolume, slMusic, slEffect, slGame, txGame, _quality, slGraphic;
function COptionsScreen () {
super();
}
function setup() {
if (_global.AppStarted == undefined) {
return(undefined);
}
_visible = true;
slVolume.setVal(CSessionManager.ins().sndOverallVolume);
slMusic.setVal(CSessionManager.ins().sndMusicVolume);
slEffect.setVal(CSessionManager.ins().sndEffectsVolume);
var _local3 = Math.round((CSessionManager.ins().numPlayPerGame / 20) * 100);
slGame.setVal(_local3);
if (CTournament.ins().tournamentPhase > 1) {
slGame._visible = false;
} else {
slGame._visible = true;
}
txGame.text = String(CSessionManager.ins().numPlayPerGame);
switch (_quality) {
case "LOW" :
slGraphic.setVal(0);
break;
case "MEDIUM" :
slGraphic.setVal(50);
break;
case "HIGH" :
slGraphic.setVal(100);
}
EventCenter.access().addEventListener("sliderpress", this);
EventCenter.access().addEventListener("sliderrelease", this);
EventCenter.access().addEventListener("slidermove", this);
}
function sliderrelease(ob) {
switch (ob.param._name) {
case "slVolume" :
CSessionManager.ins().sndOverallVolume = slVolume.getVal();
trace("changing volume baibe to " + CSessionManager.ins().sndOverallVolume);
SoundManager.ins().setOverallVolume();
break;
case "slMusic" :
CSessionManager.ins().sndMusicVolume = slMusic.getVal();
SoundManager.ins().setMusicVolume();
break;
case "slEffect" :
CSessionManager.ins().sndEffectsVolume = slEffect.getVal();
SoundManager.ins().setEffectVolume();
break;
case "slGraphic" :
var _local2 = slGraphic.getVal();
if (_local2 < 33) {
_quality = "LOW";
slGraphic.setVal(0);
} else if (_local2 > 66) {
_quality = "HIGH";
slGraphic.setVal(100);
} else {
_quality = "MEDIUM";
slGraphic.setVal(50);
}
break;
case "slGame" :
if (CTournament.ins().tournamentPhase > 1) {
return(undefined);
}
_local2 = Math.round((slGame.getVal() / 100) * 19);
if (_local2 < 2) {
_local2 = 2;
}
CSessionManager.ins().numPlayPerGame = _local2;
txGame.text = String(_local2);
}
}
}
Symbol 1170 MovieClip [__Packages.CNationalFlag] Frame 0
class CNationalFlag extends MovieClip
{
var toid, attachBitmap;
function CNationalFlag () {
super();
setFlag(toid);
}
function setFlag(id) {
id--;
var _local8 = flash.display.BitmapData.loadBitmap("flags");
var _local3 = new flash.display.BitmapData(32, 20, false, 13421772);
var _local4 = id % 61;
var _local9 = Math.floor(id / 61);
var _local7 = _local9 * 32;
var _local6 = _local4 * 20;
var _local2 = new flash.geom.Matrix();
_local2.tx = -_local7;
_local2.ty = -_local6;
_local3.draw(_local8, _local2, new flash.geom.ColorTransform(), null, new flash.geom.Rectangle(0, 0, 32, 20), false);
attachBitmap(_local3, 0);
}
}
Symbol 1171 MovieClip [__Packages.Application] Frame 0
class Application
{
var mcRoot;
function Application (_mcroot) {
SoundManager.ins().loadSounds();
EventCenter.access().addEventListener("resumeSite", this);
_global.__DISPATCH = _dispatchEventToController;
_global.AppStarted = true;
mcRoot = _mcroot;
FileManager.ins().loadList("teamdata.xml");
}
function resumeSite() {
EventCenter.access().removeEventListener("resumeSite", this);
var _local2 = new CNavigationStateManager(mcRoot);
_local2.changeAppState(CNavigationStateManager.AS_INTRO);
}
static function _dispatchEventToController(o) {
EventCenter.access()._dispatchEvent(o);
}
}
Symbol 1172 MovieClip [__Packages.FileManager] Frame 0
class FileManager
{
static var _oI;
var stillLoading, listXML;
function FileManager () {
stillLoading = true;
}
function handleLoad(success) {
if (success) {
} else {
trace("xml load failure");
}
}
function loadList(filename) {
var _local6 = "<content> <team id=\"1\" flagid=\"118\" teamname=\"South Korea\" shirtcolor1=\"white\" pantscolor1=\"red\" shirtcolor2=\"red\" pantscolor2=\"white\" goalie=\"Woon-Jae\u00A0Lee\" cornerkicker=\"Ji Sung\u00A0Park\" kicker=\"Jung-Hwan\u00A0Ahn\" /> <team id=\"2\" flagid=\"177\" teamname=\"Portugal\" shirtcolor1=\"red\" pantscolor1=\"green\" shirtcolor2=\"white\" pantscolor2=\"black\" goalie=\"Vitor Baia\" cornerkicker=\"Cristiano Ronaldo\" kicker=\"Helder Postiga\" /> <team id=\"3\" flagid=\"162\" teamname=\"Nigeria\" shirtcolor1=\"yellow\" pantscolor1=\"green\" shirtcolor2=\"green\" pantscolor2=\"yellow\" goalie=\"Vincent Enyeama\" cornerkicker=\"John Obi Mikel\" kicker=\"Obafemi Martins\" /> <team id=\"4\" flagid=\"230\" teamname=\"USA\" shirtcolor1=\"white\" pantscolor1=\"black\" shirtcolor2=\"light blue\" pantscolor2=\"white\" goalie=\"Tim Howard\" cornerkicker=\"Landon Donovan\" kicker=\"Freddy Adu\" /> <team id=\"5\" flagid=\"67\" teamname=\"Egypt\" shirtcolor1=\"red\" pantscolor1=\"white\" shirtcolor2=\"green\" pantscolor2=\"green\" goalie=\"Sherif Ekramy\" cornerkicker=\"Mohamed Zidan\" kicker=\"Mido\" /> <team id=\"6\" flagid=\"12\" teamname=\"Australia\" shirtcolor1=\"yellow\" pantscolor1=\"green\" shirtcolor2=\"green\" pantscolor2=\"yellow\" goalie=\"Schwarzer Mark\" cornerkicker=\"Kewell\u00A0Harry\" kicker=\"Viduka\u00A0Mark\" /> <team id=\"7\" flagid=\"9\" teamname=\"Argentina\" shirtcolor1=\"light blue\" pantscolor1=\"black\" shirtcolor2=\"blue\" pantscolor2=\"blue\" goalie=\"Roberto Abbondanzieri\" cornerkicker=\"Juan Roman Riquelme\" kicker=\"Leo Messi\" /> <team id=\"8\" flagid=\"60\" teamname=\"Czech Rep.\" shirtcolor1=\"red\" pantscolor1=\"blue\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Peter Cech\" cornerkicker=\"Tomas Rosicky\" kicker=\"Milan Baros\" /> <team id=\"9\" flagid=\"87\" teamname=\"England\" shirtcolor1=\"white\" pantscolor1=\"black\" shirtcolor2=\"red\" pantscolor2=\"white\" goalie=\"Paul Robinson\" cornerkicker=\"Steven Gerrard\" kicker=\"Wayne Rooney\" /> <team id=\"10\" flagid=\"143\" teamname=\"Mexico\" shirtcolor1=\"green\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"green\" goalie=\"Ochoa\u00A0Guillermo\" cornerkicker=\"Perez\u00A0Luis\" kicker=\"Fonseca\u00A0Jose\" /> <team id=\"11\" flagid=\"112\" teamname=\"Japan\" shirtcolor1=\"blue\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"blue\" goalie=\"Narazaki\u00A0Seigo\" cornerkicker=\"Nakamura\u00A0Shunsuke\" kicker=\"Takahara\u00A0Naohiro\" /> <team id=\"12\" flagid=\"197\" teamname=\"South Africa\" shirtcolor1=\"yellow\" pantscolor1=\"green\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Moeneeb Josephs\" cornerkicker=\"Steven Pienaar\" kicker=\"Benni Mccarthy\" /> <team id=\"13\" flagid=\"105\" teamname=\"Iran\" shirtcolor1=\"white\" pantscolor1=\"white\" shirtcolor2=\"red\" pantscolor2=\"red\" goalie=\"Mirzapour\u00A0Ebrahim\" cornerkicker=\"Ali Karimi\" kicker=\"Hashemian\u00A0Vahid\" /> <team id=\"14\" flagid=\"54\" teamname=\"Costa Rica\" shirtcolor1=\"red\" pantscolor1=\"blue\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Mesen\u00A0Alvaro\" cornerkicker=\"Hernandez\u00A0Carlos\" kicker=\"Wanchope\u00A0Paulo\" /> <team id=\"15\" flagid=\"84\" teamname=\"Germany\" shirtcolor1=\"white\" pantscolor1=\"black\" shirtcolor2=\"red\" pantscolor2=\"white\" goalie=\"Kahn\u00A0Oliver\" cornerkicker=\"Michael Ballack\" kicker=\"Miroslav Klose\" /> <team id=\"16\" flagid=\"210\" teamname=\"Sweden\" shirtcolor1=\"yellow\" pantscolor1=\"blue\" shirtcolor2=\"blue\" pantscolor2=\"yellow\" goalie=\"Isaksson\u00A0Andreas\" cornerkicker=\"Ljungberg\u00A0Fredrik\" kicker=\"Ibrahimovic\u00A0Zlatan\" /> <team id=\"17\" flagid=\"198\" teamname=\"Spain\" shirtcolor1=\"red\" pantscolor1=\"blue\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Iker Casillas\" cornerkicker=\"Xavi\" kicker=\"Fernando Torres.\" /> <team id=\"18\" flagid=\"182\" teamname=\"Russia\" shirtcolor1=\"white\" pantscolor1=\"white\" shirtcolor2=\"red\" pantscolor2=\"white\" goalie=\"Igor Akinfeev\" cornerkicker=\"Andrey Arshavin\" kicker=\"Alexander Kerzhakov\" /> <team id=\"19\" flagid=\"231\" teamname=\"Uruguay\" shirtcolor1=\"yellow\" pantscolor1=\"blue\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Gustavo Munua\" cornerkicker=\"Alvaro Recoba\" kicker=\"Diego Forlan\" /> <team id=\"20\" flagid=\"77\" teamname=\"France\" shirtcolor1=\"blue\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"blue\" goalie=\"Gregory Coupet\" cornerkicker=\"Sidney Govou\" kicker=\"Thierry Henry\" /> <team id=\"21\" flagid=\"110\" teamname=\"Italy\" shirtcolor1=\"blue\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"blue\" goalie=\"Gianluigi Buffon\" cornerkicker=\"Francesco Totti\" kicker=\"Alberto Gilardino\" /> <team id=\"22\" flagid=\"173\" teamname=\"Peru\" shirtcolor1=\"red\" pantscolor1=\"blue\" shirtcolor2=\"blue\" pantscolor2=\"white\" goalie=\"Erick Delgado\" cornerkicker=\"Jefferson Farfan\" kicker=\"Claudio Pizarro\" /> <team id=\"23\" flagid=\"157\" teamname=\"Netherlands\" shirtcolor1=\"orange\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"blue\" goalie=\"Edwin Van Der Sar\" cornerkicker=\"Arjen Robben\" kicker=\"Ruud Van Nisterooy\" /> <team id=\"24\" flagid=\"111\" teamname=\"Jamaica\" shirtcolor1=\"yellow\" pantscolor1=\"green\" shirtcolor2=\"green\" pantscolor2=\"yellow\" goalie=\"Donovan Ricketts\" cornerkicker=\"Jason Euell\" kicker=\"Kevin Lisbie\" /> <team id=\"25\" flagid=\"30\" teamname=\"Brazil\" shirtcolor1=\"yellow\" pantscolor1=\"blue\" shirtcolor2=\"blue\" pantscolor2=\"white\" goalie=\"Dida\" cornerkicker=\"Ronaldinho\" kicker=\"Kaka\" /> <team id=\"26\" flagid=\"55\" teamname=\"Ivory Coast\" shirtcolor1=\"green\" pantscolor1=\"green\" shirtcolor2=\"orange\" pantscolor2=\"orange\" goalie=\"Copa\" cornerkicker=\"Salomon Kalou\" kicker=\"Didier Drogba\" /> <team id=\"27\" flagid=\"37\" teamname=\"Cameroon\" shirtcolor1=\"red\" pantscolor1=\"black\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Carlos Idriss Kameni\" cornerkicker=\"Geremi\" kicker=\"Samuel Eto'o\" /> <team id=\"28\" flagid=\"56\" teamname=\"Croatia\" shirtcolor1=\"red\" pantscolor1=\"white\" shirtcolor2=\"blue\" pantscolor2=\"blue\" goalie=\"Pletikosa\u00A0\u00A0Stipe\" cornerkicker=\"Olic Ivica\" kicker=\"Klasnic Ivan\" /> <team id=\"29\" flagid=\"109\" teamname=\"Israel\" shirtcolor1=\"blue\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"blue\" goalie=\"Dudu Aouate\" cornerkicker=\"Yossi Benayoun\" kicker=\"Roberto Colautti\" /> <team id=\"30\" flagid=\"107\" teamname=\"Ireland\" shirtcolor1=\"green\" pantscolor1=\"white\" shirtcolor2=\"white\" pantscolor2=\"green\" goalie=\"Shay Given\" cornerkicker=\"Damien Duff\" kicker=\"Robbie Keane\" /> <team id=\"31\" flagid=\"223\" teamname=\"Turkey\" shirtcolor1=\"red\" pantscolor1=\"red\" shirtcolor2=\"white\" pantscolor2=\"white\" goalie=\"Recber Rustu\" cornerkicker=\"Nihat\" kicker=\"Umit Karan\" /> <team id=\"32\" flagid=\"228\" teamname=\"Ukraine\" shirtcolor1=\"yellow\" pantscolor1=\"yellow\" shirtcolor2=\"blue\" pantscolor2=\"blue\" goalie=\"Shovkovskyi\u00A0Olexander\" cornerkicker=\"Rotan\u00A0Ruslan\" kicker=\"Shevchenko\u00A0Andriy\" />\t\t\t</content>";
listXML.ignoreWhite = true;
listXML = new XML(_local6);
var _local4 = 1;
var _local5 = listXML.firstChild;
var _local7 = CTeamManager.ins();
while (_local4 < _local5.childNodes.length) {
var _local3 = listXML.firstChild.childNodes[_local4];
CTeamManager.ins().addTeam(Number(_local3.attributes.id), Number(_local3.attributes.flagid), _local3.attributes.teamname, _local3.attributes.shirtcolor1, _local3.attributes.pantscolor1, _local3.attributes.shirtcolor2, _local3.attributes.pantscolor2, _local3.attributes.goalie, _local3.attributes.cornerkicker, _local3.attributes.kicker);
_local4 = _local4 + 2;
}
stillLoading = false;
_global.__DISPATCH({type:"resumeSite"});
}
static function _buildInstance() {
_oI = new FileManager();
return(_oI);
}
static function ins() {
return(((_oI instanceof FileManager) ? (_oI) : (_buildInstance())));
}
}
Symbol 1173 MovieClip [__Packages.CNavigationStateManager] Frame 0
class CNavigationStateManager
{
var AppState, mcRoot, modalscreen, mcsIntro, mcsMenu, mcsNewGame, mcsContinueGame1, mcsContinueGame2, mcsPreGame, mcsGame, mcsResult, mcsGameOver, mcsOptions, mcsHighScore, mcsCredits, mcsHelp, mcsDialog, mcsPreloader;
function CNavigationStateManager (_mcroot) {
AppState = AS_IDLE;
mcRoot = _mcroot;
modalscreen = 0;
EventCenter.access().addEventListener("endScreen", this);
EventCenter.access().addEventListener("menuAccess", this);
}
function menuAccess(event) {
var _local2 = false;
if (event.tembus != undefined) {
_local2 = true;
}
switch (event.name) {
case "AddThisGames" :
getURL ("http://www.net-games.biz/downloads.php", "_blank");
break;
case "PlayMoreGames" :
getURL ("http://www.net-games.biz", "_blank");
break;
case "StartNewGame" :
SoundManager.ins().playMousedown();
if (CTournament.ins().tournamentPhase != -1) {
if (!_local2) {
visibleScreen(false, AppState);
}
changeAppState(AS_DIALOG);
return(undefined);
}
SoundManager.ins().playMousedown();
changeAppState(AS_NEWGAME);
break;
case "ContinueGame1" :
changeAppState(AS_CONTINUEGAME1);
break;
case "ContinueGame2" :
changeAppState(AS_CONTINUEGAME2);
break;
case "Options" :
SoundManager.ins().playMousedown();
if (!_local2) {
visibleScreen(false, AppState);
}
changeAppState(AS_OPTIONS);
break;
case "Help" :
SoundManager.ins().playMousedown();
if (!_local2) {
visibleScreen(false, AppState);
}
changeAppState(AS_HELP);
break;
case "HighScore" :
SoundManager.ins().playMousedown();
if (!_local2) {
visibleScreen(false, AppState);
}
changeAppState(AS_HIGHSCORE);
break;
case "Credits" :
SoundManager.ins().playMousedown();
if (!_local2) {
visibleScreen(false, AppState);
}
changeAppState(AS_CREDITS);
break;
case "Quit" :
SoundManager.ins().playMousedown();
changeAppState(AS_QUIT);
break;
case "Menu" :
SoundManager.ins().playMousedown();
changeAppState(AS_MENU);
}
}
function endScreen(event) {
switch (event.name) {
case "ScreenIntro" :
removeScreen(AS_INTRO);
changeAppState(AS_MENU);
break;
case "ScreenNewGame" :
SoundManager.ins().playMousedown();
removeScreen(AS_NEWGAME);
changeAppState(AS_CONTINUEGAME1);
break;
case "ScreenContinueGame1" :
SoundManager.ins().playMousedown();
removeScreen(AS_CONTINUEGAME1);
removeScreen(AS_CONTINUEGAME2);
if (event.tonew) {
changeAppState(AS_NEWGAME);
} else {
changeAppState(AS_PREGAME);
}
break;
case "ScreenContinueGame2" :
SoundManager.ins().playMousedown();
removeScreen(AS_CONTINUEGAME1);
removeScreen(AS_CONTINUEGAME2);
if (event.tonew) {
changeAppState(AS_NEWGAME);
} else {
changeAppState(AS_PREGAME);
}
break;
case "ScreenPreGame" :
SoundManager.ins().playMousedown();
removeScreen(AS_PREGAME);
removeScreen(AS_MENU);
changeAppState(AS_GAME);
break;
case "ScreenGame" :
removeScreen(AS_GAME);
changeAppState(AS_RESULT);
break;
case "ScreenResult" :
SoundManager.ins().playMousedown();
removeScreen(AS_RESULT);
if (event.round == 1) {
changeAppState(AS_PREGAME);
} else if (CTournament.ins().gameover) {
changeAppState(AS_GAMEOVER);
} else {
setScreen(AS_MENU);
if (CTournament.ins().tournamentPhase >= 4) {
changeAppState(AS_CONTINUEGAME2);
} else {
changeAppState(AS_CONTINUEGAME1);
}
}
break;
case "ScreenGameOver" :
SoundManager.ins().playMousedown();
removeScreen(AS_GAMEOVER);
setScreen(AS_MENU);
changeAppState(AS_CONTINUEGAME1);
break;
case "ScreenCredits" :
SoundManager.ins().playMousedown();
removeScreen(AS_CREDITS);
visibleScreen(true, AppState);
changeAppState(AS_MENU);
break;
case "ScreenOptions" :
SoundManager.ins().playMousedown();
removeScreen(AS_OPTIONS);
visibleScreen(true, AppState);
changeAppState(AS_MENU);
break;
case "ScreenHighScore" :
SoundManager.ins().playMousedown();
removeScreen(AS_HIGHSCORE);
visibleScreen(true, AppState);
changeAppState(AS_MENU);
break;
case "ScreenHelp" :
SoundManager.ins().playMousedown();
removeScreen(AS_HELP);
visibleScreen(true, AppState);
changeAppState(AS_MENU);
break;
case "ScreenDialog" :
SoundManager.ins().playMousedown();
visibleScreen(true, AppState);
removeScreen(AS_DIALOG);
if (event.select) {
removeScreen(AS_CONTINUEGAME1);
removeScreen(AS_CONTINUEGAME2);
removeScreen(AS_PREGAME);
CTournament.ins().endTournament();
changeAppState(AS_NEWGAME);
} else {
changeAppState(AS_MENU);
}
break;
case "ScreenPreloader" :
SoundManager.ins().playMousedown();
removeScreen(AS_PRELOADER);
changeAppState(AS_INTRO);
}
}
function removeScreen(screen) {
modalscreen = 0;
switch (screen) {
case AS_INTRO :
mcsIntro.removeMovieClip();
SoundManager.ins().playBGM();
break;
case AS_MENU :
mcsMenu.removeMovieClip();
break;
case AS_NEWGAME :
mcsNewGame.removeMovieClip();
break;
case AS_CONTINUEGAME1 :
mcsContinueGame1.removeMovieClip();
mcsContinueGame2.removeMovieClip();
break;
case AS_CONTINUEGAME2 :
mcsContinueGame1.removeMovieClip();
mcsContinueGame2.removeMovieClip();
break;
case AS_PREGAME :
mcsPreGame.removeMovieClip();
break;
case AS_GAME :
mcsGame.hide();
break;
case AS_RESULT :
mcsResult.removeMovieClip();
break;
case AS_GAMEOVER :
mcsGameOver.removeMovieClip();
break;
case AS_OPTIONS :
mcsOptions.removeMovieClip();
break;
case AS_HIGHSCORE :
mcsHighScore.removeMovieClip();
break;
case AS_CREDITS :
mcsCredits.removeMovieClip();
break;
case AS_HELP :
mcsHelp.removeMovieClip();
break;
case AS_DIALOG :
mcsDialog.removeMovieClip();
break;
case AS_PRELOADER :
mcsPreloader.removeMovieClip();
}
}
function setScreen(screen) {
switch (screen) {
case AS_PRELOADER :
var _local2 = {_x:0, _y:0};
mcsPreloader = mcRoot.attachMovie("mcCPreloaderScreen", "ScreenPreloader", 0, _local2);
mcsPreloader.show();
break;
case AS_INTRO :
_local2 = {_x:385.9, _y:287.6};
mcsIntro = mcRoot.attachMovie("mcCIntroScreen", "ScreenIntro", 0, _local2);
mcsIntro.show();
break;
case AS_MENU :
SoundManager.ins().addSpeaker();
_local2 = {_x:0, _y:0};
mcsMenu = mcRoot.attachMovie("mcCMenuScreen", "ScreenMenu", 1, _local2);
mcsMenu.show();
break;
case AS_NEWGAME :
_local2 = {_x:0, _y:0};
mcsNewGame = mcRoot.attachMovie("mcCNewGameScreen", "ScreenNewGame", 2, _local2);
mcsNewGame.show();
AppState = AS_NEWGAME;
break;
case AS_CONTINUEGAME1 :
_local2 = {_x:0, _y:0};
mcsContinueGame1 = mcRoot.attachMovie("mcCContinueGameScreen1", "ScreenContinueGame1", 3, _local2);
mcsContinueGame1.show();
AppState = AS_CONTINUEGAME1;
break;
case AS_CONTINUEGAME2 :
_local2 = {_x:0, _y:0};
mcsContinueGame2 = mcRoot.attachMovie("mcCContinueGameScreen2", "ScreenContinueGame2", 3, _local2);
mcsContinueGame2.show();
AppState = AS_CONTINUEGAME2;
break;
case AS_PREGAME :
_local2 = {_x:0, _y:0};
mcsPreGame = mcRoot.attachMovie("mcCPreGameScreen", "ScreenPreGame", 4, _local2);
mcsPreGame.show();
AppState = AS_PREGAME;
break;
case AS_GAME :
SoundManager.ins().fadeBGM(false);
AppState = AS_GAME;
_local2 = {_x:0, _y:0};
if (mcsGame == undefined) {
mcsGame = mcRoot.attachMovie("mcCGameScreen", "ScreenGame", 5, _local2);
}
mcsGame.show();
break;
case AS_RESULT :
SoundManager.ins().playBGM();
_local2 = {_x:0, _y:0};
mcsResult = mcRoot.attachMovie("mcCResultScreen", "ScreenResult", 6, _local2);
mcsResult.show();
AppState = AS_RESULT;
break;
case AS_GAMEOVER :
_local2 = {_x:0, _y:0};
mcsGameOver = mcRoot.attachMovie("mcCGameOverScreen", "ScreenGameOver", 7, _local2);
mcsGameOver.show();
AppState = AS_GAMEOVER;
break;
case AS_OPTIONS :
_local2 = {_x:0, _y:0};
mcsOptions = mcRoot.attachMovie("mcCOptionsScreen", "ScreenOptions", 8, _local2);
mcsOptions.show();
modalscreen = AS_OPTIONS;
break;
case AS_HIGHSCORE :
_local2 = {_x:0, _y:0};
mcsHighScore = mcRoot.attachMovie("mcCHighScoreScreen", "ScreenHighScore", 9, _local2);
mcsHighScore.show();
modalscreen = AS_HIGHSCORE;
break;
case AS_CREDITS :
_local2 = {_x:0, _y:0};
mcsCredits = mcRoot.attachMovie("mcCCreditsScreen", "ScreenCredits", 10, _local2);
mcsCredits.show();
modalscreen = AS_CREDITS;
break;
case AS_HELP :
_local2 = {_x:0, _y:0};
mcsHelp = mcRoot.attachMovie("mcCHelpScreen", "ScreenHelp", 11, _local2);
mcsHelp.show();
modalscreen = AS_HELP;
break;
case AS_DIALOG :
_local2 = {_x:0, _y:0};
mcsDialog = mcRoot.attachMovie("mcCDialogScreen", "ScreenDialog", 12, _local2);
mcsDialog.show();
modalscreen = AS_DIALOG;
}
}
function changeAppState(tostate) {
if (modalscreen != 0) {
removeScreen(modalscreen);
}
setScreen(tostate);
}
function visibleScreen(visibility, screen) {
switch (screen) {
case AS_PRELOADER :
mcsPreloader._visible = visibility;
break;
case AS_INTRO :
mcsIntro._visible = visibility;
break;
case AS_MENU :
mcsMenu._visible = visibility;
break;
case AS_NEWGAME :
mcsNewGame._visible = visibility;
break;
case AS_CONTINUEGAME1 :
mcsContinueGame1._visible = visibility;
break;
case AS_CONTINUEGAME2 :
mcsContinueGame2._visible = visibility;
break;
case AS_PREGAME :
mcsPreGame._visible = visibility;
break;
case AS_GAME :
mcsGame._visible = visibility;
break;
case AS_RESULT :
mcsResult._visible = visibility;
break;
case AS_GAMEOVER :
mcsGameOver._visible = visibility;
break;
case AS_OPTIONS :
mcsOptions._visible = visibility;
break;
case AS_HIGHSCORE :
mcsHighScore._visible = visibility;
break;
case AS_CREDITS :
mcsCredits._visible = visibility;
break;
case AS_HELP :
mcsHelp._visible = visibility;
case AS_DIALOG :
mcsDialog._visible = visibility;
}
}
static var AS_IDLE = 0;
static var AS_INTRO = 1;
static var AS_MENU = 2;
static var AS_NEWGAME = 3;
static var AS_CONTINUEGAME1 = 4;
static var AS_CONTINUEGAME2 = 5;
static var AS_PREGAME = 6;
static var AS_GAME = 7;
static var AS_RESULT = 8;
static var AS_OPTIONS = 9;
static var AS_HELP = 10;
static var AS_HIGHSCORE = 11;
static var AS_CREDITS = 12;
static var AS_QUIT = 13;
static var AS_GAMEOVER = 14;
static var AS_DIALOG = 15;
static var AS_PRELOADER = 16;
}
Symbol 103 MovieClip [tgroup] Frame 1
stop();
Symbol 103 MovieClip [tgroup] Frame 2
stop();
Symbol 170 MovieClip [flag] Frame 1
#initclip 131
Object.registerClass("flag", CNationalFlag);
#endinitclip
Symbol 180 MovieClip [Thumbrack2] Frame 1
#initclip 115
Object.registerClass("Thumbrack2", Thumbrack);
#endinitclip
Symbol 188 MovieClip [Scrollbar] Frame 1
#initclip 116
Object.registerClass("Scrollbar", Scrollbar);
#endinitclip
Symbol 195 MovieClip [mcCContinueGameScreen1] Frame 1
#initclip 117
Object.registerClass("mcCContinueGameScreen1", CContinueGameScreen1);
#endinitclip
stop();
Symbol 195 MovieClip [mcCContinueGameScreen1] Frame 2
stop();
Symbol 198 MovieClip [Scrollbarhorz] Frame 1
#initclip 118
Object.registerClass("Scrollbarhorz", Scrollbar);
#endinitclip
Symbol 201 MovieClip [mcCContinueGameScreen2] Frame 1
#initclip 119
Object.registerClass("mcCContinueGameScreen2", CContinueGameScreen2);
#endinitclip
stop();
Symbol 201 MovieClip [mcCContinueGameScreen2] Frame 2
stop();
Symbol 238 MovieClip [cornerkicker] Frame 1
stop();
Symbol 238 MovieClip [cornerkicker] Frame 9
indicator._visible = false;
Symbol 238 MovieClip [cornerkicker] Frame 25
_global.__DISPATCH({type:"gameevent", param:"cornerkick"});
Symbol 238 MovieClip [cornerkicker] Frame 35
stop();
Symbol 405 MovieClip [keeper] Frame 1
indicator._visible = false;
stop();
Symbol 405 MovieClip [keeper] Frame 18
_global.__DISPATCH({type:"keeperevent", param:"idle"});
Symbol 405 MovieClip [keeper] Frame 22
_global.__DISPATCH({type:"keeperevent", param:"adddown", tbmc:0.3});
Symbol 405 MovieClip [keeper] Frame 24
_global.__DISPATCH({type:"keeperevent", param:"adddown", tbmc:0.3});
Symbol 405 MovieClip [keeper] Frame 26
_global.__DISPATCH({type:"keeperevent", param:"adddown", tbmc:0.3});
Symbol 405 MovieClip [keeper] Frame 31
_global.__DISPATCH({type:"keeperevent", param:"block"});
Symbol 405 MovieClip [keeper] Frame 36
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 38
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 40
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 42
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 43
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 45
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 57
_global.__DISPATCH({type:"keeperevent", param:"downleft"});
Symbol 405 MovieClip [keeper] Frame 62
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 64
_global.__DISPATCH({type:"keeperevent", param:"aaddrightddleft", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 66
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 68
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 70
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 72
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 81
_global.__DISPATCH({type:"keeperevent", param:"downright"});
Symbol 405 MovieClip [keeper] Frame 101
_global.__DISPATCH({type:"keeperevent", param:"jump"});
Symbol 405 MovieClip [keeper] Frame 106
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 108
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 110
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 112
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 114
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 116
_global.__DISPATCH({type:"keeperevent", param:"addleft", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 127
_global.__DISPATCH({type:"keeperevent", param:"upleft"});
Symbol 405 MovieClip [keeper] Frame 132
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 134
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.5});
Symbol 405 MovieClip [keeper] Frame 136
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 138
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:1});
Symbol 405 MovieClip [keeper] Frame 140
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 142
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 153
_global.__DISPATCH({type:"keeperevent", param:"upright"});
Symbol 405 MovieClip [keeper] Frame 160
stop();
Symbol 405 MovieClip [keeper] Frame 176
stop();
Symbol 405 MovieClip [keeper] Frame 199
gotoAndPlay ("win");
Symbol 405 MovieClip [keeper] Frame 214
gotoAndPlay ("win2b");
Symbol 405 MovieClip [keeper] Frame 218
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.3});
Symbol 405 MovieClip [keeper] Frame 220
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.2});
Symbol 405 MovieClip [keeper] Frame 222
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.2});
Symbol 405 MovieClip [keeper] Frame 224
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.2});
Symbol 405 MovieClip [keeper] Frame 226
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.1});
Symbol 405 MovieClip [keeper] Frame 228
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:-0.1});
Symbol 405 MovieClip [keeper] Frame 230
_global.__DISPATCH({type:"keeperevent", param:"idle"});
Symbol 405 MovieClip [keeper] Frame 234
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.3});
Symbol 405 MovieClip [keeper] Frame 236
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 238
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 240
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.2});
Symbol 405 MovieClip [keeper] Frame 242
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 244
_global.__DISPATCH({type:"keeperevent", param:"addright", tbmc:0.1});
Symbol 405 MovieClip [keeper] Frame 246
_global.__DISPATCH({type:"keeperevent", param:"idle"});
Symbol 711 MovieClip [kicker] Frame 1
indicator._visible = false;
stop();
Symbol 711 MovieClip [kicker] Frame 2
stop();
Symbol 711 MovieClip [kicker] Frame 12
_global.__DISPATCH({type:"kickerevent", param:"runright"});
Symbol 711 MovieClip [kicker] Frame 22
_global.__DISPATCH({type:"kickerevent", param:"runleft"});
Symbol 711 MovieClip [kicker] Frame 31
_global.__DISPATCH({type:"kickerevent", param:"runup"});
Symbol 711 MovieClip [kicker] Frame 41
_global.__DISPATCH({type:"kickerevent", param:"rundown"});
Symbol 711 MovieClip [kicker] Frame 43
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:1});
Symbol 711 MovieClip [kicker] Frame 44
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 46
_global.__DISPATCH({type:"gameevent", param:"volleycontact"});
Symbol 711 MovieClip [kicker] Frame 53
_global.__DISPATCH({type:"gameevent", param:"volley"});
Symbol 711 MovieClip [kicker] Frame 59
_global.__DISPATCH({type:"gameevent", param:"headingcontact"});
Symbol 711 MovieClip [kicker] Frame 64
_global.__DISPATCH({type:"gameevent", param:"heading"});
Symbol 711 MovieClip [kicker] Frame 69
_global.__DISPATCH({type:"gameevent", param:"backflipcontact"});
Symbol 711 MovieClip [kicker] Frame 77
_global.__DISPATCH({type:"gameevent", param:"backflip"});
Symbol 711 MovieClip [kicker] Frame 82
_global.__DISPATCH({type:"gameevent", param:"chestvolleycontact"});
Symbol 711 MovieClip [kicker] Frame 89
_global.__DISPATCH({type:"gameevent", param:"chestvolleykick"});
Symbol 711 MovieClip [kicker] Frame 93
_global.__DISPATCH({type:"gameevent", param:"chestvolley"});
Symbol 711 MovieClip [kicker] Frame 96
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 97
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 98
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 99
_global.__DISPATCH({type:"gameevent", param:"divecontact"});
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 101
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 103
_global.__DISPATCH({type:"kickerevent", param:"addup", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 111
_global.__DISPATCH({type:"gameevent", param:"dive"});
Symbol 711 MovieClip [kicker] Frame 124
gotoAndPlay ("loose");
Symbol 711 MovieClip [kicker] Frame 148
stop();
Symbol 711 MovieClip [kicker] Frame 164
gotoAndPlay ("win");
Symbol 711 MovieClip [kicker] Frame 191
gotoAndPlay ("win2b");
Symbol 711 MovieClip [kicker] Frame 198
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 200
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 202
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 204
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 206
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 208
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 210
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 212
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 214
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 216
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 218
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 220
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 222
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 224
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 226
_global.__DISPATCH({type:"kickerevent", param:"addleft", tbmc:1});
Symbol 711 MovieClip [kicker] Frame 236
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 238
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 240
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 242
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 244
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 246
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 248
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 250
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 252
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 254
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 256
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 258
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 260
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 262
_global.__DISPATCH({type:"kickerevent", param:"addright", tbmc:0.5});
Symbol 711 MovieClip [kicker] Frame 268
gotoAndPlay ("win3");
Symbol 719 Button
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name, round:this.round});
}
Symbol 721 MovieClip [mcCCreditsScreen] Frame 1
#initclip 120
Object.registerClass("mcCCreditsScreen", CCreditsScreen);
#endinitclip
Instance of Symbol 106 MovieClip in Symbol 721 MovieClip [mcCCreditsScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 725 Button
on (release) {
endButton();
}
Symbol 745 MovieClip Frame 1
i = 0;
cf = 0;
numberOfBeams = 40;
myScale = 20 + random(80);
myBeam1._visible = true;
xyscalevar = 20 + random(80);
colorArray = ["FF", "00", "33", "99", "66", "CC"];
myColor = new Color(myBeam1);
myColor.setRGB((("0x" + colorArray[random(6)]) + colorArray[random(6)]) + colorArray[random(6)]);
do {
duplicateMovieClip ("myBeam1", "beam" + i, i);
setProperty("beam" + i, _rotation , random(360));
setProperty("beam" + i, _xscale , myScale + random(myScale));
setProperty("beam" + i, _yscale , myScale + random(myScale));
i = Number(i) + 1;
} while (Number(i) <= numberOfBeams);
setProperty("myBeam1", _visible , false);
Symbol 745 MovieClip Frame 2
cf = cf + 2;
if (cf >= 80) {
gotoAndPlay (1);
}
if (cf >= 10) {
setProperty("beam" + ((cf / 2) + 1), _alpha , 75);
setProperty("beam" + ((cf / 2) + 2), _alpha , 50);
setProperty("beam" + ((cf / 2) + 3), _alpha , 25);
setProperty("beam" + ((cf / 2) + 4), _alpha , 0);
setProperty("beam" + ((cf / 2) + 5), _alpha , 25);
setProperty("beam" + ((cf / 2) + 6), _alpha , 50);
setProperty("beam" + ((cf / 2) + 7), _alpha , 75);
setProperty("beam" + ((cf / 2) + 8), _alpha , 100);
setProperty("beam" + ((cf / 2) + 9), _alpha , 75);
setProperty("beam" + ((cf / 2) + 10), _alpha , 50);
setProperty("beam" + ((cf / 2) + 11), _alpha , 25);
setProperty("beam" + ((cf / 2) + 12), _alpha , 0);
setProperty("beam" + ((cf / 2) + 13), _alpha , 25);
setProperty("beam" + ((cf / 2) + 14), _alpha , 50);
setProperty("beam" + ((cf / 2) + 15), _alpha , 75);
setProperty("beam" + ((cf / 2) + 16), _alpha , 100);
setProperty("beam" + ((cf / 2) - 1), _alpha , 75);
setProperty("beam" + ((cf / 2) - 2), _alpha , 50);
setProperty("beam" + ((cf / 2) - 3), _alpha , 25);
setProperty("beam" + ((cf / 2) - 4), _alpha , 0);
setProperty("beam" + ((cf / 2) - 5), _alpha , 25);
setProperty("beam" + ((cf / 2) - 6), _alpha , 50);
setProperty("beam" + ((cf / 2) - 7), _alpha , 75);
setProperty("beam" + ((cf / 2) - 8), _alpha , 100);
setProperty("beam" + ((cf / 2) - 9), _alpha , 75);
setProperty("beam" + ((cf / 2) - 10), _alpha , 50);
setProperty("beam" + ((cf / 2) - 11), _alpha , 25);
setProperty("beam" + ((cf / 2) - 12), _alpha , 0);
setProperty("beam" + ((cf / 2) - 13), _alpha , 25);
setProperty("beam" + ((cf / 2) - 14), _alpha , 50);
setProperty("beam" + ((cf / 2) - 15), _alpha , 75);
setProperty("beam" + ((cf / 2) - 16), _alpha , 100);
}
ii = 0;
if (cf >= 61) {
myAlpha = 100 - ((cf - 61) * 4);
do {
if (getProperty("beam" + ii, _alpha) >= myAlpha) {
setProperty("beam" + ii, _alpha , myAlpha);
}
ii = Number(ii) + 1;
} while (Number(ii) <= numberOfBeams);
}
Symbol 745 MovieClip Frame 3
gotoAndPlay (2);
Symbol 749 MovieClip [mcCGameOverScreen] Frame 1
#initclip 121
Object.registerClass("mcCGameOverScreen", CGameOverScreen);
#endinitclip
stop();
Instance of Symbol 106 MovieClip in Symbol 749 MovieClip [mcCGameOverScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 749 MovieClip [mcCGameOverScreen] Frame 2
stop();
Symbol 776 MovieClip Frame 1
stop();
Symbol 776 MovieClip Frame 13
_global.__DISPATCH({type:"gameevent", param:"finishtransition", obyek:this});
Symbol 776 MovieClip Frame 63
_global.__DISPATCH({type:"gameevent", param:"incoming"});
stop();
Symbol 776 MovieClip Frame 102
_global.__DISPATCH({type:"gameevent", param:"incoming2"});
stop();
Symbol 794 MovieClip [ball] Frame 1
stop();
Symbol 794 MovieClip [ball] Frame 2
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 2
stop();
Symbol 795 MovieClip Frame 3
stop();
Symbol 795 MovieClip Frame 4
stop();
Symbol 795 MovieClip Frame 5
stop();
Symbol 795 MovieClip Frame 6
stop();
Symbol 795 MovieClip Frame 7
stop();
Symbol 795 MovieClip Frame 8
stop();
Symbol 795 MovieClip Frame 9
stop();
Symbol 795 MovieClip Frame 10
stop();
Symbol 795 MovieClip Frame 11
stop();
Symbol 807 Button
on (press) {
_global.__DISPATCH({type:"inGameMenu", name:"showmenu", obyek:this});
}
Symbol 813 Button
on (press) {
_global.__DISPATCH({type:"gameevent", param:"dialogendgame"});
}
Symbol 814 Button
on (press) {
_global.__DISPATCH({type:"gameevent", param:"dialognoendgame"});
}
Symbol 815 MovieClip Frame 1
stop();
Instance of Symbol 106 MovieClip in Symbol 815 MovieClip Frame 2
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Instance of Symbol 106 MovieClip in Symbol 815 MovieClip Frame 2
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Symbol 826 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"StartNewGame"});
}
Symbol 827 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"Options"});
}
Symbol 828 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"Help"});
}
Symbol 829 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"Credits"});
}
Symbol 830 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"AddThisGames"});
}
Symbol 831 Button
on (release) {
_global.__DISPATCH({type:"inGameMenu", name:"PlayMoreGames"});
}
Symbol 839 Button
on (press) {
_global.__DISPATCH({type:"gameevent", param:"playtutorial"});
}
Symbol 840 Button
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Symbol 885 MovieClip Frame 1
stop();
Instance of Symbol 106 MovieClip in Symbol 885 MovieClip Frame 2
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Instance of Symbol 106 MovieClip in Symbol 885 MovieClip Frame 2
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Instance of Symbol 106 MovieClip in Symbol 885 MovieClip Frame 13
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Instance of Symbol 106 MovieClip in Symbol 885 MovieClip Frame 13
on (press) {
_global.__DISPATCH({type:"gameevent", param:"skiptutorial"});
}
Symbol 886 MovieClip [mcCGameScreen] Frame 1
#initclip 122
Object.registerClass("mcCGameScreen", CGameScreen);
#endinitclip
Symbol 886 MovieClip [mcCGameScreen] Frame 22
_global.__DISPATCH({type:"gameevent", param:"playambience"});
Symbol 886 MovieClip [mcCGameScreen] Frame 106
_global.__DISPATCH({type:"gameevent", param:"startgamealready", obyek:this});
indicator._visible = false;
stop();
Symbol 888 Button
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 918 MovieClip Frame 1
function setColor(_shirt, _pants) {
trace(("Asdas " + _shirt) + _pants);
shirt.gotoAndStop(_shirt);
pants.gotoAndStop(_pants);
}
stop();
Symbol 923 MovieClip [mcCPreGameScreen] Frame 1
#initclip 123
Object.registerClass("mcCPreGameScreen", CPreGameScreen);
#endinitclip
Instance of Symbol 106 MovieClip in Symbol 923 MovieClip [mcCPreGameScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 933 MovieClip [mcCResultScreen] Frame 1
#initclip 124
Object.registerClass("mcCResultScreen", CResultScreen);
#endinitclip
Instance of Symbol 106 MovieClip in Symbol 933 MovieClip [mcCResultScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 937 Button
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name, round:this.round});
}
Symbol 938 Button
on (release) {
nextFrame();
}
Symbol 986 MovieClip [mcCHelpScreen] Frame 1
stop();
Instance of Symbol 934 MovieClip in Symbol 986 MovieClip [mcCHelpScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Instance of Symbol 934 MovieClip in Symbol 986 MovieClip [mcCHelpScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 986 MovieClip [mcCHelpScreen] Frame 2
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 3
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 4
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 5
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 6
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 7
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 8
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 9
stop();
Symbol 986 MovieClip [mcCHelpScreen] Frame 10
stop();
Symbol 988 MovieClip [Thumbrack] Frame 1
#initclip 125
Object.registerClass("Thumbrack", Thumbrack);
#endinitclip
Symbol 990 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"StartNewGame"});
}
Symbol 991 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"Options"});
}
Symbol 992 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"Help"});
}
Symbol 993 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"Credits"});
}
Symbol 994 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"AddThisGames"});
}
Symbol 995 Button
on (release) {
_global.__DISPATCH({type:"menuAccess", name:"PlayMoreGames"});
}
Symbol 996 MovieClip [mcCMenuScreen] Frame 1
#initclip 126
Object.registerClass("mcCMenuScreen", CMenuScreen);
#endinitclip
Symbol 1009 Button
on (release) {
select(false);
}
Symbol 1010 Button
on (release) {
select(true);
}
Symbol 1011 MovieClip [mcCDialogScreen] Frame 1
#initclip 127
Object.registerClass("mcCDialogScreen", CDialogScreen);
#endinitclip
Symbol 1013 Button
on (release) {
selectTeam();
}
Symbol 1021 MovieClip [mcCNewGameScreen] Frame 1
#initclip 128
Object.registerClass("mcCNewGameScreen", CNewGameScreen);
#endinitclip
Symbol 1030 MovieClip [CSlider] Frame 1
#initclip 129
Object.registerClass("CSlider", CSlider);
#endinitclip
Symbol 1037 MovieClip [mcCOptionsScreen] Frame 1
#initclip 130
Object.registerClass("mcCOptionsScreen", COptionsScreen);
#endinitclip
Instance of Symbol 106 MovieClip in Symbol 1037 MovieClip [mcCOptionsScreen] Frame 1
on (release) {
_global.__DISPATCH({type:"endScreen", name:this._name});
}
Symbol 1037 MovieClip [mcCOptionsScreen] Frame 2
setup();
stop();
Symbol 1041 MovieClip [arrow] Frame 1
stop();
Symbol 1041 MovieClip [arrow] Frame 20
gotoAndPlay (2);
Symbol 1043 MovieClip [ballshadow] Frame 1
stop();
Symbol 1043 MovieClip [ballshadow] Frame 2
stop();
Symbol 1045 MovieClip [bayball] Frame 1
stop();
Symbol 1045 MovieClip [bayball] Frame 2
stop();
Symbol 1046 MovieClip Frame 1
apreloader.gotoAndStop(1);
gs.gotoAndStop(1);
stop();