Instance of Symbol 112 MovieClip in Frame 1
onClipEvent (load) {
_visible = false;
}
Frame 4
stop();
new keepyups.App(this);
Symbol 69 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 70 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 70 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 60
Symbol 85 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 87 MovieClip Frame 1
this._visible = false;
Symbol 93 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 98 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 98 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 98 MovieClip Frame 12
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 100
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 112 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 87 MovieClip "mcIntro" in Symbol 112 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 112 MovieClip Frame 2
_visible = true;
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 111 MovieClip "mcLoadingAnimated" in Symbol 112 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 112 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 112 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
_root.gotoAndStop(2);
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 115 MovieClip [PulseMC] Frame 10
this.removeMovieClip();
Symbol 129 MovieClip Frame 55
stop();
Symbol 131 MovieClip Frame 21
stop();
Symbol 132 MovieClip Frame 21
stop();
Symbol 133 MovieClip Frame 21
stop();
Symbol 134 MovieClip Frame 21
stop();
Symbol 135 MovieClip [Ball] Frame 1
stop();
Symbol 137 MovieClip Frame 21
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 13
stop();
Symbol 398 MovieClip Frame 13
stop();
Symbol 417 MovieClip Frame 9
stop();
Symbol 473 MovieClip Frame 13
stop();
Symbol 500 MovieClip Frame 13
stop();
Symbol 528 MovieClip Frame 13
stop();
Symbol 553 MovieClip Frame 12
stop();
Symbol 680 MovieClip Frame 6
stop();
Symbol 680 MovieClip Frame 22
stop();
Symbol 680 MovieClip Frame 34
stop();
Symbol 788 MovieClip Frame 8
stop();
Symbol 788 MovieClip Frame 22
stop();
Symbol 788 MovieClip Frame 28
stop();
Symbol 881 MovieClip Frame 8
stop();
Symbol 881 MovieClip Frame 15
stop();
Symbol 881 MovieClip Frame 22
stop();
Symbol 973 MovieClip Frame 9
stop();
Symbol 973 MovieClip Frame 17
stop();
Symbol 973 MovieClip Frame 26
stop();
Symbol 1572 MovieClip Frame 1
stop();
Symbol 1593 MovieClip [FeedbackField] Frame 50
this.removeMovieClip();
Symbol 1605 MovieClip Frame 1
stop();
Symbol 1615 MovieClip Frame 15
stop();
Symbol 1617 MovieClip Frame 15
stop();
Symbol 1625 MovieClip Frame 15
stop();
Symbol 1626 MovieClip Frame 15
stop();
Symbol 1631 MovieClip Frame 1
stop();
Symbol 1633 MovieClip Frame 1
stop();
Symbol 1634 MovieClip Frame 5
stop();
Symbol 1635 MovieClip [LeftTrick] Frame 1
stop();
Symbol 1636 MovieClip Frame 1
stop();
Symbol 1637 MovieClip [RightTrick] Frame 1
stop();
Symbol 1639 MovieClip Frame 1
stop();
Symbol 1640 MovieClip Frame 1
stop();
Symbol 1641 MovieClip Frame 1
stop();
Symbol 1642 MovieClip Frame 5
stop();
Symbol 1643 MovieClip [EitherTrick] Frame 1
stop();
Symbol 1645 MovieClip Frame 1
stop();
Symbol 1648 MovieClip Frame 5
stop();
Symbol 1649 MovieClip Frame 1
stop();
Symbol 1650 MovieClip Frame 5
stop();
Symbol 1651 MovieClip [CradleTrick] Frame 1
stop();
Symbol 1653 MovieClip Frame 3
stop();
Symbol 1654 MovieClip Frame 3
stop();
Symbol 1655 MovieClip Frame 1
stop();
Symbol 1759 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 1770 MovieClip [FeedbackViewMC] Frame 81
stop();
Symbol 1774 MovieClip Frame 1
this._visible = false;
Symbol 1783 Button
on (release) {
gameURL = ("http://www.miniclip.com/games/" + gamename) + "/en/";
trace("Going to game: " + gameURL);
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 1785 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 1774 MovieClip "mcHighscores" in Symbol 1785 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1785 MovieClip Frame 2
if (scoreLocation == undefined) {
trace(("*** Miniclip Highscore Component: scoreLocation (" + scoreLocation) + ") is undefined.");
}
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 1785 MovieClip Frame 3
stop();
Instance of Symbol 1785 MovieClip "comHighscores" in Symbol 1786 MovieClip [SubmitScoreViewMC] Frame 1
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "skivekeepyups";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 1814 MovieClip [__Packages.keepyups.App] Frame 0
class keepyups.App
{
function App (mc) {
var _local1 = new keepyups.model.Model(mc);
var _local2 = 0;
var _local10 = new keepyups.view.GameView(mc, _local2++);
var _local8 = new keepyups.view.ScoreView(mc, _local2++);
var _local6 = new keepyups.view.MenuView(mc, _local2++);
var _local9 = new keepyups.view.SubmitScoreView(mc, _local2++);
var _local15 = new keepyups.view.ComboView(mc, _local2++);
var _local4 = new keepyups.view.TimerView(mc, _local2++);
var _local16 = new keepyups.view.PlayGameView(mc, _local2++);
var _local12 = new keepyups.view.TutorialView(mc, _local2++);
var _local14 = new keepyups.view.FeedbackView(mc, _local2++);
var _local11 = new keepyups.view.PauseMenuView(mc, _local2++);
var _local13 = new keepyups.view.ToolbarView(mc, _local2++);
var _local17 = new keepyups.view.SoundView(mc, _local2++);
var _local7 = new keepyups.view.TermsView(mc, _local2++);
var _local5 = new keepyups.view.AlertView(mc, _local2++);
var _local25 = new keepyups.controller.GameController(_local1, _local10);
var _local27 = new keepyups.controller.ScoreController(_local1, _local8);
var _local22 = new keepyups.controller.MenuController(_local1, _local6);
var _local29 = new keepyups.controller.SubmitScoreController(_local1, _local9);
var _local30 = new keepyups.controller.ComboController(_local1, _local15);
var _local20 = new keepyups.controller.TimerController(_local1, _local4);
var _local26 = new keepyups.controller.PlayGameController(_local1, _local16);
var _local23 = new keepyups.controller.TutorialController(_local1, _local12);
var _local18 = new keepyups.controller.FeedbackController(_local1, _local14);
var _local24 = new keepyups.controller.PauseMenuController(_local1, _local11);
var _local21 = new keepyups.controller.ToolbarController(_local1, _local13);
var _local31 = new keepyups.controller.SoundController(_local1, _local17);
var _local28 = new keepyups.controller.TermsController(_local1, _local7);
var _local19 = new keepyups.controller.AlertController(_local1, _local5);
_local10.controller = _local25;
_local8.controller = _local27;
_local6.controller = _local22;
_local9.controller = _local29;
_local15.controller = _local30;
_local4.controller = _local20;
_local16.controller = _local26;
_local12.controller = _local23;
_local14.controller = _local18;
_local11.controller = _local24;
_local13.controller = _local21;
_local17.controller = _local31;
_local7.controller = _local28;
_local5.controller = _local19;
_local1.init();
}
}
Symbol 1815 MovieClip [__Packages.keepyups.model.Model] Frame 0
class keepyups.model.Model
{
var soundMngr, combosXML, scriptManager;
function Model (mc) {
var scope = this;
mc.onEnterFrame = function () {
scope.onEnterFrame();
};
soundMngr = new unwrong.codebase.sound.SoundManager(mc.createEmptyMovieClip("sound", 3489));
soundMngr.addSound("crowdIdle_sfx", "crowdIdle");
soundMngr.addSound("applause1_sfx", "applause0");
soundMngr.addSound("applause2_sfx", "applause1");
soundMngr.addSound("applause3_sfx", "applause2");
soundMngr.addSound("applause4_sfx", "applause3");
soundMngr.addSound("applause5_sfx", "applause4");
soundMngr.addSound("applause6_sfx", "applause5");
soundMngr.addSound("cameraClick0_sfx", "cameraClick0");
soundMngr.addSound("cameraClick1_sfx", "cameraClick1");
soundMngr.addSound("cameraClick2_sfx", "cameraClick2");
soundMngr.addSound("fail0_sfx", "fail0");
soundMngr.addSound("kick0_sfx", "kick0");
soundMngr.addSound("kick1_sfx", "kick1");
soundMngr.addSound("kick2_sfx", "kick2");
soundMngr.addSound("thump0_sfx", "thump0");
soundMngr.addSound("whistle_sfx", "whistle");
soundMngr.addSound("shortWhistle_sfx", "shortWhistle");
soundMngr.addSound("music_sfx", "music");
soundMngr.sound("music").play(0, 99999999999, 40);
keepyups.Globals.soundMngr = soundMngr;
}
function init() {
unwrong.codebase.data.XMLHandler.load("xml/combos.xml", this, onLoadCombosXML);
}
function onLoadCombosXML(xml) {
combosXML = xml;
unwrong.codebase.data.XMLHandler.load("xml/scriptURLs.xml", this, onLoadScriptURLs);
}
function onLoadScriptURLs(xml) {
scriptManager = new keepyups.model.ScriptManager();
scriptManager.parseURLs(xml);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "menuController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "toolbarController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.INIT));
}
function onEnterFrame() {
unwrong.codebase.events.StaticEventDispatcher.execute();
}
var userHighscore = 0;
}
Symbol 1816 MovieClip [__Packages.unwrong.codebase.events.EventDispatcher] Frame 0
class unwrong.codebase.events.EventDispatcher
{
var eventListeners;
function EventDispatcher () {
eventListeners = new Array();
}
function addEventListener(type, scope, method) {
for (var _local6 in eventListeners) {
var _local2 = eventListeners[_local6];
if (((_local2.scope == scope) && (_local2.type == type)) && (_local2.method == method)) {
return(false);
}
}
eventListeners.push(new unwrong.codebase.events.EventListener(type, scope, method));
return(true);
}
function removeEventListener(type, scope, method) {
for (var _local4 in eventListeners) {
var _local2 = eventListeners[_local4];
if (((_local2.scope == scope) && (_local2.type == type)) && (_local2.method == method)) {
eventListeners.splice(_local4, 1);
return(true);
}
}
return(false);
}
function dispatchEvent(event) {
event.target = this;
for (var _local4 in eventListeners) {
var _local2 = eventListeners[_local4];
if (_local2.type == event.type) {
_local2.method.apply(_local2.scope, [event]);
}
}
}
}
Symbol 1817 MovieClip [__Packages.unwrong.codebase.events.EventListener] Frame 0
class unwrong.codebase.events.EventListener
{
var type, scope, method;
function EventListener (type, scope, method) {
this.type = type;
this.scope = scope;
this.method = method;
}
}
Symbol 1818 MovieClip [__Packages.unwrong.codebase.events.Event] Frame 0
class unwrong.codebase.events.Event
{
var type;
function Event (type) {
this.type = type;
}
static var TOGGLE = "eventToggle";
static var TOGGLE_ON = "eventToggleOn";
static var TOGGLE_OFF = "eventToggleOff";
static var CHANGED = "eventChanged";
static var INIT = "eventInit";
static var COMPLETE = "eventComplete";
}
Symbol 1819 MovieClip [__Packages.unwrong.codebase.sound.SoundManager] Frame 0
class unwrong.codebase.sound.SoundManager extends unwrong.codebase.events.EventDispatcher
{
var mc, soundAssets, globalSound, dispatchEvent;
function SoundManager (mc) {
super();
this.mc = mc;
soundAssets = new Object();
globalSound = new Sound();
var scope = this;
mc.onEnterFrame = function () {
scope.execute.apply(scope);
};
}
function addSound(linkageID, id) {
if (id == null) {
id = linkageID;
}
if (soundAssets[id] != null) {
return(false);
}
var _local3 = (soundAssets[id] = new unwrong.codebase.sound.SoundAsset(linkageID, id, mc.createEmptyMovieClip(id, mc.getNextHighestDepth())));
_local3.addEventListener(unwrong.codebase.sound.SoundEvent.COMPLETE, this, onSoundComplete);
_local3.addEventListener(unwrong.codebase.sound.SoundEvent.COMPLETE_ALL_LOOPS, this, onSoundCompleteAllLoops);
return(true);
}
function sound(id) {
return(soundAssets[id]);
}
function toggleSound() {
if (_isSoundOn) {
globalSound.setVolume(0);
_isSoundOn = false;
} else {
globalSound.setVolume(100);
_isSoundOn = true;
}
}
function execute() {
for (var _local3 in soundAssets) {
var _local2 = soundAssets[_local3];
_local2.update();
}
}
function onSoundComplete(event) {
dispatchEvent(event);
}
function onSoundCompleteAllLoops(event) {
dispatchEvent(event);
}
function get isSoundOn() {
return(_isSoundOn);
}
var _isSoundOn = true;
}
Symbol 1820 MovieClip [__Packages.unwrong.codebase.sound.SoundAsset] Frame 0
class unwrong.codebase.sound.SoundAsset extends unwrong.codebase.events.EventDispatcher
{
var linkageID, id, mc, sound, stopSoundOnSilent, isPlaying, targetVolume, speed, dispatchEvent, loops;
function SoundAsset (linkageID, id, mc) {
super();
if (linkageID == null) {
linkageID = id;
}
this.linkageID = linkageID;
this.id = id;
this.mc = mc;
sound = new Sound(mc);
sound.attachSound(linkageID);
stopSoundOnSilent = true;
isPlaying = false;
targetVolume = 100;
speed = 8;
var scope = this;
sound.onSoundComplete = function () {
scope.onSoundComplete.apply(scope);
};
}
function onSoundComplete() {
dispatchEvent(new unwrong.codebase.sound.SoundEvent(unwrong.codebase.sound.SoundEvent.COMPLETE, this));
loops--;
if (loops == 0) {
dispatchEvent(new unwrong.codebase.sound.SoundEvent(unwrong.codebase.sound.SoundEvent.COMPLETE_ALL_LOOPS, this));
isPlaying = false;
}
}
function play(offset, loops, volume) {
if (volume == null) {
volume = 100;
}
if (loops == null) {
this.loops = 1;
} else {
this.loops = loops;
}
isPlaying = true;
sound.start(offset, loops);
sound.setVolume(volume);
targetVolume = volume;
}
function set volume(value) {
sound.setVolume(value);
targetVolume = value;
//return(volume);
}
function get volume() {
return(sound.getVolume());
}
function stop() {
sound.stop();
isPlaying = false;
}
function update() {
if (isPlaying == false) {
return(undefined);
}
var _local2 = sound.getVolume();
if (_local2 == targetVolume) {
return(undefined);
}
if (_local2 < targetVolume) {
_local2 = _local2 + Math.min(speed, targetVolume - _local2);
} else {
_local2 = _local2 + Math.max(-speed, targetVolume - _local2);
}
sound.setVolume(_local2);
if (stopSoundOnSilent) {
if (_local2 <= 1) {
stop();
}
}
}
}
Symbol 1821 MovieClip [__Packages.unwrong.codebase.sound.SoundEvent] Frame 0
class unwrong.codebase.sound.SoundEvent extends unwrong.codebase.events.Event
{
var soundAsset;
function SoundEvent (type, soundAsset) {
super(type);
this.soundAsset = soundAsset;
}
static var COMPLETE = "complete";
static var COMPLETE_ALL_LOOPS = "completeAllLoops";
}
Symbol 1822 MovieClip [__Packages.keepyups.model.ScriptManager] Frame 0
class keepyups.model.ScriptManager extends unwrong.codebase.events.EventDispatcher
{
var sendToFriendURL, submitScoreURL, getScoresURL, connectorURL, flashTrackingURL, dispatchEvent;
function ScriptManager () {
super();
com.skivecreative.forms.EncryptionAsp.key = [191, 167, 111, 212, 165, 119, 187, 101, 151, 152, 89, 22, 156, 10, 72, 142, 51, 137, 68, 207, 215, 157, 144, 117, 204, 190, 46, 153, 19, 48, 28, 86, 238, 96, 24, 31, 78, 126, 214, 245];
}
function parseURLs(xml) {
var _local3 = 0;
while (_local3 < xml.firstChild.childNodes.length) {
var _local2 = xml.firstChild.childNodes[_local3];
if (_local2.nodeName == "sendToFriend") {
sendToFriendURL = _local2.attributes.url;
} else if (_local2.nodeName == "submitScore") {
submitScoreURL = _local2.attributes.url;
} else if (_local2.nodeName == "getScores") {
getScoresURL = _local2.attributes.url;
} else if (_local2.nodeName == "connector") {
connectorURL = _local2.attributes.url;
} else if (_local2.nodeName == "flashTracking") {
flashTrackingURL = _local2.attributes.url;
}
_local3++;
}
}
function tracking() {
var _local2 = new LoadVars();
_local2.item = "miniclip";
trace(flashTrackingURL);
_local2.sendAndLoad(flashTrackingURL, _local2, "GET");
}
function sendToFriend(name, email, fname, femail, message, emailFormat, optin) {
var _local2 = new LoadVars();
var loadXML = new XML();
var scope = this;
loadXML.onLoad = function () {
scope.sendToFriendCompleteHandler.apply(scope, [loadXML]);
};
optin = false;
_local2.name = name;
_local2.email = email;
_local2.fname = fname;
_local2.femail = femail;
_local2.message = message;
_local2.emailFormat = emailFormat;
_local2.optin = (optin ? "1" : "0");
trace(("ScriptManager.sendToFriend : SEND " + sendToFriendURL) + newline);
trace("name : " + _local2.name);
trace("email : " + _local2.email);
trace("fname : " + _local2.fname);
trace("femail : " + _local2.femail);
trace("message : " + _local2.message);
trace("emailFormat : " + _local2.emailFormat);
trace("optin : " + _local2.optin);
_local2.sendAndLoad(sendToFriendURL, loadXML, "POST");
}
function sendToFriendCompleteHandler(xml) {
trace("ScriptManager.sendToFriend : RECEIVE\n");
trace(xml);
dispatchEvent(new keepyups.events.ScriptManagerEvent(keepyups.events.ScriptManagerEvent.SEND_TO_FRIEND_COMPLETE, xml));
}
function submitScore(name, surname, email, score, optin) {
var _local2 = new LoadVars();
var loadXML = new XML();
var scope = this;
loadXML.onLoad = function () {
scope.submitScoreCompleteHandler.apply(scope, [loadXML]);
};
_local2.name = com.skivecreative.forms.EncryptionAsp.encryptString(name);
_local2.surname = com.skivecreative.forms.EncryptionAsp.encryptString(surname);
_local2.email = com.skivecreative.forms.EncryptionAsp.encryptString(email);
_local2.score = com.skivecreative.forms.EncryptionAsp.encryptString(String(score));
_local2.optin = (optin ? (com.skivecreative.forms.EncryptionAsp.encryptString("1")) : (com.skivecreative.forms.EncryptionAsp.encryptString("0")));
trace(("ScriptManager.submitScore : SEND " + submitScoreURL) + newline);
trace("name : " + name);
trace("name : " + _local2.name);
trace("surname : " + surname);
trace("surname : " + _local2.surname);
trace("email : " + email);
trace("email : " + _local2.email);
trace("score : " + score);
trace("score : " + _local2.score);
trace("optin : " + optin);
trace("optin : " + _local2.optin);
_local2.sendAndLoad(submitScoreURL, loadXML, "POST");
if (optin) {
connector(name, surname, email);
}
}
function submitScoreCompleteHandler(xml) {
trace("ScriptManager.submitScoreCompleteHandler : RECEIVE\n");
trace(xml);
dispatchEvent(new keepyups.events.ScriptManagerEvent(keepyups.events.ScriptManagerEvent.SUBMIT_SCORE_COMPLETE, xml));
}
function getScores() {
var _local2 = new LoadVars();
var loadXML = new XML();
var scope = this;
loadXML.onLoad = function () {
scope.getScoresCompleteHandler.apply(scope, [loadXML]);
};
trace(("ScriptManager.getScores : SEND " + getScoresURL) + newline);
_local2.sendAndLoad(getScoresURL, loadXML, "POST");
}
function getScoresCompleteHandler(xml) {
trace("ScriptManager.getScoresCompleteHandler : RECEIVE\n");
trace(xml);
dispatchEvent(new keepyups.events.ScriptManagerEvent(keepyups.events.ScriptManagerEvent.GET_SCORES_COMPLETE, xml));
}
function connector(name, surname, email) {
var _local2 = new LoadVars();
_local2.name = com.skivecreative.forms.EncryptionAsp.encryptString(name);
_local2.surname = com.skivecreative.forms.EncryptionAsp.encryptString(surname);
_local2.email = com.skivecreative.forms.EncryptionAsp.encryptString(email);
trace(connectorURL);
_local2.sendAndLoad(connectorURL, null, "POST");
}
}
Symbol 1823 MovieClip [__Packages.com.skivecreative.forms.EncryptionAsp] Frame 0
class com.skivecreative.forms.EncryptionAsp
{
function EncryptionAsp () {
}
static function encryptString(inputText) {
if (inputText == undefined) {
inputText = "";
}
inputText = inputText.toString();
var _local9 = "";
var _local10 = 1;
while (_local10 <= 3) {
var _local2 = 0;
var _local3 = 1;
while (_local3 <= inputText.length) {
var _local5 = inputText.charCodeAt(_local3 - 1);
_local2 = _local2 + _local5;
_local3++;
}
_local2 = (_local2 * 29) % 10;
if (inputText.length > 1) {
_local3 = 1;
while (_local3 <= _local2) {
inputText = inputText + inputText.charAt(0);
inputText = inputText.substr(1, inputText.length - 1);
_local3++;
}
}
_local9 = "";
var _local4 = 0;
_local3 = 1;
while (_local3 <= inputText.length) {
var _local6 = inputText.charCodeAt(_local3 - 1);
var _local7 = ((_local6 + key[_local4]) % 255) + 1;
var _local8 = String.fromCharCode(_local7);
_local4 = (_local4 + 1) % key.length;
_local9 = _local9 + _local8;
_local3++;
}
inputText = _local9;
_local10++;
}
return(safeHexEncode(_local9));
}
static function safeHexEncode(inputText) {
var _local3 = "";
var _local2 = 1;
while (_local2 <= inputText.length) {
var _local1 = getHex(inputText.charCodeAt(_local2 - 1));
if (_local1.length > 3) {
_local3 = _local3 + _local1.substr(2, _local1.length);
} else {
_local3 = _local3 + ("0" + _local1.substr(2, _local1.length));
}
_local2++;
}
return(_local3);
}
static function getHex(pvDec) {
var _local3 = parseInt(pvDec);
var _local6 = "0123456789abcdef";
var _local4 = "0x";
var _local5 = Math.floor(Math.log(_local3) / 2.77258872223978);
if (!isFinite(_local5)) {
_local4 = _local4 + "0";
} else {
var _local1 = _local5;
while (_local1 >= 0) {
var _local2 = Math.floor(_local3 / Math.pow(16, _local1));
_local4 = _local4 + _local6.charAt(_local2);
_local3 = _local3 - (_local2 * Math.pow(16, _local1));
_local1--;
}
}
return(_local4);
}
static function encryptStringLong(input) {
var _local6 = "";
var _local7 = Math.ceil(input.length / 100);
var _local2 = 0;
while (_local2 < _local7) {
var _local5 = _local2 * 100;
var _local1 = (_local2 + 1) * 100;
if (_local1 > input.length) {
_local1 = input.length;
}
var _local4 = input.substring(_local5, _local1);
_local6 = _local6 + safeHexEncode(encryptString(_local4));
if (_local1 != input.length) {
_local6 = _local6 + ",";
}
_local2++;
}
return(_local6);
}
static var key = new Array(17, 237, 184, 100, 166, 245, 227, 96, 195, 150, 98, 247, 75, 98, 78, 209, 250, 152, 15, 188, 237, 178, 229, 100, 9, 170, 94, 138, 215, 85, 33, 61, 57, 34, 73, 242, 112, 186, 247, 219);
}
Symbol 1824 MovieClip [__Packages.keepyups.events.ScriptManagerEvent] Frame 0
class keepyups.events.ScriptManagerEvent extends unwrong.codebase.events.Event
{
var xml;
function ScriptManagerEvent (type, xml) {
super(type);
this.xml = xml;
}
static var SEND_TO_FRIEND_COMPLETE = "ScriptManagerEventSendToFriendComplete";
static var SUBMIT_SCORE_COMPLETE = "ScriptManagerEventSubmitScoreComplete";
static var GET_SCORES_COMPLETE = "ScriptManagerEventGetScoresComplete";
}
Symbol 1825 MovieClip [__Packages.keepyups.Globals] Frame 0
class keepyups.Globals
{
function Globals () {
}
static var frameRate = 30;
}
Symbol 1826 MovieClip [__Packages.unwrong.codebase.data.XMLHandler] Frame 0
class unwrong.codebase.data.XMLHandler
{
static var _parentNode;
function XMLHandler () {
}
static function load(url, scope, func) {
loadQueue.push({url:url, scope:scope, func:func, id:++id});
loadNextItem();
return(id);
}
static function getNode(node, searchStr, prop) {
if (prop == null) {
prop = "nodeName";
}
var _local1 = null;
var _local2 = 0;
while (_local2 < node.childNodes.length) {
var _local6 = node.childNodes[_local2];
if (prop == "nodeName") {
if (_local6[prop] == searchStr) {
_local1 = _local6;
}
} else if (_local6.attributes[prop] == searchStr) {
_local1 = _local6;
}
_local2++;
}
if (_local1 == null) {
_local2 = 0;
while (_local2 < node.childNodes.length) {
var _local6 = node.childNodes[_local2];
_local1 = getNode(_local6, searchStr, prop);
if (_local1 != null) {
return(_local1);
}
_local2++;
}
} else {
return(_local1);
}
return(null);
}
static function getAncestor(node, searchStr, prop) {
_parentNode = null;
if (prop == null) {
prop = "nodeName";
}
parseAncestors(node, searchStr, prop);
return(_parentNode);
}
static function loadNextItem() {
if (busy || (loadQueue.length == 0)) {
return(undefined);
}
busy = true;
var _local3 = loadQueue[0];
var _local2 = new XML();
_local3.xml = _local2;
_local2.ignoreWhite = true;
_local2.onLoad = function () {
unwrong.codebase.data.XMLHandler.xmlLoaded.apply(unwrong.codebase.data.XMLHandler, [this]);
};
var _local5 = new Date();
var _local4 = _local5.getTime();
if (offline) {
_local2.load(_local3.url);
} else {
_local2.load((_local3.url + "?unique=") + String(_local4));
}
}
static function xmlLoaded(xml) {
var _local1;
for (var _local3 in loadQueue) {
_local1 = loadQueue[_local3];
if (xml == _local1.xml) {
loadQueue.splice(Number(_local3), 1);
break;
}
}
var _local6 = _local1.scope;
var _local5 = _local1.func;
var _local4 = _local1.id;
if (xml.firstChild) {
_local5.apply(_local6, [xml, _local4]);
}
busy = false;
loadNextItem();
}
static function parseAncestors(node, searchStr, prop) {
var _local1 = node.parentNode;
if (_local1) {
if (prop == "nodeName") {
if (_local1[prop] == searchStr) {
_parentNode = _local1;
return(undefined);
}
} else if (_local1.attributes[prop] == searchStr) {
_parentNode = _local1;
return(undefined);
}
parseAncestors(_local1, searchStr, prop);
}
}
static var busy = false;
static var loadQueue = [];
static var offline = true;
static var id = 0;
}
Symbol 1827 MovieClip [__Packages.unwrong.codebase.events.StaticEventDispatcher] Frame 0
class unwrong.codebase.events.StaticEventDispatcher
{
function StaticEventDispatcher () {
}
static function addEventListener(eventType, scope, method) {
if (eventTypes[eventType] == null) {
eventTypes[eventType] = new Array();
}
var _local2 = eventTypes[eventType];
for (var _local4 in _local2) {
var _local1 = _local2[_local4];
if (_local1.scope == scope) {
return(false);
}
}
_local2.push(new unwrong.codebase.events.EventListener(eventType, scope, method));
return(true);
}
static function removeEventListener(eventType, scope, method) {
var _local1 = eventTypes[eventType];
for (var _local3 in _local1) {
if (_local1[_local3].method == method) {
_local1.splice(Number(_local3), 1);
return(true);
}
}
return(false);
}
static function dispatch(event, delay) {
if ((delay == null) || (delay == 0)) {
var _local2 = eventTypes[event.type];
for (var _local3 in _local2) {
var _local1 = _local2[_local3];
_local1.method.apply(_local1.scope, [event]);
}
return(undefined);
}
eventsToBroadcast.push({event:event, delay:delay});
}
static function execute() {
var _local3 = 0;
while (_local3 < eventsToBroadcast.length) {
var _local2 = eventsToBroadcast[_local3];
if ((_local2.delay--) <= 0) {
var _local4 = eventTypes[_local2.event.type];
for (var _local5 in _local4) {
var _local1 = _local4[_local5];
_local1.method.apply(_local1.scope, [_local2.event]);
}
eventsToBroadcast.splice(_local3--, 1);
}
_local3++;
}
}
static var eventTypes = {};
static var eventsToBroadcast = [];
}
Symbol 1828 MovieClip [__Packages.unwrong.codebase.events.ControllerEvent] Frame 0
class unwrong.codebase.events.ControllerEvent extends unwrong.codebase.events.Event
{
var controllerID;
function ControllerEvent (type, controllerID) {
super(type);
this.controllerID = controllerID;
}
static var SHOW = "controllerEventShow";
static var HIDE = "controllerEventHide";
static var TOGGLE = "controllerEventToggle";
static var OPEN = "controllerEventOpen";
static var CLOSE = "controllerEventClose";
static var ENABLE = "controllerEventEnable";
static var DISABLE = "controllerEventDisable";
static var INIT = "controllerEventInit";
}
Symbol 1829 MovieClip [__Packages.unwrong.codebase.designPatterns.mvc.View] Frame 0
class unwrong.codebase.designPatterns.mvc.View
{
var mc, controller;
function View (parent_mc, depth) {
mc = parent_mc.createEmptyMovieClip("view" + depth, depth);
}
function show() {
enable();
mc._visible = true;
}
function hide() {
disable();
mc._visible = false;
}
function enable() {
enableButtonFunctions();
var scope = this;
mc.onEnterFrame = function () {
scope.onEnterFrame();
};
}
function disable() {
disableButtonFunctions();
delete mc.onEnterFrame;
}
function enableButtonFunctions() {
}
function disableButtonFunctions() {
}
function onEnterFrame() {
controller.onEnterFrame();
}
}
Symbol 1830 MovieClip [__Packages.unwrong.codebase.designPatterns.mvc.Controller] Frame 0
class unwrong.codebase.designPatterns.mvc.Controller
{
var model, view, id, enabled;
function Controller (model, view) {
this.model = model;
this.view = view;
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.INIT, this, init);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.SHOW, this, show);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.HIDE, this, hide);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.ENABLE, this, enable);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.DISABLE, this, disable);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(unwrong.codebase.events.ControllerEvent.TOGGLE, this, toggle);
hide();
}
function onInit() {
}
function onEnable() {
}
function onDisable() {
}
function onShow() {
}
function onHide() {
}
function init(event) {
onInit();
}
function toggle(event) {
if ((event != null) && (event.controllerID != id)) {
return(undefined);
}
if (enabled) {
hide();
} else {
show();
}
}
function enable(event) {
if ((event != null) && (event.controllerID != id)) {
return(undefined);
}
enabled = true;
onEnable();
}
function disable(event) {
if ((event != null) && (event.controllerID != id)) {
return(undefined);
}
enabled = false;
onDisable();
}
function hide(event) {
if ((event != null) && (event.controllerID != id)) {
return(undefined);
}
view.hide();
disable();
onHide();
}
function show(event) {
if ((event != null) && (event.controllerID != id)) {
return(undefined);
}
view.show();
enable();
onShow();
}
function onEnterFrame() {
}
}
Symbol 1831 MovieClip [__Packages.keepyups.view.BaseView] Frame 0
class keepyups.view.BaseView extends unwrong.codebase.designPatterns.mvc.View
{
var effectMngr, mc, openEffect, closeEffect, disableButtonFunctions, disable, enableButtonFunctions;
function BaseView (parent_mc, depth) {
super(parent_mc, depth);
effectMngr = new unwrong.codebase.effects.EffectManager();
effectMngr.addEventListener(unwrong.codebase.effects.EffectEvent.FINISH, this, finishEffectHandler);
}
function show() {
super.show();
mc._alpha = 0;
effectMngr.removeEffect(openEffect);
effectMngr.removeEffect(closeEffect);
openEffect = new unwrong.codebase.effects.Effect([mc], ["_alpha"]);
openEffect.start = 0;
openEffect.end = 100;
openEffect.delay = openDelay;
openEffect.length = openTime;
openEffect.easeType = unwrong.codebase.effects.EaseType.EASE_OUT_CUBIC;
effectMngr.addEffect(openEffect);
effectMngr.execute();
}
function hide() {
disableButtonFunctions();
mc._alpha = 100;
effectMngr.removeEffect(openEffect);
effectMngr.removeEffect(closeEffect);
closeEffect = new unwrong.codebase.effects.Effect([mc], ["_alpha"]);
closeEffect.start = 100;
closeEffect.end = 0;
closeEffect.length = closeTime;
closeEffect.easeType = unwrong.codebase.effects.EaseType.EASE_OUT_CUBIC;
effectMngr.addEffect(closeEffect);
effectMngr.execute();
}
function onEnterFrame() {
effectMngr.execute();
super.onEnterFrame();
}
function finishEffectHandler(event) {
if (event.effect == closeEffect) {
disable();
mc._visible = false;
} else if (event.effect == openEffect) {
enableButtonFunctions();
}
}
var openTime = 18;
var closeTime = 10;
var openDelay = 14;
}
Symbol 1832 MovieClip [__Packages.keepyups.controller.BaseController] Frame 0
class keepyups.controller.BaseController extends unwrong.codebase.designPatterns.mvc.Controller
{
function BaseController (model, view) {
super(model, view);
}
}
Symbol 1833 MovieClip [__Packages.unwrong.codebase.effects.Effect] Frame 0
class unwrong.codebase.effects.Effect
{
var targets, props, customEasing, diff, overshoot, period, life;
function Effect (itargets, iprops) {
targets = itargets;
props = iprops;
}
function execute() {
if (delay != 0) {
delay--;
return(undefined);
}
var _local4 = 0;
while (_local4 < targets.length) {
var _local3 = targets[_local4];
var _local2 = 0;
while (_local2 < props.length) {
if (easeType == unwrong.codebase.effects.EaseType.EASE_CUSTOM) {
_local3[props[_local2]] = customEasing.ease(t, start, diff, length, customEasing.pts);
} else {
_local3[props[_local2]] = unwrong.codebase.effects.Easing[String(easeType)](t, start, diff, length, overshoot, period);
}
_local2++;
}
_local4++;
}
t = t + (1 * direction);
if (!persistant) {
life--;
}
}
var start = 0;
var length = 100;
var direction = 1;
var delay = 0;
var t = 0;
var easeType = "easeInLinear";
var persistant = false;
}
Symbol 1834 MovieClip [__Packages.unwrong.codebase.effects.EaseType] Frame 0
class unwrong.codebase.effects.EaseType
{
function EaseType () {
}
static var EASE_IN_LINEAR = "easeInLinear";
static var EASE_OUT_LINEAR = "easeOutLinear";
static var EASE_IN_OUT_LINEAR = "easeInOutLinear";
static var EASE_IN_BACK = "easeInBack";
static var EASE_OUT_BACK = "easeOutBack";
static var EASE_IN_OUT_BACK = "easeInOutBack";
static var EASE_IN_BOUNCE = "easeInBounce";
static var EASE_OUT_BOUNCE = "easeOutBounce";
static var EASE_IN_OUT_BOUNCE = "easeInOutBounce";
static var EASE_IN_CIRC = "easeInCirc";
static var EASE_OUT_CIRC = "easeOutCirc";
static var EASE_IN_OUT_CIRC = "easeInOutCirc";
static var EASE_IN_CUBIC = "easeInCubic";
static var EASE_OUT_CUBIC = "easeOutCubic";
static var EASE_IN_OUT_CUBIC = "easeInOutCubic";
static var EASE_IN_ELASTIC = "easeInElastic";
static var EASE_OUT_ELASTIC = "easeOutElastic";
static var EASE_IN_OUT_ELASTIC = "easeInOutElastic";
static var EASE_IN_EXPO = "easeInExpo";
static var EASE_OUT_EXPO = "easeOutExpo";
static var EASE_IN_OUT_EXPO = "easeInOutExpo";
static var EASE_IN_QUAD = "easeInQuad";
static var EASE_OUT_QUAD = "easeOutQuad";
static var EASE_IN_OUT_QUAD = "easeInOutQuad";
static var EASE_IN_QUART = "easeInQuart";
static var EASE_OUT_QUART = "easeOutQuart";
static var EASE_IN_OUT_QUART = "easeInOutQuart";
static var EASE_IN_QUINT = "easeInQuint";
static var EASE_OUT_QUINT = "easeOutQuint";
static var EASE_IN_OUT_QUINT = "easeInOutQuint";
static var EASE_IN_SIN = "easeInSine";
static var EASE_OUT_SIN = "easeOutSine";
static var EASE_IN_OUT_SIN = "easeInOutSine";
static var EASE_SIN = "sin";
static var EASE_COS = "cos";
static var EASE_CUSTOM = "custom";
}
Symbol 1835 MovieClip [__Packages.unwrong.codebase.effects.Easing] Frame 0
class unwrong.codebase.effects.Easing
{
function Easing () {
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
var _local1 = 0;
if ((!a) || (a < Math.abs(c))) {
a = c;
_local1 = p / 4;
} else {
_local1 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local1) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
var _local5;
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
var _local5;
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeInLinear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOutLinear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOutLinear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function cos(t, start, offset, length) {
var _local1 = (Math.cos(((t / length) * Math.PI) * 2) + 1) / 2;
return((_local1 * start) + ((1 - _local1) * (start + offset)));
}
static function sin(t, start, offset, length) {
var _local1 = (Math.sin(((t / length) * Math.PI) * 2) + 1) / 2;
return((_local1 * start) + ((1 - _local1) * (start + offset)));
}
}
Symbol 1836 MovieClip [__Packages.unwrong.codebase.effects.EffectManager] Frame 0
class unwrong.codebase.effects.EffectManager extends unwrong.codebase.events.EventDispatcher
{
var effects, dispatchEvent;
function EffectManager () {
super();
effects = new Array();
}
function clear() {
while (effects.length > 0) {
removeEffect(effects[0]);
}
}
function removeEffect(effect) {
var _local2 = effects.length;
while (_local2-- , _local2 > -1) {
if (effects[_local2] == effect) {
effects.splice(_local2, 1);
return(true);
}
}
return(false);
}
function addEffect(effect) {
if (effect.life == null) {
effect.life = effect.length;
}
if ((effect.end == null) && (effect.diff == null)) {
effect.end = 100;
}
if ((effect.end == null) && (effect.diff != null)) {
effect.end = effect.start + effect.diff;
}
if (effect.diff == null) {
effect.diff = effect.end - effect.start;
}
effects.push(effect);
}
function execute() {
var _local4 = effects.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = effects[_local2];
_local3.execute();
if ((_local3.life == -1) && (_local3.persistant == false)) {
effects.splice(_local2, 1);
_local2--;
dispatchEvent(new unwrong.codebase.effects.EffectEvent(unwrong.codebase.effects.EffectEvent.FINISH, _local3));
}
_local2++;
}
}
}
Symbol 1837 MovieClip [__Packages.unwrong.codebase.effects.EffectEvent] Frame 0
class unwrong.codebase.effects.EffectEvent extends unwrong.codebase.events.Event
{
var effect;
function EffectEvent (type, effect) {
super(type);
this.effect = effect;
}
static var FINISH = "finish";
}
Symbol 1838 MovieClip [__Packages.keepyups.view.GameView] Frame 0
class keepyups.view.GameView extends keepyups.view.BaseView
{
var mc, mask_mc;
function GameView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("GameView", "GameView" + depth, depth);
mask_mc = mc.mask_mc;
mc._visible = false;
}
}
Symbol 1839 MovieClip [__Packages.keepyups.controller.GameController] Frame 0
class keepyups.controller.GameController extends keepyups.controller.BaseController
{
var id, game, model, show, view, hide, demo;
function GameController (model, view) {
super(model, view);
id = "gameController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.NEW_GAME, this, newGame);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.END_GAME, this, endGame);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.PAUSE_GAME, this, pauseGame);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.RESUME_GAME, this, resumeGame);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.SAVE_DEMO, this, saveDemo);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.PLAY_DEMO, this, playDemo);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.EXPIRED, this, timerExpiredHandler);
}
function timerExpiredHandler(event) {
game.conductor.disable();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "gameController"), 60);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FeedbackEvent(keepyups.events.FeedbackEvent.SPAWN, "TIME'S UP!"));
model.userHighscore = game.scoreManager.score;
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "submitScoreController"), 90);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "gameController"), 90);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.SAVE_DEMO), 90);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.PLAY_DEMO), 90);
}
function newGame(event) {
createGame();
game.conductor.destroy();
game.conductor = new keepyups.objects.game.HumanConductor(game);
show();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
pauseGame();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.RESUME_GAME), 70);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FeedbackEvent(keepyups.events.FeedbackEvent.SPAWN, "GET READY"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.SET, 120 * keepyups.Globals.frameRate));
}
function createGame() {
destroyGame();
game = new keepyups.objects.game.Game(view.mc.attachMovie("Game", "Game", 0), model.combosXML);
game.mc._x = 295;
game.mc._y = 350;
game.mc.setMask(view.mask_mc);
var _local2 = new keepyups.events.FlowEvent(keepyups.events.FlowEvent.GAME_INIT);
_local2.game = game;
unwrong.codebase.events.StaticEventDispatcher.dispatch(_local2);
game.scoreManager.__set__score(0);
game.scoreManager.__set__multiplier(1);
game.scoreManager.__set__special(0);
}
function pauseGame() {
paused = true;
game.pause();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.STOP));
}
function resumeGame() {
if (game == null) {
return(undefined);
}
game.resume();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.START));
paused = false;
}
function endGame(event) {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
paused = false;
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.STOP));
destroyGame();
}
function saveDemo(event) {
demo = new keepyups.objects.recorder.Recorder();
demo.deserialise(game.recorder.serialise());
}
function playDemo(event) {
createGame();
game.conductor.destroy();
game.conductor = new keepyups.objects.game.DemoConductor(game, demo);
game.mc._x = 490;
game.mc._y = 350;
}
function destroyGame() {
if (game == null) {
return(undefined);
}
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.GAME_DESTROY));
game.destroy();
game = null;
}
function onEnterFrame() {
if (paused) {
return(undefined);
}
game.step(1);
}
var paused = false;
}
Symbol 1840 MovieClip [__Packages.keepyups.objects.game.Game] Frame 0
class keepyups.objects.game.Game extends unwrong.codebase.events.EventDispatcher
{
var mc, effects_mc, t, player, ball, paddle, cradle, special, conductor, comboManager, scoreManager, flashManager, regions, recorder, dispatchEvent;
function Game (mc, comboXML) {
super();
this.mc = mc;
effects_mc = mc.createEmptyMovieClip("effects_mc", 0);
t = 0;
player = new keepyups.objects.game.Player(this);
ball = new keepyups.objects.game.Ball(this);
paddle = new keepyups.objects.game.Paddle(this);
cradle = new keepyups.objects.game.Cradle(this);
special = new keepyups.objects.game.Special(this);
conductor = new keepyups.objects.game.HumanConductor(this);
comboManager = new keepyups.objects.game.ComboManager(this, comboXML);
scoreManager = new keepyups.objects.game.ScoreManager(this);
flashManager = new keepyups.objects.game.FlashManager(this);
regions = [new keepyups.objects.game.Region(mc.head, "head"), new keepyups.objects.game.Region(mc.chest, "chest"), new keepyups.objects.game.Region(mc.knee, "knee"), new keepyups.objects.game.Region(mc.foot, "foot")];
recorder = new keepyups.objects.recorder.Recorder();
unwrong.codebase.util.MathUtils.seed(0);
conductor.enable();
ball.respawn();
}
function pause() {
ball.pause();
player.pause();
conductor.disable();
}
function resume() {
ball.resume();
player.resume();
conductor.enable();
}
function step(dt) {
t = t + dt;
paddle.step(dt);
ball.step(dt);
player.step(dt);
cradle.step(dt);
special.step(dt);
conductor.step(dt);
scoreManager.step(dt);
flashManager.step(dt);
var _local3 = getClosestRegion(ball.__get__x() + ball.vx, ball.__get__y() + ball.vy);
if (_local3 != ball.region) {
if (ball.region != null) {
var _local4 = new keepyups.events.GameEvent(keepyups.events.GameEvent.BALL_ROLLOUT_REGION);
_local4.region = ball.region;
dispatchEvent(_local4);
}
if (_local3 != null) {
var _local4 = new keepyups.events.GameEvent(keepyups.events.GameEvent.BALL_ROLLOVER_REGION);
_local4.region = _local3;
dispatchEvent(_local4);
}
ball.region = _local3;
}
}
function destroy() {
player.destroy();
ball.destroy();
paddle.destroy();
conductor.destroy();
}
function click(x, y) {
if (!ball.inPlay) {
return(undefined);
}
if (cradle.enabled) {
return(undefined);
}
if (special.enabled) {
return(undefined);
}
if (ball.region == null) {
return(undefined);
}
var _local4 = ball.__get__x() + ball.vx;
var _local5 = ball.__get__y() + ball.vy;
recorder.addKeyframe(new keepyups.objects.recorder.ClickKeyframe(t, x, y));
var _local2 = (((_local4 - ball.region.mc._x) / ball.region.mc._width) - 0.5) * 2;
_local2 = ((_local2 < -1) ? -1 : (_local2));
_local2 = ((_local2 > 1) ? 1 : (_local2));
player.setCatagory(ball.region.id);
player.playAnimFromRatio((_local2 / 2) + 0.5);
var t = ((_local5 - ball.region.mc._y) / ball.region.mc._height);
ball.vx = (_local4 - x) * 0.12;
if (ball.vx < -10) {
ball.vx = -10;
}
if (ball.vx > 10) {
ball.vx = 10;
}
ball.vy = (t * -12) + ((1 - t) * -16);
spawnPulse(x, y);
var _local3 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local3.action = new keepyups.objects.actions.RatioAction(ball.region.id, _local2);
dispatchEvent(_local3);
}
function get canCradle() {
if (!ball.inPlay) {
return(false);
}
if ((ball.region.id != "head") && (ball.region.id != "foot")) {
return(false);
}
if (cradle.enabled) {
return(false);
}
if (special.enabled) {
return(false);
}
if (ball.region == null) {
return(false);
}
return(true);
}
function get canSpecial() {
if (!ball.inPlay) {
return(false);
}
if ((ball.region.id != "knee") && (ball.region.id != "chest")) {
return(false);
}
if (cradle.enabled) {
return(false);
}
if (special.enabled) {
return(false);
}
if (ball.region == null) {
return(false);
}
if (scoreManager.__get__special() != 100) {
return(false);
}
return(true);
}
function beginCradle(x, y) {
if (canCradle == false) {
return(undefined);
}
var _local4 = ball.__get__x() + ball.vx;
var _local5 = ball.__get__y() + ball.vy;
var _local2 = (_local4 - ball.region.mc._x) / ball.region.mc._width;
_local2 = ((_local2 < 0) ? 0 : (_local2));
_local2 = ((_local2 > 1) ? 1 : (_local2));
if ((_local2 < 0.25) || (_local2 > 0.75)) {
return(undefined);
}
cradle.beginCradle(ball.region.id, x, y);
player.beginCradle(ball.region.id + "Cradle", _local2);
ball.hide();
recorder.addKeyframe(new keepyups.objects.recorder.BeginCradleKeyframe(t, x, y));
var _local3 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local3.action = new keepyups.objects.actions.BeginCradleAction();
dispatchEvent(_local3);
}
function cradleInput(x, y) {
if (!ball.inPlay) {
return(undefined);
}
if (x == cradle.mousePosX) {
return(undefined);
}
cradle.updateMousePos(x, y);
recorder.addKeyframe(new keepyups.objects.recorder.CradleKeyframe(t, x, y));
}
function endCradle() {
if (!cradle.enabled) {
return(undefined);
}
cradle.endCradle();
player.endCradle();
recorder.addKeyframe(new keepyups.objects.recorder.EndCradleKeyframe(t));
ball.vx = (-(cradle.mousePosX - cradle.mc._x)) * 0.05;
var _local4 = Math.max(0, cradle.mousePosY - cradle.mc._y);
var _local3 = Math.max(0, Math.min(1, _local4 / 200));
ball.vy = (_local3 * -20) + ((1 - _local3) * -8);
ball.show();
var _local2 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local2.action = new keepyups.objects.actions.EndCradleAction(cradle.regionID, cradle.duration);
dispatchEvent(_local2);
}
function failCradle() {
if (!cradle.enabled) {
return(undefined);
}
cradle.failCradle();
player.failCradle();
recorder.addKeyframe(new keepyups.objects.recorder.FailCradleKeyframe(t));
ball.show();
ball.vx = 0;
ball.vy = 0;
var _local2 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local2.action = new keepyups.objects.actions.FailCradleAction();
dispatchEvent(_local2);
}
function beginSpecial(x, y) {
if (canSpecial == false) {
return(undefined);
}
var _local5 = ball.__get__x() + ball.vx;
var _local6 = ball.__get__y() + ball.vy;
var _local3;
if (ball.region.id == "knee") {
_local3 = 1;
} else if (ball.region.id == "chest") {
_local3 = 2;
} else {
return(undefined);
}
var _local2 = (_local5 - ball.region.mc._x) / ball.region.mc._width;
_local2 = ((_local2 < 0) ? 0 : (_local2));
_local2 = ((_local2 > 1) ? 1 : (_local2));
special.beginSpecial(_local3, x, y);
player.beginSpecial(_local3, _local2);
ball.hide();
scoreManager.__set__special(0);
recorder.addKeyframe(new keepyups.objects.recorder.BeginSpecialKeyframe(t, x, y, _local3));
var _local4 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local4.action = new keepyups.objects.actions.BeginSpecialAction();
dispatchEvent(_local4);
}
function endSpecial() {
if (!special.enabled) {
return(undefined);
}
special.endSpecial();
player.endSpecial();
}
function ballDropped() {
dispatchEvent(new keepyups.events.GameEvent(keepyups.events.GameEvent.BALL_DROPPED));
}
function spawnPulse(x, y) {
var _local3 = effects_mc.getNextHighestDepth();
var _local2 = effects_mc.attachMovie("PulseMC", "PulseMC" + _local3, _local3);
_local2._x = x;
_local2._y = y;
}
function getClosestRegion(x, y) {
var _local6 = {x:x, y:y};
mc.localToGlobal(_local6);
x = _local6.x;
y = _local6.y;
var _local2 = 0;
while (_local2 < regions.length) {
var _local3 = regions[_local2];
if (_local3.mc.hitTest(x, y)) {
return(_local3);
}
_local2++;
}
return(null);
}
var specialAmount = 0;
}
Symbol 1841 MovieClip [__Packages.keepyups.objects.game.Player] Frame 0
class keepyups.objects.game.Player
{
var game, mc, reflection_mc, mask_mc, reflection_bmp, anim_mc, catagory_mc;
function Player (game) {
this.game = game;
mc = game.mc.player_mc;
reflection_mc = mc.reflection_mc;
mask_mc = mc.mask_mc;
reflection_mc._alpha = 50;
setCatagory("idle");
}
function destroy() {
reflection_bmp.dispose();
}
function beginCradle(regionID, ratio) {
setCatagory(regionID);
playAnimFromRatio(ratio);
cradling = true;
}
function endCradle() {
anim_mc.gotoAndPlay("out");
cradling = false;
}
function beginSpecial(type, ratio) {
if (type == 1) {
setCatagory("trick01");
} else if (type == 2) {
setCatagory("trick02");
}
playAnimFromRatio(ratio);
doingSpecial = true;
}
function endSpecial() {
doingSpecial = false;
setCatagory("idle");
catagory_mc.gotoAndStop(((direction == -1) ? 1 : 2));
}
function failCradle() {
anim_mc.gotoAndPlay("fail");
cradling = false;
}
function setBalance(ratio) {
var _local3 = anim_mc.cradle._totalframes;
var _local2 = Math.floor((ratio * _local3) + 1);
anim_mc.cradle.gotoAndStop(_local2);
}
function setCatagory(id) {
mc.gotoAndStop(id);
catagory_mc = mc.catagory;
catagory_mc.cacheAsBitmap = true;
mask_mc.cacheAsBitmap = true;
catagory_mc.setMask(mask_mc);
setCatagoryFrame(1);
}
function setCatagoryFrame(frame) {
catagory_mc.gotoAndStop(frame);
anim_mc = catagory_mc.anim;
anim_mc.gotoAndPlay(1);
}
function playAnimFromRatio(ratio) {
var _local2 = Math.floor((ratio * catagory_mc._totalframes) + 1);
direction = ((ratio < 0.5) ? -1 : 1);
setCatagoryFrame(_local2);
}
function pause() {
anim_mc.stop();
}
function resume() {
anim_mc.play();
}
function step(dt) {
if ((cradling == false) && (doingSpecial == false)) {
if ((game.ball.__get__x() < 0) && (direction == 1)) {
setCatagory("turn");
catagory_mc.gotoAndStop(2);
} else if ((game.ball.__get__x() > 1) && (direction == -1)) {
setCatagory("turn");
catagory_mc.gotoAndStop(1);
} else if (anim_mc._currentframe == anim_mc._totalframes) {
setCatagory("idle");
catagory_mc.gotoAndStop(((direction == -1) ? 1 : 2));
}
direction = ((game.ball.__get__x() < 0) ? -1 : 1);
}
var _local2 = catagory_mc.getBounds(mc);
var _local3 = new flash.geom.Rectangle(_local2.xMin, _local2.yMin, _local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin);
reflection_bmp.dispose();
reflection_bmp = new flash.display.BitmapData(int(_local3.width * reflectionQuality), int(_local3.height * reflectionQuality), true, 0);
var _local4 = new flash.geom.Matrix();
_local4.scale(reflectionQuality, reflectionQuality);
reflection_bmp.draw(catagory_mc, _local4);
reflection_mc.attachBitmap(reflection_bmp, 0);
reflection_mc._yscale = -100 / reflectionQuality;
reflection_mc._xscale = 100 / reflectionQuality;
reflection_mc._x = _local3.x;
reflection_mc._y = (-_local2.yMax) + _local3.height;
reflection_mc.filters = [new flash.filters.BlurFilter(8, 8, 1)];
}
function get ballPos() {
var _local3 = findBallMC(mc);
var _local2 = {x:_local3._x, y:_local3._y};
_local3._parent.localToGlobal(_local2);
game.mc.globalToLocal(_local2);
return(new flash.geom.Point(_local2.x, _local2.y));
}
function findBallMC(search_mc) {
for (var _local6 in search_mc) {
var _local4 = search_mc[_local6];
if (_local4 instanceof MovieClip) {
var _local2 = MovieClip(_local4);
if (_local2._name == "ball_mc") {
return(_local2);
}
var _local3 = findBallMC(_local2);
if (_local3 != null) {
return(_local3);
}
}
}
}
var direction = -1;
var cradling = false;
var doingSpecial = false;
var reflectionQuality = 0.5;
}
Symbol 1842 MovieClip [__Packages.keepyups.objects.game.Ball] Frame 0
class keepyups.objects.game.Ball
{
var game, mc, shadow_mc, reflection_mc, vx, vy, radius, _x, _y;
function Ball (game) {
this.game = game;
mc = game.mc.ball_mc;
shadow_mc = game.mc.ballShadow_mc;
reflection_mc = game.mc.ballReflection_mc;
x = (mc._x);
y = (mc._y);
vx = 0;
vy = 0;
radius = mc._width * 0.5;
}
function destroy() {
}
function respawn() {
_x = -200;
_y = -200;
vx = 6;
vy = -16;
inPlay = true;
mc.gotoAndStop("respawn");
reflection_mc.gotoAndStop("respawn");
shadow_mc.gotoAndStop("respawn");
respawnCounter = 0;
}
function outOfPlay() {
mc.gotoAndStop("idle");
mc.gotoAndStop("dropped");
reflection_mc.gotoAndStop("idle");
reflection_mc.gotoAndStop("dropped");
shadow_mc.gotoAndStop("idle");
shadow_mc.gotoAndStop("dropped");
inPlay = false;
respawnCounter = 55;
game.ballDropped();
}
function pause() {
mc.anim.stop();
reflection_mc.anim.stop();
shadow_mc.anim.stop();
}
function resume() {
mc.anim.play();
reflection_mc.anim.stop();
shadow_mc.anim.play();
if (mc.anim._currentframe == mc.anim._totalframes) {
mc.gotoAndStop("idle");
}
if (reflection_mc.anim._currentframe == shadow_mc.anim._totalframes) {
reflection_mc.gotoAndStop("idle");
}
}
function step(dt) {
if (respawnCounter > 0) {
respawnCounter--;
if (respawnCounter == 0) {
respawn();
}
}
shadow_mc._x = _x;
shadow_mc._y = radius;
var _local3 = (-_y) / 200;
shadow_mc._xscale = 100 + (_local3 * 200);
shadow_mc._yscale = shadow_mc._xscale;
shadow_mc._alpha = (1 - _local3) * 100;
reflection_mc._x = _x;
reflection_mc._y = (-_y) + radius;
if (enabled == false) {
return(undefined);
}
vx = vx + (((-vx) * 0.01) * dt);
vy = vy + (((-vy) * 0.01) * dt);
x = x + (vx * dt);
y = y + (vy * dt);
if (y >= 0) {
y = (0);
vy = vy * -0.5;
if (vy > -2) {
vy = 0;
}
vx = vx + (((-vx) * 0.05) * dt);
if (inPlay) {
outOfPlay();
}
} else {
vy = vy + gravity;
}
}
function multiplierBonus() {
mc.gotoAndStop("idle");
mc.gotoAndStop("multiplierBonus");
reflection_mc.gotoAndStop("idle");
reflection_mc.gotoAndStop("multiplierBonus");
shadow_mc.gotoAndStop("idle");
shadow_mc.gotoAndStop("multiplierBonus");
}
function comboComplete() {
mc.gotoAndStop("idle");
mc.gotoAndStop("comboComplete");
reflection_mc.gotoAndStop("idle");
reflection_mc.gotoAndStop("comboComplete");
shadow_mc.gotoAndStop("comboComplete");
shadow_mc.gotoAndStop("idle");
}
function specialReady() {
mc.gotoAndStop("idle");
mc.gotoAndStop("specialReady");
reflection_mc.gotoAndStop("idle");
reflection_mc.gotoAndStop("specialReady");
shadow_mc.gotoAndStop("idle");
shadow_mc.gotoAndStop("specialReady");
}
function hide() {
enabled = false;
mc._visible = false;
reflection_mc._visible = false;
}
function show() {
enabled = true;
mc._visible = true;
reflection_mc._visible = true;
}
function set x(value) {
_x = value;
mc._x = _x;
//return(x);
}
function get x() {
return(_x);
}
function set y(value) {
_y = value;
mc._y = _y;
//return(y);
}
function get y() {
return(_y);
}
var gravity = 1.05;
var enabled = true;
var inPlay = true;
var respawnCounter = 50;
}
Symbol 1843 MovieClip [__Packages.keepyups.objects.game.Region] Frame 0
class keepyups.objects.game.Region extends unwrong.codebase.events.EventDispatcher
{
var mc, id;
function Region (mc, id) {
super();
this.mc = mc;
this.id = id;
mc._alpha = 0;
mc.useHandCursor = false;
}
}
Symbol 1844 MovieClip [__Packages.keepyups.objects.game.Paddle] Frame 0
class keepyups.objects.game.Paddle
{
var game, mc, _x, _y, _rotation;
function Paddle (game) {
this.game = game;
mc = game.mc.paddle_mc;
x = (mc._x);
y = (mc._y);
}
function destroy() {
}
function step(dt) {
x = (game.mc._xmouse);
y = (game.mc._ymouse);
}
function set x(value) {
_x = value;
mc._x = _x;
//return(x);
}
function get x() {
return(_x);
}
function set y(value) {
_y = value;
mc._y = _y;
//return(y);
}
function get y() {
return(_y);
}
function set rotation(value) {
_rotation = value;
mc._rotation = _rotation;
//return(rotation);
}
function get rotation() {
return(_rotation);
}
function activate() {
mc.gotoAndStop("idle");
mc.gotoAndStop("activated");
}
function enable() {
mc.filters = [];
}
function disable() {
var _local2 = new unwrong.codebase.geom.ColorMatrix();
_local2.adjustSaturation(0);
mc.filters = [_local2.__get__filter()];
}
}
Symbol 1845 MovieClip [__Packages.unwrong.codebase.geom.ColorMatrix] Frame 0
class unwrong.codebase.geom.ColorMatrix
{
var matrix;
function ColorMatrix (mat) {
if (mat instanceof unwrong.codebase.geom.ColorMatrix) {
matrix = mat.matrix.concat();
} else if (mat instanceof Array) {
matrix = mat.concat();
} else {
reset();
}
}
function reset() {
matrix = IDENTITY.concat();
}
function clone() {
return(new unwrong.codebase.geom.ColorMatrix(matrix));
}
function adjustSaturation(s) {
var _local2 = 1 - s;
var _local5 = _local2 * r_lum;
var _local3 = _local2 * g_lum;
var _local4 = _local2 * b_lum;
var _local7 = Array(_local5 + s, _local3, _local4, 0, 0, _local5, _local3 + s, _local4, 0, 0, _local5, _local3, _local4 + s, 0, 0, 0, 0, 0, 1, 0);
concat(_local7);
}
function adjustContrast(r, g, b) {
g = g || (r);
b = b || (r);
r = r + 1;
g = g + 1;
b = b + 1;
var _local5 = Array(r, 0, 0, 0, 128 * (1 - r), 0, g, 0, 0, 128 * (1 - g), 0, 0, b, 0, 128 * (1 - b), 0, 0, 0, 1, 0);
concat(_local5);
}
function adjustBrightness(r, g, b) {
g = g || (r);
b = b || (r);
var _local4 = Array(1, 0, 0, 0, r, 0, 1, 0, 0, g, 0, 0, 1, 0, b, 0, 0, 0, 1, 0);
concat(_local4);
}
function adjustHue(angle) {
angle = angle * (Math.PI/180);
var _local2 = Math.cos(angle);
var _local3 = Math.sin(angle);
var _local6 = 0.213;
var _local5 = 0.715;
var _local4 = 0.072;
var _local8 = Array((_local6 + (_local2 * (1 - _local6))) + (_local3 * (-_local6)), (_local5 + (_local2 * (-_local5))) + (_local3 * (-_local5)), (_local4 + (_local2 * (-_local4))) + (_local3 * (1 - _local4)), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * 0.143), (_local5 + (_local2 * (1 - _local5))) + (_local3 * 0.14), (_local4 + (_local2 * (-_local4))) + (_local3 * -0.283), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * (-(1 - _local6))), (_local5 + (_local2 * (-_local5))) + (_local3 * _local5), (_local4 + (_local2 * (1 - _local4))) + (_local3 * _local4), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
concat(_local8);
}
function colorize(rgb, amount) {
var _local4 = ((rgb >> 16) & 255) / 255;
var _local6 = ((rgb >> 8) & 255) / 255;
var _local3 = (rgb & 255) / 255;
if (amount == null) {
amount = 1;
}
var _local5 = 1 - amount;
var _local8 = Array(_local5 + ((amount * _local4) * r_lum), (amount * _local4) * g_lum, (amount * _local4) * b_lum, 0, 0, (amount * _local6) * r_lum, _local5 + ((amount * _local6) * g_lum), (amount * _local6) * b_lum, 0, 0, (amount * _local3) * r_lum, (amount * _local3) * g_lum, _local5 + ((amount * _local3) * b_lum), 0, 0, 0, 0, 0, 1, 0);
concat(_local8);
}
function setAlpha(alpha) {
var _local2 = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, alpha, 0);
concat(_local2);
}
function desaturate() {
var _local2 = Array(r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, 0, 0, 0, 1, 0);
concat(_local2);
}
function invert() {
var _local2 = Array(-1, 0, 0, 0, 255, 0, -1, 0, 0, 255, 0, 0, -1, 0, 255, 0, 0, 0, 1, 0);
concat(_local2);
}
function threshold(t) {
var _local3 = Array(r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, 0, 0, 0, 1, 0);
concat(_local3);
}
function randomize(amount) {
if (amount == null) {
amount = 1;
}
var _local3 = 1 - amount;
var _local10 = _local3 + (amount * (Math.random() - Math.random()));
var _local15 = amount * (Math.random() - Math.random());
var _local12 = amount * (Math.random() - Math.random());
var _local6 = (amount * 255) * (Math.random() - Math.random());
var _local8 = amount * (Math.random() - Math.random());
var _local14 = _local3 + (amount * (Math.random() - Math.random()));
var _local11 = amount * (Math.random() - Math.random());
var _local5 = (amount * 255) * (Math.random() - Math.random());
var _local7 = amount * (Math.random() - Math.random());
var _local13 = amount * (Math.random() - Math.random());
var _local9 = _local3 + (amount * (Math.random() - Math.random()));
var _local4 = (amount * 255) * (Math.random() - Math.random());
var _local16 = Array(_local10, _local15, _local12, 0, _local6, _local8, _local14, _local11, 0, _local5, _local7, _local13, _local9, 0, _local4, 0, 0, 0, 1, 0);
concat(_local16);
}
function setChannels(r, g, b, a) {
var _local3 = (((((r & 1) == 1) ? 1 : 0) + (((r & 2) == 2) ? 1 : 0)) + (((r & 4) == 4) ? 1 : 0)) + (((r & 8) == 8) ? 1 : 0);
if (_local3 > 0) {
_local3 = 1 / _local3;
}
var _local2 = (((((g & 1) == 1) ? 1 : 0) + (((g & 2) == 2) ? 1 : 0)) + (((g & 4) == 4) ? 1 : 0)) + (((g & 8) == 8) ? 1 : 0);
if (_local2 > 0) {
_local2 = 1 / _local2;
}
var _local4 = (((((b & 1) == 1) ? 1 : 0) + (((b & 2) == 2) ? 1 : 0)) + (((b & 4) == 4) ? 1 : 0)) + (((b & 8) == 8) ? 1 : 0);
if (_local4 > 0) {
_local4 = 1 / _local4;
}
var _local5 = (((((a & 1) == 1) ? 1 : 0) + (((a & 2) == 2) ? 1 : 0)) + (((a & 4) == 4) ? 1 : 0)) + (((a & 8) == 8) ? 1 : 0);
if (_local5 > 0) {
_local5 = 1 / _local5;
}
var _local10 = Array((((r & 1) == 1) ? (_local3) : 0), (((r & 2) == 2) ? (_local3) : 0), (((r & 4) == 4) ? (_local3) : 0), (((r & 8) == 8) ? (_local3) : 0), 0, (((g & 1) == 1) ? (_local2) : 0), (((g & 2) == 2) ? (_local2) : 0), (((g & 4) == 4) ? (_local2) : 0), (((g & 8) == 8) ? (_local2) : 0), 0, (((b & 1) == 1) ? (_local4) : 0), (((b & 2) == 2) ? (_local4) : 0), (((b & 4) == 4) ? (_local4) : 0), (((b & 8) == 8) ? (_local4) : 0), 0, (((a & 1) == 1) ? (_local5) : 0), (((a & 2) == 2) ? (_local5) : 0), (((a & 4) == 4) ? (_local5) : 0), (((a & 8) == 8) ? (_local5) : 0), 0);
concat(_local10);
}
function blend(m, amount) {
var _local3 = 1 - amount;
var _local2 = 0;
while (_local2 < 20) {
matrix[_local2] = (_local3 * matrix[_local2]) + (amount * m.matrix[_local2]);
_local2++;
}
}
function concat(mat) {
var _local6 = Array();
var _local3 = 0;
var _local5 = 0;
while (_local5 < 4) {
var _local2 = 0;
while (_local2 < 5) {
_local6[_local3 + _local2] = ((((mat[_local3] * matrix[_local2]) + (mat[_local3 + 1] * matrix[_local2 + 5])) + (mat[_local3 + 2] * matrix[_local2 + 10])) + (mat[_local3 + 3] * matrix[_local2 + 15])) + ((_local2 == 4) ? (mat[_local3 + 4]) : 0);
_local2++;
}
_local3 = _local3 + 5;
_local5++;
}
matrix = _local6;
}
function get filter() {
return(new flash.filters.ColorMatrixFilter(matrix));
}
static var r_lum = 0.212671;
static var g_lum = 0.71516;
static var b_lum = 0.072169;
static var IDENTITY = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0);
}
Symbol 1846 MovieClip [__Packages.keepyups.objects.game.Cradle] Frame 0
class keepyups.objects.game.Cradle
{
var game, mc, needle_mc, regionID, duration, balance, wobble, wobbleTarget, mousePosX, mousePosY, balanceRatio;
function Cradle (game) {
this.game = game;
mc = game.mc.cradle_mc;
needle_mc = mc.needle_mc;
mc._visible = false;
}
function beginCradle(regionID, x, y) {
enabled = true;
this.regionID = regionID;
duration = 0;
balance = 0;
wobble = 0;
wobbleTarget = 0;
mc._x = x;
mc._y = y - needleLength;
}
function endCradle() {
enabled = false;
mc._visible = false;
}
function failCradle() {
endCradle();
}
function updateMousePos(x, y) {
mousePosX = x;
mousePosY = y;
}
function step(dt) {
if (!enabled) {
mc._visible = false;
return(undefined);
}
duration = duration + dt;
var _local2 = new keepyups.events.GameEvent(keepyups.events.GameEvent.ACTION);
_local2.action = new keepyups.objects.actions.CradleAction(regionID, duration, balance / range);
game.dispatchEvent(_local2);
var _local3 = duration + range;
var _local4 = unwrong.codebase.util.MathUtils.srand();
wobbleTarget = (_local4 * _local3) - (_local3 * 0.5);
wobble = wobble + ((wobbleTarget - wobble) * 0.05);
balance = balance + (wobble * 0.1);
balance = balance + (((mousePosX - mc._x) * 0.4) * 0.1);
balance = balance + (balance * 0.07);
needle_mc._x = Math.sin(balance * 0.01745) * needleLength;
needle_mc._y = Math.cos(balance * 0.01745) * needleLength;
balanceRatio = (balance / (range * 2)) + 0.5;
game.ball.__set__x(game.player.__get__ballPos().x);
game.ball.__set__y(game.player.__get__ballPos().y);
game.player.setBalance(balanceRatio);
if (Math.abs(balance) > range) {
game.failCradle();
}
mc._visible = true;
}
var range = 70;
var enabled = false;
var needleLength = 60;
}
Symbol 1847 MovieClip [__Packages.keepyups.events.GameEvent] Frame 0
class keepyups.events.GameEvent extends unwrong.codebase.events.Event
{
function GameEvent (type) {
super(type);
}
static var ACTION = "gameEventAction";
static var BALL_DROPPED = "gameEventBallDropped";
static var BALL_ROLLOVER_REGION = "gameEventBallRollOverRegion";
static var BALL_ROLLOUT_REGION = "gameEventBallRollOutRegion";
}
Symbol 1848 MovieClip [__Packages.keepyups.objects.actions.BaseAction] Frame 0
class keepyups.objects.actions.BaseAction
{
var region;
function BaseAction (region) {
this.region = region;
}
}
Symbol 1849 MovieClip [__Packages.keepyups.objects.tricks.Combo] Frame 0
class keepyups.objects.tricks.Combo
{
var name, score, tricks, duration, multiplier, special;
function Combo (name, score) {
this.name = name;
this.score = score;
tricks = new Array();
}
function deserialise(node) {
name = node.attributes.name;
score = Number(node.attributes.score);
duration = Number(node.attributes.duration);
multiplier = Number(node.attributes.multiplier);
special = Number(node.attributes.special);
var _local3 = 0;
while (_local3 < node.childNodes.length) {
var _local2 = node.childNodes[_local3];
switch (_local2.nodeName) {
case "Trick" :
var _local4 = new keepyups.objects.tricks.Trick();
_local4.deserialise(_local2);
tricks.push(_local4);
break;
case "CradleTrick" :
_local4 = new keepyups.objects.tricks.CradleTrick();
_local4.deserialise(_local2);
tricks.push(_local4);
break;
case "RatioTrick" :
_local4 = new keepyups.objects.tricks.RatioTrick();
_local4.deserialise(_local2);
tricks.push(_local4);
}
_local3++;
}
if (isNaN(multiplier)) {
multiplier = 1;
}
if (isNaN(duration)) {
duration = 600;
}
}
}
Symbol 1850 MovieClip [__Packages.keepyups.objects.tricks.BaseTrick] Frame 0
class keepyups.objects.tricks.BaseTrick
{
var region;
function BaseTrick (region) {
this.region = region;
}
function validateAction(action) {
return(action.region == region);
}
function deserialise(node) {
region = node.attributes.region;
}
}
Symbol 1851 MovieClip [__Packages.keepyups.objects.tricks.Trick] Frame 0
class keepyups.objects.tricks.Trick extends keepyups.objects.tricks.BaseTrick
{
function Trick (region) {
super(region);
}
function validateAction(action) {
if ((action instanceof keepyups.objects.actions.Action) == false) {
return(false);
}
return(super.validateAction(action));
}
}
Symbol 1852 MovieClip [__Packages.keepyups.objects.actions.Action] Frame 0
class keepyups.objects.actions.Action extends keepyups.objects.actions.BaseAction
{
function Action (region) {
super(region);
}
}
Symbol 1853 MovieClip [__Packages.keepyups.objects.tricks.CradleTrick] Frame 0
class keepyups.objects.tricks.CradleTrick extends keepyups.objects.tricks.BaseTrick
{
var duration;
function CradleTrick (duration) {
super();
this.duration = duration;
}
function validateAction(action) {
if (super.validateAction(action) == false) {
return(false);
}
if ((action instanceof keepyups.objects.actions.EndCradleAction) == false) {
return(false);
}
var _local4 = keepyups.objects.actions.EndCradleAction(action);
return(_local4.duration >= duration);
}
function deserialise(node) {
super.deserialise(node);
duration = Number(node.attributes.duration);
}
}
Symbol 1854 MovieClip [__Packages.keepyups.objects.actions.CradleAction] Frame 0
class keepyups.objects.actions.CradleAction extends keepyups.objects.actions.BaseAction
{
var duration, balance;
function CradleAction (region, duration, balance) {
super(region);
this.duration = duration;
this.balance = balance;
}
}
Symbol 1855 MovieClip [__Packages.keepyups.objects.actions.EndCradleAction] Frame 0
class keepyups.objects.actions.EndCradleAction extends keepyups.objects.actions.CradleAction
{
var duration;
function EndCradleAction (region, duration) {
super(region);
this.duration = duration;
}
}
Symbol 1856 MovieClip [__Packages.keepyups.objects.tricks.RatioTrick] Frame 0
class keepyups.objects.tricks.RatioTrick extends keepyups.objects.tricks.Trick
{
var minRatio, maxRatio;
function RatioTrick (region, minRatio, maxRatio) {
super(region);
this.minRatio = minRatio;
this.maxRatio = maxRatio;
}
function validateAction(action) {
if (super.validateAction(action) == false) {
return(false);
}
if ((action instanceof keepyups.objects.actions.RatioAction) == false) {
return(false);
}
var _local3 = keepyups.objects.actions.RatioAction(action);
return((_local3.ratio > minRatio) && (_local3.ratio < maxRatio));
}
function deserialise(node) {
super.deserialise(node);
minRatio = Number(node.attributes.minRatio);
maxRatio = Number(node.attributes.maxRatio);
}
}
Symbol 1857 MovieClip [__Packages.keepyups.objects.actions.RatioAction] Frame 0
class keepyups.objects.actions.RatioAction extends keepyups.objects.actions.Action
{
var ratio;
function RatioAction (region, ratio) {
super(region);
this.ratio = ratio;
}
}
Symbol 1858 MovieClip [__Packages.unwrong.codebase.util.MathUtils] Frame 0
class unwrong.codebase.util.MathUtils
{
function MathUtils () {
}
static function srand() {
SEED = int((SEED * 1664525) + 1013904223);
return((SEED / 4294967296) + 0.5);
}
static function seed(value) {
SEED = value;
}
static function snapToIncrement(number, increment) {
var _local1 = number % increment;
if (_local1 >= (increment / 2)) {
return((number + increment) - _local1);
}
return(number - _local1);
}
static function angleBetween(a, b) {
if ((a - b) > Math.PI) {
return(a - (b + (Math.PI*2)));
}
if ((a - b) < -3.14159265358979) {
return((a + (Math.PI*2)) - b);
}
return(a - b);
}
static var PI = Math.PI;
static var PI2 = (Math.PI*2);
static var halfPI = (Math.PI/2);
static var SEED = 0;
}
Symbol 1859 MovieClip [__Packages.keepyups.objects.game.Special] Frame 0
class keepyups.objects.game.Special
{
var game, flag;
function Special (game) {
this.game = game;
}
function beginSpecial(type, x, y) {
enabled = true;
flag = false;
}
function endSpecial() {
enabled = false;
}
function step(dt) {
if (!enabled) {
return(undefined);
}
var _local2 = game.player.__get__ballPos();
if (_local2.x == null) {
if (flag == false) {
game.ball.vx = 0;
game.ball.vy = -15;
game.ball.show();
flag = true;
}
} else {
game.ball.__set__x(_local2.x);
game.ball.__set__y(_local2.y);
}
if (flag) {
if (game.player.anim_mc._currentframe == game.player.anim_mc._totalframes) {
game.endSpecial();
}
}
}
var enabled = false;
var needleLength = 60;
}
Symbol 1860 MovieClip [__Packages.keepyups.objects.recorder.Recorder] Frame 0
class keepyups.objects.recorder.Recorder
{
var keyframes;
function Recorder () {
keyframes = new Object();
}
function addKeyframe(keyframe) {
if (keyframes[keyframe.t] == null) {
keyframes[keyframe.t] = new Array();
}
keyframes[keyframe.t].push(keyframe);
}
function getKeyframesAtT(t) {
return(keyframes[t]);
}
function serialise() {
var _local4 = new XML().createElement("demo");
for (var _local5 in keyframes) {
var _local3 = keyframes[_local5];
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.appendChild(_local3[_local2].serialise());
_local2++;
}
}
return(_local4);
}
function deserialise(node) {
var _local3 = 0;
while (_local3 < node.childNodes.length) {
var _local2 = node.childNodes[_local3];
switch (_local2.nodeName) {
case "click" :
var _local7 = new keepyups.objects.recorder.ClickKeyframe();
_local7.deserialise(_local2);
addKeyframe(_local7);
break;
case "beginCradle" :
var _local6 = new keepyups.objects.recorder.BeginCradleKeyframe();
_local6.deserialise(_local2);
addKeyframe(_local6);
break;
case "beginSpecial" :
var _local8 = new keepyups.objects.recorder.BeginSpecialKeyframe();
_local8.deserialise(_local2);
addKeyframe(_local8);
break;
case "cradle" :
var _local9 = new keepyups.objects.recorder.CradleKeyframe();
_local9.deserialise(_local2);
addKeyframe(_local9);
break;
case "endCradle" :
var _local4 = new keepyups.objects.recorder.EndCradleKeyframe();
_local4.deserialise(_local2);
addKeyframe(_local4);
break;
case "failCradle" :
var _local5 = new keepyups.objects.recorder.FailCradleKeyframe();
_local5.deserialise(_local2);
addKeyframe(_local5);
}
_local3++;
}
}
}
Symbol 1861 MovieClip [__Packages.keepyups.objects.recorder.Keyframe] Frame 0
class keepyups.objects.recorder.Keyframe
{
var t, id;
function Keyframe (t) {
this.t = t;
id = "keyframe";
}
function serialise() {
var _local2 = new XML().createElement(id);
_local2.attributes.t = String(t);
return(_local2);
}
function deserialise(node) {
t = Number(node.attributes.t);
}
}
Symbol 1862 MovieClip [__Packages.keepyups.objects.recorder.ClickKeyframe] Frame 0
class keepyups.objects.recorder.ClickKeyframe extends keepyups.objects.recorder.Keyframe
{
var x, y, id;
function ClickKeyframe (t, x, y) {
super(t);
this.x = x;
this.y = y;
id = "click";
}
function serialise() {
var _local3 = super.serialise();
_local3.attributes.x = String(x);
_local3.attributes.y = String(y);
return(_local3);
}
function deserialise(node) {
super.deserialise(node);
x = Number(node.attributes.x);
y = Number(node.attributes.y);
}
}
Symbol 1863 MovieClip [__Packages.keepyups.objects.recorder.BeginCradleKeyframe] Frame 0
class keepyups.objects.recorder.BeginCradleKeyframe extends keepyups.objects.recorder.Keyframe
{
var x, y, id;
function BeginCradleKeyframe (t, x, y) {
super(t);
this.x = x;
this.y = y;
id = "beginCradle";
}
function serialise() {
var _local3 = super.serialise();
_local3.attributes.x = String(x);
_local3.attributes.y = String(y);
return(_local3);
}
function deserialise(node) {
super.deserialise(node);
x = Number(node.attributes.x);
y = Number(node.attributes.y);
}
}
Symbol 1864 MovieClip [__Packages.keepyups.objects.recorder.BeginSpecialKeyframe] Frame 0
class keepyups.objects.recorder.BeginSpecialKeyframe extends keepyups.objects.recorder.Keyframe
{
var x, y, type, id;
function BeginSpecialKeyframe (t, x, y, type) {
super(t);
this.x = x;
this.y = y;
this.type = type;
id = "beginSpecial";
}
function serialise() {
var _local3 = super.serialise();
_local3.attributes.x = String(x);
_local3.attributes.y = String(y);
_local3.attributes.type = String(type);
return(_local3);
}
function deserialise(node) {
super.deserialise(node);
x = Number(node.attributes.x);
y = Number(node.attributes.y);
type = Number(node.attributes.type);
}
}
Symbol 1865 MovieClip [__Packages.keepyups.objects.recorder.CradleKeyframe] Frame 0
class keepyups.objects.recorder.CradleKeyframe extends keepyups.objects.recorder.Keyframe
{
var x, y, id;
function CradleKeyframe (t, x, y) {
super(t);
this.x = x;
this.y = y;
id = "cradle";
}
function serialise() {
var _local3 = super.serialise();
_local3.attributes.x = String(x);
_local3.attributes.y = String(y);
return(_local3);
}
function deserialise(node) {
super.deserialise(node);
x = Number(node.attributes.x);
y = Number(node.attributes.y);
}
}
Symbol 1866 MovieClip [__Packages.keepyups.objects.recorder.EndCradleKeyframe] Frame 0
class keepyups.objects.recorder.EndCradleKeyframe extends keepyups.objects.recorder.Keyframe
{
var id;
function EndCradleKeyframe (t) {
super(t);
id = "endCradle";
}
}
Symbol 1867 MovieClip [__Packages.keepyups.objects.recorder.FailCradleKeyframe] Frame 0
class keepyups.objects.recorder.FailCradleKeyframe extends keepyups.objects.recorder.Keyframe
{
var id;
function FailCradleKeyframe (t) {
super(t);
id = "failCradle";
}
}
Symbol 1868 MovieClip [__Packages.keepyups.objects.game.Conductor] Frame 0
class keepyups.objects.game.Conductor
{
var game;
function Conductor (game) {
this.game = game;
}
function destroy() {
game = null;
}
function step(dt) {
}
function enable() {
}
function disable() {
}
}
Symbol 1869 MovieClip [__Packages.keepyups.objects.game.ComboManager] Frame 0
class keepyups.objects.game.ComboManager extends unwrong.codebase.events.EventDispatcher
{
var game, xml, combos, comboIndex, trickIndex, currTrick, currCombo, dispatchEvent;
function ComboManager (game, xml) {
super();
this.game = game;
this.xml = xml;
combos = new Array();
var _local3 = 0;
while (_local3 < xml.firstChild.childNodes.length) {
var _local5 = xml.firstChild.childNodes[_local3];
var _local4 = new keepyups.objects.tricks.Combo();
_local4.deserialise(_local5);
combos.push(_local4);
_local3++;
}
game.addEventListener(keepyups.events.GameEvent.ACTION, this, onAction);
game.addEventListener(keepyups.events.GameEvent.BALL_DROPPED, this, onBallDropped);
comboIndex = -1;
nextCombo();
}
function onBallDropped(event) {
resetCombo();
}
function resetCombo() {
trickIndex = 0;
currTrick = currCombo.tricks[trickIndex];
var _local2 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.NEW_COMBO);
_local2.combo = currCombo;
dispatchEvent(_local2);
_local2 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.NEW_TRICK);
_local2.combo = currCombo;
_local2.trick = currTrick;
_local2.trickIndex = 0;
dispatchEvent(_local2);
}
function onAction(event) {
var _local2 = event.action;
var _local4 = currCombo.tricks[trickIndex];
if ((_local2 instanceof keepyups.objects.actions.CradleAction) && (currTrick instanceof keepyups.objects.tricks.CradleTrick)) {
if ((_local2 instanceof keepyups.objects.actions.EndCradleAction) == false) {
return(undefined);
}
}
if (_local4.validateAction(_local2)) {
trickIndex++;
currTrick = currCombo.tricks[trickIndex];
var _local3 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.TRICK_COMPLETE);
_local3.combo = currCombo;
_local3.trick = currCombo.tricks[trickIndex - 1];
_local3.trickIndex = trickIndex - 1;
dispatchEvent(_local3);
if (trickIndex == currCombo.tricks.length) {
_local3 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.COMBO_COMPLETE);
_local3.combo = currCombo;
dispatchEvent(_local3);
nextCombo();
} else {
_local3 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.NEW_TRICK);
_local3.combo = currCombo;
_local3.trick = currTrick;
_local3.trickIndex = trickIndex;
dispatchEvent(_local3);
}
} else {
resetCombo();
if (trickIndex != currCombo.tricks.length) {
_local4 = currCombo.tricks[trickIndex];
if (_local4.validateAction(_local2)) {
trickIndex++;
currTrick = currCombo.tricks[trickIndex];
var _local3 = new keepyups.events.ComboEvent(keepyups.events.ComboEvent.TRICK_COMPLETE);
_local3.combo = currCombo;
_local3.trick = currCombo.tricks[trickIndex - 1];
_local3.trickIndex = trickIndex - 1;
dispatchEvent(_local3);
}
}
}
}
function nextCombo() {
comboIndex++;
currCombo = combos[comboIndex];
resetCombo();
}
}
Symbol 1870 MovieClip [__Packages.keepyups.events.ComboEvent] Frame 0
class keepyups.events.ComboEvent extends unwrong.codebase.events.Event
{
function ComboEvent (type) {
super(type);
}
static var CRADLE = "ComboEventCradle";
static var COMBO_COMPLETE = "ComboEventComboComplete";
static var NEW_COMBO = "ComboEventNewComplete";
static var TRICK_COMPLETE = "ComboEventTrickComplete";
static var NEW_TRICK = "ComboEventNewTrick";
}
Symbol 1871 MovieClip [__Packages.keepyups.objects.game.ScoreManager] Frame 0
class keepyups.objects.game.ScoreManager extends unwrong.codebase.events.EventDispatcher
{
var game, averageValues, _style, prevAction, _score, dispatchEvent, _multiplier, _special;
function ScoreManager (game) {
super();
this.game = game;
game.addEventListener(keepyups.events.GameEvent.ACTION, this, onAction);
game.addEventListener(keepyups.events.GameEvent.BALL_DROPPED, this, onBallDropped);
game.comboManager.addEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
score = (0);
multiplier = (1);
special = (0);
style = (0);
averageValues = [];
}
function onBallDropped(event) {
style = style - 0.3;
special = (0);
}
function step(dt) {
_style = _style - (_style * 0.005);
if (_style < 0) {
_style = 0;
}
style = (_style);
}
function onAction(event) {
var _local2 = event.action;
if (_local2.region != prevAction.region) {
_style = _style + 0.1;
if ((prevAction instanceof keepyups.objects.actions.EndCradleAction) && (_local2 instanceof keepyups.objects.actions.CradleAction)) {
_style = _style + 0.5;
}
}
if (_local2 instanceof keepyups.objects.actions.RatioAction) {
var _local5 = 1 - Math.abs(keepyups.objects.actions.RatioAction(_local2).ratio);
_style = _style + (_local5 * 0.05);
score = score + (250 * multiplier);
special = special + (2 * _style);
} else if (_local2 instanceof keepyups.objects.actions.CradleAction) {
var _local3 = keepyups.objects.actions.CradleAction(_local2);
if (_local3 instanceof keepyups.objects.actions.BeginCradleAction) {
_style = _style + 0.2;
}
if (_local3 instanceof keepyups.objects.actions.EndCradleAction) {
var _local6 = keepyups.objects.actions.EndCradleAction(_local3);
var _local4 = int(_local6.duration / 120);
if (_local4 > 0) {
multiplier = multiplier + _local4;
}
_style = _style + (keepyups.objects.actions.EndCradleAction(_local2).duration * 0.01);
special = special + ((keepyups.objects.actions.EndCradleAction(_local2).duration * _style) * 0.1);
}
if (_local3 instanceof keepyups.objects.actions.FailCradleAction) {
_style = _style - 0.2;
} else {
score = score + (25 * multiplier);
_style = _style + (_style * 0.004);
special = special + (0.05 * style);
}
} else if (_local2 instanceof keepyups.objects.actions.FailCradleAction) {
_style = _style - 2;
} else if (_local2 instanceof keepyups.objects.actions.BeginSpecialAction) {
multiplier = multiplier + 4;
score = score + (100000 * multiplier);
_style = _style + 5;
}
style = (_style);
prevAction = _local2;
}
function comboCompleteHandler(event) {
var _local3 = 0;
score = score + (event.combo.score * multiplier);
multiplier = multiplier + event.combo.multiplier;
style = style + (event.combo.special * 0.02);
game.ball.comboComplete();
special = special + (event.combo.special * style);
}
function set score(value) {
_score = value;
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.SCORE_CHANGED, _score));
//return(score);
}
function get score() {
return(_score);
}
function set multiplier(value) {
if (value > _multiplier) {
game.ball.multiplierBonus();
}
_multiplier = value;
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.MULTIPLIER_CHANGED, _multiplier));
//return(multiplier);
}
function get multiplier() {
return(_multiplier);
}
function set special(value) {
_special = value;
if (_special > 100) {
_special = 100;
}
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.SPECIAL_CHANGED, _special));
if ((_special == 100) && (specialEnabled == false)) {
specialEnabled = true;
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.SPECIAL_READY, _special));
game.ball.specialReady();
} else if ((_special != 100) && (specialEnabled)) {
specialEnabled = false;
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.SPECIAL_UNAVAILABLE, _special));
}
//return(special);
}
function get special() {
return(_special);
}
function set style(value) {
_style = value;
dispatchEvent(new keepyups.events.ScoreEvent(keepyups.events.ScoreEvent.STYLE_CHANGED, _style));
//return(style);
}
function get style() {
return(_style);
}
var specialEnabled = false;
var cradleBonusRange = 150;
}
Symbol 1872 MovieClip [__Packages.keepyups.objects.actions.BeginCradleAction] Frame 0
class keepyups.objects.actions.BeginCradleAction extends keepyups.objects.actions.CradleAction
{
function BeginCradleAction (region) {
super(region);
}
}
Symbol 1873 MovieClip [__Packages.keepyups.objects.actions.FailCradleAction] Frame 0
class keepyups.objects.actions.FailCradleAction extends keepyups.objects.actions.CradleAction
{
function FailCradleAction (region) {
super(region);
}
}
Symbol 1874 MovieClip [__Packages.keepyups.objects.actions.BeginSpecialAction] Frame 0
class keepyups.objects.actions.BeginSpecialAction extends keepyups.objects.actions.BaseAction
{
var region;
function BeginSpecialAction () {
super(region);
}
}
Symbol 1875 MovieClip [__Packages.keepyups.events.ScoreEvent] Frame 0
class keepyups.events.ScoreEvent extends unwrong.codebase.events.Event
{
var value;
function ScoreEvent (type, value) {
super(type);
this.value = value;
}
static var SCORE_CHANGED = "ScoreEventScoreChanged";
static var MULTIPLIER_CHANGED = "ScoreEventMultiplierChanged";
static var SPECIAL_CHANGED = "ScoreEventSpecialChanged";
static var STYLE_CHANGED = "ScoreEventStyleChanged";
static var SPECIAL_READY = "ScoreEventSpecialReady";
static var SPECIAL_UNAVAILABLE = "ScoreEventSpecialUnavailable";
}
Symbol 1876 MovieClip [__Packages.keepyups.objects.game.FlashManager] Frame 0
class keepyups.objects.game.FlashManager extends unwrong.codebase.events.EventDispatcher
{
var game, shadows_mc, flashes_mc, effectMngr, player_ct;
function FlashManager (game) {
super();
this.game = game;
shadows_mc = game.mc.shadows_mc;
flashes_mc = game.mc.flashes_mc;
effectMngr = new unwrong.codebase.effects.EffectManager();
effectMngr.addEventListener(unwrong.codebase.effects.EffectEvent.FINISH, this, finishEffectHandler);
player_ct = new flash.geom.ColorTransform();
}
function step(dt) {
if (random(5) == 0) {
var _local2 = game.scoreManager.__get__style() / 15;
((_local2 > 1) ? 1 : (_local2));
if (Math.random() < _local2) {
spawnFlash();
keepyups.Globals.soundMngr.sound("cameraClick" + random(3)).play();
}
}
effectMngr.execute();
game.player.mc.transform.colorTransform = player_ct;
}
function spawnFlash() {
var _local7 = flashes_mc.getNextHighestDepth();
var _local5 = flashes_mc.attachMovie("FlashMC", "flash" + _local7, _local7);
var _local6 = Math.random() - 0.5;
var _local8 = 0.15 + (Math.random() * 0.2);
var _local4 = new flash.geom.Matrix();
_local4.c = _local6 * 3;
_local4.tx = _local6 * 700;
_local4.ty = 40;
_local5.transform.matrix = _local4;
_local5.blendMode = "add";
var _local2 = new unwrong.codebase.effects.Effect([_local5], ["_alpha"]);
_local2.start = _local8 * 100;
_local2.end = 0;
_local2.easeType = unwrong.codebase.effects.EaseType.EASE_OUT_LINEAR;
_local2.length = 1 + random(2);
effectMngr.addEffect(_local2);
var _local3 = new unwrong.codebase.effects.Effect([player_ct], ["blueOffset", "redOffset", "greenOffset"]);
_local3.start = _local8 * 200;
_local3.end = 0;
_local3.easeType = unwrong.codebase.effects.EaseType.EASE_OUT_LINEAR;
_local3.length = 1 + random(2);
effectMngr.addEffect(_local3);
}
function finishEffectHandler(event) {
event.effect.targets[0].removeMovieClip();
}
}
Symbol 1877 MovieClip [__Packages.keepyups.objects.game.HumanConductor] Frame 0
class keepyups.objects.game.HumanConductor extends keepyups.objects.game.Conductor
{
var clickArea_mc, game, pressPoint;
function HumanConductor (game) {
super(game);
clickArea_mc = game.mc.clickArea_mc;
clickArea_mc.useHandCursor = false;
enable();
}
function enable() {
var scope = this;
clickArea_mc.onPress = function () {
scope.onMouseDown.call(scope);
};
}
function disable() {
delete clickArea_mc.onPress;
delete clickArea_mc.onRelease;
delete clickArea_mc.onReleaseOutside;
}
function destroy() {
disable();
super.destroy();
}
function step(dt) {
if (counter > 0) {
counter--;
if (counter == 0) {
var _local3 = new flash.geom.Point(game.mc._xmouse, game.mc._ymouse);
var _local4 = _local3.x - pressPoint.x;
var _local2 = _local3.y - pressPoint.y;
var _local5 = Math.atan2(_local2, _local4);
if ((_local2 > 5) && (game.__get__canCradle())) {
game.beginCradle(game.mc._xmouse, game.mc._ymouse);
var scope = this;
clickArea_mc.onRelease = function () {
scope.onMouseUp.call(scope);
};
clickArea_mc.onReleaseOutside = function () {
scope.onMouseUp.call(scope);
};
cradling = true;
} else if ((_local2 < -5) && (game.__get__canSpecial())) {
game.beginSpecial(game.mc._xmouse, game.mc._ymouse);
} else {
game.click(game.mc._xmouse, game.mc._ymouse);
}
}
}
if (cradling) {
game.cradleInput(game.mc._xmouse, game.mc._ymouse);
}
}
function onMouseDown() {
pressPoint = new flash.geom.Point(game.mc._xmouse, game.mc._ymouse);
counter = 2;
}
function onMouseUp() {
delete clickArea_mc.onRelease;
delete clickArea_mc.onReleaseOutside;
cradling = false;
game.endCradle();
}
var counter = 0;
var cradling = false;
}
Symbol 1878 MovieClip [__Packages.keepyups.events.FlowEvent] Frame 0
class keepyups.events.FlowEvent extends unwrong.codebase.events.Event
{
function FlowEvent (type) {
super(type);
}
static var NEW_GAME = "flowEventNewGame";
static var END_GAME = "flowEventEndGame";
static var GAME_INIT = "flowEventGameInit";
static var GAME_DESTROY = "flowEventGameDestroy";
static var PAUSE_GAME = "flowEventPauseGame";
static var RESUME_GAME = "flowEventResumeGame";
static var TIMES_UP = "flowEventTimesUp";
static var SAVE_DEMO = "flowEventSaveDemo";
static var PLAY_DEMO = "flowEventPlayDemo";
}
Symbol 1879 MovieClip [__Packages.keepyups.events.TimerEvent] Frame 0
class keepyups.events.TimerEvent extends unwrong.codebase.events.Event
{
var value;
function TimerEvent (type, value) {
super(type);
this.value = value;
}
static var START = "timerEventStart";
static var STOP = "timerEventStop";
static var SET = "timerEventSet";
static var EXPIRED = "timerEventExpired";
}
Symbol 1880 MovieClip [__Packages.keepyups.events.FeedbackEvent] Frame 0
class keepyups.events.FeedbackEvent extends unwrong.codebase.events.Event
{
var text;
function FeedbackEvent (type, text) {
super(type);
this.text = text;
}
static var SPAWN = "feedbackEventSpawn";
static var SET = "feedbackEventSet";
}
Symbol 1881 MovieClip [__Packages.keepyups.objects.game.DemoConductor] Frame 0
class keepyups.objects.game.DemoConductor extends keepyups.objects.game.Conductor
{
var demo, game;
function DemoConductor (game, demo) {
super(game);
this.demo = demo;
}
function step(dt) {
var _local8 = demo.getKeyframesAtT(game.t);
var _local3 = 0;
while (_local3 < _local8.length) {
var _local2 = _local8[_local3];
switch (_local2.id) {
case "click" :
var _local6 = keepyups.objects.recorder.ClickKeyframe(_local2);
game.click(_local6.x, _local6.y);
break;
case "beginCradle" :
var _local5 = keepyups.objects.recorder.BeginCradleKeyframe(_local2);
game.beginCradle(_local5.x, _local5.y);
break;
case "beginSpecial" :
var _local4 = keepyups.objects.recorder.BeginSpecialKeyframe(_local2);
game.beginSpecial(_local4.x, _local4.y, _local4.type);
break;
case "cradle" :
var _local7 = keepyups.objects.recorder.CradleKeyframe(_local2);
game.cradleInput(_local7.x, _local7.y);
break;
case "endCradle" :
var _local9 = keepyups.objects.recorder.EndCradleKeyframe(_local2);
game.endCradle();
break;
case "failCradle" :
var _local10 = keepyups.objects.recorder.FailCradleKeyframe(_local2);
game.failCradle();
}
_local3++;
}
}
}
Symbol 1882 MovieClip [__Packages.keepyups.view.ScoreView] Frame 0
class keepyups.view.ScoreView extends keepyups.view.BaseView
{
var mc, score_tf, multiplier_tf, style_tf, special_mc, mask_mc, bar_mc, feedback_mc, effects_mc, closeTime, effectMngr, sparkleFlag, controller;
function ScoreView (parent_mc, depth) {
super();
mc = parent_mc.attachMovie("ScoreView", "ScoreView" + depth, depth);
score_tf = mc.score_tf;
multiplier_tf = mc.multiplier_tf;
style_tf = mc.style_tf;
special_mc = mc.special_mc;
mask_mc = special_mc.mask_mc;
bar_mc = special_mc.bar_mc;
feedback_mc = mc.createEmptyMovieClip("feedback_mc", 1);
effects_mc = mc.createEmptyMovieClip("effects_mc", 0);
closeTime = 0;
mc._visible = false;
}
function updateScore(value) {
score_tf.text = unwrong.codebase.util.StringUtils.delimate(String(value), 3);
}
function updateMultiplier(value) {
multiplier_tf.text = "x" + value;
}
function updateSpecial(value) {
barTarget = value;
}
function updateStyle(value) {
style_tf.text = String(int(value * 100)) + "%";
}
function spawnFeedback(string, x, y) {
var _local3 = feedback_mc.getNextHighestDepth();
var _local2 = new keepyups.objects.Field(feedback_mc.attachMovie("FeedbackField", "FeedbackField" + _local3, _local3));
_local2.tf.htmlText = string;
_local2.mc._x = x;
_local2.mc._y = y;
}
function onEnterFrame() {
super.onEnterFrame();
mask_mc._xscale = mask_mc._xscale + ((barTarget - mask_mc._xscale) * 0.1);
effectMngr.execute();
if (sparklesEnabled && (sparkleFlag)) {
var _local5 = effects_mc.getNextHighestDepth();
var _local3 = new keepyups.view.objects.Sparkle(effects_mc.attachMovie("SparkleMC", "sparkle_mc" + _local5, _local5), controller.game.ball);
sparkles.push(_local3);
}
sparkleFlag = !sparkleFlag;
var _local4 = sparkles.length;
while (_local4-- , _local4 > -1) {
var _local3 = sparkles[_local4];
if (_local3.life == 0) {
_local3.mc.removeMovieClip();
sparkles.splice(_local4, 1);
continue;
}
_local3.execute();
}
}
function enableSparkles() {
sparklesEnabled = true;
bar_mc.gotoAndStop("glow");
}
function disableSparkles() {
sparklesEnabled = false;
bar_mc.gotoAndStop("idle");
}
var barTarget = 0;
var sparkles = [];
var sparklesEnabled = false;
}
Symbol 1883 MovieClip [__Packages.keepyups.controller.ScoreController] Frame 0
class keepyups.controller.ScoreController extends keepyups.controller.BaseController
{
var id, game, view;
function ScoreController (model, view) {
super(model, view);
id = "scoreController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_DESTROY, this, gameDestroyHandler);
}
function gameInitHandler(event) {
if (game != null) {
gameDestroyHandler(null);
}
game = event.game;
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.SCORE_CHANGED, this, scoreChangedHandler);
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.MULTIPLIER_CHANGED, this, multiplierChangedHandler);
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.SPECIAL_CHANGED, this, specialChangedHandler);
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.STYLE_CHANGED, this, styleChangedHandler);
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.SPECIAL_READY, this, specialEnabledHandler);
game.scoreManager.addEventListener(keepyups.events.ScoreEvent.SPECIAL_UNAVAILABLE, this, specialDisabledHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
function gameDestroyHandler(event) {
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.SCORE_CHANGED, this, scoreChangedHandler);
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.MULTIPLIER_CHANGED, this, multiplierChangedHandler);
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.SPECIAL_CHANGED, this, specialChangedHandler);
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.STYLE_CHANGED, this, styleChangedHandler);
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.SPECIAL_READY, this, specialEnabledHandler);
game.scoreManager.removeEventListener(keepyups.events.ScoreEvent.SPECIAL_UNAVAILABLE, this, specialDisabledHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
game = null;
}
function scoreChangedHandler(event) {
view.updateScore(event.value);
}
function multiplierChangedHandler(event) {
view.updateMultiplier(event.value);
}
function specialChangedHandler(event) {
view.updateSpecial(event.value);
}
function styleChangedHandler(event) {
view.updateStyle(event.value);
}
function specialEnabledHandler(event) {
view.enableSparkles();
}
function specialDisabledHandler(event) {
view.disableSparkles();
}
function comboCompleteHandler(event) {
comboComplete = true;
spawnFeedback = true;
}
function actionHandler(event) {
if (event.action instanceof keepyups.objects.actions.BeginCradleAction) {
cradle = true;
}
if (event.action instanceof keepyups.objects.actions.EndCradleAction) {
spawnFeedback = true;
duration = keepyups.objects.actions.EndCradleAction(event.action).duration;
} else if (event.action instanceof keepyups.objects.actions.BeginSpecialAction) {
special = true;
spawnFeedback = true;
}
}
function onEnterFrame() {
if (spawnFeedback) {
var _local4 = {x:0, y:0};
game.ball.mc.localToGlobal(_local4);
var _local6 = game.scoreManager.__get__score() - prevScore;
var _local5 = game.scoreManager.__get__multiplier() - prevMultiplier;
var _local2 = "";
_local2 = _local2 + (("+" + unwrong.codebase.util.StringUtils.delimate(String(_local6), 3)) + " ");
if (comboComplete) {
_local2 = _local2 + "COMBO<br>";
}
if (cradle) {
_local2 = _local2 + "CRADLE<br>";
}
if (special) {
_local2 = _local2 + "SPECIAL!<br>";
}
if (duration > 0) {
var _local3 = String(duration / 30);
_local3 = _local3.substring(0, 3);
_local3 = _local3 + " seconds";
_local2 = _local2 + (_local3 + "<br>");
}
if (_local5 > 0) {
_local2 = _local2 + (("+(x" + _local5) + ")<br>");
}
_local4.x = 20;
view.spawnFeedback(_local2, _local4.x, _local4.y);
comboComplete = false;
cradle = false;
special = false;
spawnFeedback = false;
duration = 0;
}
if (cradle == false) {
prevScore = game.scoreManager.score;
prevMultiplier = game.scoreManager.multiplier;
}
}
var cradle = false;
var spawnFeedback = false;
var comboComplete = false;
var special = false;
var duration = 0;
var prevScore = 0;
var prevMultiplier = 0;
}
Symbol 1884 MovieClip [__Packages.unwrong.codebase.util.StringUtils] Frame 0
class unwrong.codebase.util.StringUtils
{
function StringUtils () {
}
static function trim(str) {
var _local1 = 0;
while (((str.charCodeAt(_local1) == 13) || (str.charCodeAt(_local1) == 10)) || (str.charCodeAt(_local1) == 9)) {
_local1++;
}
str = str.slice(_local1);
_local1 = str.length - 1;
while (((str.charCodeAt(_local1) == 13) || (str.charCodeAt(_local1) == 10)) || (str.charCodeAt(_local1) == 9)) {
_local1--;
}
str = str.slice(0, _local1 + 1);
return(str);
}
static function replace(str, searchStr, replaceStr) {
var _local1 = str.indexOf(searchStr);
if (_local1 == -1) {
return(null);
}
var _local3 = _local1 + searchStr.length;
return((str.substring(0, _local1) + replaceStr) + str.substr(_local3));
}
static function delimate(string, spacing) {
if (spacing == null) {
spacing = 3;
}
var _local2 = "";
var _local3 = 0;
var _local1 = string.length - 1;
while (_local1 > -1) {
if ((_local3 != 0) && ((_local3 % spacing) == 0)) {
_local2 = "," + _local2;
}
_local2 = string.charAt(_local1) + _local2;
_local3++;
_local1--;
}
return(_local2);
}
}
Symbol 1885 MovieClip [__Packages.keepyups.objects.Field] Frame 0
class keepyups.objects.Field
{
var mc, tf;
function Field (mc) {
this.mc = mc;
tf = mc.tf_mc.tf;
tf.html = true;
tf.embedFonts = true;
}
}
Symbol 1886 MovieClip [__Packages.keepyups.view.objects.Sparkle] Frame 0
class keepyups.view.objects.Sparkle
{
var mc, vx, vy, life;
function Sparkle (mc, ball) {
this.mc = mc;
var _local2 = {x:0, y:0};
ball.mc.localToGlobal(_local2);
vx = (Math.random() - 0.5) * 2;
vy = (Math.random() - 0.5) * 2;
mc._rotation = Math.random() * 360;
var _local3 = Math.sqrt((vx * vx) + (vy * vy));
mc._x = _local2.x + (((vx / _local3) * ball.radius) * 0.5);
mc._y = _local2.y + (((vy / _local3) * ball.radius) * 0.5);
life = 15;
}
function execute() {
mc._x = mc._x + vx;
mc._y = mc._y + vy;
mc._xscale = (life / 20) * 100;
mc._yscale = mc._xscale;
life--;
}
}
Symbol 1887 MovieClip [__Packages.keepyups.view.MenuView] Frame 0
class keepyups.view.MenuView extends keepyups.view.BaseView
{
var mc, play_btn, tutorial_btn, highscores_btn, sendToFriend_btn, product_btn, openDelay, controller;
function MenuView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("MenuView", "MenuView" + depth, depth);
play_btn = mc.play_btn;
tutorial_btn = mc.tutorial_btn;
highscores_btn = mc.highscores_btn;
sendToFriend_btn = mc.sendToFriend_btn;
product_btn = mc.product_btn;
mc._visible = false;
openDelay = 0;
}
function enableButtonFunctions() {
var scope = controller;
play_btn.onRelease = function () {
scope.onSelectPlay();
};
tutorial_btn.onRelease = function () {
scope.onSelectTutorial();
};
highscores_btn.onRelease = function () {
scope.onSelectHighscores();
};
sendToFriend_btn.onRelease = function () {
scope.onSelectSendToFriend();
};
product_btn.onRelease = function () {
scope.onSelectProduct();
};
}
function disableButtonFunctions() {
delete play_btn.onRelease;
delete tutorial_btn.onRelease;
delete highscores_btn.onRelease;
delete sendToFriend_btn.onRelease;
delete product_btn.onRelease;
}
}
Symbol 1888 MovieClip [__Packages.keepyups.controller.MenuController] Frame 0
class keepyups.controller.MenuController extends keepyups.controller.BaseController
{
var id, hide, model;
function MenuController (model, view) {
super(model, view);
id = "menuController";
}
function onSelectPlay() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.NEW_GAME));
model.scriptManager.tracking();
}
function onSelectTutorial() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.NEW_GAME));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.BEGIN_TUTORIAL));
}
function onSelectHighscores() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "highScoresController"));
}
function onSelectSendToFriend() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "sendToFriendController"));
}
function onSelectProduct() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "productController"));
}
}
Symbol 1889 MovieClip [__Packages.keepyups.events.TutorialEvent] Frame 0
class keepyups.events.TutorialEvent extends unwrong.codebase.events.Event
{
function TutorialEvent (type) {
super(type);
}
static var BEGIN_TUTORIAL = "tutorialEventBeginTutorial";
static var NEXT = "tutorialEventNext";
}
Symbol 1890 MovieClip [__Packages.keepyups.view.SubmitScoreView] Frame 0
class keepyups.view.SubmitScoreView extends keepyups.view.BaseView
{
var mc, back_btn, submit_btn, register_btn, name_tf, surname_tf, email_tf, displayScore_tf, score_tf, mask_mc, termsAsterix_mc, comHighscores, optin_btn, terms_btn, score, controller;
function SubmitScoreView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("SubmitScoreViewMC", "SubmitScoreViewMC" + depth, depth);
back_btn = mc.back_btn;
submit_btn = mc.submit_btn;
register_btn = mc.register_btn;
name_tf = mc.name_tf;
surname_tf = mc.surname_tf;
email_tf = mc.email_tf;
displayScore_tf = mc.displayScore_tf;
score_tf = mc.score_tf;
mask_mc = mc.mask_mc;
termsAsterix_mc = mc.termsAsterix_mc;
mask_mc.onPress = function () {
};
mask_mc.useHandCursor = false;
comHighscores = mc.comHighscores;
termsAsterix_mc._visible = false;
optin_btn = new unwrong.codebase.components.widget.ToggleButton(mc.optin_btn, false);
optin_btn.__set__state(false);
terms_btn = new unwrong.codebase.components.widget.ToggleButton(mc.terms_btn, false);
terms_btn.__set__state(false);
mc._visible = false;
}
function populate(score) {
this.score = score;
score_tf.text = String(score);
displayScore_tf.text = unwrong.codebase.util.StringUtils.delimate(String(score), 3);
comHighscores.gotoAndPlay(1);
if (controller.model.userFirstName != null) {
name_tf.text = controller.model.userFirstName;
surname_tf.text = controller.model.userSurname;
email_tf.text = controller.model.userEmail;
name_tf.text = controller.model.userFirstName;
surname_tf.text = controller.model.userSurname;
email_tf.text = controller.model.userEmail;
name_tf.type = "static";
surname_tf.type = "static";
email_tf.type = "static";
name_tf.selectable = false;
surname_tf.selectable = false;
email_tf.selectable = false;
name_tf.backgroundColor = 13421772 /* 0xCCCCCC */;
surname_tf.backgroundColor = 13421772 /* 0xCCCCCC */;
email_tf.backgroundColor = 13421772 /* 0xCCCCCC */;
mask_mc._visible = true;
} else {
name_tf.text = defaultNameText;
surname_tf.text = defaultSurnameText;
email_tf.text = defaultEmailText;
name_tf.type = "input";
surname_tf.type = "input";
email_tf.type = "input";
name_tf.selectable = true;
surname_tf.selectable = true;
email_tf.selectable = true;
name_tf.backgroundColor = 16777215 /* 0xFFFFFF */;
surname_tf.backgroundColor = 16777215 /* 0xFFFFFF */;
email_tf.backgroundColor = 16777215 /* 0xFFFFFF */;
var scope2 = this;
name_tf.onChanged = function () {
scope2.resetTF(this);
};
name_tf.onSetFocus = function () {
scope2.resetTF(this);
};
surname_tf.onChanged = function () {
scope2.resetTF(this);
};
surname_tf.onSetFocus = function () {
scope2.resetTF(this);
};
email_tf.onChanged = function () {
scope2.resetTF(this);
};
email_tf.onSetFocus = function () {
scope2.resetTF(this);
};
mask_mc._visible = false;
}
}
function enableButtonFunctions() {
var scope = controller;
back_btn.onRelease = function () {
scope.onSelectBack();
};
submit_btn.onRelease = function () {
scope.onSelectSubmit();
};
register_btn.onRelease = function () {
scope.onSelectRegister();
};
terms_btn.addEventListener(unwrong.codebase.events.Event.TOGGLE_ON, this, toggleTermsOnHandler);
}
function disableButtonFunctions() {
delete back_btn.onRelease;
delete submit_btn.onRelease;
delete register_btn.onRelease;
}
function validate() {
var _local2 = true;
var scope = this;
termsAsterix_mc._visible = false;
if (terms_btn.__get__state() == false) {
_local2 = false;
termsAsterix_mc._visible = true;
}
if ((name_tf.text == "") || (name_tf.text == defaultNameText)) {
_local2 = false;
name_tf.text = "Please enter your first name";
name_tf.textColor = 16711680 /* 0xFF0000 */;
name_tf.onChanged = function () {
scope.resetTF(this);
};
name_tf.onSetFocus = function () {
scope.resetTF(this);
};
}
if ((surname_tf.text == "") || (surname_tf.text == defaultSurnameText)) {
_local2 = false;
surname_tf.text = "Please enter your surname";
surname_tf.textColor = 16711680 /* 0xFF0000 */;
surname_tf.onChanged = function () {
scope.resetTF(this);
};
surname_tf.onSetFocus = function () {
scope.resetTF(this);
};
}
if ((unwrong.codebase.components.validators.EmailValidator.validate(email_tf.text) == false) || (email_tf.text == defaultEmailText)) {
_local2 = false;
email_tf.text = "Invalid email";
email_tf.textColor = 16711680 /* 0xFF0000 */;
email_tf.onChanged = function () {
scope.resetTF(this);
};
email_tf.onSetFocus = function () {
scope.resetTF(this);
};
}
return(_local2);
}
function toggleTermsOnHandler(event) {
controller.openTerms();
}
function resetTF(tf) {
tf.textColor = 0;
tf.text = "";
tf.onChanged = function () {
};
tf.onSetFocus = function () {
};
}
var defaultNameText = "Please enter your first name";
var defaultSurnameText = "Please enter your surname";
var defaultEmailText = "Please enter your email address";
}
Symbol 1891 MovieClip [__Packages.keepyups.controller.SubmitScoreController] Frame 0
class keepyups.controller.SubmitScoreController extends keepyups.controller.BaseController
{
var id, game, view, hide, model;
function SubmitScoreController (model, view) {
super(model, view);
id = "submitScoreController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_DESTROY, this, gameDestroyHandler);
}
function gameInitHandler(event) {
game = event.game;
}
function gameDestroyHandler(event) {
game = null;
}
function onShow() {
_root.score = game.scoreManager.score;
view.populate(game.scoreManager.__get__score());
}
function onSelectBack() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "menuController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.END_GAME));
}
function onKeyDown() {
if (Key.getCode() == 38) {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "submitScoreController"));
}
}
function onSelectSubmit() {
if (view.validate()) {
model.userFirstName = view.name_tf.text;
model.userSurname = view.surname_tf.text;
model.userEmail = view.email_tf.text;
model.scriptManager.addEventListener(keepyups.events.ScriptManagerEvent.SUBMIT_SCORE_COMPLETE, this, submitScoreCompleteHandler);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.AlertEvent(keepyups.events.AlertEvent.SHOW, "Submitting", "Please wait", false, false));
model.scriptManager.submitScore(model.userFirstName, model.userSurname, model.userEmail, view.score, view.optin_btn.__get__state());
}
}
function onSelectRegister() {
getURL ("http://www.samsung-europe.com/europe/pages/prc/prcnew_step1.aspx", "_blank");
}
function openTerms() {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "termsController"));
}
function submitScoreCompleteHandler(event) {
model.scriptManager.removeEventListener(keepyups.events.ScriptManagerEvent.SUBMIT_SCORE_COMPLETE, this, submitScoreCompleteHandler);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.AlertEvent(keepyups.events.AlertEvent.HIDE));
var _local2 = unwrong.codebase.data.XMLHandler.getNode(event.xml.firstChild, "success");
if (_local2.firstChild.nodeValue == "true") {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "highScoresController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.END_GAME));
} else {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.AlertEvent(keepyups.events.AlertEvent.SHOW, "Send Failed", "Please check your connection and try again", true));
}
}
}
Symbol 1892 MovieClip [__Packages.keepyups.events.AlertEvent] Frame 0
class keepyups.events.AlertEvent extends unwrong.codebase.events.Event
{
var title, body, showOk, showCancel;
function AlertEvent (type, title, body, showOk, showCancel) {
super(type);
this.title = title;
this.body = body;
this.showOk = showOk;
this.showCancel = showCancel;
}
static var SHOW = "AlertEventShow";
static var HIDE = "AlertEventHide";
static var CONFIRM = "AlertEventHide";
static var CANCEL = "AlertEventCancel";
}
Symbol 1893 MovieClip [__Packages.unwrong.codebase.components.validators.IValidatable] Frame 0
interface unwrong.codebase.components.validators.IValidatable
{
}
Symbol 1894 MovieClip [__Packages.unwrong.codebase.components.BaseComponent] Frame 0
class unwrong.codebase.components.BaseComponent extends unwrong.codebase.events.EventDispatcher implements unwrong.codebase.components.validators.IValidatable
{
var mc, requiresRedraw, _width, _height;
function BaseComponent (mc) {
super();
this.mc = mc;
var scope = this;
mc.onEnterFrame = function () {
scope.update.call(scope);
};
requiresRedraw = true;
}
function invalidate() {
requiresRedraw = true;
}
function update() {
if (requiresRedraw) {
redraw();
requiresRedraw = false;
}
}
function redraw() {
}
function set width(value) {
_width = value;
invalidate();
//return(width);
}
function get width() {
return(mc._width);
}
function set height(value) {
_height = value;
invalidate();
//return(height);
}
function get height() {
return(mc._height);
}
function set x(value) {
mc._x = value;
//return(x);
}
function get x() {
return(mc._x);
}
function set y(value) {
mc._y = value;
//return(y);
}
function get y() {
return(mc._y);
}
function getValidatableValue() {
return(null);
}
function setValidatableValue(value) {
}
}
Symbol 1895 MovieClip [__Packages.unwrong.codebase.components.widget.ToggleButton] Frame 0
class unwrong.codebase.components.widget.ToggleButton extends unwrong.codebase.components.BaseComponent
{
var mc, btn_mc, _skin, _enabled, invalidate, _state, dispatchEvent, frame, redraw;
function ToggleButton (mc, useSkin) {
super(mc);
this.mc = mc;
if (useSkin == null) {
useSkin = true;
}
if (!useSkin) {
btn_mc = mc;
} else {
skin = ("Default");
}
state = (false);
enable();
}
function set skin(value) {
_skin = value;
btn_mc = mc.attachMovie(_skin + ".ToggleButton", "btn_mc", 0);
btn_mc.stop();
if (_enabled) {
enable();
}
invalidate();
//return(skin);
}
function get skin() {
return(_skin);
}
function deserialise(node) {
state = (node.attributes.state == "1");
}
function enable() {
_enabled = true;
var scope = this;
mc.onRollOver = function () {
scope.onRollOver.call(scope);
};
mc.onRollOut = function () {
scope.onRollOut.call(scope);
};
mc.onPress = function () {
scope.onPress.call(scope);
};
mc.onReleaseOutside = function () {
scope.onRollOut.call(scope);
};
mc.onRelease = function () {
scope.onRelease.call(scope);
};
}
function disable() {
_enabled = false;
delete mc.onRollOver;
delete mc.onRollOut;
delete mc.onPress;
delete mc.onReleaseOutside;
delete mc.onRelease;
}
function set state(value) {
if (value == _state) {
return;
}
_state = value;
if (_state) {
if (mc.hitTest(_root._xmouse, _root._ymouse, true)) {
onRollOver();
} else {
onRollOut();
}
} else if (mc.hitTest(_root._xmouse, _root._ymouse, true)) {
onRollOver();
} else {
onRollOut();
}
if (_state) {
dispatchEvent(new unwrong.codebase.events.Event(unwrong.codebase.events.Event.TOGGLE_ON));
} else {
dispatchEvent(new unwrong.codebase.events.Event(unwrong.codebase.events.Event.TOGGLE_OFF));
}
dispatchEvent(new unwrong.codebase.events.Event(unwrong.codebase.events.Event.TOGGLE));
//return(state);
}
function get state() {
return(_state);
}
function onRollOver() {
if (_state) {
frame = "onOver";
btn_mc.gotoAndStop(frame);
} else {
frame = "offOver";
btn_mc.gotoAndStop(frame);
}
redraw();
dispatchEvent(new unwrong.codebase.events.MouseEvent(unwrong.codebase.events.MouseEvent.ROLL_OVER));
}
function onRollOut() {
if (_state) {
frame = "on";
btn_mc.gotoAndStop(frame);
} else {
frame = "off";
btn_mc.gotoAndStop(frame);
}
redraw();
dispatchEvent(new unwrong.codebase.events.MouseEvent(unwrong.codebase.events.MouseEvent.ROLL_OUT));
}
function onPress() {
if (_state) {
frame = "onDown";
btn_mc.gotoAndStop(frame);
} else {
frame = "offDown";
btn_mc.gotoAndStop(frame);
}
redraw();
dispatchEvent(new unwrong.codebase.events.MouseEvent(unwrong.codebase.events.MouseEvent.MOUSE_DOWN));
}
function onRelease() {
state = (!state);
redraw();
}
function getValidatableValue() {
return(String(state));
}
function setValidatableValue(value) {
if ((value == "true") || (value == "1")) {
state = (true);
} else {
state = (false);
}
}
}
Symbol 1896 MovieClip [__Packages.unwrong.codebase.events.MouseEvent] Frame 0
class unwrong.codebase.events.MouseEvent extends unwrong.codebase.events.Event
{
function MouseEvent (type) {
super(type);
}
static var MOUSE_MOVE = "mouse_move";
static var MOUSE_DOWN = "mouse_dowm";
static var MOUSE_UP = "mouse_up";
static var CLICK = "click";
static var ROLL_OVER = "rollOver";
static var ROLL_OUT = "rollOut";
}
Symbol 1897 MovieClip [__Packages.unwrong.codebase.components.validators.EmailValidator] Frame 0
class unwrong.codebase.components.validators.EmailValidator
{
function EmailValidator () {
}
static function validate(value) {
value = value.toLowerCase();
if (hasInvalidChars(value)) {
return(false);
}
return(checkForAtSymbol(value));
}
static function validateComponents(components) {
var _local1 = 0;
while (_local1 < components.length) {
var _local2 = components[_local1];
if (validate(_local2.getValidatableValue()) == false) {
return(false);
}
_local1++;
}
return(true);
}
static function checkForAtSymbol(email) {
var _local1 = email.split("@");
if (_local1.length != 2) {
return(false);
}
if (checkPrefix(_local1[0]) == false) {
return(false);
}
return(checkSuffix(_local1[1]));
}
static function checkPrefix(prefix) {
if (((prefix.length > 0) && (prefix.charAt(0) != ".")) && (prefix.charAt(prefix.length - 1) != ".")) {
return(true);
}
return(false);
}
static function checkSuffix(suffix) {
var _local1 = suffix.split(".");
if (_local1.length > 1) {
return(checkTLD(_local1));
}
return(false);
}
static function checkTLD(array) {
var _local1 = array[array.length - 1];
if ((_local1.length >= 2) && (_local1.length <= 4)) {
return(checkSuffixLength(array));
}
return(false);
}
static function checkSuffixLength(array) {
var _local1 = 0;
while (_local1 < array.length) {
var _local2 = array[_local1];
if (_local2.length == 0) {
return(false);
}
_local1++;
}
return(true);
}
static function hasInvalidChars(string) {
var _local2 = 0;
while (_local2 < string.length) {
var _local3 = string.charAt(_local2);
var _local1 = 0;
while (_local1 < invalidCharArray.length) {
if (_local3 == invalidCharArray[_local1]) {
return(true);
}
_local1++;
}
_local2++;
}
return(false);
}
static var invalidCharArray = [" ", "<", ">", ","];
}
Symbol 1898 MovieClip [__Packages.keepyups.view.ComboView] Frame 0
class keepyups.view.ComboView extends keepyups.view.BaseView
{
var mc, title_tf, multiplier_tf, time_tf, regions_mc, head_mc, chest_mc, knee_mc, foot_mc, lines, closeTime, trickIcons, trickIcon, effectMngr;
function ComboView (parent_mc, depth) {
super();
mc = parent_mc.attachMovie("ComboView", "ComboView" + depth, depth);
title_tf = mc.title_tf;
multiplier_tf = mc.multiplier_tf;
time_tf = mc.time_tf;
regions_mc = mc.regions_mc;
head_mc = regions_mc.head_mc;
chest_mc = regions_mc.chest_mc;
knee_mc = regions_mc.knee_mc;
foot_mc = regions_mc.foot_mc;
lines = [mc.head, mc.head_chest, mc.chest, mc.knee, mc.knee_foot, mc.foot];
closeTime = 0;
mc._visible = false;
}
function clearCombo() {
var _local2 = 0;
while (_local2 < trickIcons.length) {
trickIcons[_local2].removeMovieClip();
_local2++;
}
trickIcons = new Array();
title_tf.htmlText = "";
}
function newCombo(combo) {
title_tf.htmlText = combo.name;
multiplier_tf.htmlText = "+" + combo.multiplier;
var _local3 = 0;
while (_local3 < combo.tricks.length) {
var _local2 = combo.tricks[_local3];
var _local4;
switch (_local2.region) {
case "head" :
_local4 = head_mc;
break;
case "chest" :
_local4 = chest_mc;
break;
case "knee" :
_local4 = knee_mc;
break;
case "foot" :
_local4 = foot_mc;
}
var _local8 = _local4.getBounds().xMax - _local4.getBounds().xMin;
if (_local2 instanceof keepyups.objects.tricks.RatioTrick) {
var _local5 = keepyups.objects.tricks.RatioTrick(_local2);
if (_local5.minRatio < 0) {
_local2.mc = _local4.attachMovie("LeftTrick", "LeftTrick" + _local3, _local3);
} else if (_local5.minRatio >= 0) {
_local2.mc = _local4.attachMovie("RightTrick", "RightTrick" + _local3, _local3);
}
} else if (_local2 instanceof keepyups.objects.tricks.CradleTrick) {
var _local6 = keepyups.objects.tricks.CradleTrick(_local2);
_local2.mc = _local4.attachMovie("CradleTrick", "CradleTrick" + _local3, _local3);
_local2.mc.tf.text = String(_local6.duration);
} else {
_local2.mc = _local4.attachMovie("EitherTrick", "EitherTrick" + _local3, _local3);
}
_local2.mc._x = _local3 * spacing;
trickIcons.push(_local2.mc);
_local3++;
}
var _local9 = 560;
regions_mc._x = (_local9 - regions_mc.getBounds().xMax) - regions_mc.getBounds().xMin;
}
function setTrickIndex(index) {
var _local2 = 0;
while (_local2 < trickIcons.length) {
trickIcon = trickIcons[_local2];
if (_local2 == index) {
trickIcon.gotoAndStop("highlighted");
} else if (_local2 == (index + 1)) {
trickIcon.gotoAndStop("enabled");
} else if (_local2 > index) {
trickIcon.gotoAndStop("disabled");
} else {
trickIcon.gotoAndStop("removed");
}
_local2++;
}
}
function completeTrick(index) {
trickIcons[index].gotoAndStop("removed");
}
function updateCradleDuration(cradleTrick, duration) {
var _local1 = Math.max(0, cradleTrick.duration - duration);
cradleTrick.mc.tf.text = String(_local1);
}
function onEnterFrame() {
super.onEnterFrame();
effectMngr.execute();
}
var spacing = 20;
}
Symbol 1899 MovieClip [__Packages.keepyups.controller.ComboController] Frame 0
class keepyups.controller.ComboController extends keepyups.controller.BaseController
{
var id, game, view, currTrick, currCombo;
function ComboController (model, view) {
super(model, view);
id = "comboController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_DESTROY, this, gameDestroyHandler);
}
function onInit() {
}
function gameInitHandler(event) {
if (game != null) {
gameDestroyHandler(null);
}
game = event.game;
game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.NEW_COMBO, this, newComboHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.TRICK_COMPLETE, this, trickCompleteHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.NEW_TRICK, this, newTrickHandler);
}
function gameDestroyHandler(event) {
view.clearCombo();
game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.NEW_COMBO, this, newComboHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.TRICK_COMPLETE, this, trickCompleteHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.NEW_TRICK, this, newTrickHandler);
game = null;
}
function actionHandler(event) {
var _local2 = event.action;
if ((_local2 instanceof keepyups.objects.actions.CradleAction) && (currTrick instanceof keepyups.objects.tricks.CradleTrick)) {
if (keepyups.objects.actions.CradleAction(_local2).region == currTrick.region) {
view.updateCradleDuration(keepyups.objects.tricks.CradleTrick(currTrick), keepyups.objects.actions.CradleAction(_local2).duration);
}
return(undefined);
}
}
function newComboHandler(event) {
currCombo = event.combo;
currTrick = currCombo.tricks[0];
view.clearCombo();
view.newCombo(currCombo);
view.setTrickIndex(event.trickIndex);
}
function comboCompleteHandler(event) {
view.clearCombo();
}
function newTrickHandler(event) {
currTrick = event.trick;
view.setTrickIndex(event.trickIndex);
}
function trickCompleteHandler(event) {
view.completeTrick(event.trickIndex);
}
}
Symbol 1900 MovieClip [__Packages.keepyups.view.TimerView] Frame 0
class keepyups.view.TimerView extends keepyups.view.BaseView
{
var mc, time_tf, closeTime;
function TimerView (parent_mc, depth) {
super();
mc = parent_mc.attachMovie("TimerViewMC", "TimerViewMC" + depth, depth);
time_tf = mc.time_tf;
closeTime = 0;
mc._visible = false;
}
function updateTime(value) {
var _local3 = value / keepyups.Globals.frameRate;
var _local4 = int(_local3 / 60);
_local3 = _local3 - (_local4 * 60);
var _local2 = String(int(_local3));
if (_local2.length == 1) {
_local2 = "0" + _local2;
}
time_tf.text = (String(_local4) + ":") + _local2;
}
}
Symbol 1901 MovieClip [__Packages.keepyups.controller.TimerController] Frame 0
class keepyups.controller.TimerController extends keepyups.controller.BaseController
{
var id, currTime, view;
function TimerController (model, view) {
super(model, view);
id = "timerController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.SET, this, setTimerHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.START, this, startTimerHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.STOP, this, stopTimerHandler);
}
function setTimerHandler(event) {
currTime = event.value;
view.updateTime(currTime);
}
function startTimerHandler(event) {
timerRunning = true;
}
function stopTimerHandler(event) {
timerRunning = false;
}
function onEnterFrame() {
if (timerRunning) {
currTime--;
view.updateTime(currTime);
if (currTime == 0) {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.STOP));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.EXPIRED));
}
}
}
var timerRunning = false;
}
Symbol 1902 MovieClip [__Packages.keepyups.view.PlayGameView] Frame 0
class keepyups.view.PlayGameView extends keepyups.view.BaseView
{
var mc, play_btn, tutorial_btn, close_btn, backing_mc, controller;
function PlayGameView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("PlayGameView", "PlayGameView" + depth, depth);
play_btn = mc.play_btn;
tutorial_btn = new unwrong.codebase.components.widget.ToggleButton(mc.tutorial_btn, false);
close_btn = mc.close_btn;
backing_mc = mc.backing_mc;
backing_mc.onPress = function () {
};
backing_mc.useHandCursor = false;
mc._visible = false;
}
function enableButtonFunctions() {
var scope = controller;
play_btn.onRelease = function () {
scope.onClickPlay();
};
close_btn.onRelease = function () {
scope.onClickClose();
};
tutorial_btn.addEventListener(unwrong.codebase.events.Event.CHANGED, this, changeHandler);
}
function changeHandler(event) {
}
function disableButtonFunctions() {
delete play_btn.onRelease;
delete close_btn.onRelease;
tutorial_btn.removeEventListener(unwrong.codebase.events.Event.CHANGED, this, changeHandler);
}
}
Symbol 1903 MovieClip [__Packages.keepyups.controller.PlayGameController] Frame 0
class keepyups.controller.PlayGameController extends keepyups.controller.BaseController
{
var id, hide, view;
function PlayGameController (model, view) {
super(model, view);
id = "playGameController";
}
function onClickPlay() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "menuController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "gameController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.NEW_GAME));
if (view.tutorial_btn.__get__state()) {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.BEGIN_TUTORIAL));
}
}
function onClickClose() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.ENABLE, "menuController"));
}
}
Symbol 1904 MovieClip [__Packages.keepyups.view.TutorialView] Frame 0
class keepyups.view.TutorialView extends keepyups.view.BaseView
{
var mc;
function TutorialView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("TutorialViewMC", "TutorialViewMC" + depth, depth);
mc._visible = false;
}
}
Symbol 1905 MovieClip [__Packages.keepyups.controller.TutorialController] Frame 0
class keepyups.controller.TutorialController extends keepyups.controller.BaseController
{
var id, steps, game, show, stepIndex, currStep, hide, view;
function TutorialController (model, view) {
super(model, view);
id = "tutorialController";
steps = new Array();
steps.push(new keepyups.objects.tutorial.Step1(this));
steps.push(new keepyups.objects.tutorial.Step2(this));
steps.push(new keepyups.objects.tutorial.Step3(this));
steps.push(new keepyups.objects.tutorial.Step4(this));
steps.push(new keepyups.objects.tutorial.Step5(this));
steps.push(new keepyups.objects.tutorial.Step6(this));
steps.push(new keepyups.objects.tutorial.Step7(this));
steps.push(new keepyups.objects.tutorial.Step8(this));
steps.push(new keepyups.objects.tutorial.Step9(this));
steps.push(new keepyups.objects.tutorial.Step10(this));
steps.push(new keepyups.objects.tutorial.Step11(this));
steps.push(new keepyups.objects.tutorial.Step12(this));
steps.push(new keepyups.objects.tutorial.Step13(this));
steps.push(new keepyups.objects.tutorial.Step14(this));
}
function onInit() {
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TutorialEvent.BEGIN_TUTORIAL, this, beginTutorialHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
}
function gameInitHandler(event) {
game = event.game;
}
function beginTutorialHandler(event) {
show();
stepIndex = -1;
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.TimerEvent(keepyups.events.TimerEvent.STOP));
nextStep();
}
function nextStep() {
currStep.leave();
stepIndex++;
if (steps[stepIndex] == null) {
currStep.mc.removeMovieClip();
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.NEW_GAME));
return(undefined);
}
currStep = steps[stepIndex];
var _local2 = view.mc.attachMovie("Step" + String(stepIndex + 1), "Step", 0);
_local2._x = 20;
_local2._y = 20;
currStep.addEventListener(keepyups.events.TutorialEvent.NEXT, this, nextHandler);
currStep.enter(_local2);
}
function nextHandler() {
nextStep();
}
function onClickNext() {
nextStep();
}
function onEnterFrame() {
currStep.enterFrame();
}
}
Symbol 1906 MovieClip [__Packages.keepyups.objects.tutorial.Tutorial] Frame 0
class keepyups.objects.tutorial.Tutorial extends unwrong.codebase.events.EventDispatcher
{
var controller, mc, next_btn, dispatchEvent;
function Tutorial (controller) {
super();
this.controller = controller;
}
function enter(mc) {
this.mc = mc;
next_btn = mc.next_btn;
var scope = this;
next_btn.onRelease = function () {
scope.onClickNext.apply(scope);
};
}
function leave() {
delete next_btn.onRelease;
}
function onClickNext() {
dispatchEvent(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.NEXT));
}
function enterFrame() {
}
}
Symbol 1907 MovieClip [__Packages.keepyups.objects.tutorial.Step1] Frame 0
class keepyups.objects.tutorial.Step1 extends keepyups.objects.tutorial.Tutorial
{
function Step1 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1908 MovieClip [__Packages.keepyups.objects.tutorial.Step2] Frame 0
class keepyups.objects.tutorial.Step2 extends keepyups.objects.tutorial.Tutorial
{
function Step2 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1909 MovieClip [__Packages.keepyups.objects.tutorial.Step3] Frame 0
class keepyups.objects.tutorial.Step3 extends keepyups.objects.tutorial.Tutorial
{
function Step3 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1910 MovieClip [__Packages.keepyups.objects.tutorial.Step4] Frame 0
class keepyups.objects.tutorial.Step4 extends keepyups.objects.tutorial.Tutorial
{
function Step4 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1911 MovieClip [__Packages.keepyups.objects.tutorial.Step5] Frame 0
class keepyups.objects.tutorial.Step5 extends keepyups.objects.tutorial.Tutorial
{
var controller, dispatchEvent;
function Step5 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
controller.game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
function actionHandler(event) {
if (event.action instanceof keepyups.objects.actions.BeginCradleAction) {
dispatchEvent(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.NEXT));
}
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
controller.game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
}
Symbol 1912 MovieClip [__Packages.keepyups.objects.tutorial.Step6] Frame 0
class keepyups.objects.tutorial.Step6 extends keepyups.objects.tutorial.Tutorial
{
var controller, dispatchEvent;
function Step6 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
controller.game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
function actionHandler(event) {
if (event.action instanceof keepyups.objects.actions.EndCradleAction) {
if (keepyups.objects.actions.EndCradleAction(event.action).duration >= 60) {
dispatchEvent(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.NEXT));
}
}
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
controller.game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
}
Symbol 1913 MovieClip [__Packages.keepyups.objects.tutorial.Step7] Frame 0
class keepyups.objects.tutorial.Step7 extends keepyups.objects.tutorial.Tutorial
{
function Step7 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "scoreController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1914 MovieClip [__Packages.keepyups.objects.tutorial.Step8] Frame 0
class keepyups.objects.tutorial.Step8 extends keepyups.objects.tutorial.Tutorial
{
function Step8 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1915 MovieClip [__Packages.keepyups.objects.tutorial.Step9] Frame 0
class keepyups.objects.tutorial.Step9 extends keepyups.objects.tutorial.Tutorial
{
function Step9 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1916 MovieClip [__Packages.keepyups.objects.tutorial.Step10] Frame 0
class keepyups.objects.tutorial.Step10 extends keepyups.objects.tutorial.Tutorial
{
var controller, dispatchEvent;
function Step10 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
controller.game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
function actionHandler(event) {
if (event.action instanceof keepyups.objects.actions.BeginSpecialAction) {
dispatchEvent(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.NEXT));
}
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
controller.game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
}
function enterFrame() {
controller.game.scoreManager.__set__special(100);
}
}
Symbol 1917 MovieClip [__Packages.keepyups.objects.tutorial.Step11] Frame 0
class keepyups.objects.tutorial.Step11 extends keepyups.objects.tutorial.Tutorial
{
function Step11 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "comboController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "comboController"));
}
}
Symbol 1918 MovieClip [__Packages.keepyups.objects.tutorial.Step12] Frame 0
class keepyups.objects.tutorial.Step12 extends keepyups.objects.tutorial.Tutorial
{
var controller, dispatchEvent;
function Step12 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
controller.game.comboManager.addEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, actionHandler);
}
function actionHandler(event) {
dispatchEvent(new keepyups.events.TutorialEvent(keepyups.events.TutorialEvent.NEXT));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
controller.game.comboManager.removeEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, actionHandler);
}
}
Symbol 1919 MovieClip [__Packages.keepyups.objects.tutorial.Step13] Frame 0
class keepyups.objects.tutorial.Step13 extends keepyups.objects.tutorial.Tutorial
{
function Step13 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
}
}
Symbol 1920 MovieClip [__Packages.keepyups.objects.tutorial.Step14] Frame 0
class keepyups.objects.tutorial.Step14 extends keepyups.objects.tutorial.Tutorial
{
function Step14 (controller) {
super(controller);
}
function enter(mc) {
super.enter(mc);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "timerController"));
}
function leave() {
super.leave();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "timerController"));
}
}
Symbol 1921 MovieClip [__Packages.keepyups.view.FeedbackView] Frame 0
class keepyups.view.FeedbackView extends keepyups.view.BaseView
{
var mc, tf, openTime, openDelay;
function FeedbackView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("FeedbackViewMC", "FeedbackViewMC" + depth, depth);
tf = mc.tf_mc.tf;
mc._visible = false;
openTime = 1;
openDelay = 0;
}
function enableButtonFunctions() {
}
function disableButtonFunctions() {
}
function showFeedback(text) {
mc.gotoAndPlay(1);
setFeedback(text);
}
function setFeedback(text) {
tf.text = text;
}
}
Symbol 1922 MovieClip [__Packages.keepyups.controller.FeedbackController] Frame 0
class keepyups.controller.FeedbackController extends keepyups.controller.BaseController
{
var id, show, view;
function FeedbackController (model, view) {
super(model, view);
id = "feedbackController";
}
function onInit() {
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FeedbackEvent.SPAWN, this, feedbackSpawnHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FeedbackEvent.SET, this, setFeedbackHandler);
}
function feedbackSpawnHandler(event) {
show();
view.showFeedback(event.text);
}
function setFeedbackHandler(event) {
view.setFeedback(event.text);
}
}
Symbol 1923 MovieClip [__Packages.keepyups.view.PauseMenuView] Frame 0
class keepyups.view.PauseMenuView extends keepyups.view.BaseView
{
var mc, resumeGame_btn, endGame_btn, close_btn, backing_mc, openDelay, controller;
function PauseMenuView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("PauseMenuViewMC", "PauseMenuViewMC" + depth, depth);
resumeGame_btn = mc.resumeGame_btn;
endGame_btn = mc.endGame_btn;
close_btn = mc.close_btn;
backing_mc = mc.backing_mc;
backing_mc.onPress = function () {
};
backing_mc.useHandCursor = false;
openDelay = 0;
mc._visible = false;
}
function enableButtonFunctions() {
var scope = controller;
resumeGame_btn.onRelease = function () {
scope.onClickResumeGame();
};
endGame_btn.onRelease = function () {
scope.onClickEndGame();
};
close_btn.onRelease = function () {
scope.onClickClose();
};
}
function disableButtonFunctions() {
delete resumeGame_btn.onRelease;
delete endGame_btn.onRelease;
delete close_btn.onRelease;
}
}
Symbol 1924 MovieClip [__Packages.keepyups.controller.PauseMenuController] Frame 0
class keepyups.controller.PauseMenuController extends keepyups.controller.BaseController
{
var id, hide;
function PauseMenuController (model, view) {
super(model, view);
id = "pauseMenuController";
}
function onClickResumeGame() {
onClickClose();
}
function onClickEndGame() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.END_GAME));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "menuController"));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.HIDE, "tutorialController"));
}
function onClickClose() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.RESUME_GAME), 70);
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FeedbackEvent(keepyups.events.FeedbackEvent.SPAWN, "GET READY"));
}
}
Symbol 1925 MovieClip [__Packages.keepyups.view.ToolbarView] Frame 0
class keepyups.view.ToolbarView extends keepyups.view.BaseView
{
var mc, pause_btn, terms_btn, soundToggle_btn, openDelay, controller;
function ToolbarView (parent_mc, depth) {
super();
mc = parent_mc.attachMovie("ToolbarViewMC", "ToolbarViewMC" + depth, depth);
pause_btn = mc.pause_btn;
terms_btn = mc.terms_btn;
soundToggle_btn = new unwrong.codebase.components.widget.ToggleButton(mc.soundToggle_btn, false);
soundToggle_btn.__set__state(true);
hidePauseButton();
openDelay = 0;
mc._visible = false;
}
function enableButtonFunctions() {
var scope = this;
pause_btn.onRelease = function () {
scope.onSelectMenu();
};
terms_btn.onRelease = function () {
scope.onSelectTerms();
};
soundToggle_btn.addEventListener(unwrong.codebase.events.Event.TOGGLE, this, toggleSoundHandler);
}
function onSelectTerms() {
controller.onSelectTerms();
}
function onSelectMenu() {
controller.menuSelected();
}
function disableButtonFunctions() {
delete pause_btn.onRelease;
delete terms_btn.onRelease;
soundToggle_btn.removeEventListener(unwrong.codebase.events.Event.TOGGLE, this, toggleSoundHandler);
}
function toggleSoundHandler(event) {
controller.toggleSound(event.target.state);
}
function hidePauseButton() {
pause_btn._visible = false;
}
function showPauseButton() {
pause_btn._visible = true;
}
}
Symbol 1926 MovieClip [__Packages.keepyups.controller.ToolbarController] Frame 0
class keepyups.controller.ToolbarController extends keepyups.controller.BaseController
{
var id, view, model;
function ToolbarController (model, view) {
super(model, view);
id = "toolbarController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.END_GAME, this, endGameHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.RESUME_GAME, this, resumeGameHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.EXPIRED, this, timerExpiredHandler);
}
function timerExpiredHandler(event) {
view.hidePauseButton();
}
function endGameHandler(event) {
}
function menuSelected() {
view.hidePauseButton();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.PAUSE_GAME));
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "pauseMenuController"));
}
function onSelectTerms() {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new unwrong.codebase.events.ControllerEvent(unwrong.codebase.events.ControllerEvent.SHOW, "termsController"));
}
function resumeGameHandler(event) {
trace("resume");
view.showPauseButton();
}
function toggleSound(state) {
model.soundMngr.toggleSound();
}
}
Symbol 1927 MovieClip [__Packages.keepyups.view.SoundView] Frame 0
class keepyups.view.SoundView extends keepyups.view.BaseView
{
var mc;
function SoundView (parent_mc, depth) {
super();
mc = parent_mc.createEmptyMovieClip("SoundView", depth);
}
}
Symbol 1928 MovieClip [__Packages.keepyups.controller.SoundController] Frame 0
class keepyups.controller.SoundController extends keepyups.controller.BaseController
{
var id, show, soundMngr, model, game;
function SoundController (model, view) {
super(model, view);
id = "soundController";
}
function onInit() {
show();
soundMngr = model.soundMngr;
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_DESTROY, this, gameDestroyHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.RESUME_GAME, this, resumeGameHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.TimerEvent.EXPIRED, this, timerExpiredHandler);
}
function gameInitHandler(event) {
if (game != null) {
gameDestroyHandler(null);
}
game = event.game;
game.addEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
game.comboManager.addEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.addEventListener(keepyups.events.GameEvent.BALL_DROPPED, this, ballDroppedHandler);
soundMngr.sound("crowdIdle").play(0, 9999, 0);
soundMngr.sound("crowdIdle").stopSoundOnSilent = false;
}
function gameDestroyHandler(event) {
game.removeEventListener(keepyups.events.GameEvent.ACTION, this, actionHandler);
game.comboManager.removeEventListener(keepyups.events.ComboEvent.COMBO_COMPLETE, this, comboCompleteHandler);
game.removeEventListener(keepyups.events.GameEvent.BALL_DROPPED, this, ballDroppedHandler);
game = null;
soundMngr.sound("crowdIdle").targetVolume = 0;
soundMngr.sound("crowdIdle").speed = 3;
soundMngr.sound("crowdIdle").stopSoundOnSilent = true;
}
function actionHandler(event) {
var _local2 = event.action;
if (_local2 instanceof keepyups.objects.actions.RatioAction) {
if ((keepyups.objects.actions.RatioAction(_local2).region == "head") || (keepyups.objects.actions.RatioAction(_local2).region == "chest")) {
soundMngr.sound("thump" + random(1)).play();
} else {
soundMngr.sound("kick" + random(3)).play();
}
}
if (_local2 instanceof keepyups.objects.actions.EndCradleAction) {
if (keepyups.objects.actions.EndCradleAction(_local2).duration < 30) {
}
var _local3 = keepyups.objects.actions.EndCradleAction(_local2).duration / 300;
if (_local3 > 1) {
_local3 = 1;
}
if (_local3 < 0) {
_local3 = 0;
}
var _local4 = int(_local3 * 5);
soundMngr.sound("applause" + _local4).play();
} else if (_local2 instanceof keepyups.objects.actions.BeginSpecialAction) {
soundMngr.sound("applause5").play();
} else if (_local2 instanceof keepyups.objects.actions.FailCradleAction) {
soundMngr.sound("fail0").play();
}
}
function comboCompleteHandler(event) {
var _local2 = event.combo.score / 50000;
if (_local2 > 1) {
_local2 = 1;
}
if (_local2 < 0) {
_local2 = 0;
}
var _local3 = int(_local2 * 5);
soundMngr.sound("applause" + _local3).play();
}
function resumeGameHandler(event) {
if (game == null) {
return(undefined);
}
soundMngr.sound("shortWhistle").play();
}
function timerExpiredHandler(event) {
soundMngr.sound("whistle").play();
}
function ballDroppedHandler(event) {
soundMngr.sound("fail0").play();
}
function onEnterFrame() {
if (game == null) {
return(undefined);
}
soundMngr.sound("crowdIdle").targetVolume = 15 + Math.min(game.scoreManager.__get__style() * 20, 80);
}
}
Symbol 1929 MovieClip [__Packages.keepyups.view.TermsView] Frame 0
class keepyups.view.TermsView extends keepyups.view.BaseView
{
var mc, pane, terms_tf, backing_mc, back_btn, openDelay, controller;
function TermsView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("TermsViewMC", "TermsViewMC" + depth, depth);
pane = new unwrong.codebase.components.widget.Pane(mc.createEmptyMovieClip("pane", 0));
pane.__set__x(188);
pane.__set__y(160);
pane.__set__width(350);
pane.__set__height(110);
pane.__set__skin("Invisible");
terms_tf = pane.getContentMC().createTextField("terms_tf", 0, 0, 0, pane.__get__width() - 40, pane.__get__height());
terms_tf.autoSize = "left";
terms_tf.wordWrap = true;
terms_tf.multiline = true;
terms_tf.selectable = false;
terms_tf.setNewTextFormat(new TextFormat("Helvetica 45 Light", 12, 16777215, false, false));
terms_tf.html = true;
terms_tf.htmlText = "<li>This Promotion is open to UK residents aged 16 years and over.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Employees or agents of the Promoter or any of its group companies or their families or households or anyone professionally connected to this Promotion are not eligible to enter.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>No purchase is necessary to enter.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>To enter the Promotion, entrants will need to play the Samsung Freestyle Football game online at www.samsungskive.co.uk and, after completing the first 2 minute game, must register to enter this Promotion by completing the required online registration form. When registering, entrants will be required to provide their first name, last name, e-mail contact details and future contact preferences for data protection purposes, as set out on the online registration form.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>There will be one prize draw which will take place on [1st November 2007]. The Promoter, acting reasonably, reserves the right to delay the timing of the prize draw.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Registrations forms completed and received after the Closing Date (31st October 2007) will not be eligible.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Entries (i.e. individual registrations to participate in this Promotion) are limited to one per individual.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The prize draw will be supervised by an independent person.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The winners will be chosen at random by a computer from the eligible entries received before the Closing Date (31st October 2007).</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>There shall be 10 prize winners in this Promotion only.The first five winners to be chosen at random will each win one 50 inch Samsung Plasma television, model number PS50Q97HDX. The next five winners chosen at random will receive a pair of tickets, of their choice, to attend a Chelsea FC Premiership Football match at Stamford Bridge during November or December 2007. Tickets will be allocated based on availability. Travel and accommodation costs are not included in these prizes which will consist of the 2 tickets only. </li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter will use its reasonable endeavours to notify the winners in writing or by email or telephone within 7 days of the Closing Date (31st October 2007).</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The winners must confirm receipt of notification of winning a prize within 7 days of the notification (and will be asked to either confirm their UK address as given on their registration form or to provide an alternative UK address for delivery of their prize).</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>If the winner does not respond as described in clause 12 above, the Promoter reserves the right to disqualify them, in which event a further prize winner will be chosen at random from the remaining eligible entries.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The prizes will be sent by post to the UK addresses given by the winners. Please allow 28 days for delivery.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>There are no cash alternatives to the prizes. In the event that all or part of the prizes is unavailable then the Promoter reserves the right to offer an alternative prize or prizes of equivalent value. The prizes are non-transferable.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter's decision is final and no correspondence will be entered into by the Promoter in respect of the results. Any appeal against the Promoter's decision is of no effect.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Entries must not be made through agents or third parties.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The names and towns of residence of the winners will be published at www.samsungskive.co.uk between 10th November 2007 and 1st January 2008 and will be available after that date upon receipt of a written request, together with a stamped addressed envelope, to Darren Petersen at Samsung House, 1000 Hillswood Drive Chertsey, Surrey KT16 OPS.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Prize winners may be required to take part in publicity and, by entering this Promotion, you are deemed to consent to such publicity.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter, acting reasonably, reserves the right to delay the timing of the notification of and/or the publication of the names and towns of residence of the winners.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter shall have the right, where necessary, to undertake all such action as is reasonable to protect itself against fraudulent or invalid claims including, without limitation, to require further verification as to the identity, age and other relevant details of an entrant.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter shall not be responsible for lost, misdirected, illegible, late, mutilated or altered entries.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter shall not be liable for any interruption to this Promotion whether due to force majeure or other factors beyond the Promoter\u2019s control.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter reserves the right, acting reasonably and in accordance with all relevant legislation and codes of practice, to vary the terms and conditions of this Promotion.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>The Promoter reserves the right at its absolute discretion to disqualify entries which it considers do not comply with these terms and conditions or any entrant who it reasonably believes has interfered with the fair running of this Promotion and/or the results thereof.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>By entering this Promotion you agree to be bound by these terms and conditions. </li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>By entering the Promotion and accepting these terms and conditions, entrants accept that their personal data are processed by the Promoter (and its agents), the controller of their personal data. This data will be used only in accordance with the preferences for data protection purposes expressed by the entrant on his / her registration form.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>This Promotion is governed by English law.</li>";
terms_tf.htmlText = terms_tf.htmlText + "<li>Instructions form part of these terms and conditions.</li>";
terms_tf.htmlText = terms_tf.htmlText + "Promoter: Samsung Electronics (UK) Ltd, Samsung House, 1000 Hillswood Drive, Chertsey, Surrey, KT16 0PS";
terms_tf.embedFonts = true;
terms_tf.antiAliasType = "advanced";
terms_tf.thickness = 0;
terms_tf.sharpness = 0;
backing_mc = mc.backing_mc;
backing_mc.onPress = function () {
};
backing_mc.useHandCursor = false;
back_btn = mc.back_btn;
openDelay = 0;
mc._visible = false;
}
function enableButtonFunctions() {
var scope = controller;
back_btn.onRelease = function () {
scope.onSelectBack();
};
pane.verScrollbar.enableMouseWheel();
}
function disableButtonFunctions() {
delete back_btn.onRelease;
pane.verScrollbar.disableMouseWheel();
}
}
Symbol 1930 MovieClip [__Packages.keepyups.controller.TermsController] Frame 0
class keepyups.controller.TermsController extends keepyups.controller.BaseController
{
var id, game, view, hide;
function TermsController (model, view) {
super(model, view);
id = "termsController";
}
function onInit() {
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_INIT, this, gameInitHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.FlowEvent.GAME_DESTROY, this, gameDestroyHandler);
}
function gameInitHandler(event) {
game = event.game;
}
function gameDestroyHandler(event) {
game = null;
}
function onShow() {
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.PAUSE_GAME));
}
function onHide() {
if (game == null) {
return(undefined);
}
if (view.mc._visible == false) {
return(undefined);
}
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.FlowEvent(keepyups.events.FlowEvent.RESUME_GAME));
}
function onSelectBack() {
hide();
}
}
Symbol 1931 MovieClip [__Packages.unwrong.codebase.components.widget.Pane] Frame 0
class unwrong.codebase.components.widget.Pane extends unwrong.codebase.events.EventDispatcher
{
var mc, contentShell_mc, content_mc, mask_mc, verScrollbar, horScrollbar, _skin, backing, _width, _height, scaleFrame;
function Pane (mc) {
super();
this.mc = mc;
contentShell_mc = mc.createEmptyMovieClip("contentShell_mc", 1);
content_mc = contentShell_mc.createEmptyMovieClip("content_mc", 0);
mask_mc = contentShell_mc.createEmptyMovieClip("mask_mc", 1);
verScrollbar = new unwrong.codebase.components.widget.Scrollbar(mc.createEmptyMovieClip("verScrollbar_mc", 2), content_mc, "_y", "_height", mask_mc, "_height");
verScrollbar.__set__skin("Default.ScrollbarHorizontal");
horScrollbar = new unwrong.codebase.components.widget.Scrollbar(mc.createEmptyMovieClip("horScrollbar_mc", 3), content_mc, "_x", "_width", mask_mc, "_width");
horScrollbar.__set__rotation(-90);
horScrollbar.__set__skin("Default.ScrollbarHorizontal");
skin = ("Default");
width = (minWidth);
height = (minHeight);
useScrollbars = (true);
drawMask();
}
function overrideScrollHeight(value) {
verScrollbar.target.overrideHeight = value;
verScrollbar.targetTotProp = "overrideHeight";
}
function hide() {
mc._visible = false;
verScrollbar.disable();
horScrollbar.disable();
}
function show() {
mc._visible = true;
if (_useScrollbars) {
verScrollbar.enable();
horScrollbar.enable();
}
}
function set skin(value) {
if (value != _skin) {
_skin = value;
backing.mc.removeMovieClip();
backing = new unwrong.codebase.components.widget.Scale9GridMC(mc.attachMovie(_skin + ".Pane.backing_mc", "backing_mc", 0));
backing.__set__width(_width);
backing.__set__height(_height);
contentShell_mc._x = backing.leftWidth;
contentShell_mc._y = backing.topHeight;
minWidth = Math.max(horScrollbar.minHeight, horScrollbar.minHeight) + verScrollbar.__get__width();
if (isNaN(minWidth)) {
minWidth = 100;
}
minHeight = Math.max(horScrollbar.minHeight, horScrollbar.minHeight) + horScrollbar.__get__width();
if (isNaN(minHeight)) {
minHeight = 100;
}
}
//return(skin);
}
function getContentMC() {
return(content_mc);
}
function onVerticalRedundant() {
if (!_useScrollbars) {
return(undefined);
}
contentWidthModifier = 0;
horScrollbar.__set__height(_width);
verScrollbar.hide();
backing.__set__width(_width);
drawMask();
}
function onVerticalRequired() {
contentWidthModifier = -verScrollbar.__get__width();
horScrollbar.__set__height(_width + contentWidthModifier);
verScrollbar.show();
backing.__set__width(_width + contentWidthModifier);
drawMask();
}
function onHorRedundant() {
contentHeightModifier = 0;
horScrollbar.hide();
verScrollbar.__set__height(_height);
backing.__set__height(_height);
drawMask();
}
function onHorRequired() {
horScrollbar.show();
contentHeightModifier = -horScrollbar.__get__width();
verScrollbar.__set__height(_height + contentHeightModifier);
backing.__set__height(_height + contentHeightModifier);
drawMask();
}
function get skin() {
return(_skin);
}
function set width(value) {
scaleFrame.__set__minWidth(minWidth);
_width = Math.max(value, minWidth);
drawMask();
backing.__set__width(_width);
verScrollbar.__set__x(_width - verScrollbar.__get__width());
horScrollbar.__set__height(_width + contentWidthModifier);
backing.__set__width(_width + contentWidthModifier);
backing.__set__height(_height + contentHeightModifier);
//return(width);
}
function get width() {
return(_width);
}
function set height(value) {
scaleFrame.__set__minHeight(minHeight);
_height = Math.max(value, minHeight);
drawMask();
backing.__set__height(_height);
horScrollbar.__set__y(_height);
verScrollbar.__set__height(_height + contentHeightModifier);
backing.__set__width(_width + contentWidthModifier);
backing.__set__height(_height + contentHeightModifier);
//return(height);
}
function get height() {
return(_height);
}
function get viewableWidth() {
return(mask_mc._width);
}
function get viewableHeight() {
return(mask_mc._height);
}
function set x(value) {
mc._x = value;
//return(x);
}
function get x() {
return(mc._x);
}
function set y(value) {
mc._y = value;
//return(y);
}
function get y() {
return(mc._y);
}
function drawMask() {
var _local3 = (_width + contentWidthModifier) - backing.frameWidth;
var _local2 = (_height + contentHeightModifier) - backing.frameHeight;
mask_mc.clear();
mask_mc.beginFill(16711680, 100);
mask_mc.lineTo(_local3, 0);
mask_mc.lineTo(_local3, _local2);
mask_mc.lineTo(0, _local2);
mask_mc.lineTo(0, 0);
content_mc.setMask(mask_mc);
}
function set useScrollbars(value) {
_useScrollbars = value;
if (value) {
verScrollbar.enable();
horScrollbar.enable();
var scope = this;
horScrollbar.onRedundant = function () {
scope.onHorRedundant();
};
horScrollbar.onRequired = function () {
scope.onHorRequired();
};
verScrollbar.onRedundant = function () {
scope.onVerticalRedundant();
};
verScrollbar.onRequired = function () {
scope.onVerticalRequired();
};
} else {
verScrollbar.hide();
horScrollbar.hide();
delete horScrollbar.onRedundant;
delete horScrollbar.onRequired;
delete verScrollbar.onRedundant;
delete verScrollbar.onRequired;
}
//return(useScrollbars);
}
function get useScrollbars() {
return(_useScrollbars);
}
var _useScrollbars = true;
var minWidth = 100;
var minHeight = 100;
var contentWidthModifier = 0;
var contentHeightModifier = 0;
}
Symbol 1932 MovieClip [__Packages.unwrong.codebase.components.widget.Scale9GridMC] Frame 0
class unwrong.codebase.components.widget.Scale9GridMC
{
var mc, middle, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, topHeight, bottomHeight, leftWidth, rightWidth, frameWidth, frameHeight, _minWidth, _minHeight, _width, _height;
function Scale9GridMC (imc) {
mc = imc;
middle = mc.middle;
top = mc.top;
bottom = mc.bottom;
left = mc.left;
right = mc.right;
topLeft = mc.topLeft;
topRight = mc.topRight;
bottomLeft = mc.bottomLeft;
bottomRight = mc.bottomRight;
topHeight = top._height;
bottomHeight = bottom._height;
leftWidth = left._width;
rightWidth = right._width;
frameWidth = leftWidth + rightWidth;
frameHeight = topHeight + bottomHeight;
_minWidth = leftWidth + rightWidth;
_minHeight = topHeight + bottomHeight;
autoRedraw = false;
width = ((leftWidth + rightWidth) + middle._width);
height = ((topHeight + bottomHeight) + middle._height);
autoRedraw = true;
}
function set width(value) {
if (value != _width) {
_width = value;
if (autoRedraw) {
draw();
}
}
//return(width);
}
function get width() {
return(_width);
}
function set height(value) {
if (value != _height) {
_height = value;
if (autoRedraw) {
draw();
}
}
//return(height);
}
function get height() {
return(_height);
}
function set minWidth(value) {
if (value != _minWidth) {
_minWidth = value;
if (autoRedraw) {
draw();
}
}
//return(minWidth);
}
function get minWidth() {
return(_minWidth);
}
function set minHeight(value) {
if (value != _minHeight) {
_minHeight = value;
if (autoRedraw) {
draw();
}
}
//return(minHeight);
}
function get minHeight() {
return(_minHeight);
}
function draw() {
_width = Math.max(_width, _minWidth);
_height = Math.max(_height, _minHeight);
topLeft._width = left._width;
topLeft._height = top._height;
top._width = (_width - left._width) - right._width;
top._height = topHeight;
topRight._width = rightWidth;
topRight._height = topHeight;
right._width = rightWidth;
right._height = (_height - topHeight) - bottomHeight;
bottomRight._width = rightWidth;
bottomRight._height = bottomHeight;
bottom._width = top._width;
bottom._height = bottom._height;
bottomLeft._width = leftWidth;
bottomLeft._height = bottomHeight;
left._width = leftWidth;
left._height = right._height;
topLeft._x = 0;
topLeft._y = 0;
topRight._x = leftWidth + top._width;
topRight._y = 0;
bottomLeft._x = 0;
bottomLeft._y = topHeight + left._height;
bottomRight._x = leftWidth + bottom._width;
bottomRight._y = topHeight + right._height;
left._x = 0;
left._y = topHeight;
right._x = topRight._x;
right._y = topHeight;
top._x = leftWidth;
top._y = 0;
bottom._x = leftWidth;
bottom._y = topHeight + left._height;
middle._x = leftWidth;
middle._y = topHeight;
middle._width = (_width - leftWidth) - rightWidth;
middle._height = (_height - topHeight) - bottomHeight;
}
var autoRedraw = true;
}
Symbol 1933 MovieClip [__Packages.unwrong.codebase.components.widget.Scrollbar] Frame 0
class unwrong.codebase.components.widget.Scrollbar
{
var target, targetCurrProp, targetTotProp, bounds, boundsTotProp, scrollbar_mc, mc, _skin, backing, scroller, up_btn, down_btn, minScroller, __get__skin, lengthRatio, required, mwFunction, enabled, minHeight, storedObj, scrollInterval;
function Scrollbar (imc, itarget, itargetCurrProp, itargetTotProp, ibounds, iboundsTotProp) {
target = itarget;
targetCurrProp = itargetCurrProp;
targetTotProp = itargetTotProp;
bounds = ibounds;
boundsTotProp = iboundsTotProp;
scrollbar_mc = imc;
mc = scrollbar_mc.createEmptyMovieClip("mc", 0);
enable();
skin = ("Default.ScrollbarVertical");
}
function set skin(value) {
if (value != _skin) {
_skin = value;
backing.mc.removeMovieClip();
scroller.mc.removeMovieClip();
MovieClip(up_btn).removeMovieClip();
MovieClip(down_btn).removeMovieClip();
backing = new unwrong.codebase.components.widget.Scale9GridMC(mc.attachMovie(_skin + ".backing_mc", "backing_mc", 0));
scroller = new unwrong.codebase.components.widget.Scale9GridMC(mc.attachMovie(_skin + ".scroller_mc", "scroller_mc", 1));
scroller.__set__width(scroller.mc._width);
minScroller = (scroller.mc.top._height + scroller.mc.bottom._height) + scroller.mc.middle._height;
scroller.__set__height(100);
up_btn = Button(mc.attachMovie(_skin + ".up_btn", "up_btn", 2));
down_btn = Button(mc.attachMovie(_skin + ".down_btn", "down_btn", 3));
var scope = this;
up_btn.onPress = function () {
scope.onPressUp();
};
up_btn.onRelease = function () {
scope.onReleaseButton();
};
up_btn.onReleaseOutside = function () {
scope.onReleaseButton();
};
down_btn.onPress = function () {
scope.onPressDown();
};
down_btn.onRelease = function () {
scope.onReleaseButton();
};
down_btn.onReleaseOutside = function () {
scope.onReleaseButton();
};
scroller.mc.onPress = function () {
scope.onPressScroller();
};
scroller.mc.onRelease = function () {
scope.onReleaseScroller();
};
scroller.mc.onReleaseOutside = function () {
scope.onReleaseScroller();
};
backing.mc.useHandCursor = false;
backing.mc.onPress = function () {
scope.onPressBacking();
};
backing.mc.onRelease = function () {
scope.onReleaseButton();
};
backing.mc.onReleaseOutside = function () {
scope.onReleaseButton();
};
width = (backing.mc._width);
height = (_height);
updateScroller();
}
//return(__get__skin());
}
function onEnterFrame() {
ratioTarget = Math.min(1, ratioTarget);
ratioTarget = Math.max(0, ratioTarget);
var _local3 = ratio;
ratio = ratio + ((ratioTarget - ratio) * ease);
var _local2 = bounds[boundsTotProp] / target[targetTotProp];
_local2 = Math.min(_local2, 1);
_local2 = Math.max(_local2, 0);
if (_local2 != lengthRatio) {
lengthRatio = _local2;
updateScroller();
}
if ((lengthRatio == 1) && (required != false)) {
required = false;
onRedundant();
} else if ((lengthRatio != 1) && (required != true)) {
required = true;
onRequired();
}
if (_local3 != ratio) {
updateScroller();
updateTarget();
}
}
function updateTarget() {
var _local2 = Math.max(0, target[targetTotProp] - bounds[boundsTotProp]);
if (reverseDirection) {
target[targetCurrProp] = Math.floor((-ratio) * _local2);
} else {
target[targetCurrProp] = Math.floor(ratio * _local2);
}
}
function updateScroller() {
scroller.__set__height(Math.max(minScroller, lengthRatio * backing.__get__height()));
scroller.mc._y = (ratio * (backing.__get__height() - scroller.__get__height())) + up_btn._height;
}
function refresh() {
up_btn._width = _width;
up_btn._height = _width;
down_btn._width = _width;
down_btn._height = _width;
down_btn._y = _height - down_btn._height;
backing.__set__width(_width);
backing.__set__height((_height - down_btn._height) - up_btn._height);
backing.mc._y = up_btn._height;
}
function enableMouseWheel(conditionalFunction) {
if (conditionalFunction == null) {
conditionalFunction = function () {
return(true);
};
}
mwFunction = conditionalFunction;
Mouse.addListener(this);
}
function disableMouseWheel() {
Mouse.removeListener(this);
mwFunction = null;
}
function onMouseWheel(delta) {
if (mwFunction()) {
ratioTarget = ratioTarget - ((delta * scrollSpeed) * (1 / target[targetTotProp]));
}
}
function setScrollerTarget(itargetRatio) {
ratioTarget = itargetRatio;
updateScroller();
updateTarget();
}
function setScroller(iratio) {
ratioTarget = iratio;
ratio = iratio;
updateScroller();
updateTarget();
}
function show() {
if (visible != true) {
visible = true;
mc._visible = true;
enable();
}
}
function hide() {
if (visible != false) {
visible = false;
mc._visible = false;
}
}
function enable() {
if (!enabled) {
enabled = true;
delete mc.onPress;
mc._alpha = 100;
var scope = this;
mc.onEnterFrame = function () {
scope.onEnterFrame();
};
}
}
function disable() {
if (enabled) {
enabled = false;
mc.onPress = function () {
};
mc._alpha = 50;
delete mc.onEnterFrame;
}
}
function set width(value) {
_width = value;
refresh();
//return(width);
}
function get width() {
return(_width);
}
function set height(value) {
minHeight = (up_btn._height + down_btn._height) + minScroller;
_height = Math.max(value, minHeight);
refresh();
//return(height);
}
function get height() {
return(_height);
}
function set x(value) {
scrollbar_mc._x = value;
//return(x);
}
function get x() {
return(scrollbar_mc._x);
}
function set y(value) {
scrollbar_mc._y = value;
//return(y);
}
function get y() {
return(scrollbar_mc._y);
}
function set rotation(value) {
_rotation = value;
scrollbar_mc._rotation = _rotation;
//return(rotation);
}
function get rotation() {
return(_rotation);
}
function onPressScroller() {
storedObj = {mouse:mc._ymouse, ratio:ratioTarget};
var scope = this;
scroller.mc.onEnterFrame = function () {
scope.dragScroller();
};
}
function onReleaseScroller() {
delete scroller.mc.onEnterFrame;
}
function dragScroller() {
var _local2 = mc._ymouse - storedObj.mouse;
ratioTarget = storedObj.ratio + (_local2 / (backing.__get__height() - scroller.__get__height()));
updateScroller();
}
function onPressBacking(amount) {
clearInterval(scrollInterval);
var _local3 = backing.mc._ymouse / backing.__get__height();
var _local2;
if (amount == null) {
_local2 = 500;
} else {
_local2 = 40;
}
if (_local3 > ratio) {
if (amount >= 0) {
ratioTarget = ratioTarget + (scrollSpeed * (1 / target[targetTotProp]));
scrollInterval = setInterval(this, "onPressBacking", _local2, scrollSpeed * (1 / target[targetTotProp]));
}
} else if (amount <= 0) {
ratioTarget = ratioTarget - (scrollSpeed * (1 / target[targetTotProp]));
scrollInterval = setInterval(this, "onPressBacking", _local2, (-scrollSpeed) * (1 / target[targetTotProp]));
}
}
function onPressUp() {
scrollInterval = setInterval(this, "buttonScroll", 500, (-scrollSpeed) * (1 / target[targetTotProp]));
ratioTarget = ratioTarget - (scrollSpeed * (1 / target[targetTotProp]));
}
function onPressDown() {
scrollInterval = setInterval(this, "buttonScroll", 500, scrollSpeed * (1 / target[targetTotProp]));
ratioTarget = ratioTarget + (scrollSpeed * (1 / target[targetTotProp]));
}
function onReleaseButton() {
clearInterval(scrollInterval);
}
function buttonScroll(amount) {
clearInterval(scrollInterval);
scrollInterval = setInterval(this, "buttonScroll", 40, amount);
ratioTarget = ratioTarget + amount;
}
function onRedundant() {
}
function onRequired() {
}
var visible = true;
var _width = 20;
var _height = 100;
var scrollSpeed = 5;
var _rotation = 0;
var reverseDirection = true;
var ratio = 0;
var ratioTarget = 0;
var ease = 1;
}
Symbol 1934 MovieClip [__Packages.unwrong.codebase.components.widget.ScaleFrame] Frame 0
class unwrong.codebase.components.widget.ScaleFrame
{
var mc, target, xProp, yProp, widthProp, heightProp, _minWidth, _frameThickness, _minHeight, _height, _width, enabled, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, pressPosX, pressPosY, storedX, storedY, storedWidth, storedHeight;
function ScaleFrame (imc, itarget, ixProp, iyProp, iwidthProp, iheightProp) {
mc = imc;
target = itarget;
xProp = ixProp;
yProp = iyProp;
widthProp = iwidthProp;
heightProp = iheightProp;
frameThickness = (4);
_minWidth = _frameThickness * 2;
_minHeight = _frameThickness * 2;
_height = 100;
_width = 100;
var scope = this;
mc.onEnterFrame = function () {
scope.onEnterFrame();
};
create();
enable();
}
function onEnterFrame() {
if (target[widthProp] != _width) {
width = (target[widthProp]);
}
if (target[heightProp] != _height) {
height = (target[heightProp]);
}
}
function enable() {
enabled = true;
mc._visible = true;
}
function disable() {
enabled = false;
mc._visible = false;
}
function create() {
top = mc.createEmptyMovieClip("top", 1);
bottom = mc.createEmptyMovieClip("bottom", 2);
left = mc.createEmptyMovieClip("left", 3);
right = mc.createEmptyMovieClip("right", 4);
topLeft = mc.createEmptyMovieClip("topLeft", 5);
topRight = mc.createEmptyMovieClip("topRight", 6);
bottomLeft = mc.createEmptyMovieClip("bottomLeft", 7);
bottomRight = mc.createEmptyMovieClip("bottomRight", 8);
drawRect(topLeft, 0, 0, 1, 1);
drawRect(topRight, 0, 0, 1, 1);
drawRect(bottomLeft, 0, 0, 1, 1);
drawRect(bottomRight, 0, 0, 1, 1);
drawRect(top, 0, 0, 1, 1);
drawRect(bottom, 0, 0, 1, 1);
drawRect(left, 0, 0, 1, 1);
drawRect(right, 0, 0, 1, 1);
var scope = this;
topLeft.onPress = function () {
scope.onPress("dragTopLeft");
};
topRight.onPress = function () {
scope.onPress("dragTopRight");
};
bottomLeft.onPress = function () {
scope.onPress("dragBottomLeft");
};
bottomRight.onPress = function () {
scope.onPress("dragBottomRight");
};
top.onPress = function () {
scope.onPress("dragTop");
};
bottom.onPress = function () {
scope.onPress("dragBottom");
};
left.onPress = function () {
scope.onPress("dragLeft");
};
right.onPress = function () {
scope.onPress("dragRight");
};
topLeft.onRollOver = function () {
scope.onRollOver([this, this._parent.top, this._parent.left, this._parent.bottomLeft, this._parent.topRight]);
};
topLeft.onRollOut = function () {
scope.onRollOut([this, this._parent.top, this._parent.left, this._parent.bottomLeft, this._parent.topRight]);
};
topRight.onRollOver = function () {
scope.onRollOver([this, this._parent.top, this._parent.right, this._parent.topLeft, this._parent.bottomRight]);
};
topRight.onRollOut = function () {
scope.onRollOut([this, this._parent.top, this._parent.right, this._parent.topLeft, this._parent.bottomRight]);
};
bottomLeft.onRollOver = function () {
scope.onRollOver([this, this._parent.bottom, this._parent.left, this._parent.topLeft, this._parent.bottomRight]);
};
bottomLeft.onRollOut = function () {
scope.onRollOut([this, this._parent.bottom, this._parent.left, this._parent.topLeft, this._parent.bottomRight]);
};
bottomRight.onRollOver = function () {
scope.onRollOver([this, this._parent.bottom, this._parent.right, this._parent.topRight, this._parent.bottomLeft]);
};
bottomRight.onRollOut = function () {
scope.onRollOut([this, this._parent.bottom, this._parent.right, this._parent.topRight, this._parent.bottomLeft]);
};
top.onRollOver = function () {
scope.onRollOver([this, this._parent.topLeft, this._parent.topRight]);
};
top.onRollOut = function () {
scope.onRollOut([this, this._parent.topLeft, this._parent.topRight]);
};
bottom.onRollOver = function () {
scope.onRollOver([this, this._parent.bottomLeft, this._parent.bottomRight]);
};
bottom.onRollOut = function () {
scope.onRollOut([this, this._parent.bottomLeft, this._parent.bottomRight]);
};
left.onRollOver = function () {
scope.onRollOver([this, this._parent.topleft, this._parent.topRight]);
};
left.onRollOut = function () {
scope.onRollOut([this, this._parent.topleft, this._parent.topRight]);
};
right.onRollOver = function () {
scope.onRollOver([this, this._parent.bottomRight, this._parent.topRight]);
};
right.onRollOut = function () {
scope.onRollOut([this, this._parent.bottomRight, this._parent.topRight]);
};
}
function drawRect(mc, x, y, width, height, alpha) {
if (alpha == null) {
alpha = 0;
}
mc.clear();
mc.lineStyle(0, 0, 0);
mc.beginFill(16777215, alpha);
mc.moveTo(x, y);
mc.lineTo(x + width, y);
mc.lineTo(x + width, y + height);
mc.lineTo(x, y + height);
mc.lineTo(x, y);
mc.endFill();
}
function onRollOver(mcs) {
for (var _local3 in mcs) {
drawRect(mcs[_local3], 0, 0, 1, 1, 50);
}
}
function onRollOut(mcs) {
for (var _local3 in mcs) {
drawRect(mcs[_local3], 0, 0, 1, 1);
}
}
function onPress(functionToCall) {
if (!enabled) {
return(undefined);
}
pressPosX = mc._xmouse;
pressPosY = mc._ymouse;
storedX = target[xProp];
storedY = target[yProp];
storedWidth = _width;
storedHeight = _height;
var scope = this;
mc.onEnterFrame = function () {
scope[functionToCall]();
};
Mouse.addListener(this);
}
function onMouseUp() {
Mouse.removeListener(this);
delete mc.onEnterFrame;
var _local2 = [top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight];
for (var _local3 in _local2) {
drawRect(_local2[_local3], 0, 0, 1, 1);
}
}
function dragTopLeft() {
target[xProp] = (mc._xmouse + target[xProp]) - pressPosX;
width = (storedWidth - (target[xProp] - storedX));
target[yProp] = (mc._ymouse + target[yProp]) - pressPosY;
height = (storedHeight - (target[yProp] - storedY));
}
function dragTopRight() {
var _local2 = mc._xmouse - pressPosX;
width = (storedWidth + _local2);
target[yProp] = (mc._ymouse + target[yProp]) - pressPosY;
height = (storedHeight - (target[yProp] - storedY));
}
function dragBottomLeft() {
var _local2 = mc._ymouse - pressPosY;
height = (storedHeight + _local2);
target[xProp] = (mc._xmouse + target[xProp]) - pressPosX;
width = (storedWidth - (target[xProp] - storedX));
}
function dragBottomRight() {
var _local3 = mc._xmouse - pressPosX;
var _local2 = mc._ymouse - pressPosY;
width = (storedWidth + _local3);
height = (storedHeight + _local2);
}
function dragTop() {
target[yProp] = (mc._ymouse + target[yProp]) - pressPosY;
height = (storedHeight - (target[yProp] - storedY));
}
function dragBottom() {
var _local2 = mc._ymouse - pressPosY;
height = (storedHeight + _local2);
}
function dragLeft() {
target[xProp] = (mc._xmouse + target[xProp]) - pressPosX;
width = (storedWidth - (target[xProp] - storedX));
}
function dragRight() {
var _local2 = mc._xmouse - pressPosX;
width = (storedWidth + _local2);
}
function set width(value) {
if (value != _width) {
_width = Math.max(_minWidth, value);
target[widthProp] = _width;
draw();
}
//return(width);
}
function get width() {
return(_width);
}
function set height(value) {
if (value != _height) {
_height = Math.max(_minHeight, value);
target[heightProp] = _height;
draw();
}
//return(height);
}
function get height() {
return(_height);
}
function set frameThickness(value) {
if (value != _frameThickness) {
_frameThickness = Math.max(value, 4);
draw();
}
//return(frameThickness);
}
function get frameThickness() {
return(_frameThickness);
}
function set minWidth(value) {
if (value != _minWidth) {
_minWidth = value;
_width = Math.max(_width, _minWidth);
draw();
}
//return(minWidth);
}
function get minWidth() {
return(_minWidth);
}
function set minHeight(value) {
if (value != _minHeight) {
_minHeight = value;
_height = Math.max(_height, _minHeight);
draw();
}
//return(minHeight);
}
function get minHeight() {
return(_minHeight);
}
function draw() {
var _local3 = Math.max(0, _width - (_frameThickness * 2));
var _local2 = Math.max(0, _height - (_frameThickness * 2));
left._width = _frameThickness;
left._height = _local2;
right._width = _frameThickness;
right._height = _local2;
top._width = _local3;
top._height = _frameThickness;
bottom._width = _local3;
bottom._height = _frameThickness;
topLeft._width = _frameThickness;
topLeft._height = _frameThickness;
topRight._width = _frameThickness;
topRight._height = _frameThickness;
bottomLeft._width = _frameThickness;
bottomLeft._height = _frameThickness;
bottomRight._width = _frameThickness;
bottomRight._height = _frameThickness;
topLeft._x = 0;
topLeft._y = 0;
topRight._x = _local3 + _frameThickness;
topRight._y = 0;
bottomLeft._x = 0;
bottomLeft._y = _local2 + _frameThickness;
bottomRight._x = _local3 + _frameThickness;
bottomRight._y = _local2 + _frameThickness;
left._x = 0;
left._y = _frameThickness;
right._x = _local3 + _frameThickness;
right._y = _frameThickness;
top._x = _frameThickness;
top._y = 0;
bottom._x = _frameThickness;
bottom._y = _local2 + _frameThickness;
}
}
Symbol 1935 MovieClip [__Packages.keepyups.view.AlertView] Frame 0
class keepyups.view.AlertView extends keepyups.view.BaseView
{
var mc, ok_btn, cancel_btn, title_tf, body_tf, backing_mc, openDelay, openTime, controller;
function AlertView (parent_mc, depth) {
super(parent_mc, depth);
mc = parent_mc.attachMovie("AlertViewMC", "AlertViewMC" + depth, depth);
ok_btn = mc.ok_btn;
cancel_btn = mc.cancel_btn;
title_tf = mc.title_tf;
body_tf = mc.body_tf;
backing_mc = mc.backing_mc;
backing_mc.onPress = function () {
};
backing_mc.useHandCursor = false;
mc._visible = false;
openDelay = 0;
openTime = 5;
}
function enableButtonFunctions() {
var scope = controller;
ok_btn.onRelease = function () {
scope.onSelectOK();
};
cancel_btn.onRelease = function () {
scope.onSelectCancel();
};
}
function disableButtonFunctions() {
delete ok_btn.onRelease;
delete cancel_btn.onRelease;
}
function showAlert(title, body, showOK, showCancel) {
title_tf.text = title;
body_tf.text = body;
ok_btn._visible = showOK;
cancel_btn._visible = showCancel;
}
}
Symbol 1936 MovieClip [__Packages.keepyups.controller.AlertController] Frame 0
class keepyups.controller.AlertController extends keepyups.controller.BaseController
{
var id, show, view, hide;
function AlertController (model, view) {
super(model, view);
id = "alertController";
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.AlertEvent.SHOW, this, showAlertHandler);
unwrong.codebase.events.StaticEventDispatcher.addEventListener(keepyups.events.AlertEvent.HIDE, this, hideAlertHandler);
}
function showAlertHandler(event) {
show();
view.showAlert(event.title, event.body, event.showOk, event.showCancel);
}
function hideAlertHandler(event) {
hide();
}
function onSelectOK() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.AlertEvent(keepyups.events.AlertEvent.CONFIRM));
}
function onSelectCancel() {
hide();
unwrong.codebase.events.StaticEventDispatcher.dispatch(new keepyups.events.AlertEvent(keepyups.events.AlertEvent.CANCEL));
}
}