Frame 1
function doLoader() {
ratio = getBytesLoaded() / getBytesTotal();
loader_mc.bar_mc.gotoAndStop(ratio * 50);
if (ratio == 1) {
clearInterval(loader_int);
loader_mc.gotoAndPlay("out");
}
}
function stopLoader() {
clearInterval(loader_int);
gotoAndStop ("off");
trace("stopping Loader");
}
var ratio;
var FRAMES = 100;
loader_int = setInterval(doLoader, 5);
Frame 5
function stopLoader() {
}
project.init();
stop();
Symbol 10 MovieClip Frame 50
stop();
Symbol 11 MovieClip Frame 5
stop();
Symbol 11 MovieClip Frame 11
_parent.gotoAndStop("game");
stop();
Symbol 639 MovieClip [__Packages.smashing.rampage.Messenger] Frame 0
class smashing.rampage.Messenger
{
static var __addresses;
function Messenger () {
}
static function registerAddress(id, obj) {
if (__addresses == undefined) {
__addresses = {};
}
__addresses[id] = obj;
}
static function removeAddress(id) {
__addresses[id] = "";
}
static function sendMessage(id, message, args) {
if ((__addresses[id] != "") && (__addresses[id] != undefined)) {
__addresses[id].onMessageReceived(message, args);
return(undefined);
}
trace("[Messenger] Error locating message recipient " + id);
}
}
Symbol 640 MovieClip [__Packages.smashing.rampage.BaseEngine] Frame 0
class smashing.rampage.BaseEngine extends MovieClip
{
var __gameStartTime, __interval, isPaused, mouse, key;
function BaseEngine () {
super();
}
function init() {
__gameStartTime = getTimer();
__initInterval();
__initSounds();
__initGameState();
__initUI();
__initViewport();
__initMouse();
__initKey();
smashing.rampage.Messenger.registerAddress("engine", this);
}
function __initInterval() {
__interval = new smashing.IntervalEngine(this, "update");
__interval.startFast();
}
function __initSounds() {
}
function __initGameState() {
}
function __initUI() {
}
function __initViewport() {
}
function update(dt) {
}
function pause() {
isPaused = true;
}
function unpause() {
isPaused = false;
}
function onQuit() {
stopAllSounds();
destroy();
}
function destroy() {
__interval.clear();
__clearMouse();
__clearKey();
}
function __initMouse() {
mouse = {};
mouse.owner = this;
Mouse.addListener(mouse);
}
function __clearMouse() {
Mouse.removeListener(mouse);
}
function mouse_up() {
}
function mouse_down() {
}
function __initKey() {
key = {};
key.owner = this;
Key.addListener(key);
}
function __clearKey() {
Key.removeListener(key);
}
function key_down() {
}
function key_up() {
}
function onMessageReceived(message, args) {
this[message](args);
}
}
Symbol 641 MovieClip [__Packages.smashing.IntervalEngine] Frame 0
class smashing.IntervalEngine
{
var _uo, _uf, _update_interval, _last_update, _i, _ft, _el;
function IntervalEngine (update_object, update_function) {
_uo = update_object;
_uf = update_function;
}
function startFlat(FPS) {
_FPS = FPS;
_update_interval = 1 / FPS;
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flat_step", 0);
}
function startFlex() {
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flex_step", 0);
}
function startFast() {
_last_update = getTimer();
_i = setInterval(this, "_fast_step", 10);
}
function reset(Void) {
if (_i != undefined) {
clearInterval(_i);
}
_ft = 0;
_last_update = getTimer() * 0.001;
_lel = _MAX_FRAMETIME / 2;
}
function _flex_step(Void) {
_el = Math.min(_MAX_FRAMETIME, (-_last_update) + ((_last_update = getTimer() * 0.001)));
_lel = _lel - Math.max(-_MAX_TIMEDIFF, Math.min(_MAX_TIMEDIFF, _lel - _el));
_uo[_uf](_lel);
}
function _flat_step(Void) {
_ft = _ft + ((-_last_update) + ((_last_update = getTimer() * 0.001)));
if (_ft < _update_interval) {
return(undefined);
}
_uo[_uf](_ft);
_ft = 0;
}
function _fast_step(Void) {
_el = (-_last_update) + ((_last_update = getTimer()));
_uo[_uf](_el * 0.001);
}
function clear() {
clearInterval(_i);
}
var _MAX_TIMEDIFF = 0.005;
var _MIN_FPS = 5;
var _MAX_FRAMETIME = 1 / smashing.IntervalEngine.prototype._MIN_FPS;
var _lel = 0.2;
var _FPS = 0;
}
Symbol 642 MovieClip [__Packages.nickjr.dora.starmountaingolf.Engine] Frame 0
class nickjr.dora.starmountaingolf.Engine extends smashing.rampage.BaseEngine
{
var activeWorld, __holeData, cursor, cursor_mc, pause, __UI, __sounds, viewport_mc, __state, isPaused, __cursorIsFrozen, __cursorIsRolledOut, _xmouse, _ymouse, unpause, __transCallbackPath, __transCallbackFunc, __transCallbackProp, trans_mc, __interval, gotoAndStop, hole_mc, starpanel_mc, printable_effect_mc, printpopup_mc, printable_mc, getURL, mouse, __lastPointX, __pasteString, __lastPointY, key, __cursorIsX, mousebox_mc, topnav_mc, so, __gameStartTime;
function Engine () {
super();
}
function init() {
super.init();
trace("Init");
loadSharedObject();
activeWorld = new nickjr.dora.starmountaingolf.World();
activeWorld.init(this);
__holeData = [];
__hardLevels();
cursor = cursor_mc;
cursor._xscale = (cursor._yscale = 130);
hideCursor();
pause();
__UI.goScreen("splash");
}
function __initSounds() {
nickjr.dora.starmountaingolf.Sounds.init();
__sounds = nickjr.dora.starmountaingolf.Sounds.getInstance();
__sounds.generateSounds(viewport_mc);
}
function __initGameState() {
nickjr.dora.starmountaingolf.GameState.init();
__state = nickjr.dora.starmountaingolf.GameState.getInstance();
}
function __initUI() {
nickjr.dora.starmountaingolf.ui.UI.init();
__UI = nickjr.dora.starmountaingolf.ui.UI.getInstance();
__UI.linkEngine(this);
__UI.reset();
}
function __initViewport() {
smashing.rampage.Viewport.init(viewport_mc, 2, nickjr.dora.starmountaingolf.GameState.getInstance());
var _local2 = smashing.rampage.Viewport.getInstance();
_local2.setScrollport(1);
_local2.createGroup({name:"bg", index:0, slots:50});
_local2.createGroup({name:"ball", index:1, slots:10});
_local2.createGroup({name:"effect", index:2, slots:500});
_local2.createGroup({name:"player", index:3, slots:10});
_local2.initGroups();
nickjr.dora.starmountaingolf.GameCamera.init();
}
function update(dt) {
if (!isPaused) {
activeWorld.update(dt);
}
if ((!__cursorIsFrozen) && (!__cursorIsRolledOut)) {
cursor._x = _xmouse;
cursor._y = _ymouse;
}
__UI.update(dt);
updateAfterEvent();
}
function onSelectHole(t_data) {
__state.holeNum = t_data.num;
playTransition(this, "startHole");
}
function startHole() {
__state.reset();
__UI.goScreen("gameplay");
smashing.rampage.Viewport.getInstance().newView();
activeWorld.generate(__holeData[__state.holeNum]);
activeWorld.start();
unpause();
}
function playTransition(callbackPath, callbackFunc, callbackProp) {
__transCallbackPath = callbackPath;
__transCallbackFunc = callbackFunc;
if (callbackProp == undefined) {
__transCallbackProp = {};
} else {
__transCallbackProp = callbackProp;
}
trans_mc.gotoAndPlay("anim");
}
function onTransCallback() {
__transCallbackPath[__transCallbackFunc](__transCallbackProp);
}
function clear() {
activeWorld.clear();
smashing.rampage.Viewport.getInstance().newView();
}
function destroy() {
trace("Cleaning up Star Mountain golf");
__interval.clear();
__interval = null;
__clearMouse();
__clearKey();
__sounds.stopAll();
gotoAndStop("off");
}
function finalCleanup() {
__sounds.stopAll();
__sounds.changeVolume(0);
__sounds.changeVolume(0, "music");
}
function getHoleMovieClip() {
return(hole_mc);
}
function getStarPanelMovieClip() {
return(starpanel_mc);
}
function getTunnelInMovieClip(t_id) {
return(this[("tunnel" + t_id) + "_in"]);
}
function getTunnelOutMovieClip(t_id) {
return(this[("tunnel" + t_id) + "_out"]);
}
function getPrintableCardMC() {
return(printable_effect_mc);
}
function playWallEvents(t_data) {
var _local2 = t_data.events.length;
while (_local2--) {
this[t_data.events[_local2]].gotoAndPlay(2);
}
}
function onCompleteHole() {
pause();
__state.onCompleteHole();
__state.onUnlockHole(__state.holeNum + 1);
saveUser();
if (__state.isLastHole()) {
__state.mapProgressState = "win";
playTransition(__UI, "goScreenRemote", {screen:"win"});
return(undefined);
}
playTransition(__UI, "goScreenRemote", {screen:"map"});
}
function onOpenPrintable() {
smashing.rampage.Messenger.sendMessage("screen", "requestHush");
printpopup_mc.gotoAndStop(2);
printpopup_mc.print_mc.gotoAndStop(__state.printablesUnlocked + 1);
printpopup_mc.btn_invis.useHandCursor = false;
printpopup_mc.map_mc.gotoAndStop("print_3");
}
function onPressPrint() {
printable_mc.gotoAndStop(__state.printablesUnlocked + 1);
getURL("printasbitmap:#bframe", printable_mc.print_mc);
}
function onClosePrintable() {
smashing.rampage.Messenger.sendMessage("screen", "releaseHush");
printpopup_mc.gotoAndStop(1);
}
function onPressBackToMap() {
pause();
__sounds.stopVO();
playTransition(__UI, "goScreenRemote", {screen:"map"});
}
function onEndIntro() {
playTransition(__UI, "goScreenRemote", {screen:"help"});
}
function onEndHelp() {
playTransition(__UI, "goScreenRemote", {screen:"map"});
}
function onPressClearShared() {
clearSharedObject();
playTransition(__UI, "goScreenRemote", {screen:"splash"});
}
function __initMouse() {
mouse = {};
mouse.owner = this;
mouse.onMouseUp = function () {
this.owner.mouse_up();
};
mouse.onMouseDown = function () {
this.owner.mouse_down();
};
Mouse.addListener(mouse);
}
function __clearMouse() {
Mouse.removeListener(mouse);
}
function mouse_up() {
if (!isPaused) {
if (__cursorIsRolledOut) {
return(undefined);
}
activeWorld.onMouseUp();
}
}
function mouse_down() {
if (!isPaused) {
}
}
function recordPointToWallMap() {
if (__lastPointX == undefined) {
__pasteString = "";
__lastPointX = _xmouse;
__lastPointY = _ymouse;
return(undefined);
}
__pasteString = ((((((((__pasteString + "addWall( ") + __lastPointX) + " , ") + __lastPointY) + " , ") + _xmouse) + " , ") + _ymouse) + " );";
__pasteString = __pasteString + newline;
log((("Add point : " + _xmouse) + " , ") + _ymouse);
__lastPointX = _xmouse;
__lastPointY = _ymouse;
System.setClipboard(__pasteString);
}
function __initKey() {
key = {};
key.owner = this;
key.onKeyDown = function () {
this.owner.key_down();
};
Key.addListener(key);
}
function __clearKey() {
Key.removeListener(key);
}
function key_down() {
if (Key.getCode() == 32) {
}
}
function key_up() {
if (Key.getCode(32)) {
}
}
function lockCursor() {
cursor.gotoAndStop("locked");
__cursorIsX = true;
}
function unlockCursor() {
cursor.gotoAndStop("idle");
__cursorIsX = false;
}
function freezeCursor() {
__cursorIsFrozen = true;
cursor.gotoAndStop("down");
}
function unfreezeCursor() {
cursor.gotoAndStop("idle");
__cursorIsFrozen = false;
}
function showCursor() {
trace("Show! : " + __cursorIsRolledOut);
if (__cursorIsRolledOut) {
onRollOnField();
return(undefined);
}
if (cursor._visible) {
Mouse.hide();
return(undefined);
}
cursor._visible = true;
Mouse.hide();
cursor.gotoAndStop("idle");
__cursorIsX = false;
__cursorIsFrozen = false;
__cursorIsRolledOut = false;
mousebox_mc.onRollOver = function () {
smashing.rampage.Messenger.sendMessage("engine", "showCursor");
};
mousebox_mc.useHandCursor = false;
topnav_mc.onRollOver = function () {
smashing.rampage.Messenger.sendMessage("engine", "onRollOffField");
};
topnav_mc.useHandCursor = false;
}
function hideCursor() {
cursor._visible = false;
cursor.gotoAndStop("idle");
Mouse.show();
mousebox_mc.onRollOver = null;
mousebox_mc.useHandCursor = false;
__cursorIsFrozen = true;
__cursorIsRolledOut = false;
}
function onRollOffField() {
__cursorIsRolledOut = true;
cursor._visible = false;
Mouse.show();
}
function onRollOnField() {
__cursorIsRolledOut = false;
cursor._visible = true;
Mouse.hide();
}
function __addLevel(t_levelData) {
__holeData.push(t_levelData);
}
function __hardLevels() {
__holeData = [];
var _local3 = [new nickjr.dora.starmountaingolf.holes.Hole1(), new nickjr.dora.starmountaingolf.holes.Hole2(), new nickjr.dora.starmountaingolf.holes.Hole3(), new nickjr.dora.starmountaingolf.holes.Hole4(), new nickjr.dora.starmountaingolf.holes.Hole5(), new nickjr.dora.starmountaingolf.holes.Hole6(), new nickjr.dora.starmountaingolf.holes.Hole7(), new nickjr.dora.starmountaingolf.holes.Hole8(), new nickjr.dora.starmountaingolf.holes.Hole9()];
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].loadData();
__addLevel(_local3[_local2]);
_local2++;
}
}
function loadSharedObject() {
so = SharedObject.getLocal(__SHAREDOBJECT_NAME);
if (so.data.user == undefined) {
generateSaveFile();
} else {
loadSaveFile();
}
}
function clearSharedObject() {
so.clear();
generateSaveFile();
}
function generateSaveFile() {
__state.begin();
saveUser();
}
function saveUser() {
so.data.user = __state.getSaveData();
so.flush();
}
function loadSaveFile() {
__state.begin(so.data.user);
}
function onEraseSave() {
clearSharedObject();
}
function log(message) {
var _local1 = new LocalConnection();
_local1.send("_SILCtrace", "trace", message);
_local1.close();
trace(message);
}
function get gameStartTime() {
return(__gameStartTime);
}
function isMusicMuted() {
return(__sounds.muteMusic);
}
var __SHAREDOBJECT_NAME = "dorastarmountainso";
}
Symbol 643 MovieClip [__Packages.nickjr.dora.starmountaingolf.World] Frame 0
class nickjr.dora.starmountaingolf.World
{
var engine, __state, __sounds, __vectorToHole, __hole, __ball, __player, __event, __eventTimer, __timeoutVOTimer, __hasPlayerActed, __tooCloseAlternator, __effects, __isPutting, loop, __printableEffect, __walls, __hasStarPanel, __starPanel, __tunnels, __hdata, __camera;
function World (t_engine) {
}
function init(t_engine) {
engine = t_engine;
__state = nickjr.dora.starmountaingolf.GameState.getInstance();
__sounds = nickjr.dora.starmountaingolf.Sounds.getInstance();
smashing.rampage.Messenger.registerAddress("world", this);
}
function start() {
__vectorToHole = new smashing.Point3D(Math.abs(__ball.x - __hole.x), Math.abs(__ball.y - __hole.y), 0);
__ball.moveToPlayer(__player);
setState_Putting();
__event = "";
__eventTimer = 0;
__sounds.playVO("holeintro" + (__state.holeNum + 1));
__timeoutVOTimer = __TIMEOUT_VO_DEF;
__hasPlayerActed = false;
__tooCloseAlternator = false;
}
function clear() {
__effects = [];
}
function onMouseUp() {
if (((!__isPutting) || (__eventTimer > 0)) || ((_ymouse < 54) && ((_xmouse < 50) || (_xmouse > 560)))) {
return(undefined);
}
if (((Math.abs(_xmouse - __player.x) < __MIN_HIT_RADIUS) && (Math.abs(_ymouse - __player.y) < __MIN_HIT_RADIUS)) && ((Math.abs(__player.x - __hole.x) > __MIN_HIT_RADIUS) && (Math.abs(__player.y - __hole.y) > __MIN_HIT_RADIUS))) {
onPlayerClickingTooClose();
return(undefined);
}
__hasPlayerActed = true;
__player.onPutt();
__state.addTry();
setState_Watching();
}
function update(dt) {
if (dt > 0.2) {
dt = 0.2;
}
loop = __effects.length;
while (loop--) {
if (__effects[loop].doRemove) {
__effects.splice(loop, 1);
continue;
}
__effects[loop].updateAndRender(dt);
}
if (!__hasPlayerActed) {
__timeoutVOTimer = __timeoutVOTimer - dt;
if (__timeoutVOTimer < 0) {
__timeoutVOTimer = __TIMEOUT_VO_DEF;
__sounds.playVO("timeout");
}
}
if (__eventTimer > 0) {
__eventTimer = __eventTimer - dt;
if (__eventTimer <= 0) {
resolveEvent();
} else if (__event == "card") {
__printableEffect.update(dt);
}
return(undefined);
}
if (__isPutting) {
__player.updateAndRender(dt, __hole);
__ball.render(dt);
} else {
__player.animAndRender(dt);
if (__player.isSwingWindUp) {
return(undefined);
}
__ball.update(dt);
loop = __walls.length;
while (loop--) {
__ball.runSweepWallCollision(__walls[loop]);
}
__ball.render(dt);
if (__hasStarPanel) {
if (__ball.runRadiusCollision(__starPanel)) {
onBallHitStarPanel();
}
}
loop = __tunnels.length;
while (loop--) {
if (__ball.runRadiusCollision(__tunnels[loop])) {
onBallHitTunnel(__tunnels[loop]);
}
}
if (__ball.runRadiusCollision(__hole)) {
onBallHitHole();
} else if (__ball.isAtRest) {
smashing.rampage.Messenger.sendMessage("engine", "unfreezeCursor");
relocatePlayerToBall();
setState_Putting();
}
}
}
function testBallProgress() {
var _local2 = new smashing.Point3D(Math.abs(__ball.x - __hole.x), Math.abs(__ball.y - __hole.y), 0);
if (__vectorToHole.__get__length() > _local2.__get__length()) {
__sounds.playRandomGood();
} else if (__vectorToHole.__get__length() < (_local2.__get__length() + 50)) {
__sounds.playRandomBad();
}
__vectorToHole = _local2;
}
function setState_Putting() {
__isPutting = true;
__ball.setAtRest();
__player.onReady();
}
function setState_Watching() {
smashing.rampage.Messenger.sendMessage("engine", "freezeCursor");
__isPutting = false;
}
function relocatePlayerToBall() {
__player.moveToBall();
}
function onBallHitHole() {
__ball.onHitHole();
__hole.onHitBall();
startEvent("fiesta", 15);
__sounds.forceVO("fiesta");
__sounds.stopMusic();
}
function onBallHitStarPanel() {
__ball.setAtRest();
startEvent("starpanel", 5.5);
__sounds.stopVO();
__starPanel.onHitBall();
__hasStarPanel = false;
}
function onBallHitTunnel(t_tunnel) {
__ball.onHitTunnel(t_tunnel);
t_tunnel.onHitBall();
}
function onPlayerClickingTooClose() {
if (__tooCloseAlternator) {
__sounds.playVO("clickHelp2");
} else {
__sounds.playVO("clickHelp1");
}
__tooCloseAlternator = !__tooCloseAlternator;
}
function onDoraVOComplete(pArgs) {
if (__event == "fiesta") {
resolveEvent();
} else if (__event == "win") {
resolveEvent();
} else if (((pArgs.name == "holeintro4") || (pArgs.name == "holeintro8")) || (pArgs.name == "holeintro9")) {
__sounds.playVO("starcallout");
}
}
function startEvent(t_id, t_timer) {
__event = t_id;
__eventTimer = t_timer;
}
function resolveEvent() {
__eventTimer = -1;
if (__event == "fiesta") {
startEvent("win", 15);
if (__state.isLastHole()) {
__sounds.forceVO("top");
} else if (__state.tries == 1) {
__sounds.playRandomHoleInOne();
} else {
__sounds.playRandomGreat();
}
} else if (__event == "win") {
if (__state.isCurrentHolePrintableUnlocked()) {
smashing.rampage.Messenger.sendMessage("engine", "onCompleteHole");
} else {
startEvent("card", 4);
__printableEffect = new nickjr.dora.starmountaingolf.PrintableEffect(engine.getPrintableCardMC(), __state.holeNum + 1, __hole.x, __hole.y);
__sounds.forceVO("printable");
}
} else if (__event == "card") {
smashing.rampage.Messenger.sendMessage("engine", "onCompleteHole");
}
}
function generate(hdata) {
clear();
__hdata = hdata;
__camera = nickjr.dora.starmountaingolf.GameCamera.getInstance();
__camera.generate({x:300, y:200});
__ball = new nickjr.dora.starmountaingolf.ents.Ball({});
__player = new nickjr.dora.starmountaingolf.ents.Player({x:__hdata.player.x, y:__hdata.player.y, ball:__ball});
__hole = new nickjr.dora.starmountaingolf.ents.Hole({x:__hdata.hole.x, y:__hdata.hole.y, mc:engine.getHoleMovieClip()});
if (__hdata.starpanel == undefined) {
trace("No star panel");
__hasStarPanel = false;
} else {
trace("Has star panel!");
__hasStarPanel = true;
__starPanel = new nickjr.dora.starmountaingolf.ents.StarPanel({x:__hdata.starpanel.x, y:__hdata.starpanel.y, mc:engine.getStarPanelMovieClip(), eventmcs:__hdata.starpanel.eventmcs});
}
__walls = [];
var _local3 = __hdata.maps[0].length;
var _local2;
while (_local3--) {
_local2 = __hdata.maps[0][_local3];
__walls.push(new nickjr.dora.starmountaingolf.ents.Wall({p0:new smashing.Point3D(_local2.x1, _local2.y1), p1:new smashing.Point3D(_local2.x2, _local2.y2), impact:_local2.impact, eventmcs:_local2.eventmcs, mapchange:_local2.mapchange}));
}
__tunnels = [];
if (__hdata.hasTunnels) {
__hdata.generateTunnels();
_local3 = __hdata.tunnels.length;
while (_local3--) {
_local2 = __hdata.tunnels[_local3];
__tunnels.push(new nickjr.dora.starmountaingolf.ents.Tunnel({inx:_local2.inx, iny:_local2.iny, outx:_local2.outx, outy:_local2.outy, outangle:_local2.outangle, inmc:engine.getTunnelInMovieClip(_local2.id), outmc:engine.getTunnelOutMovieClip(_local2.outid)}));
}
}
}
function swapMaps(t_index) {
if (t_index == undefined) {
t_index = 1;
}
__walls = [];
var _local3 = __hdata.maps[t_index].length;
var _local2;
while (_local3--) {
_local2 = __hdata.maps[t_index][_local3];
__walls.push(new nickjr.dora.starmountaingolf.ents.Wall({p0:new smashing.Point3D(_local2.x1, _local2.y1), p1:new smashing.Point3D(_local2.x2, _local2.y2), impact:_local2.impact, eventmcs:_local2.eventmcs, mapchange:_local2.mapchange}));
}
}
function onBallWallCollision(t_data) {
var _local2 = t_data.wall;
playImpactEffect({impact:_local2.impact});
if (_local2.hasEvent) {
smashing.rampage.Messenger.sendMessage("engine", "playWallEvents", {events:_local2.eventmcs});
if (_local2.mapchange != -1) {
swapMaps(_local2.mapchange);
}
_local2.onEventTrigger();
}
}
function playImpactEffect(t_data) {
switch (t_data.impact) {
case "stars" :
__effects.push(new nickjr.dora.starmountaingolf.ents.EffectSparkle({x:__ball.x, y:__ball.y}));
break;
case "goo" :
__effects.push(new nickjr.dora.starmountaingolf.ents.EffectGoo({x:__ball.x, y:__ball.y}));
break;
case "snow" :
__effects.push(new nickjr.dora.starmountaingolf.ents.EffectSnow({x:__ball.x, y:__ball.y}));
}
}
function getPlayer() {
return(__player);
}
function get camera() {
return(__camera);
}
function onMessageReceived(message, args) {
this[message](args);
}
var __TIMEOUT_VO_DEF = 8;
var __MIN_HIT_RADIUS = 24;
}
Symbol 644 MovieClip [__Packages.nickjr.dora.starmountaingolf.GameState] Frame 0
class nickjr.dora.starmountaingolf.GameState
{
static var __instance;
var mapProgressState, holeNum, tries, hasChanged, holes, printablesUnlocked;
function GameState () {
}
static function init() {
__instance = new nickjr.dora.starmountaingolf.GameState();
}
static function getInstance() {
return(__instance);
}
function begin(t_data) {
if ((t_data == undefined) || (t_data.version != __VERSION)) {
trace("New User or New Version");
newData();
mapProgressState = "intro";
} else {
loadData(t_data);
clearMapProgressState();
}
holeNum = 0;
reset();
}
function clearMapProgressState() {
mapProgressState = "standard";
}
function reset() {
tries = 0;
hasChanged = true;
}
function newData() {
holes = [];
holes.push({num:1, state:1, best:0});
holes.push({num:2, state:0, best:0});
holes.push({num:3, state:0, best:0});
holes.push({num:4, state:0, best:0});
holes.push({num:5, state:0, best:0});
holes.push({num:6, state:0, best:0});
holes.push({num:7, state:0, best:0});
holes.push({num:8, state:0, best:0});
holes.push({num:9, state:0, best:0});
printablesUnlocked = 0;
}
function loadData(t_data) {
newData();
var _local3 = t_data.holes.split(",");
var _local4;
var _local2 = 0;
trace("Load Data -");
while (_local2 < _local3.length) {
trace((((("hole " + _local3[_local2]) + " ~ ") + _local3[_local2].charAt(0)) + " : ") + _local3[_local2].charAt(1));
_local4 = holes[Number(_local3[_local2].charAt(0)) - 1];
_local4.state = Number(_local3[_local2].charAt(1));
_local4.best = Number(_local3[_local2].charAt(2));
_local2++;
}
printablesUnlocked = t_data.printables;
}
function getSaveData() {
var _local3 = "";
var _local2 = 0;
while (_local2 < holes.length) {
if (_local3.length > 0) {
_local3 = _local3 + ",";
}
_local3 = _local3 + ((String(holes[_local2].num) + String(holes[_local2].state)) + String(holes[_local2].best));
_local2++;
}
trace("Save data : " + _local3);
return({version:__VERSION, holes:_local3, printables:printablesUnlocked});
}
function onUnlockHole(t_holeNum) {
if (t_holeNum > (holes.length - 1)) {
return(undefined);
}
trace("Unlock hole : " + holes[t_holeNum].num);
if (holes[t_holeNum].state == 0) {
holes[t_holeNum].state = 1;
return(true);
}
return(false);
}
function onCompleteHole() {
trace("Complete hole : " + holes[holeNum].num);
if ((holes[holeNum].best == 0) || (holes[holeNum].best > tries)) {
holes[holeNum].best = tries;
}
if (holes[holeNum].state == 1) {
holes[holeNum].state = 2;
printablesUnlocked++;
return(true);
}
return(false);
}
function isLastHole() {
return(holeNum == (holes.length - 1));
}
function isCurrentHolePrintableUnlocked() {
return(holes[holeNum].state == 2);
}
function addTry() {
tries++;
hasChanged = true;
}
function getBest() {
return(holes[holeNum].best);
}
var SCREEN_WIDTH = Stage.width;
var SCREEN_HEIGHT = Stage.height;
var HALF_WIDTH = Stage.width / 2;
var HALF_HEIGHT = Stage.height / 2;
var sc = {x:Stage.width / 2, y:Stage.height / 2};
var __VERSION = "1.10";
}
Symbol 645 MovieClip [__Packages.smashing.sound.SoundEngine] Frame 0
class smashing.sound.SoundEngine
{
var __mc, o_sounds, o_groups, __a_soundQueue, __flag_muted, __flag_overwrite, __groupCount, __callbackPath, __callbackFunc;
function SoundEngine () {
}
function generateSounds(t_path, t_depth, t_overwrite) {
__mc = t_path.createEmptyMovieClip(__DEFAULTMCNAME, t_depth);
o_sounds = {};
o_groups = {};
__a_soundQueue = [];
__flag_muted = false;
if (t_overwrite == undefined) {
t_overwrite = false;
}
__flag_overwrite = t_overwrite;
__groupCount = 0;
createGroup(__DEFAULTGROUPNAME);
trace("-- Init Sound Engine -- ");
}
function setCallback(path, func) {
__callbackPath = path;
__callbackFunc = func;
}
function createGroup(t_name) {
__groupCount++;
var _local2 = __mc.createEmptyMovieClip(t_name, __groupCount);
_local2.soundObject = new Sound(_local2);
o_groups[t_name] = _local2;
}
function createSound(t_name, t_assetID, t_groupName, doCallback) {
var _local4;
if (((t_groupName == undefined) || (t_groupName == "")) || (t_groupName == null)) {
_local4 = o_groups[__DEFAULTGROUPNAME];
} else {
_local4 = o_groups[t_groupName];
}
if (_local4 != undefined) {
var _local2 = {};
_local2.soundEffect = new Sound(_local4);
_local2.soundEffect.attachSound(t_assetID);
if (doCallback == undefined) {
doCallback = false;
}
_local2.doCallback = doCallback;
o_sounds[t_name] = _local2;
} else {
trace(("Error Locating Group " + t_groupName) + " for create Sound");
}
}
function playSound(t_soundName, t_loops, t_queued) {
if (__flag_muted) {
return(undefined);
}
var _local2 = o_sounds[t_soundName];
_soundList[_soundCount] = t_soundName;
_soundCount++;
if (_local2 != undefined) {
if (t_loops == undefined) {
t_loops = 1;
} else if (t_loops == 0) {
t_loops = 100000 /* 0x0186A0 */;
}
if (__flag_overwrite) {
_local2.soundEffect.stop();
}
if (t_queued == true) {
__a_soundQueue[0].doCallback = _local2.doCallback;
_local2.soundEffect.onSoundComplete = mx.utils.Delegate.create(this, onQueuedSoundComplete);
} else if (_local2.doCallback) {
trace("Setting callback");
_local2.soundEffect.owner = this;
_local2.soundEffect.myName = t_soundName;
_local2.soundEffect.onSoundComplete = function () {
this.owner.onCallbackSoundComplete(this.myName);
};
}
_local2.soundEffect.start(0, t_loops);
} else {
trace(("Error - sound " + t_soundName) + " not found");
}
}
function stopEachSound() {
var _local3;
var _local2;
_local2 = 0;
while (_local2 < _soundCount) {
_local3 = o_sounds[_soundList[_local2]];
_local3.soundEffect.stop();
_local2++;
}
}
function stopSound(t_soundName) {
o_sounds[t_soundName].soundEffect.stop();
}
function stopAll() {
trace("STOP ALL");
clearQueue();
stopAllSounds();
}
function changeVolume(t_vol, t_groupName) {
if (t_groupName == undefined) {
t_groupName = __DEFAULTGROUPNAME;
}
o_groups[t_groupName].soundObject.setVolume(t_vol);
}
function toggleSound() {
if (__flag_muted) {
soundOn();
} else {
soundOff();
}
return(!__flag_muted);
}
function soundOff() {
__flag_muted = true;
}
function soundOn() {
__flag_muted = false;
}
function callbackSound(t_soundName, t_loops, path, func) {
trace("Call back used " + t_soundName);
playSound(t_soundName, t_loops, false);
var _local2 = o_sounds[t_soundName];
_local2.soundEffect.cbpath = path;
_local2.soundEffect.cbfunc = func;
_local2.soundEffect.onSoundComplete = function () {
this.onSoundComplete = null;
this.cbpath[func]();
};
}
function onCallbackSoundComplete(name) {
__callbackPath[__callbackFunc](name);
}
function queueSound(t_soundName) {
__a_soundQueue.push({soundName:t_soundName, isPlaying:false, doCallback:false});
__playQueue();
}
function __playQueue() {
if (__a_soundQueue.length == 0) {
return(undefined);
}
if (!__a_soundQueue[0].isPlaying) {
playSound(__a_soundQueue[0].soundName, 1, true);
__a_soundQueue[0].isPlaying = true;
}
}
function onQueuedSoundComplete() {
trace(("Sound " + __a_soundQueue[0].sound) + " complete.");
if (__a_soundQueue[0].doCallback) {
onCallbackSoundComplete(__a_soundQueue[0].soundName);
}
__a_soundQueue.splice(0, 1);
__playQueue();
}
function clearQueue() {
__a_soundQueue = [__a_soundQueue[0]];
}
function get queueLength() {
return(__a_soundQueue.length);
}
function get isQueuePlaying() {
if (__a_soundQueue.length == 0) {
return(false);
}
return(true);
}
var __DEFAULTMCNAME = "soundEngine_MC";
var __DEFAULTGROUPNAME = "sound";
var _soundList = [];
var _soundCount = 0;
}
Symbol 646 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 647 MovieClip [__Packages.nickjr.dora.starmountaingolf.Sounds] Frame 0
class nickjr.dora.starmountaingolf.Sounds extends smashing.sound.SoundEngine
{
static var __instance;
var createGroup, changeVolume, __currentMusic, __currentVO, __isPlayingVO, setCallback, stopSound, muteSound, queueSound, callbackSound, muteMusic, clearQueue, stopEachSound, __get__isQueuePlaying;
function Sounds () {
super();
}
static function init() {
__instance = new nickjr.dora.starmountaingolf.Sounds();
}
static function getInstance() {
return(__instance);
}
function generateSounds(path) {
super.generateSounds(path, __DEPTH, __DO_OVERWRITE);
createGroup("music");
createSound("menu", "dsm_map_loop.wav", "music");
createSound("map", "dsm_main_loop.wav", "music");
createSound("game1", "dsm_holes123_loop.wav", "music");
createSound("game2", "dsm_holes456_loop.wav", "music");
createSound("game3", "dsm_holes789_loop.wav", "music");
changeVolume(60);
createSound("starcallout", "dsm_34.wav");
createSound("holeintro1", "dsm_18.wav");
createSound("holeintro2", "dsm_19.wav");
createSound("holeintro3", "dsm_20.wav");
createSound("holeintro4", "dsm_21.wav");
createSound("holeintro5", "dsm_22.wav");
createSound("holeintro6", "dsm_23.wav");
createSound("holeintro7", "dsm_24.wav");
createSound("holeintro8", "dsm_25.wav");
createSound("holeintro9", "dsm_26.wav");
createSound("good1", "dsm_04.wav");
createSound("good2", "dsm_05.wav");
createSound("good3", "dsm_06.wav");
createSound("good4", "dsm_07.wav");
createSound("good5", "dsm_08.wav");
createSound("good6", "dsm_09.wav");
createSound("good7", "dsm_10.wav");
createSound("great1", "dsm_11.wav");
createSound("great2", "dsm_12.wav");
createSound("great3", "dsm_13.wav");
createSound("great4", "dsm_14.wav");
createSound("printable", "dsm_15.wav");
createSound("top", "dsm_16.wav");
createSound("timeout", "golfball_help.wav");
createSound("clickHelp2", "dsm_pu04.wav");
createSound("clickHelp1", "dsm_pu02.wav");
createSound("holeinone1", "dsm_pu08.wav");
createSound("holeinone2", "dsm_pu09.wav");
createSound("fiesta", "dsm_fiestratrio_fanfare.wav");
__currentMusic = "";
__currentVO = "";
__isPlayingVO = false;
setCallback(this, "onVOComplete");
}
function createSound(t_name, t_assetID, t_groupName, doCallback) {
if (t_groupName != "music") {
super.createSound(t_name, t_assetID, undefined, true);
} else {
super.createSound(t_name, t_assetID, t_groupName, false);
}
}
function onVOComplete(pName) {
__isPlayingVO = false;
__currentVO = "";
smashing.rampage.Messenger.sendMessage("world", "onDoraVOComplete", {name:pName});
}
function stopVO() {
if (!__isPlayingVO) {
return(undefined);
}
stopSound(__currentVO);
__isPlayingVO = false;
__currentVO = "";
}
function playVO(name) {
if (__isPlayingVO) {
return(undefined);
}
__isPlayingVO = true;
__currentVO = name;
playSound(name, 1);
}
function forceVO(name) {
if (__isPlayingVO && (__currentVO != "")) {
stopVO();
}
__isPlayingVO = false;
playVO(name);
}
function playRandomGood() {
var _local2 = Math.ceil(Math.random() * 7);
if (_local2 == 0) {
_local2 = 1;
}
playVO("good" + _local2);
}
function playRandomBad() {
}
function playRandomHoleInOne() {
var _local2 = Math.ceil(Math.random() * 2);
if (_local2 == 0) {
_local2 = 1;
}
forceVO("holeinone" + _local2);
}
function playRandomGreat() {
var _local2 = Math.ceil(Math.random() * 4);
if (_local2 == 0) {
_local2 = 1;
}
forceVO("great" + _local2);
}
function playSound(name, loops) {
if (muteSound == true) {
return(undefined);
}
super.playSound(name, loops);
}
function p(name) {
playSound(name, 1);
}
function q(name) {
queueSound(name);
}
function c(name, cbpath, cbfunc) {
callbackSound(name, 1, cbpath, cbfunc);
}
function playMusic(name) {
if (muteMusic) {
__currentMusic = name;
return(undefined);
}
if (name == undefined) {
name = __currentMusic;
}
if ((__currentMusic != "") && (__currentMusic != undefined)) {
stopMusic();
}
__currentMusic = name;
playSound(__currentMusic, 0);
}
function stopMusic() {
stopSound(__currentMusic);
}
function stopAll() {
clearQueue();
stopMusic();
stopVO();
stopEachSound();
}
function playOptional(t_name) {
if (!__get__isQueuePlaying()) {
queueSound(t_name);
}
}
var __DEPTH = 20;
var __DO_OVERWRITE = false;
}
Symbol 648 MovieClip [__Packages.smashing.Point3D] Frame 0
class smashing.Point3D
{
var x, y, z;
function Point3D (x, y, z) {
this.x = Number(x);
this.y = Number(y);
if (z == undefined) {
z = 0;
}
this.z = Number(z);
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
if (length != 0) {
var _local2 = newLength / length;
x = x * _local2;
y = y * _local2;
z = z * _local2;
}
//return(length);
}
function get lengthSqu() {
return(((x * x) + (y * y)) + (z * z));
}
function copy() {
return(new smashing.Point3D(x, y, z));
}
function addPoint(p) {
return(new smashing.Point3D(p.x + x, p.y + y, p.z + z));
}
function subtractPoint(p) {
return(new smashing.Point3D(x - p.x, y - p.y, z - p.z));
}
function addScalar(n) {
return(new smashing.Point3D(x + n, y + n, z + n));
}
function subtractScalar(n) {
return(new smashing.Point3D(x - n, y - n, z - n));
}
function addPointMe(p) {
x = x + p.x;
y = y + p.y;
z = z + p.z;
}
function subtractPointMe(p) {
x = x - p.x;
y = y - p.y;
z = z - p.z;
}
function addScalarMe(n) {
x = x + n;
y = y + n;
z = z + n;
}
function subtractScalarMe(n) {
x = x - n;
y = y - n;
z = z - n;
}
function multiply(n) {
var _local2 = copy();
_local2.x = _local2.x * n;
_local2.y = _local2.y * n;
_local2.z = _local2.z * n;
return(_local2);
}
function divide(n) {
var _local2 = copy();
if (n == 0) {
_local2.x = 0;
_local2.y = 0;
_local2.z = 0;
return(undefined);
}
_local2.x = _local2.x / n;
_local2.y = _local2.y / n;
_local2.z = _local2.z / n;
return(_local2);
}
function multiplyMe(n) {
x = x * n;
y = y * n;
z = z * n;
}
function divideMe(n) {
x = x / n;
y = y / n;
z = z / n;
}
function dot(p) {
return(((x * p.x) + (y * p.y)) + (z * p.z));
}
function cross(p) {
return(new smashing.Point3D((y * p.z) - (z * p.y), (z * p.x) - (x * p.z), (x * p.y) - (y * p.x)));
}
function pseudoCross() {
return(new smashing.Point3D(y, -x, z));
}
function normalize() {
if (((!x) && (!y)) && (!z)) {
return(undefined);
}
var _local2 = length;
return(new smashing.Point3D(x / _local2, y / _local2, z / _local2));
}
function normalizeMe() {
if ((!x) && (!y)) {
return(undefined);
}
var _local2 = length;
x = x / _local2;
y = y / _local2;
z = z / _local2;
}
function reverse() {
var _local2 = new smashing.Point3D(x * -1, y * -1, z * -1);
return(_local2);
}
function reverseMe() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function findCosine(vOther) {
var _local3 = dot(vOther);
var _local4 = length * vOther.__get__length();
var _local2 = _local3 / _local4;
return(_local2);
}
function equals(p) {
if (((x == p.x) && (y == p.y)) && (z == p.z)) {
return(true);
}
return(false);
}
function zero() {
x = 0;
y = 0;
z = 0;
}
function distSqu(p) {
var _local4 = p.x - x;
var _local3 = p.y - y;
var _local2 = p.z - z;
return(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2));
}
function toString() {
var _local2 = ((((("Point3D (" + x) + ",") + y) + ",") + z) + ")";
return(_local2);
}
}
Symbol 649 MovieClip [__Packages.nickjr.dora.starmountaingolf.PrintableEffect] Frame 0
class nickjr.dora.starmountaingolf.PrintableEffect
{
var __mc, __startX, __startY, __totalFrames, __ratio;
function PrintableEffect (pMc, pFrame, pX, pY) {
__mc = pMc;
__mc.gotoAndPlay(3);
__mc.card_mc.gotoAndStop(pFrame);
__startX = pX;
__startY = pY;
__totalFrames = __mc._totalframes;
}
function update(dt) {
__ratio = __mc._currentframe / __totalFrames;
__mc._x = __startX + (__ratio * (__END_X - __startX));
__mc._y = __startY + (__ratio * (__END_Y - __startY));
if (__ratio == 1) {
}
}
var __END_X = 300;
var __END_Y = 200;
}
Symbol 650 MovieClip [__Packages.smashing.rampage.BaseCamera] Frame 0
class smashing.rampage.BaseCamera
{
static var __instance;
var __gameState, x, y, z, fl, farClip, __bound_left, __bound_right, __bound_top, __bound_bottom, left, right, top, bottom;
function BaseCamera (t_data) {
}
static function init(t_path, t_depth, dimensions) {
__instance = new smashing.rampage.BaseCamera(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function generate(t_data) {
__gameState = getGameState();
x = (y = (z = 0));
if (t_data.x != undefined) {
x = t_data.x;
}
if (t_data.y != undefined) {
y = t_data.y;
}
if (t_data.z != undefined) {
z = t_data.z;
}
fl = __FL_DEF;
farClip = __DEF_CLIP;
refreshEdges();
}
function getGameState() {
return(new Object());
}
function update(dt) {
}
function setBounds(left, right, top, bottom) {
__bound_left = left + __gameState.HALF_WIDTH;
__bound_right = right - __gameState.HALF_WIDTH;
__bound_top = top + __gameState.HALF_HEIGHT;
__bound_bottom = bottom - __gameState.HALF_HEIGHT;
}
function enforceBounds() {
if (x < __bound_left) {
x = __bound_left;
} else if (x > __bound_right) {
x = __bound_right;
}
if (y < __bound_top) {
y = __bound_top;
} else if (y > __bound_bottom) {
y = __bound_bottom;
}
}
function refreshEdges() {
left = x - __gameState.HALF_WIDTH;
right = x + __gameState.HALF_WIDTH;
top = y - __gameState.HALF_HEIGHT;
bottom = y + __gameState.HALF_HEIGHT;
}
function get sc() {
return(__gameState.sc);
}
function screenWidth() {
return(__gameState.SCREEN_WIDTH);
}
function screenHeight() {
return(__gameState.SCREEN_WIDTH);
}
function halfWidth() {
return(__gameState.HALF_WIDTH);
}
function halfHeight() {
return(__gameState.HALF_HEIGHT);
}
function toString() {
return((((("Camera : focus : " + x) + " , ") + y) + " , ") + z);
}
var __DEF_CLIP = 100000;
var __FL_DEF = 1000;
var __EDGE_PADDING = 50;
}
Symbol 651 MovieClip [__Packages.nickjr.dora.starmountaingolf.GameCamera] Frame 0
class nickjr.dora.starmountaingolf.GameCamera extends smashing.rampage.BaseCamera
{
static var __instance;
function GameCamera () {
super();
}
static function init(t_path, t_depth, dimensions) {
__instance = new nickjr.dora.starmountaingolf.GameCamera(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function getGameState() {
return(nickjr.dora.starmountaingolf.GameState.getInstance());
}
function update(dt, player) {
}
var __ENFORCE_BOUNDS = true;
}
Symbol 652 MovieClip [__Packages.smashing.rampage.Renderable] Frame 0
class smashing.rampage.Renderable
{
var mc, baseWidth, baseHeight, hdWidth, hdHeight, radius, assetID, startX, startY, startZ, __camera, x, nextX, y, nextY, z, nextZ, depthInfluence, flipH, doUpdate, threedScale, __onscreen, isDrawn, isAlive, isHidden, scale, startScale, hdReg;
function Renderable (t_data) {
mc = null;
baseWidth = __DEF_WIDTH;
baseHeight = __DEF_HEIGHT;
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
} else {
hdWidth = __DEF_HD_WIDTH / 2;
hdHeight = __DEF_HD_HEIGHT / 2;
radius = hdWidth;
}
setHDRegistration();
init(t_data);
}
function init(t_data) {
if (t_data.asset == undefined) {
t_data.asset = __DEF_ASSET;
}
assetID = t_data.asset;
if (t_data.x == undefined) {
t_data.x = 0;
}
startX = t_data.x;
if (t_data.y == undefined) {
t_data.y = 0;
}
startY = t_data.y;
if (t_data.z == undefined) {
t_data.z = __DEF_Z;
}
startZ = t_data.z;
if (__camera != undefined) {
initScale();
}
x = (nextX = startX);
y = (nextY = startY);
z = (nextZ = startZ);
if (t_data.depthInfluence == undefined) {
t_data.depthInfluence = 0;
}
depthInfluence = t_data.depthInfluence;
if (t_data.flip != undefined) {
flip();
} else {
flipH = false;
}
doUpdate = __DO_UPDATE;
threedScale = __3D_SCALE;
__onscreen = false;
if (((mc == undefined) || (mc == null)) || (mc == "")) {
isDrawn = false;
}
isAlive = true;
isHidden = false;
}
function linkCamera(cam) {
__camera = cam;
if (startZ != undefined) {
initScale();
}
}
function onDraw(t_newmc) {
isDrawn = true;
mc = t_newmc;
if (isHidden) {
mc._visible = false;
}
if (__USE_ACTUAL_DIMENSIONS) {
baseWidth = mc._width;
baseHeight = mc._height;
setHDRegistration();
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
}
}
if (flipH) {
mc._xscale = -100;
}
mc._x = -1000 - baseWidth;
mc._y = -1000 - baseHeight;
}
function update(dt) {
}
function updateAndRender(dt) {
}
function render(dt) {
updateDraw();
if (!isDrawn) {
return(undefined);
}
if (threedScale) {
if (z < __camera.z) {
return(undefined);
}
var _local2 = __camera.fl / (z - __camera.z);
if (scale != _local2) {
scale = _local2;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
if (flipH) {
mc._xscale = mc._xscale * -1;
}
}
}
mc._x = ((x - __camera.x) * scale) + __camera.__get__sc().x;
mc._y = ((y - __camera.y) * scale) + __camera.__get__sc().y;
mc._x = x;
mc._y = y;
}
function renderDirect(camera) {
mc._x = x;
mc._y = y;
}
function initScale() {
startScale = (scale = __camera.fl / (startZ - __camera.z));
}
function updateDraw() {
__onscreen = false;
if (CUSTOMDRAW) {
__onscreen = true;
} else if (z >= __camera.z) {
if (((Math.abs((x - __camera.x) * scale) < (__camera.__get__sc().x + baseWidth)) && (Math.abs((y - __camera.y) * scale) < (__camera.__get__sc().y + baseHeight))) && ((z - __camera.z) < __camera.farClip)) {
__onscreen = true;
}
}
if ((!isDrawn) && (__onscreen)) {
smashing.rampage.Viewport.getInstance().draw({element:this});
} else if (isDrawn && (!__onscreen)) {
requestErase();
}
}
function onErase(t_viewport) {
isDrawn = false;
mc = null;
}
function requestErase() {
smashing.rampage.Viewport.getInstance().erase({element:this});
}
function requestDepthSort() {
smashing.rampage.Viewport.getInstance().requestGroupDepthSort(getDrawType());
}
function requestDepthChange() {
smashing.rampage.Viewport.getInstance().requestDepthChange(this);
}
function deleteMe() {
}
function kill() {
isAlive = false;
}
function hide() {
if (isDrawn) {
mc._visible = false;
}
isHidden = true;
}
function show() {
if (isDrawn) {
mc._visible = true;
}
isHidden = false;
}
function flip() {
flipH = true;
if (isDrawn) {
mc._xscale = -100;
}
}
function unflip() {
flipH = false;
if (isDrawn) {
mc._xscale = 100;
}
}
function toggleFlip() {
if (flipH) {
unflip();
} else {
flip();
}
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function runHD_entity_radius(t_target, dt) {
var _local4 = (nextX + hdReg.x) - (t_target.nextX + t_target.hdReg.x);
var _local3 = (nextY + hdReg.y) - (t_target.nextY + t_target.hdReg.y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= (t_target.radius + radius)) {
return(true);
}
return(false);
}
function runHD_entity_box(t_target, dt) {
if (Math.abs((nextX + hdReg.x) - (t_target.nextX + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((nextY + hdReg.y) - (t_target.nextY + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function runHD_entity_3D(t_target, dt) {
var _local3 = z - t_target.z;
var _local2 = (nextZ + radius) - t_target.z;
if ((_local3 * _local2) <= 0) {
return(runHD_entity_radius(t_target, dt));
}
return(false);
}
function runHD_line_sphere(t_lineStart, t_lineEnd, dt) {
var _local4 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local3 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local6 = _local4.x - _local3.x;
var _local7 = _local4.y - _local3.y;
var _local2 = getLineSeperation(_local3, {x:x, y:y}, _local6, _local7);
var _local5;
if (_local2.distance <= radius) {
_local5 = new smashing.Point3D(x + _local2.xSeparation, y + _local2.ySeparation);
return(true);
}
_local5.x = (_local5.y = 0);
return(false);
}
function runHD_line_sphere_complex(t_lineStart, t_lineEnd, dt) {
var _local5 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local7 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local8;
var _local16 = getDistBetween(_local5, {x:x, y:y});
var _local15 = getDistBetween(_local7, {x:x, y:y});
var _local11 = getDistBetween(_local5, _local7);
var _local4 = new smashing.Point3D(_local5.x, _local5.y);
var _local9 = new smashing.Point3D(_local7.x, _local7.y);
var _local12 = _local9.x - _local4.x;
var _local13 = _local9.y - _local4.y;
var _local3 = _local12 / _local11;
var _local2 = _local13 / _local11;
var _local10;
_local4.subtractScalarMe(_local3 * radius, _local2 * radius);
_local9.addScalarMe(_local3 * radius, _local2 * radius);
var _local6 = getLineSeperation(_local5, {x:x, y:y}, _local12, _local13);
_local12 = _local9.x - _local4.x;
_local13 = _local9.y - _local4.y;
var _local14 = getLineSeperation(_local4, {x:x, y:y}, _local12, _local13);
if (_local6.distance <= radius) {
if (_local15 > _local11) {
_local8 = Math.sqrt((radius * radius) - (_local14.distance * _local14.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local14.xSeparation) + _local3;
_local10 = (y + _local14.ySeparation) + _local2;
} else {
_local8 = Math.sqrt((radius * radius) - (_local6.distance * _local6.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local6.xSeparation) + _local3;
_local10 = (y + _local6.ySeparation) + _local2;
if (getDistBetween(_local5, _local10) >= _local11) {
_local10.copy(_local7);
}
}
return(true);
}
_local10.x = (_local10.y = 0);
return(false);
}
function getLineSeperation(p0, s, dx, dy) {
var _local1 = new Object();
var _local5 = p0.x - s.x;
var _local6 = p0.y - s.y;
var _local7 = (dx * dx) + (dy * dy);
var _local2 = (-((_local5 * dx) + (_local6 * dy))) / _local7;
_local2 = Math.min(Math.max(_local2, 0), 1);
_local1.xSeparation = _local5 + (_local2 * dx);
_local1.ySeparation = _local6 + (_local2 * dy);
_local1.distance = Math.sqrt((_local1.xSeparation * _local1.xSeparation) + (_local1.ySeparation * _local1.ySeparation));
return(_local1);
}
function getDistBetween(p0, p1) {
return(Math.sqrt((p1.x - p0.x) * (p1.x - p0.x)) + ((p1.y - p0.y) * (p1.y - p0.y)));
}
function hitReact(t_source) {
}
function getDrawType() {
return(DRAWTYPE);
}
function animate(t_frame, t_subFrame) {
mc.gotoAndStop(t_frame);
if (t_subFrame != undefined) {
mc.anim.gotoAndStop(t_subFrame);
}
}
function toString() {
return("Renderable: " + TYPE);
}
function drawHitBox() {
var _local3 = hdReg.x;
var _local4 = hdReg.y;
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.endFill();
}
function drawReg() {
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(-5, -5);
_local2.lineTo(5, -5);
_local2.lineTo(5, 5);
_local2.lineTo(-5, 5);
_local2.lineTo(-5, -5);
}
var TYPE = "element";
var DRAWTYPE = "element";
var __DEF_ASSET = "";
var __DEF_Z = 1000;
var __3D_SCALE = false;
var __DEF_WIDTH = 50;
var __DEF_HEIGHT = 50;
var __USE_ACTUAL_DIMENSIONS = true;
var CUSTOMDRAW = false;
var __DEF_HD_WIDTH = 25;
var __DEF_HD_HEIGHT = 25;
var __USE_DIMENSIONS_AS_HD = true;
var __DO_UPDATE = true;
}
Symbol 653 MovieClip [__Packages.smashing.rampage.Viewport] Frame 0
class smashing.rampage.Viewport
{
static var __a_groups, __o_groups, __dimensions, __viewportPath, __viewportDepth, __useScrollport, __instance, __scrollportDepth, mc, scrollmc;
function Viewport (t_path, t_depth, dimensions) {
__a_groups = [];
__o_groups = {};
__dimensions = dimensions;
__viewportPath = t_path;
__viewportDepth = t_depth;
__useScrollport = false;
trace("-- Init Viewport --");
}
static function init(t_path, t_depth, dimensions) {
__instance = new smashing.rampage.Viewport(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function setScrollport(t_depth) {
__useScrollport = true;
__scrollportDepth = t_depth;
}
function initGroups() {
var _local6 = __a_groups.length;
var _local2;
var _local5 = [];
var _local3 = 0;
while (_local5.length < _local6) {
_local2 = __a_groups.length;
while (_local2--) {
if (__a_groups[_local2].index < __a_groups[_local3].index) {
_local3 = _local2;
}
}
_local5.push(__a_groups[_local3]);
__a_groups.splice(_local3, 1);
}
__a_groups = _local5;
var _local4 = __defaultMCDepth;
_local2 = 0;
while (_local2 < __a_groups.length) {
_local4 = __a_groups[_local2].init(_local4);
_local4++;
_local2++;
}
newView();
}
function newView() {
var _local1 = __a_groups.length;
while (_local1--) {
__a_groups[_local1].reset();
}
if (mc != undefined) {
mc.removeMovieClip();
}
mc = __viewportPath.createEmptyMovieClip("viewport" + __viewportDepth, __viewportDepth);
if (__useScrollport) {
if (scrollmc != undefined) {
scrollmc.removeMovieClip();
}
scrollmc = __viewportPath.createEmptyMovieClip("scrollport" + __scrollportDepth, __scrollportDepth);
scrollmc.scrollRect = new flash.geom.Rectangle(0, 0, __dimensions.SCREEN_WIDTH + 1, __dimensions.SCREEN_HEIGHT);
}
}
function clearGroup(t_group) {
var _local2 = __o_groups[t_group].mcs;
while (_local2.length > 0) {
__eraseAsset(_local2[0].mc, t_group);
}
}
function draw(t_data) {
var _local4;
if (t_data.element != undefined) {
var _local3 = t_data.element;
_local4 = __drawElement(_local3);
if (_local4 != undefined) {
_local3.onDraw(_local4, getInstance());
// unexpected jump
}
trace("* Viewport Error: Error drawing asset " + _local3.assetID);
return(undefined);
}
if (t_data.assetID == "_empty") {
return(__drawEmpty(t_data.groupName, t_data.depth + t_data.depthInfluence));
}
return(__drawAsset(t_data.assetID, t_data.groupName, t_data.depth + t_data.depthInfluence));
}
function erase(t_data) {
if (t_data.element != undefined) {
__eraseAsset(t_data.element.mc, t_data.element.getDrawType());
t_data.element.onErase(getInstance());
} else {
__eraseAsset(t_data.mc, t_data.groupName);
}
}
function createGroup(t_data) {
__a_groups.push((__o_groups[t_data.name] = new smashing.rampage.ViewportGroup(t_data)));
}
function requestGroupDepthSort(t_group) {
__o_groups[t_group].requestDepthSort();
}
function requestDepthChange(t_element) {
__o_groups[t_element.getDrawType()].requestDepthChange(t_element);
}
function __drawElement(t_element) {
var _local7;
var _local2 = __o_groups[t_element.getDrawType()];
if (_local2 == undefined) {
trace(("* Viewport Error: GROUP " + t_element.getDrawType()) + " not found.");
return(undefined);
}
var _local6 = _local2.getDepth(((_local2.sortAxis == "") ? 0 : (t_element[_local2.sortAxis])) + t_element.depthInfluence);
var _local3 = mc;
if (_local2.scrollport) {
_local3 = scrollmc;
}
if (t_element.assetID == "_empty") {
var _local4 = _local3.createEmptyMovieClip(t_element.getDrawType() + _local6, _local6);
} else {
var _local4 = _local3.attachMovie(t_element.assetID, t_element.assetID + _local6, _local6);
}
_local2.mcs.push({mc:_local4, depth:_local6});
return(_local4);
}
function __drawAsset(t_asset, t_groupName, t_depth) {
var _local1 = __o_groups[t_groupName];
var _local6 = _local1.getDepth(t_depth);
var _local3 = mc;
if (_local1.scrollport) {
_local3 = scrollmc;
}
var _local2 = _local3.attachMovie(t_asset, t_asset + _local6, _local6);
_local1.mcs.push({mc:_local2, depth:_local6});
return(_local2);
}
function __drawEmpty(t_groupName, t_depth) {
if (t_groupName == undefined) {
t_groupName = __a_groups[0].name;
}
if (t_depth == undefined) {
t_depth = 1;
}
var _local4 = __o_groups[t_groupName];
var _local7 = _local4.getDepth(t_depth);
var _local3 = mc;
if (_local4.scrollport) {
_local3 = scrollmc;
}
var _local2 = _local3.createEmptyMovieClip(t_groupName + _local7, _local7);
__o_groups[t_groupName].mcs.push({mc:_local2, depth:_local7});
return(_local2);
}
function __eraseAsset(t_mc, t_groupName) {
var _local2 = __o_groups[t_groupName];
var _local1 = _local2.mcs.length;
while (_local1--) {
if (_local2.mcs[_local1].mc == t_mc) {
_local2.mcs[_local1].mc.removeMovieClip();
_local2.mcs.splice(_local1, 1);
return(undefined);
}
}
}
function toString() {
return("Viewport exists");
}
static var __defaultMCDepth = 100;
}
Symbol 654 MovieClip [__Packages.smashing.rampage.ViewportGroup] Frame 0
class smashing.rampage.ViewportGroup
{
var name, mcs, index, numSlots, sortAxis, ascending, reverse, scrollport, min, max, current, isSearching, loop;
function ViewportGroup (t_data) {
name = t_data.name;
mcs = [];
index = t_data.index;
numSlots = t_data.slots;
if (t_data.sortAxis == undefined) {
t_data.sortAxis = "";
}
sortAxis = t_data.sortAxis;
if ((sortAxis != "") && (numSlots < 10000)) {
numSlots = 10000;
}
if (t_data.ascending == undefined) {
t_data.ascending = false;
}
ascending = t_data.ascending;
if (t_data.reverse == undefined) {
t_data.reverse = false;
}
reverse = t_data.reverse;
if (t_data.scrollport == undefined) {
t_data.scrollport = false;
}
scrollport = t_data.scrollport;
}
function init(t_depth) {
min = t_depth;
max = t_depth + numSlots;
reset();
return(max);
}
function reset() {
mcs = [];
if (reverse) {
current = max;
} else {
current = min;
}
}
function requestDepthChange(t_element) {
t_element.mc.swapDepths(__getChangedDepth(t_element));
}
function requestDepthSort() {
trace("Request Depth Sort not implemented yet. Better get to work!");
}
function getDepth(t_depth) {
if (sortAxis != "") {
return(__getNewDepth(t_depth));
}
increment();
return(current);
}
function increment() {
isSearching = true;
while (isSearching) {
if (reverse) {
current--;
if (current < min) {
current = max;
}
} else {
current++;
if (current > max) {
current = min;
}
}
isSearching = false;
loop = mcs.length;
while (loop--) {
if (mcs[loop].depth == current) {
isSearching = true;
loop = 0;
}
}
}
}
function __getNewDepth(depth) {
if (depth < 0) {
trace("Error : Depth cannot be under zero");
return(undefined);
}
if (ascending) {
depth = min + Math.ceil(depth);
} else {
depth = max - Math.ceil(depth);
}
loop = mcs.length;
while (loop--) {
if (mcs[loop].depth == depth) {
if (ascending) {
depth++;
} else {
depth--;
}
loop = mcs.length;
}
}
return(depth);
}
function __getChangedDepth(t_element) {
var _local2 = Math.ceil(t_element[sortAxis]);
if (_local2 < 0) {
trace("Error : Depth cannot be under zero");
return(undefined);
}
if (ascending) {
_local2 = min + _local2;
} else {
_local2 = max - _local2;
}
var _local3 = -1;
loop = mcs.length;
while (loop--) {
if (mcs[loop].mc == t_element.mc) {
_local3 = loop;
} else if (mcs[loop].depth == _local2) {
if (ascending) {
_local2++;
} else {
_local2--;
}
loop = mcs.length;
}
}
mcs[_local3].depth = _local2;
return(_local2);
}
}
Symbol 655 MovieClip [__Packages.nickjr.dora.starmountaingolf.GameRenderable] Frame 0
class nickjr.dora.starmountaingolf.GameRenderable extends smashing.rampage.Renderable
{
var linkCamera;
function GameRenderable (t_data) {
super(t_data);
}
function init(t_data) {
super.init(t_data);
linkCamera(nickjr.dora.starmountaingolf.GameCamera.getInstance());
}
}
Symbol 656 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Entity] Frame 0
class nickjr.dora.starmountaingolf.ents.Entity extends nickjr.dora.starmountaingolf.GameRenderable
{
var startSpin, startVelocity, startGravity, doRemove, velocity, rotation, spin, isSpinning, __animation, kill, requestErase, isAlive, hdWidth, hdReg, x, hdHeight, y, z, mc, __isAnimating, DRAWTYPE, specialDepth;
function Entity (t_data) {
super(t_data);
}
function init(t_data) {
if (t_data.spin != undefined) {
startSpin = t_data.spin;
} else {
startSpin = 0;
}
if (t_data.vel != undefined) {
startVelocity = t_data.vel;
} else {
startVelocity = new smashing.Point3D(0, 0, 0);
}
if (t_data.gravity != undefined) {
startGravity = t_data.gravity;
} else {
startGravity = new smashing.Point3D(0, 0, 0);
}
doRemove = false;
super.init(t_data);
velocity = startVelocity.copy();
rotation = 0;
spin = startSpin;
if (startSpin == 0) {
isSpinning = false;
} else {
isSpinning = true;
}
__animation = __IDLE_ANIMATION;
}
function startDie() {
kill();
animate(__DEATH_ANIMATION);
if (__USES_VELOCITY) {
velocity.x = (velocity.y = 0);
}
}
function endDie() {
requestErase();
}
function onErase() {
super.onErase();
doRemove = true;
}
function updateDraw() {
if (doRemove || (!isAlive)) {
return(undefined);
}
super.updateDraw();
}
function runHD(t_target, dt) {
if (!(isAlive && (t_target.isAlive))) {
return(false);
}
if (Math.abs((x + hdReg.x) - (t_target.x + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((y + hdReg.y) - (t_target.y + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function hitReact(t_source) {
}
function onDraw(t_newmc) {
super.onDraw(t_newmc);
animateLoop(__animation);
}
function update(dt) {
updateAnim();
if (__USES_VELOCITY) {
x = x + (velocity.x * dt);
y = y + (velocity.y * dt);
z = z + (velocity.z * dt);
}
}
function updateAndRender(dt) {
updateAnim();
if (__USES_VELOCITY) {
x = x + (velocity.x * dt);
y = y + (velocity.y * dt);
z = z + (velocity.z * dt);
}
render(dt);
}
function render(dt) {
super.render(dt);
}
function animate(frame) {
if (frame != undefined) {
__animation = frame;
}
mc.gotoAndStop(__animation);
if (__animation == __IDLE_ANIMATION) {
__isAnimating = false;
} else {
__isAnimating = true;
}
}
function animateLoop(frame) {
if (frame != undefined) {
__animation = frame;
}
mc.gotoAndStop(__animation);
__isAnimating = false;
}
function updateAnim() {
if (__isAnimating) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
if (__animation == __DEATH_ANIMATION) {
endDie();
} else {
animateLoop(__IDLE_ANIMATION);
}
}
}
}
function freezeAnimation() {
mc.anim.stop();
}
function unfreezeAnimation() {
if (__isAnimating) {
mc.anim.play();
} else {
animate();
}
}
function replaceVelocity(t_vector) {
velocity = t_vector.copy();
}
function inputVelocity(t_vector) {
velocity.x = velocity.x + t_vector.x;
velocity.y = velocity.y + t_vector.y;
velocity.z = velocity.z + t_vector.z;
}
function addVelocity(t_vector, dt, maxVelocity, xMult, yMult, zMult) {
if (maxVelocity == undefined) {
maxVelocity = __MAX_VELOCITY;
}
zMult = 1;
yMult = 1;
xMult = 1;
if ((Math.abs(velocity.x) < maxVelocity) || ((velocity.x * t_vector.x) < 0)) {
velocity.x = velocity.x + ((t_vector.x * dt) * xMult);
}
if ((Math.abs(velocity.y) < maxVelocity) || ((velocity.y * t_vector.y) < 0)) {
velocity.y = velocity.y + ((t_vector.y * dt) * yMult);
}
if ((Math.abs(velocity.z) < maxVelocity) || ((velocity.z * t_vector.z) < 0)) {
velocity.z = velocity.z + ((t_vector.z * dt) * zMult);
}
}
function magnitudeToVector(t_magnitude, t_angle) {
var _local1;
var _local2;
var _local3 = t_angle * 0.01745329;
_local1 = t_magnitude * Math.cos(_local3);
_local1 = Math.round(_local1 * 100) / 100;
_local2 = t_magnitude * Math.sin(_local3);
_local2 = Math.round(_local2 * 100) / 100;
return(new smashing.Point3D(_local1, _local2, 0));
}
function getDrawType() {
return(((HAS_SPECIAL_DEPTH == true) ? ((DRAWTYPE + "_") + specialDepth) : (DRAWTYPE)));
}
function getIsAnimating() {
return(__isAnimating);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
var HAS_SPECIAL_DEPTH = false;
var __IDLE_ANIMATION = "idle";
var __DEATH_ANIMATION = "die";
var __MAX_VELOCITY = 300;
var __USES_VELOCITY = false;
}
Symbol 657 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Ball] Frame 0
class nickjr.dora.starmountaingolf.ents.Ball extends nickjr.dora.starmountaingolf.ents.Entity
{
var lastx, x, lasty, y, __vectorThisUpdate, velocity, __movementLineThisUpdate, isAtRest, magnitudeToVector, hide, __intersect;
function Ball (t_data) {
super(t_data);
}
function update(dt) {
lastx = x;
lasty = y;
super.update(dt);
__vectorThisUpdate = velocity.normalize();
__movementLineThisUpdate = new smashing.rampage.Line(new smashing.Point3D(lastx, lasty), new smashing.Point3D(x, y));
}
function moveToPlayer(player) {
x = player.x;
y = player.y;
}
function render(dt) {
super.render(dt);
if (!isAtRest) {
velocity.length = velocity.length - (__FRICTION * dt);
if (velocity.__get__length() < 2) {
setAtRest();
smashing.rampage.Messenger.sendMessage("world", "testBallProgress");
}
}
}
function setAtRest() {
velocity = new smashing.Point3D(0, 0, 0);
isAtRest = true;
}
function onHit(t_angle) {
trace("HIT!");
velocity = magnitudeToVector(400, t_angle);
isAtRest = false;
smashing.rampage.Messenger.sendMessage("world", "playEffect_Sparkle");
}
function onHitHole() {
hide();
setAtRest();
}
function onHitTunnel(t_tunnel) {
x = t_tunnel.outx;
y = t_tunnel.outy;
velocity = magnitudeToVector(velocity.__get__length(), t_tunnel.outangle);
}
function runSweepWallCollision(wall) {
if (__vectorThisUpdate.dot(wall.getFaceNormal()) < 0) {
__intersect = __movementLineThisUpdate.getSegmentIntersection(wall);
if (__intersect == null) {
return(undefined);
}
trace("Wall collision!");
x = __intersect.x + (__vectorThisUpdate.x * -1);
y = __intersect.y + (__vectorThisUpdate.y * -1);
velocity.addPointMe(wall.getFaceNormal().multiply(-2 * velocity.dot(wall.getFaceNormal())));
velocity.length = velocity.length * 0.9;
smashing.rampage.Messenger.sendMessage("world", "onBallWallCollision", {wall:wall});
}
}
function runRadiusCollision(t_target) {
if ((Math.abs(x - t_target.x) < t_target.RADIUS) && (Math.abs(y - t_target.y) < t_target.RADIUS)) {
return(true);
}
return(false);
}
var TYPE = "ball";
var DRAWTYPE = "ball";
var __DEF_ASSET = "golfball_mc";
var CUSTOMDRAW = true;
var __USES_VELOCITY = true;
var __FRICTION = 100;
}
Symbol 658 MovieClip [__Packages.smashing.rampage.Line] Frame 0
class smashing.rampage.Line
{
var p0, p1, vector, center, faceNormal, len, parametricDenomX, parametricDenomY, slope, bslope, yint, byint, det_inv, result, xseg, yseg;
function Line (t_p0, t_p1) {
p0 = t_p0;
p1 = t_p1;
vector = new smashing.Point3D(p1.x - p0.x, p1.y - p0.y, p1.z - p0.z);
center = new smashing.Point3D(p0.x + (vector.x / 2), p0.y + (vector.y / 2), p0.z + (vector.z / 2));
faceNormal = vector.pseudoCross().normalize();
len = Math.sqrt(((vector.x * vector.x) + (vector.y * vector.y)) + (vector.z * vector.z));
parametricDenomX = p1.x - p0.x;
parametricDenomY = p1.y - p0.y;
slope = vector.y / vector.x;
if (vector.x == 0) {
slope = 100000 /* 0x0186A0 */;
}
}
function setLength(t_length) {
var _local2 = t_length / len;
vector.multiplyMe(_local2);
p1 = new smashing.Point3D(p0.x + vector.x, p0.y + vector.y, p0.z + vector.z);
center = new smashing.Point3D(p0.x + (vector.x / 2), p0.y + (vector.y / 2), p0.z + (vector.z / 2));
len = t_length;
parametricDenomX = p1.x - p0.x;
parametricDenomY = p1.y - p0.y;
}
function getFaceNormal() {
return(faceNormal);
}
function getIntersection(t_line) {
bslope = t_line.slope;
yint = p0.y - (slope * p0.x);
byint = t_line.p0.y - (bslope * t_line.p0.x);
det_inv = 1 / ((slope * -1) - (bslope * -1));
return(new smashing.Point3D(((-1 * byint) - (-1 * yint)) * det_inv, ((bslope * yint) - (slope * byint)) * det_inv));
}
function getSegmentIntersection(t_line) {
bslope = t_line.slope;
yint = p0.y - (slope * p0.x);
byint = t_line.p0.y - (bslope * t_line.p0.x);
det_inv = 1 / ((slope * -1) - (bslope * -1));
result = new smashing.Point3D(((-1 * byint) - (-1 * yint)) * det_inv, ((bslope * yint) - (slope * byint)) * det_inv);
if (testPointSegmentOverlap(result) && (t_line.testPointSegmentOverlap(result))) {
return(result);
}
return(null);
}
function testPointSegmentOverlap(testPoint) {
if (parametricDenomX == 0) {
xseg = 0;
} else {
xseg = (testPoint.x - p0.x) / parametricDenomX;
}
if (parametricDenomY == 0) {
yseg = 0;
} else {
yseg = (testPoint.y - p0.y) / parametricDenomY;
}
if ((((xseg >= 0) && (xseg <= 1)) && (yseg >= 0)) && (yseg <= 1)) {
return(true);
}
return(false);
}
}
Symbol 659 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Player] Frame 0
class nickjr.dora.starmountaingolf.ents.Player extends nickjr.dora.starmountaingolf.ents.Entity
{
var __ball, isSwingWindUp, __wasLockedLastFrame, x, y, __xAngleCalc, mc, __yAngleCalc, __angle, __lastAngle, updateAnim, __animation, animateLoop, animate;
function Player (t_data) {
super(t_data);
__ball = t_data.ball;
isSwingWindUp = false;
__wasLockedLastFrame = false;
}
function updateAndRender(dt, pHole) {
super.updateAndRender(dt);
if (((Math.abs(_xmouse - x) < __MIN_TRACK_RADIUS) && (Math.abs(_ymouse - y) < __MIN_TRACK_RADIUS)) && ((Math.abs(x - pHole.x) > __MIN_TRACK_RADIUS) && (Math.abs(y - pHole.y) > __MIN_TRACK_RADIUS))) {
if (!__wasLockedLastFrame) {
smashing.rampage.Messenger.sendMessage("engine", "lockCursor");
}
__wasLockedLastFrame = true;
return(undefined);
}
if (__wasLockedLastFrame) {
smashing.rampage.Messenger.sendMessage("engine", "unlockCursor");
}
__wasLockedLastFrame = false;
__xAngleCalc = mc._x - _xmouse;
__yAngleCalc = mc._y - _ymouse;
if (__xAngleCalc >= 0) {
if (__yAngleCalc >= 0) {
__angle = 0;
} else {
__angle = 360;
}
} else {
__angle = 180;
}
__angle = __angle + (Math.atan(__yAngleCalc / __xAngleCalc) * 57.29578);
__angle = __angle + 180;
mc._rotation = __angle;
if (__angle < __lastAngle) {
mc.anim.gotoAndStop("shuffle_right");
if (mc.anim.anim._currentFrame > 9) {
mc.anim.gotoAndPlay(1);
}
} else if (__angle > __lastAngle) {
mc.anim.gotoAndStop("shuffle_left");
if (mc.anim.anim._currentFrame > 9) {
mc.anim.gotoAndPlay(1);
}
}
__lastAngle = __angle;
}
function animAndRender(dt) {
updateAnim();
if ((isSwingWindUp && (__animation == "swing")) && (mc.anim._currentFrame >= __PUTT_HIT_FRAME)) {
__ball.onHit(__angle);
isSwingWindUp = false;
}
super.render();
}
function onReady() {
animateLoop("ready");
}
function moveToBall() {
x = __ball.x;
y = __ball.y;
trace((((((((((("[PlayerPos] " + _x) + ", ") + _y) + " | ") + mc._x) + ", ") + mc._y) + " | ") + x) + ", ") + y);
}
function onPutt() {
animate("swing");
isSwingWindUp = true;
}
var TYPE = "player";
var DRAWTYPE = "player";
var __DEF_ASSET = "dora_mc";
var CUSTOMDRAW = true;
var __PUTT_HIT_FRAME = 23;
var __MIN_TRACK_RADIUS = 24;
}
Symbol 660 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Hole] Frame 0
class nickjr.dora.starmountaingolf.ents.Hole extends smashing.Point3D
{
var mc;
function Hole (t_data) {
super(t_data.x, t_data.y, t_data.z);
mc = t_data.mc;
}
function onHitBall() {
mc.gotoAndPlay("anim");
}
function blink() {
mc.gotoAndStop("blink");
}
var RADIUS = 9;
}
Symbol 661 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.StarPanel] Frame 0
class nickjr.dora.starmountaingolf.ents.StarPanel extends smashing.Point3D
{
var mc, eventmcs;
function StarPanel (t_data) {
super(t_data.x, t_data.y, t_data.z);
mc = t_data.mc;
eventmcs = t_data.eventmcs;
}
function onHitBall() {
mc.gotoAndPlay("anim");
smashing.rampage.Messenger.sendMessage("engine", "playWallEvents", {events:eventmcs});
smashing.rampage.Messenger.sendMessage("world", "swapMaps");
}
var RADIUS = 25;
}
Symbol 662 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Wall] Frame 0
class nickjr.dora.starmountaingolf.ents.Wall extends smashing.rampage.Line
{
var impact, mapchange, hasEvent, eventmcs, p0, p1, center, faceNormal;
function Wall (t_data) {
super(t_data.p0, t_data.p1);
impact = t_data.impact;
mapchange = t_data.mapchange;
if (t_data.eventmcs.length == 0) {
hasEvent = false;
} else {
eventmcs = t_data.eventmcs;
hasEvent = true;
}
}
function draw(mc) {
var _local2 = mc.createEmptyMovieClip("line", 1);
_local2.lineStyle(1, 0, 100);
_local2.moveTo(p0.x, p0.y);
_local2.lineTo(p1.x, p1.y);
_local2.moveTo(center.x, center.y);
_local2.lineTo(center.x + (faceNormal.x * 15), center.y + (faceNormal.y * 15));
}
function onEventTrigger() {
if (!hasEvent) {
return(undefined);
}
if (mapchange != -1) {
hasEvent = false;
}
}
}
Symbol 663 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Tunnel] Frame 0
class nickjr.dora.starmountaingolf.ents.Tunnel extends smashing.Point3D
{
var outx, outy, inmc, outmc, outangle;
function Tunnel (t_data) {
super(t_data.inx, t_data.iny, 0);
outx = t_data.outx;
outy = t_data.outy;
inmc = t_data.inmc;
outmc = t_data.outmc;
outangle = (t_data.outangle = t_data.outangle + (4 - (Math.random() * 8)));
inmc.gotoAndStop("glow");
trace("Tunnel angle : " + outangle);
}
function onHitBall() {
inmc.gotoAndPlay("in");
}
var RADIUS = 11;
}
Symbol 664 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.Effect] Frame 0
class nickjr.dora.starmountaingolf.ents.Effect extends nickjr.dora.starmountaingolf.ents.Entity
{
var isDrawn, mc, doRemove;
function Effect (t_data) {
super(t_data);
}
function updateAndRender(dt) {
if (isDrawn && (mc._currentFrame == mc._totalFrames)) {
requestErase();
return(undefined);
}
super.updateAndRender(dt);
}
function requestErase() {
doRemove = true;
super.requestErase();
}
var TYPE = "effect";
var DRAWTYPE = "effect";
var __USE_GRAVITY = true;
var __3D_SCALE = true;
var __DO_UPDATE = true;
}
Symbol 665 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.EffectSparkle] Frame 0
class nickjr.dora.starmountaingolf.ents.EffectSparkle extends nickjr.dora.starmountaingolf.ents.Effect
{
function EffectSparkle (t_data) {
super(t_data);
}
var __DEF_ASSET = "star_spark_impact";
}
Symbol 666 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.EffectGoo] Frame 0
class nickjr.dora.starmountaingolf.ents.EffectGoo extends nickjr.dora.starmountaingolf.ents.Effect
{
function EffectGoo (t_data) {
super(t_data);
}
var __DEF_ASSET = "goo_impact";
}
Symbol 667 MovieClip [__Packages.nickjr.dora.starmountaingolf.ents.EffectSnow] Frame 0
class nickjr.dora.starmountaingolf.ents.EffectSnow extends nickjr.dora.starmountaingolf.ents.Effect
{
function EffectSnow (t_data) {
super(t_data);
}
var __DEF_ASSET = "snow_impact";
}
Symbol 668 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.UI] Frame 0
class nickjr.dora.starmountaingolf.ui.UI
{
static var __instance;
var engine, __nextScreenID, __hasActiveScreen, __doesActiveScreenUpdate, __activeScreen, __previousScreenID, __activeScreenID;
function UI () {
}
static function init() {
__instance = new nickjr.dora.starmountaingolf.ui.UI();
}
static function getInstance() {
return(__instance);
}
function linkEngine(t_engine) {
engine = t_engine;
smashing.rampage.Messenger.registerAddress("ui", this);
}
function reset() {
__nextScreenID = "";
__hasActiveScreen = false;
__doesActiveScreenUpdate = false;
}
function update(dt) {
if (__doesActiveScreenUpdate) {
__activeScreen.update(dt);
}
}
function returnToPreviousScreen() {
__nextScreenID = __previousScreenID;
__activeScreen.close();
}
function goScreen(id) {
if (__hasActiveScreen) {
__nextScreenID = id;
__activeScreen.close();
} else {
openScreen(id);
}
}
function openScreen(id) {
if (id == undefined) {
id = __nextScreenID;
}
if (id == "") {
return(undefined);
}
__nextScreenID = "";
__previousScreenID = __activeScreenID;
__activeScreenID = id;
if (__activeScreenID == "gameplay") {
trace("Go hole : " + (nickjr.dora.starmountaingolf.GameState.getInstance().holeNum + 1));
engine.gotoAndStop("hole_" + (nickjr.dora.starmountaingolf.GameState.getInstance().holeNum + 1));
} else {
engine.gotoAndStop(__activeScreenID);
}
switch (__activeScreenID) {
case "splash" :
__activeScreen = new nickjr.dora.starmountaingolf.ui.Splash(engine.screen_mc, this);
break;
case "map" :
__activeScreen = new nickjr.dora.starmountaingolf.ui.Map(engine.screen_mc, this);
break;
case "gameplay" :
__activeScreen = new nickjr.dora.starmountaingolf.ui.GamePlay(engine.screen_mc, this);
break;
case "help" :
__activeScreen = new nickjr.dora.starmountaingolf.ui.Help(engine.screen_mc, this);
break;
case "win" :
__activeScreen = new nickjr.dora.starmountaingolf.ui.Win(engine.screen_mc, this);
break;
default :
trace("[UI] openScreen called with invalid id: " + __activeScreenID);
return(undefined);
}
__activeScreen.init();
__activeScreen.open();
smashing.rampage.Messenger.registerAddress("screen", __activeScreen);
__hasActiveScreen = true;
__doesActiveScreenUpdate = __activeScreen.DOES_UPDATE;
}
function onScreenClosed() {
if (__nextScreenID != "") {
openScreen(__nextScreenID);
}
}
function goScreenRemote(t_data) {
trace("Go screen remote! : " + t_data.screen);
if (t_data.screen == undefined) {
trace("Error: Go screen remote requires data format {screen:string}");
return(undefined);
}
goScreen(t_data.screen);
}
function onMessageReceived(message, args) {
this[message](args);
}
function get currentScreenID() {
return(__activeScreenID);
}
}
Symbol 669 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.Screen] Frame 0
class nickjr.dora.starmountaingolf.ui.Screen
{
var __mc, ui, __outroCallbackID, __outroCallbackPath, __isOpening, __isClosing, __isClosed, __outroCallbackArgs;
function Screen (mc, t_ui) {
__mc = mc;
ui = t_ui;
__outroCallbackID = (__outroCallbackPath = "");
}
function update(dt) {
if (__isOpening) {
if (__mc._currentFrame >= __OPENED_FRAME) {
onOpened();
}
} else if (__isClosing) {
if (__mc._currentFrame == __mc._totalFrames) {
onClosed();
}
}
}
function init() {
__isOpening = (__isClosing = false);
__isClosed = true;
}
function open() {
__isClosed = false;
if (__HAS_INTRO) {
__isOpening = true;
__mc.gotoAndPlay(__INTRO_FRAME);
} else {
onOpened();
}
}
function onOpened() {
__isOpening = false;
__mc.gotoAndStop(__OPENED_FRAME);
}
function close() {
if (__isClosed) {
ui.onScreenClosed();
return(undefined);
}
if (__HAS_OUTRO) {
__isClosing = true;
__mc.gotoAndPlay(__OUTRO_FRAME);
} else {
onClosed();
}
}
function onClosed() {
__isClosing = false;
__isClosed = true;
if (__outroCallbackID != "") {
smashing.rampage.Messenger.sendMessage(__outroCallbackPath, __outroCallbackID, __outroCallbackArgs);
__outroCallbackID = (__outroCallbackPath = "");
} else {
ui.onScreenClosed();
}
}
function closeThenCallback(callbackPath, callbackID, callbackArgs) {
__outroCallbackPath = callbackPath;
__outroCallbackID = callbackID;
__outroCallbackArgs = callbackArgs;
close();
}
function makeButton(mc) {
mc.screen = this;
}
function onMessageReceived(message, args) {
this[message](args);
}
function toString() {
return("Screen");
}
var __INTRO_FRAME = "intro";
var __OUTRO_FRAME = "outro";
var __HAS_INTRO = false;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 10;
var DOES_UPDATE = true;
}
Symbol 670 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.Splash] Frame 0
class nickjr.dora.starmountaingolf.ui.Splash extends nickjr.dora.starmountaingolf.ui.Screen
{
var __mc;
function Splash (mc, ui) {
super(mc, ui);
}
function open() {
super.open();
nickjr.dora.starmountaingolf.Sounds.getInstance().changeVolume(30, "music");
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("menu");
}
function update(dt) {
if (__mc._currentFrame == __mc._totalFrames) {
smashing.rampage.Messenger.sendMessage("ui", "goScreenRemote", {screen:"map"});
}
}
var __HAS_INTRO = true;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 100000;
var DOES_UPDATE = false;
}
Symbol 671 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.Map] Frame 0
class nickjr.dora.starmountaingolf.ui.Map extends nickjr.dora.starmountaingolf.ui.Screen
{
var __state, __map, __mc;
function Map (mc, ui) {
super(mc, ui);
__state = nickjr.dora.starmountaingolf.GameState.getInstance();
}
function update(dt) {
super.update(dt);
__map.update(dt);
}
function open() {
__map = new nickjr.dora.starmountaingolf.MapCharacter(__mc.map_mc);
super.open();
nickjr.dora.starmountaingolf.Sounds.getInstance().changeVolume(30, "music");
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("map");
}
function onOpened() {
super.onOpened();
if (__state.mapProgressState == "intro") {
__map.playIntro();
__state.clearMapProgressState();
} else if (__state.mapProgressState == "win") {
__map.playWin();
__state.clearMapProgressState();
} else {
var _local7 = Math.random();
if (((__state.printablesUnlocked > 4) && (__state.printablesUnlocked < 9)) && (_local7 < 0.65)) {
__map.playWow();
} else if ((_local7 < 0.5) || (__state.printablesUnlocked == 0)) {
__map.playPrompt();
if (__state.printablesUnlocked > 0) {
__map.setNextAnim("print_1");
}
}
}
__mc.printable_mc.gotoAndStop(__state.printablesUnlocked + 1);
__mc.printable_btn.onRelease = function () {
smashing.rampage.Messenger.sendMessage("engine", "onOpenPrintable");
};
if (__state.printablesUnlocked == 0) {
__mc.printable_mc._visible = false;
__mc.printable_btn._visible = false;
}
var _local5 = __state.holes;
var _local3;
var _local4 = _local5.length;
while (_local4--) {
_local3 = __mc[("hole" + _local5[_local4].num) + "_btn"];
if (_local5[_local4].state == 0) {
_local3.gotoAndStop("locked");
_local3.btn.onRelease = function () {
smashing.rampage.Messenger.sendMessage("screen", "onClickLocked");
};
continue;
}
if (_local5[_local4].state == 1) {
_local3.gotoAndStop("current");
} else {
_local3.gotoAndStop("cleared");
}
_local3.btn.num = _local5[_local4].num - 1;
_local3.btn.onRelease = function () {
smashing.rampage.Messenger.sendMessage("engine", "onSelectHole", {num:this.num});
};
}
}
function onClosed() {
__map.stopVoiceOver();
super.onClosed();
}
function requestHush() {
__map.stopVoiceOver();
__map.hushOn();
__mc.printable_mc._visible = false;
}
function releaseHush() {
__map.hushOff();
if (__state.printablesUnlocked > 0) {
__mc.printable_mc._visible = true;
}
}
function onClickLocked() {
__map.playOops();
}
var __HAS_INTRO = false;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 1;
}
Symbol 672 MovieClip [__Packages.nickjr.dora.starmountaingolf.MapCharacter] Frame 0
class nickjr.dora.starmountaingolf.MapCharacter
{
var __mc, __nextAnim, __promptTimer, __isHushed, __isAnimating;
function MapCharacter (pMc) {
__mc = pMc;
__mc.gotoAndStop("idle");
__nextAnim = "";
__promptTimer = __PROMPT_DELAY;
__isHushed = false;
}
function update(dt) {
if (__isAnimating) {
if (__mc.anim._currentFrame == __mc.anim._totalFrames) {
__isAnimating = false;
if (__nextAnim != "") {
__mc.gotoAndStop(__nextAnim);
__nextAnim = "";
} else {
__mc.gotoAndStop("idle");
}
}
} else if (!__isHushed) {
__promptTimer = __promptTimer - dt;
if (__promptTimer <= 0) {
playPrompt();
}
}
}
function playVoiceOver(pFrame) {
trace(((("MapCharacter VO : " + pFrame) + " ( ") + __isAnimating) + " )");
if (__isAnimating) {
return(undefined);
}
__isAnimating = true;
__mc.gotoAndStop(pFrame);
__promptTimer = __PROMPT_DELAY;
}
function forceVoiceOver(pFrame) {
stopVoiceOver();
playVoiceOver(pFrame);
}
function stopVoiceOver() {
__isAnimating = false;
__mc.gotoAndStop("idle");
}
function playIntro() {
playVoiceOver("intro");
}
function playWin() {
playVoiceOver("win");
}
function playOops() {
playVoiceOver("oops");
}
function playWow() {
playVoiceOver("print_2");
}
function playPrompt() {
playVoiceOver("prompt");
__promptTimer = __PROMPT_DELAY;
}
function setNextAnim(pFrame) {
__nextAnim = pFrame;
}
function hushOff() {
__isHushed = false;
}
function hushOn() {
__isHushed = true;
}
var __PROMPT_DELAY = 9.5;
}
Symbol 673 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.GamePlay] Frame 0
class nickjr.dora.starmountaingolf.ui.GamePlay extends nickjr.dora.starmountaingolf.ui.Screen
{
var __state, __fromHelpScreen, __mc;
function GamePlay (mc, ui, fromHelpScreen) {
super(mc, ui);
__state = nickjr.dora.starmountaingolf.GameState.getInstance();
__fromHelpScreen = fromHelpScreen;
}
function open() {
super.open();
smashing.rampage.Messenger.sendMessage("engine", "showCursor");
nickjr.dora.starmountaingolf.Sounds.getInstance().changeVolume(50, "music");
if (__state.holeNum < 3) {
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("game1");
} else if (__state.holeNum < 6) {
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("game2");
} else {
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("game3");
}
}
function onOpened() {
super.onOpened();
__mc.holenum_mc.gotoAndStop(nickjr.dora.starmountaingolf.GameState.getInstance().holeNum + 1);
__mc.btn_quit.onRollOver = function () {
smashing.rampage.Messenger.sendMessage("engine", "onRollOffField");
};
__mc.btn_quit.onRelease = function () {
smashing.rampage.Messenger.sendMessage("engine", "onPressBackToMap");
};
if (__state.getBest() == 0) {
__mc.best_mc._visible = false;
} else {
__mc.best_mc.txt_tries.text = __state.getBest();
}
update(0, true);
}
function onPressQuit() {
__mc.quit_confirm._visible = true;
smashing.rampage.Messenger.sendMessage("engine", "pause");
}
function onCancelQuit() {
__mc.quit_confirm._visible = false;
smashing.rampage.Messenger.sendMessage("engine", "unpause");
}
function update(dt, forceUpdate) {
if (__state.hasChanged || (forceUpdate == true)) {
__mc.tries_mc.txt_tries.text = __state.tries;
}
}
function close() {
super.close();
smashing.rampage.Messenger.sendMessage("engine", "hideCursor");
}
}
Symbol 674 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.Help] Frame 0
class nickjr.dora.starmountaingolf.ui.Help extends nickjr.dora.starmountaingolf.ui.Screen
{
var closeThenCallback, __isOpening, __mc;
function Help (mc, ui) {
super(mc, ui);
}
function onPressPlay() {
closeThenCallback("engine", "startGame");
}
function onOpened() {
__isOpening = false;
__mc.btn_map.onRelease = function () {
smashing.rampage.Messenger.sendMessage("engine", "onEndHelp");
};
}
}
Symbol 675 MovieClip [__Packages.nickjr.dora.starmountaingolf.ui.Win] Frame 0
class nickjr.dora.starmountaingolf.ui.Win extends nickjr.dora.starmountaingolf.ui.Screen
{
var __mc, __isDone;
function Win (mc, ui) {
super(mc, ui);
}
function open() {
super.open();
__mc.tries_mc.txt_tries.text = nickjr.dora.starmountaingolf.GameState.getInstance().tries;
__mc.btn_quit.onRelease = function () {
smashing.rampage.Messenger.sendMessage("engine", "onPressBackToMap");
};
nickjr.dora.starmountaingolf.Sounds.getInstance().changeVolume(30, "music");
nickjr.dora.starmountaingolf.Sounds.getInstance().playMusic("menu");
__isDone = false;
}
function update(dt) {
if ((!__isDone) && (__mc.dora_mc.anim._currentFrame == __mc.dora_mc.anim._totalFrames)) {
__isDone = true;
smashing.rampage.Messenger.sendMessage("engine", "onPressBackToMap");
}
}
var __HAS_INTRO = true;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 1;
var DOES_UPDATE = true;
}
Symbol 676 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.HoleData] Frame 0
class nickjr.dora.starmountaingolf.holes.HoleData
{
var hasTunnels, maps, tunnels, currentMapIndex;
function HoleData () {
}
function loadData() {
hasTunnels = false;
maps = [];
tunnels = [];
setMap(0);
}
function setMap(t_index) {
maps[t_index] = [];
currentMapIndex = t_index;
}
function addWall(x1, y1, x2, y2, impact, eventmcs, mapchange) {
if (impact == undefined) {
impact = "stars";
}
if (eventmcs == undefined) {
eventmcs = [];
}
if (mapchange == undefined) {
mapchange = -1;
}
maps[currentMapIndex].push({x1:x1, y1:y1, x2:x2, y2:y2, impact:impact, eventmcs:eventmcs, mapchange:mapchange});
}
function generateTunnels() {
tunnels = [];
}
function addTunnel(id, inx, iny, outid, outobj) {
tunnels.push({id:id, inx:inx, iny:iny, outid:outid, outx:outobj.x, outy:outobj.y, outangle:outobj.a});
}
}
Symbol 677 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole1] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole1 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, player, hole;
function Hole1 () {
super();
}
function loadData() {
super.loadData();
addWall(2, 285, 2, 399, "none");
addWall(2, 399, 96, 399, "none");
addWall(177, 173, 2, 285);
addWall(210, 147, 177, 173);
addWall(304, 113, 210, 147);
addWall(366, 66, 304, 113);
addWall(439, 59, 366, 66);
addWall(521, 88, 439, 59);
addWall(580, 184, 521, 88);
addWall(456, 270, 580, 184);
addWall(434, 268, 456, 270);
addWall(395, 232, 434, 268);
addWall(369, 230, 395, 232, "stars", ["plant_mc"]);
addWall(281, 282, 324, 255, "stars", ["plant_mc"]);
addWall(324, 255, 369, 230, "stars", ["plant_mc"]);
addWall(240, 288, 281, 282);
addWall(204, 311, 240, 288);
addWall(187, 335, 204, 311);
addWall(96, 399, 187, 335);
player = {x:110, y:307};
hole = {x:444, y:155};
}
}
Symbol 678 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole2] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole2 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, player, hole;
function Hole2 () {
super();
}
function loadData() {
super.loadData();
addWall(597, 249, 599, 89, "none");
addWall(381, 348, 597, 249);
addWall(308, 225, 381, 348);
addWall(284, 224, 308, 225);
addWall(121, 308, 284, 224);
addWall(101, 304, 121, 308);
addWall(24, 178, 101, 304);
addWall(291, 44, 24, 178);
addWall(332, 50, 291, 44, "stars", ["palm_mc"]);
addWall(393, 129, 332, 50);
addWall(423, 146, 393, 129);
addWall(507, 125, 423, 146);
addWall(576, 73, 507, 125);
addWall(599, 89, 576, 73);
addWall(442, 237, 430, 261, "stars", ["stump_mc"]);
addWall(430, 261, 406, 275, "stars", ["stump_mc"]);
addWall(406, 275, 360, 234, "stars", ["stump_mc"]);
addWall(360, 234, 370, 192, "stars", ["stump_mc"]);
addWall(370, 192, 419, 185, "stars", ["stump_mc"]);
addWall(419, 185, 442, 237, "stars", ["stump_mc"]);
player = {x:554, y:189};
hole = {x:109.8, y:229.2};
}
}
Symbol 679 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole3] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole3 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, player, hole;
function Hole3 () {
super();
}
function loadData() {
super.loadData();
addWall(94, 398, 233, 397);
addWall(104, 355, 94, 398);
addWall(102, 231, 103, 261);
addWall(103, 261, 104, 355, "stars", ["plant_mc"]);
addWall(89, 185, 102, 231, "stars", ["plant_mc"]);
addWall(92, 83, 89, 185);
addWall(189, 96, 92, 83);
addWall(258, 90, 189, 96);
addWall(258, 129, 258, 90, "goo");
addWall(348, 129, 258, 129, "goo");
addWall(348, 79, 349, 129, "goo");
addWall(455, 57, 348, 79, "stars", ["palm_mc"]);
addWall(535, 84, 455, 57);
addWall(552, 80, 535, 84, "goo");
addWall(566, 130, 552, 80, "goo");
addWall(561, 173, 566, 130, "goo");
addWall(564, 223, 561, 173, "goo");
addWall(462, 230, 564, 223);
addWall(423, 217, 462, 230);
addWall(341, 223, 423, 217, "goo");
addWall(348, 191, 341, 223, "goo");
addWall(254, 189, 348, 191, "goo");
addWall(252, 267, 254, 189, "goo");
addWall(262, 303, 252, 267);
addWall(233, 374, 262, 303);
addWall(233, 397, 233, 374);
player = {x:174, y:351};
hole = {x:527, y:153};
}
}
Symbol 680 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole4] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole4 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, setMap, player, hole, starpanel;
function Hole4 () {
super();
}
function loadData() {
super.loadData();
addWall(595, 193, 593, 54);
addWall(552, 182, 595, 193);
addWall(407, 184, 552, 182, "goo");
addWall(293, 189, 407, 184, "goo");
addWall(237, 187, 293, 189, "goo");
addWall(210, 209, 237, 187, "goo");
addWall(226, 234, 210, 209, "goo");
addWall(344, 235, 226, 234, "goo");
addWall(435, 225, 344, 235, "goo");
addWall(468, 252, 435, 225, "goo");
addWall(515, 249, 468, 252, "goo");
addWall(532, 351, 515, 249);
addWall(506, 381, 532, 351);
addWall(308, 363, 506, 381);
addWall(276, 351, 308, 363);
addWall(237, 385, 276, 351);
addWall(128, 381, 237, 385);
addWall(90, 355, 128, 381);
addWall(92, 312, 90, 355, "goo");
addWall(89, 277, 92, 312, "goo");
addWall(45, 232, 89, 277, "goo");
addWall(48, 215, 45, 232, "goo");
addWall(96, 193, 48, 215, "goo");
addWall(102, 177, 96, 193, "goo");
addWall(92, 134, 102, 177, "goo");
addWall(99, 119, 92, 134, "goo");
addWall(162, 108, 99, 119, "goo");
addWall(193, 90, 162, 108, "goo");
addWall(244, 29, 193, 90);
addWall(372, 32, 244, 29);
addWall(439, 46, 372, 32);
addWall(482, 30, 439, 46);
addWall(593, 54, 482, 30);
setMap(1);
addWall(595, 193, 593, 54);
addWall(495, 218, 503, 200, "goo");
addWall(503, 200, 554, 180, "goo");
addWall(554, 180, 597, 193, "goo");
addWall(515, 249, 495, 218, "goo");
addWall(532, 351, 515, 249);
addWall(506, 381, 532, 351);
addWall(308, 363, 506, 381);
addWall(276, 351, 308, 363);
addWall(237, 385, 276, 351);
addWall(128, 381, 237, 385);
addWall(90, 355, 128, 381);
addWall(92, 312, 90, 355, "goo");
addWall(89, 277, 92, 312, "goo");
addWall(45, 232, 89, 277, "goo");
addWall(48, 215, 45, 232, "goo");
addWall(96, 193, 48, 215, "goo");
addWall(102, 177, 96, 193, "goo");
addWall(92, 134, 102, 177, "goo");
addWall(99, 119, 92, 134, "goo");
addWall(162, 108, 99, 119, "goo");
addWall(193, 90, 162, 108, "goo");
addWall(244, 29, 193, 90);
addWall(372, 32, 244, 29);
addWall(439, 46, 372, 32);
addWall(482, 30, 439, 46);
addWall(593, 54, 482, 30);
player = {x:541, y:110};
hole = {x:465, y:320};
starpanel = {x:289, y:119, eventmcs:["star_mc", "goo_mc"]};
}
}
Symbol 681 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole5] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole5 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, setMap, player, hole;
function Hole5 () {
super();
}
function loadData() {
super.loadData();
addWall(265, 3, 107, 4);
addWall(265, 64, 265, 3);
addWall(257, 142, 265, 64, "goo");
addWall(266, 179, 257, 142, "goo");
addWall(278, 242, 266, 179, "stars", ["diamonds_mc"], 1);
addWall(347, 243, 278, 242, "stars", ["diamonds_mc"], 1);
addWall(348, 89, 347, 243);
addWall(453, 95, 348, 89);
addWall(480, 86, 453, 95);
addWall(508, 85, 480, 86);
addWall(502, 255, 508, 85);
addWall(519, 287, 502, 255);
addWall(504, 327, 519, 287);
addWall(450, 326, 504, 327);
addWall(413, 349, 450, 326);
addWall(350, 316, 413, 349, "goo");
addWall(316, 340, 350, 316, "goo");
addWall(207, 337, 316, 340, "goo");
addWall(150, 351, 207, 337, "goo");
addWall(110, 328, 150, 351);
addWall(107, 275, 110, 328);
addWall(96, 257, 107, 275);
addWall(107, 232, 96, 257, "goo");
addWall(100, 177, 107, 232, "goo");
addWall(114, 132, 100, 177);
addWall(107, 4, 114, 132);
setMap(1);
addWall(265, 3, 107, 4);
addWall(265, 64, 265, 3);
addWall(257, 142, 265, 64, "goo");
addWall(266, 179, 257, 142, "goo");
addWall(278, 250, 266, 179);
addWall(347, 254, 278, 250);
addWall(418, 235, 347, 254);
addWall(418, 215, 418, 235);
addWall(347, 200, 418, 215);
addWall(348, 89, 347, 200);
addWall(453, 95, 348, 89);
addWall(480, 86, 453, 95);
addWall(508, 85, 480, 86);
addWall(502, 255, 508, 85);
addWall(519, 287, 502, 255);
addWall(504, 327, 519, 287);
addWall(450, 326, 504, 327);
addWall(413, 349, 450, 326);
addWall(350, 316, 413, 349, "goo");
addWall(316, 340, 350, 316, "goo");
addWall(207, 337, 316, 340, "goo");
addWall(150, 351, 207, 337, "goo");
addWall(110, 328, 150, 351);
addWall(107, 275, 110, 328);
addWall(96, 257, 107, 275);
addWall(107, 232, 96, 257, "goo");
addWall(100, 177, 107, 232, "goo");
addWall(114, 132, 100, 177);
addWall(107, 4, 114, 132);
player = {x:177, y:62};
hole = {x:432, y:130};
}
}
Symbol 682 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole6] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole6 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var hasTunnels, addWall, player, hole, addTunnel;
function Hole6 () {
super();
}
function loadData() {
super.loadData();
hasTunnels = true;
addWall(13, 204, 86, 189);
addWall(86, 189, 185, 202);
addWall(185, 202, 356, 187);
addWall(356, 187, 395, 189);
addWall(395, 189, 425, 205);
addWall(425, 205, 421, 222);
addWall(421, 222, 403, 229);
addWall(403, 229, 289, 243);
addWall(289, 243, 169, 238);
addWall(169, 238, 166, 356);
addWall(166, 356, 201, 375);
addWall(201, 375, 286, 365);
addWall(286, 365, 343, 368);
addWall(343, 368, 379, 356);
addWall(379, 356, 410, 364);
addWall(410, 364, 460, 358);
addWall(460, 358, 484, 325);
addWall(484, 325, 484, 314);
addWall(484, 314, 467, 283);
addWall(467, 283, 474, 253);
addWall(474, 253, 498, 230);
addWall(498, 230, 526, 228);
addWall(526, 228, 534, 225);
addWall(534, 225, 535, 195);
addWall(535, 195, 544, 132);
addWall(544, 132, 541, 115);
addWall(541, 115, 542, 75);
addWall(542, 75, 470, 71);
addWall(470, 71, 435, 87);
addWall(435, 87, 383, 84);
addWall(383, 84, 376, 53);
addWall(376, 53, 231, 36);
addWall(231, 36, 152, 48);
addWall(152, 48, 109, 41);
addWall(109, 41, 18, 68);
addWall(18, 68, 30, 115);
addWall(30, 115, 27, 173);
addWall(27, 173, 13, 204);
addWall(224, 198, 206, 39);
addWall(323, 47, 330, 189);
player = {x:88, y:128};
hole = {x:207, y:306};
}
function generateTunnels() {
super.generateTunnels();
var _local6 = [{x:212, y:86}, {x:214, y:126}, {x:218, y:168}];
var _local4 = [{x:279, y:234, a:90}, {x:445, y:66, a:45}, {x:317, y:125, a:0}];
var _local3 = Math.floor(Math.random() * 3);
if (_local3 == 3) {
_local3 = 2;
}
addTunnel("1", 212, 86, _local3 + 1, _local4[_local3]);
_local3++;
if (_local3 > 2) {
_local3 = 0;
}
addTunnel("2", 214, 126, _local3 + 1, _local4[_local3]);
_local3++;
if (_local3 > 2) {
_local3 = 0;
}
addTunnel("3", 218, 168, _local3 + 1, _local4[_local3]);
}
}
Symbol 683 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole7] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole7 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, setMap, player, hole;
function Hole7 () {
super();
}
function loadData() {
super.loadData();
addWall(37, 397, 229, 394);
addWall(69, 298, 37, 397);
addWall(47, 258, 69, 298);
addWall(72, 224, 47, 258);
addWall(71, 180, 72, 224);
addWall(96, 172, 71, 180);
addWall(162, 162, 96, 172);
addWall(195, 126, 162, 162);
addWall(175, 106, 195, 126);
addWall(213, 70, 175, 106);
addWall(273, 57, 213, 70);
addWall(335, 30, 273, 57);
addWall(388, 11, 335, 30);
addWall(410, 49, 388, 11);
addWall(465, 81, 410, 49);
addWall(479, 156, 465, 81);
addWall(525, 204, 479, 156);
addWall(541, 187, 525, 204);
addWall(580, 188, 541, 187);
addWall(587, 303, 580, 188);
addWall(510, 334, 587, 303);
addWall(491, 356, 510, 334);
addWall(357, 379, 491, 356);
addWall(319, 346, 357, 379);
addWall(268, 334, 319, 346);
addWall(220, 308, 268, 334);
addWall(202, 330, 220, 308);
addWall(217, 362, 202, 330);
addWall(229, 394, 217, 362);
addWall(283, 272, 242, 241, "stars", ["rock_mc"], 1);
addWall(242, 241, 241, 183, "stars", ["rock_mc"], 1);
addWall(241, 183, 278, 142);
addWall(278, 142, 339, 117);
addWall(339, 117, 360, 119);
addWall(360, 119, 387, 150);
addWall(387, 150, 406, 188);
addWall(406, 188, 392, 229);
addWall(392, 229, 409, 258);
addWall(409, 258, 352, 277);
addWall(352, 277, 335, 267, "stars", ["rock_mc"], 1);
addWall(335, 267, 283, 272, "stars", ["rock_mc"], 1);
setMap(1);
addWall(37, 397, 229, 394);
addWall(69, 298, 37, 397);
addWall(47, 258, 69, 298);
addWall(72, 224, 47, 258);
addWall(71, 180, 72, 224);
addWall(96, 172, 71, 180);
addWall(162, 162, 96, 172);
addWall(195, 126, 162, 162);
addWall(175, 106, 195, 126);
addWall(213, 70, 175, 106);
addWall(273, 57, 213, 70);
addWall(335, 30, 273, 57);
addWall(388, 11, 335, 30);
addWall(410, 49, 388, 11);
addWall(465, 81, 410, 49);
addWall(479, 156, 465, 81);
addWall(525, 204, 479, 156);
addWall(541, 187, 525, 204);
addWall(580, 188, 541, 187);
addWall(587, 303, 580, 188);
addWall(510, 334, 587, 303);
addWall(491, 356, 510, 334);
addWall(357, 379, 491, 356);
addWall(319, 346, 357, 379);
addWall(268, 334, 319, 346);
addWall(220, 308, 268, 334);
addWall(202, 330, 220, 308);
addWall(217, 362, 202, 330);
addWall(229, 394, 217, 362);
addWall(283, 272, 242, 241);
addWall(242, 241, 241, 183);
addWall(241, 183, 278, 142);
addWall(278, 142, 339, 117);
addWall(339, 117, 360, 119);
addWall(360, 119, 387, 150);
addWall(387, 150, 406, 188);
addWall(406, 188, 392, 229);
addWall(392, 229, 409, 258);
addWall(409, 258, 352, 277);
addWall(352, 277, 335, 267);
addWall(335, 267, 283, 272);
addWall(258, 162, 193, 125);
addWall(271, 55, 301, 131);
player = {x:126, y:362};
hole = {x:424, y:109};
}
}
Symbol 684 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole8] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole8 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, setMap, player, hole, starpanel;
function Hole8 () {
super();
}
function loadData() {
super.loadData();
addWall(547, 392, 546, 358);
addWall(546, 358, 562, 270);
addWall(562, 270, 563, 211);
addWall(563, 211, 537, 188);
addWall(537, 188, 537, 134);
addWall(537, 134, 568, 96);
addWall(568, 96, 527, 34);
addWall(527, 34, 460, 29);
addWall(460, 29, 446, 37);
addWall(446, 37, 425, 38);
addWall(425, 38, 389, 60);
addWall(389, 60, 352, 64);
addWall(352, 64, 281, 30);
addWall(281, 30, 254, 60);
addWall(254, 60, 248, 182);
addWall(248, 182, 259, 207);
addWall(259, 207, 254, 236);
addWall(254, 236, 234, 247);
addWall(234, 247, 212, 243);
addWall(212, 243, 204, 225);
addWall(204, 225, 198, 110);
addWall(198, 110, 139, 107);
addWall(139, 107, 85, 88);
addWall(85, 88, 19, 111);
addWall(19, 111, 55, 191);
addWall(55, 191, 57, 222);
addWall(57, 222, 22, 291);
addWall(22, 291, 25, 329);
addWall(25, 329, 66, 354);
addWall(66, 354, 135, 333);
addWall(135, 333, 225, 337);
addWall(225, 337, 311, 358);
addWall(311, 358, 332, 342);
addWall(332, 342, 375, 341);
addWall(375, 341, 373, 256);
addWall(373, 256, 377, 205);
addWall(377, 205, 397, 186);
addWall(397, 186, 414, 189);
addWall(414, 189, 427, 224);
addWall(427, 224, 416, 268);
addWall(416, 268, 427, 297);
addWall(427, 297, 427, 395);
addWall(427, 395, 549, 396);
addWall(254, 134, 286, 119);
addWall(286, 119, 311, 117);
addWall(311, 117, 333, 132);
addWall(333, 132, 339, 155);
addWall(339, 155, 317, 185);
addWall(317, 185, 284, 189);
addWall(284, 189, 253, 165);
addWall(249, 265, 268, 250);
addWall(268, 250, 287, 250);
addWall(287, 250, 299, 268);
addWall(299, 268, 296, 282);
addWall(296, 282, 281, 293);
addWall(281, 293, 255, 288);
addWall(255, 288, 249, 265);
setMap(1);
addWall(547, 392, 546, 358);
addWall(546, 358, 562, 270);
addWall(562, 270, 563, 211);
addWall(563, 211, 537, 188);
addWall(537, 188, 537, 134);
addWall(537, 134, 568, 96);
addWall(568, 96, 527, 34);
addWall(527, 34, 460, 29);
addWall(460, 29, 446, 37);
addWall(446, 37, 425, 38);
addWall(425, 38, 389, 60);
addWall(389, 60, 352, 64);
addWall(352, 64, 281, 30);
addWall(281, 30, 254, 60);
addWall(248, 182, 259, 207);
addWall(259, 207, 254, 236);
addWall(254, 236, 234, 247);
addWall(234, 247, 212, 243);
addWall(212, 243, 204, 225);
addWall(139, 107, 85, 88);
addWall(85, 88, 19, 111);
addWall(19, 111, 55, 191);
addWall(55, 191, 57, 222);
addWall(57, 222, 22, 291);
addWall(22, 291, 25, 329);
addWall(25, 329, 66, 354);
addWall(66, 354, 135, 333);
addWall(135, 333, 225, 337);
addWall(225, 337, 311, 358);
addWall(311, 358, 332, 342);
addWall(332, 342, 375, 341);
addWall(375, 341, 373, 256);
addWall(373, 256, 377, 205);
addWall(377, 205, 397, 186);
addWall(397, 186, 414, 189);
addWall(414, 189, 427, 224);
addWall(427, 224, 416, 268);
addWall(416, 268, 427, 297);
addWall(427, 297, 427, 395);
addWall(427, 395, 549, 396);
addWall(457, 78, 146, 123);
addWall(158, 192, 466, 146);
addWall(253, 59, 251, 106);
addWall(202, 225, 202, 187);
addWall(158, 121, 140, 106);
addWall(332, 165, 317, 185);
addWall(317, 185, 300, 191);
addWall(300, 191, 268, 175);
addWall(249, 265, 268, 250);
addWall(268, 250, 287, 250);
addWall(287, 250, 299, 268);
addWall(299, 268, 296, 282);
addWall(296, 282, 281, 293);
addWall(281, 293, 255, 288);
addWall(255, 288, 249, 265);
player = {x:497, y:350};
hole = {x:120, y:157};
starpanel = {x:525, y:85, eventmcs:["star_mc", "bridge_mc"]};
}
}
Symbol 685 MovieClip [__Packages.nickjr.dora.starmountaingolf.holes.Hole9] Frame 0
class nickjr.dora.starmountaingolf.holes.Hole9 extends nickjr.dora.starmountaingolf.holes.HoleData
{
var addWall, setMap, player, hole, starpanel;
function Hole9 () {
super();
}
function loadData() {
super.loadData();
addWall(0, 62, 1, 169);
addWall(1, 169, 17, 178);
addWall(17, 178, 69, 174);
addWall(69, 174, 126, 193);
addWall(126, 193, 177, 181);
addWall(177, 181, 204, 184);
addWall(204, 184, 239, 201);
addWall(239, 201, 369, 204);
addWall(369, 204, 390, 216);
addWall(390, 216, 401, 251);
addWall(401, 251, 324, 251);
addWall(324, 251, 304, 236);
addWall(304, 236, 230, 227);
addWall(230, 227, 176, 243);
addWall(176, 243, 93, 230);
addWall(93, 230, 41, 244);
addWall(41, 244, 32, 307);
addWall(32, 307, 48, 314);
addWall(48, 314, 64, 332);
addWall(64, 332, 91, 337);
addWall(91, 337, 122, 350);
addWall(122, 350, 179, 348);
addWall(179, 348, 191, 342);
addWall(191, 342, 227, 341);
addWall(227, 341, 259, 319);
addWall(259, 319, 309, 322);
addWall(309, 322, 329, 295);
addWall(329, 295, 391, 296);
addWall(391, 296, 410, 321);
addWall(410, 321, 447, 339);
addWall(447, 339, 531, 332);
addWall(531, 332, 522, 298);
addWall(522, 298, 542, 222);
addWall(542, 222, 524, 181);
addWall(524, 181, 532, 96);
addWall(532, 96, 445, 65);
addWall(445, 65, 406, 63);
addWall(406, 63, 349, 80);
addWall(349, 80, 308, 63);
addWall(308, 63, 290, 72);
addWall(290, 72, 242, 122);
addWall(242, 122, 219, 125);
addWall(219, 125, 183, 105);
addWall(183, 105, 136, 67);
addWall(136, 67, 68, 62);
addWall(68, 62, 41, 55);
addWall(41, 55, 1, 65);
setMap(1);
addWall(0, 62, 1, 169);
addWall(41, 244, 32, 307);
addWall(32, 307, 48, 314);
addWall(48, 314, 64, 332);
addWall(64, 332, 91, 337);
addWall(91, 337, 122, 350);
addWall(122, 350, 179, 348);
addWall(179, 348, 191, 342);
addWall(191, 342, 227, 341);
addWall(227, 341, 259, 319);
addWall(259, 319, 309, 322);
addWall(309, 322, 329, 295);
addWall(329, 295, 391, 296);
addWall(391, 296, 410, 321);
addWall(410, 321, 447, 339);
addWall(447, 339, 531, 332);
addWall(531, 332, 522, 298);
addWall(522, 298, 542, 222);
addWall(542, 222, 524, 181);
addWall(524, 181, 532, 96);
addWall(532, 96, 445, 65);
addWall(445, 65, 406, 63);
addWall(406, 63, 349, 80);
addWall(349, 80, 308, 63);
addWall(308, 63, 290, 72);
addWall(290, 72, 242, 122);
addWall(242, 122, 219, 125);
addWall(219, 125, 183, 105);
addWall(183, 105, 136, 67);
addWall(136, 67, 68, 62);
addWall(68, 62, 41, 55);
addWall(41, 55, 1, 65);
addWall(0, 168, 17, 197);
addWall(17, 197, 37, 193);
addWall(37, 193, 81, 213);
addWall(81, 213, 79, 220);
addWall(79, 220, 51, 225);
addWall(51, 225, 40, 243);
addWall(222, 216, 155, 219);
addWall(155, 219, 155, 213);
addWall(155, 213, 176, 208);
addWall(176, 208, 190, 200);
addWall(190, 200, 223, 210);
addWall(223, 210, 222, 216);
addWall(389, 251, 327, 249);
addWall(327, 249, 326, 239);
addWall(326, 239, 305, 233);
addWall(305, 233, 305, 226);
addWall(305, 226, 375, 226);
addWall(375, 226, 385, 235);
addWall(385, 235, 389, 251);
player = {x:87, y:113};
hole = {x:146, y:320};
starpanel = {x:360, y:146, eventmcs:["star_mc", "snow_mc"]};
}
}
Symbol 71 MovieClip Frame 161
smashing.rampage.Messenger.sendMessage("engine", "onEndIntro");
stop();
Symbol 99 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 3
play();
Symbol 99 MovieClip Frame 7
smashing.rampage.Messenger.sendMessage("engine", "onTransCallback");
Symbol 148 MovieClip Frame 12
stop();
Symbol 149 MovieClip Frame 12
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 10
stop();
Symbol 181 MovieClip Frame 860
smashing.rampage.Messenger.sendMessage("engine", "onEndHelp");
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 8
stop();
Symbol 252 MovieClip Frame 22
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 87
stop();
Symbol 305 MovieClip Frame 79
stop();
Symbol 306 MovieClip Frame 115
stop();
Symbol 307 MovieClip Frame 134
stop();
Symbol 308 MovieClip Frame 99
stop();
Symbol 318 Button
on (release) {
smashing.rampage.Messenger.sendMessage("engine", "onPressPrint");
}
Symbol 321 Button
on (release) {
smashing.rampage.Messenger.sendMessage("engine", "onClosePrintable");
}
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 2
stop();
Symbol 323 Button
on (release) {
smashing.rampage.Messenger.sendMessage("engine", "onPressClearShared");
}
Symbol 329 MovieClip Frame 111
stop();
_parent.gotoAndStop("idle");
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 6
stop();
Symbol 330 MovieClip Frame 35
stop();
Symbol 334 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 31
gotoAndStop ("off");
Symbol 340 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Symbol 345 MovieClip Frame 17
stop();
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 50
gotoAndStop ("off");
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 31
gotoAndStop ("off");
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 31
gotoAndStop ("off");
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 31
gotoAndStop ("off");
Symbol 401 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 109
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 31
stop();
Symbol 426 MovieClip Frame 122
stop();
_parent.gotoAndStop("clicky");
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 20
gotoAndStop ("clicky");
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 31
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 156
stop();
Symbol 480 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 120
stop();
Symbol 510 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 277
stop();
Symbol 590 MovieClip [star_spark_impact] Frame 20
stop();
Symbol 592 MovieClip Frame 59
stop();
Symbol 595 MovieClip [goo_impact] Frame 10
stop();
Symbol 596 MovieClip [snow_impact] Frame 15
stop();
Symbol 636 MovieClip Frame 2
stop();
Symbol 637 MovieClip Frame 2
stop();
Symbol 638 MovieClip [_game_clip] Frame 1
#initclip 48
Object.registerClass("_game_clip", nickjr.dora.starmountaingolf.Engine);
#endinitclip