Frame 1
com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeContainer.main();
Symbol 111 MovieClip Frame 1
gotoAndStop (1);
Symbol 121 MovieClip Frame 8
stop();
Symbol 121 MovieClip Frame 16
stop();
Symbol 125 MovieClip Frame 8
stop();
Symbol 188 MovieClip [__Packages.com.lumoslabs.framework.ManagedGame] Frame 0
interface com.lumoslabs.framework.ManagedGame
{
}
Symbol 189 MovieClip [__Packages.com.lumoslabs.framework.GameManager] Frame 0
interface com.lumoslabs.framework.GameManager
{
}
Symbol 190 MovieClip [__Packages.com.lumoslabs.games.GameContainer] Frame 0
class com.lumoslabs.games.GameContainer implements com.lumoslabs.framework.ManagedGame
{
var target_mc, depth, xLoc, yLoc, container_mc, settings, game, manager;
function GameContainer (target_mc, depth, x, y) {
Stage.align = "TL";
Stage.scaleMode = "noScale";
this.target_mc = target_mc;
this.depth = depth;
xLoc = x;
yLoc = y;
setupContainerClip();
setDefaults();
com.lumoslabs.framework.GameRegistrar.registerGame(this);
}
function setupContainerClip() {
container_mc.onEnterFrame = undefined;
delete container_mc.onEnterFrame;
container_mc.removeMovieClip();
container_mc = target_mc.createEmptyMovieClip("container_mc", depth);
container_mc._x = xLoc;
container_mc._y = yLoc;
}
function setDefaults() {
}
function init(obj) {
initGame(obj);
}
function initGame(obj) {
}
function update(o, infoObj) {
if (infoObj instanceof com.lumoslabs.games.PlayEvent) {
reportPlay();
} else if (infoObj instanceof com.lumoslabs.games.HelpEvent) {
reportReset();
} else if (infoObj instanceof com.lumoslabs.games.FinalFinish) {
reportQuit();
} else if (infoObj instanceof com.lumoslabs.games.PromoEvent) {
reportPromo();
}
}
function fetchData(obj) {
}
function finish(obj, str) {
trace("GameContainer: Passing data");
reportData(obj);
}
function addSettings(gameSettings) {
trace("GameContainer: Adding settings");
settings = gameSettings;
}
function start() {
initGame(settings);
}
function help() {
game.help();
}
function mute() {
game.toggleMute();
}
function pause() {
game.togglePause();
}
function registerManager(newManager) {
manager = newManager;
}
function removeManager() {
delete manager;
}
function isPausable() {
return(_isPausable);
}
function isFullScreen() {
return(_isFullScreen);
}
function destroy() {
}
function reportPlay() {
manager.onPlay(this);
}
function reportData(gameData) {
manager.onData(this, gameData);
}
function reportReset() {
manager.onReset(this);
}
function reportQuit() {
trace("GameContainer: Calling report quit");
manager.onQuit(this);
}
function reportPromo() {
manager.onPromo(this);
}
var _isPausable = false;
var _isFullScreen = false;
var result = new Object();
}
Symbol 191 MovieClip [__Packages.com.lumoslabs.util.Observable] Frame 0
class com.lumoslabs.util.Observable
{
var observers;
function Observable () {
observers = new Array();
}
function addObserver(o) {
if (o == null) {
return(false);
}
var _local2 = 0;
while (_local2 < observers.length) {
if (observers[_local2] == o) {
return(false);
}
_local2++;
}
observers.push(o);
return(true);
}
function removeObserver(o) {
var _local3 = observers.length;
var _local2 = 0;
while (_local2 < _local3) {
if (observers[_local2] == o) {
observers.splice(_local2, 1);
return(true);
}
_local2++;
}
return(false);
}
function notifyObservers(infoObj) {
if (infoObj == undefined) {
infoObj = null;
}
if (!changed) {
return(undefined);
}
var _local3 = observers.slice(0);
clearChanged();
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
_local3[_local2].update(this, infoObj);
_local2--;
}
}
function clearObservers() {
observers = new Array();
}
function setChanged() {
changed = true;
}
function clearChanged() {
changed = false;
}
function hasChanged() {
return(changed);
}
function countObservers() {
return(observers.length);
}
function getObservers() {
return(observers.slice(0));
}
var changed = false;
}
Symbol 192 MovieClip [__Packages.com.lumoslabs.util.Observer] Frame 0
interface com.lumoslabs.util.Observer
{
}
Symbol 193 MovieClip [__Packages.com.lumoslabs.games.Game] Frame 0
class com.lumoslabs.games.Game extends com.lumoslabs.util.Observable
{
var score, level, running, levelChanged, setChanged, bestScore, finalScoresArray, lives, trialsRemaining, startTime, notifyObservers, soundEffects;
function Game () {
super();
score = 0;
level = 0;
running = false;
levelChanged = false;
}
function addPoints(points) {
newPoints = points;
score = score + newPoints;
if (score < 0) {
score = 0;
}
setChanged();
doUpdate();
}
function getLevel() {
return(level);
}
function getLevelChanged() {
return(levelChanged);
}
function getScore() {
return(score);
}
function updateBestScore() {
if ((score > bestScore) || (isNaN(bestScore))) {
bestScore = score;
}
}
function getBestScore() {
return(bestScore);
}
function pushFinalScore() {
if (finalScoresArray == null) {
finalScoresArray = new Array();
}
finalScoresArray.push(score);
}
function getFinalScoresArray() {
return(finalScoresArray);
}
function isRunning() {
return(running);
}
function levelUp() {
level = level + 1;
setLevel(level);
}
function onClick(x, y) {
}
function setLevel(newLevel) {
level = newLevel;
levelChanged = true;
setChanged();
doUpdate();
clearChanged();
}
function setScore(newScore) {
score = newScore;
setChanged();
doUpdate();
}
function setLives(lives) {
this.lives = lives;
}
function getLives() {
return(lives);
}
function changeLives(change) {
lives = lives + change;
}
function setTrialsRemaining(trialsRemaining) {
this.trialsRemaining = trialsRemaining;
if (trialsRemaining == 0) {
}
setChanged();
doUpdate();
}
function start() {
startTime = getTimer();
running = true;
setChanged();
doUpdate();
run();
}
function stop() {
running = false;
}
function restart() {
reset();
start();
}
function sendResults(resultObj) {
var _local3 = new com.lumoslabs.util.ResultSet(resultObj);
debug("results are:");
debug(_local3.toString());
var _local2 = new XML();
_local2.onLoad = com.lumoslabs.util.Delegate.create(this, resultsSent);
debug("sending data to " + save_url);
_local3.send(save_url, _local2);
}
function resultsSent(success) {
if (success) {
debug("transfer was successful");
} else {
debug("transfer failed");
}
}
function debug(str) {
setChanged();
notifyObservers(new com.lumoslabs.games.DebugOutput(str));
}
function reset() {
stop();
score = 0;
newPoints = 0;
level = 0;
running = false;
levelChanged = false;
finalScoresArray = [];
setChanged();
notifyObservers(new com.lumoslabs.games.ResetEvent());
}
function clearChanged() {
super.clearChanged();
levelChanged = false;
}
function doUpdate() {
notifyObservers(new com.lumoslabs.games.GameState(score, level, running, levelChanged, newPoints, trialsRemaining));
}
function run() {
}
function init(obj) {
}
function finish() {
}
function finalFinish() {
trace("firing final event");
setChanged();
notifyObservers(new com.lumoslabs.games.FinalFinish());
}
function help() {
setChanged();
notifyObservers(new com.lumoslabs.games.HelpEvent());
}
function getSounds() {
return(soundEffects);
}
function toggleMute() {
return(soundEffects.toggleMute());
}
function togglePause() {
return(false);
}
static var LEVEL_INCREMENT = 1000;
var newPoints = 0;
var save_url = "http://localhost/foo/";
static var EASY = 0;
static var MEDIUM = 1;
static var HARD = 2;
static var TEST = 3;
}
Symbol 194 MovieClip [__Packages.com.lumoslabs.games.SoundEffects] Frame 0
class com.lumoslabs.games.SoundEffects
{
static var firstLoadedTarget;
var all_sounds, context_mc, mute, pause, positiveFeedback, negativeFeedback, tier1Sound, tier2Sound, tier3Sound, tier4Sound, ambientSound;
function SoundEffects (target) {
if (firstLoadedTarget == undefined) {
firstLoadedTarget = target;
}
all_sounds = [];
firstLoadedTarget.createEmptyMovieClip("context_mc", firstLoadedTarget.getNextHighestDepth());
context_mc = firstLoadedTarget.context_mc;
mute = false;
pause = false;
}
function addSound(id) {
var _local2 = new com.lumoslabs.games.GameSound(context_mc);
_local2.attachSound(id);
_local2.setVolume(volume);
_local2.setMute(mute);
_local2.setPause(pause);
all_sounds.push(_local2);
return(_local2);
}
function playFeedbackSound(isPositive) {
if (isPositive) {
positiveFeedback.start(0, 1);
} else {
negativeFeedback.start(0, 1);
}
}
function playTieredFeedbackSound(tier) {
if (tier == 1) {
tier1Sound.start(0, 1);
} else if (tier == 2) {
tier2Sound.start(0, 1);
} else if (tier == 3) {
tier3Sound.start(0, 1);
} else if (tier == 4) {
tier4Sound.start(0, 1);
} else {
negativeFeedback.start(0, 1);
}
}
function setAmbientSound(newSound) {
ambientSound = newSound;
ambientSound.loop = true;
}
function setTieredSounds(sound1, sound2, sound3, sound4) {
tier1Sound = sound1;
tier2Sound = sound2;
tier3Sound = sound3;
tier4Sound = sound4;
}
function setPositiveFeedbackSound(newSound) {
positiveFeedback = newSound;
}
function setNegativeFeedbackSound(newSound) {
negativeFeedback = newSound;
}
function startAmbientSound() {
ambientSound.start(0, 1);
}
function stopAmbientSound() {
ambientSound.stop();
}
function stopAllSounds() {
for (var _local2 in all_sounds) {
com.lumoslabs.games.GameSound(all_sounds[_local2]).stop();
}
}
function setMute(mute) {
this.mute = mute;
for (var _local3 in all_sounds) {
com.lumoslabs.games.GameSound(all_sounds[_local3]).setMute(mute);
}
}
function toggleMute() {
setMute(!mute);
return(mute);
}
function destroy() {
stopAllSounds();
if (ambientSound) {
stopAmbientSound();
}
context_mc.removeMovieClip();
}
function setPause(pause) {
this.pause = pause;
for (var _local3 in all_sounds) {
com.lumoslabs.games.GameSound(all_sounds[_local3]).setPause(pause);
}
}
function togglePause() {
setPause(!pause);
return(pause);
}
var volume = 40;
}
Symbol 195 MovieClip [__Packages.com.lumoslabs.games.GameSound] Frame 0
class com.lumoslabs.games.GameSound extends Sound
{
var play, pause, mute, volume, loop, position;
function GameSound () {
if (arguments.length > 0) {
super(arguments[0]);
} else {
super();
}
play = false;
pause = false;
mute = false;
volume = super.getVolume();
loop = false;
}
function start() {
switch (arguments.length) {
case 0 :
super.start();
break;
case 1 :
super.start(arguments[0]);
break;
default :
super.start(arguments[0], arguments[1]);
}
if (pause) {
super.stop();
}
play = true;
}
function stop() {
if (arguments.length > 0) {
super.stop(arguments[0]);
} else {
super.stop();
}
play = false;
pause = false;
}
function getVolume() {
return(volume);
}
function setVolume(value) {
super.setVolume(value);
volume = super.getVolume();
if (mute) {
super.setVolume(0);
}
}
function getPlay() {
return(play);
}
function setPause(pause) {
if (pause) {
doPause();
} else {
unPause();
}
}
function setMute(mute) {
this.mute = mute;
if (mute) {
super.setVolume(0);
} else {
super.setVolume(volume);
}
}
function doPause() {
if (!pause) {
pause = true;
if (play) {
super.stop();
}
}
}
function unPause() {
if (pause) {
pause = false;
if (play) {
super.start(position / 1000);
}
}
}
function onSoundComplete() {
if (loop) {
start();
} else {
play = false;
pause = false;
}
}
}
Symbol 196 MovieClip [__Packages.com.lumoslabs.util.ResultSet] Frame 0
class com.lumoslabs.util.ResultSet
{
var resultXML;
function ResultSet (resultObj) {
buildXML(resultObj);
}
function buildXML(resultObj) {
resultXML = new XML();
var _local9 = resultObj.session_id;
if (!(delete resultObj.session_id)) {
_local9 = _root.session_id;
if (_local9 == undefined) {
return(undefined);
}
}
var _local8 = resultXML.createElement("session");
resultXML.appendChild(_local8);
var _local10 = resultXML.createElement("id");
_local8.appendChild(_local10);
_local10.appendChild(resultXML.createTextNode(_local9));
var _local6 = resultXML.createElement("game");
_local8.appendChild(_local6);
var _local4;
var _local5;
for (var _local7 in resultObj) {
trace((("adding node: " + _local7) + " value: ") + resultObj.prop);
_local4 = resultXML.createElement(_local7);
_local5 = resultXML.createTextNode(resultObj[_local7]);
_local6.appendChild(_local4);
_local4.appendChild(_local5);
}
trace(resultXML);
}
function toString() {
return(resultXML.toString());
}
function send(url, response) {
resultXML.contentType = "text/xml";
}
}
Symbol 197 MovieClip [__Packages.com.lumoslabs.util.Delegate] Frame 0
class com.lumoslabs.util.Delegate
{
function Delegate () {
}
static function create(scope, method) {
var parameters_arr = arguments.slice(2);
var _local2 = function () {
method.apply(scope, arguments.concat(parameters_arr));
};
return(_local2);
}
}
Symbol 198 MovieClip [__Packages.com.lumoslabs.games.DebugOutput] Frame 0
class com.lumoslabs.games.DebugOutput
{
var text;
function DebugOutput (output) {
text = output;
}
}
Symbol 199 MovieClip [__Packages.com.lumoslabs.games.ResetEvent] Frame 0
class com.lumoslabs.games.ResetEvent
{
function ResetEvent () {
}
}
Symbol 200 MovieClip [__Packages.com.lumoslabs.games.GameState] Frame 0
class com.lumoslabs.games.GameState
{
var score, level, isRunning, levelUp, newPoints, trialCount;
function GameState (s, l, r, lu, np, tc) {
score = s;
level = l;
isRunning = r;
levelUp = lu;
newPoints = np;
trialCount = tc;
}
}
Symbol 201 MovieClip [__Packages.com.lumoslabs.games.FinalFinish] Frame 0
class com.lumoslabs.games.FinalFinish
{
function FinalFinish () {
}
}
Symbol 202 MovieClip [__Packages.com.lumoslabs.games.HelpEvent] Frame 0
class com.lumoslabs.games.HelpEvent
{
function HelpEvent () {
}
}
Symbol 203 MovieClip [__Packages.com.lumoslabs.framework.GameRegistrar] Frame 0
class com.lumoslabs.framework.GameRegistrar
{
static var currentManager;
function GameRegistrar () {
}
static function registerGameManager(manager) {
currentManager = manager;
}
static function registerGame(game) {
if (currentManager != undefined) {
currentManager.registerGame(game);
} else {
var _local1 = new com.lumoslabs.framework.ManagedGameAS3Proxy();
if (_local1.useGameManager()) {
_local1.registerGame(game);
} else {
game.start();
}
}
}
static function getGameManager() {
return(currentManager);
}
static function waitingForGameRegistration() {
return(currentManager != undefined);
}
}
Symbol 204 MovieClip [__Packages.com.lumoslabs.framework.ManagedGameAS3Proxy] Frame 0
class com.lumoslabs.framework.ManagedGameAS3Proxy implements com.lumoslabs.framework.GameManager
{
var muteCalled, _game;
function ManagedGameAS3Proxy () {
System.security.allowDomain("*");
muteCalled = false;
_root.flashId = "ManagedGame";
_root.as3Proxy = this;
flx.external.FlashInterface.publish(_root, true);
}
function setResourcePath(resourcePath) {
trace("ManagedGameAS3Proxy, setResourcePath\n");
com.lumoslabs.framework.ResourceHelper.setResourcePath(resourcePath);
}
function useGameManager() {
var _local1 = flx.external.FlashInterface.call(AS2_PROXY_ID + ".useGameManager");
if ((_local1 != null) && (_local1.status == "success")) {
trace("ManagedGameAS3Proxy, FlashInterface manager found");
return(_local1.result);
}
trace("ManagedGameAS3Proxy, no FlashInterface manager found");
return(false);
}
function addSettings(settingsHash) {
trace("ManagedGameAS3Proxy, addSettings");
_game.addSettings(settingsHash);
}
function start() {
_game.start();
if (muteCalled) {
_game.mute();
muteCalled = false;
}
}
function onPauseClick() {
_game.pause();
}
function onHelpClick() {
_game.help();
}
function onMuteClick() {
muteCalled = true;
_game.mute();
}
function registerGame(game) {
trace(("ManagedGameAS3Proxy, registerGame, game: " + game) + newline);
_game = game;
game.registerManager(this);
flx.external.FlashInterface.call(AS2_PROXY_ID + ".registerGame");
}
function getContainerClip() {
return(_root);
}
function onPlay(game) {
flx.external.FlashInterface.call(AS2_PROXY_ID + ".reportPlay");
}
function onData(game, gameData) {
flx.external.FlashInterface.call(AS2_PROXY_ID + ".reportData", gameData);
}
function onReset(game) {
}
function onQuit(game) {
muteCalled = false;
flx.external.FlashInterface.call(AS2_PROXY_ID + ".quit");
flx.external.FlashInterface.call(AS2_PROXY_ID + ".reportQuit");
}
function onPromo(game) {
flx.external.FlashInterface.call(AS2_PROXY_ID + ".reportPromo");
}
function isPausable() {
return(_game.isPausable());
}
function isFullScreen() {
return(_game.isFullScreen());
}
function destroy() {
_game.destroy();
}
static var AS2_PROXY_ID = "root.as2Proxy";
}
Symbol 205 MovieClip [__Packages.flx.external.FlashInterface] Frame 0
class flx.external.FlashInterface extends Object
{
function FlashInterface () {
super();
}
static function addEventListener(event, listener) {
var _local2 = getId(_root);
setup(_local2);
flashIdList[_local2].registry.addEventListener(event, listener);
flash.external.ExternalInterface.call("addAVMListener", __swfID, _local2, event);
}
static function removeEventListener(event, listener) {
var _local2 = getId(_root);
setup(_local2);
flashIdList[_local2].registry.removeEventListener(event, listener);
flash.external.ExternalInterface.call("removeAVMListener", __swfID, _local2, event);
}
static function dispatchEvent(eventObject) {
flash.external.ExternalInterface.call("dispatchAVMEvent", eventObject);
}
static function dispatchHandler(flashId, eventObject) {
flashIdList[flashId].registry.dispatchEvent(eventObject);
}
static function register(id, target, overwrite) {
var _local1 = getId(target);
setup(_local1);
if (overwrite) {
flashIdList[_local1].registry[id] = target;
return(true);
}
if (flashIdList[_local1].registry[id] == null) {
flashIdList[_local1].registry[id] = target;
return(true);
}
return(false);
}
static function unregister(flashId, id) {
setup(flashId);
if (flashIdList[flashId].registry[id]) {
delete flashIdList[flashId].registry[id];
return(true);
}
return(false);
}
static function call(path) {
var _local7 = path.split(".");
var _local6 = _local7.shift().toString();
var _local5;
var _local4;
if (_local6 == "root") {
_local4 = __swfID;
_local5 = __swfID;
} else {
var _local3 = getSWFIds();
for (var _local8 in _local3) {
if (_local3[_local8] == _local6) {
_local4 = __swfID;
_local5 = _local7.shift().toString();
break;
}
}
if ((_local4 == null) || (_local5 == null)) {
_local4 = _local6;
_local5 = _local6;
}
}
path = _local7.join(".");
var _local2 = arguments.slice(1);
for (var _local8 in _local2) {
if (_local2[_local8] == "") {
_local2[_local8] = "$empty";
}
}
return(flash.external.ExternalInterface.call((("getSWF('" + _local4) + "').callFlash_") + _local5, _local4, path, _local2));
}
static function callHandler(flashId, path, args) {
var _local6 = new Object();
_local6.target = target;
_local6.type = type;
_local6.status = "error";
if (!flashIdList[flashId].swf) {
_local6.message = "SWF has not been made public.";
return(_local6);
}
var _local4 = path.split(".");
var target = _local4[0].toString();
var type = _local4.pop().toString();
var _local2 = flashIdList[flashId].registry[target];
if (_local2 == null) {
var _local5 = flashIdList[flashId].swf;
var _local7 = _local4.length;
var _local1 = 0;
while (_local1 < _local7) {
_local5 = _local5[_local4[_local1]];
_local1++;
}
if (_local5 == null) {
_local6.message = "Target does not exist";
alert(1, flashId);
return(_local6);
}
_local2 = _local5;
} else {
_local4.shift();
var _local7 = _local4.length;
var _local1 = 0;
while (_local1 < _local7) {
_local2 = _local2[_local4[_local1]];
_local1++;
}
if (_local2 == null) {
_local6.message = "Target does not exist";
return(_local6);
}
}
for (var _local8 in args) {
if (args[_local8] == "$empty") {
args[_local8] = "";
}
}
if (typeof(_local2[type]) == "function") {
_local6.result = _local2[type].apply(_local2, args);
} else if (args.length < 1) {
_local6.result = _local2[type];
} else {
_local6.result = (_local2[type] = args[0]);
}
_local6.status = "success";
return(_local6);
}
static function alert() {
trace(arguments.join(" : "));
flash.external.ExternalInterface.call("alert", arguments.join(" : "));
}
static function getId(control) {
var _local1 = control;
if (_local1.flashId == null) {
_local1.flashId = __swfID;
if (_local1.flashId == null) {
_local1.flashId = getSWFName(_local1);
}
}
return(_local1.flashId);
}
static function getSWFIds() {
return(Array(flash.external.ExternalInterface.call("getSWFIds")));
}
static function getSWFName(control) {
var _local1 = control._root._url.split("/").join("|").split("\\").join("|").split("|").pop();
if (_local1.indexOf("?") != -1) {
_local1 = _local1.split("?").shift();
}
_local1 = _local1.split(".swf").join("").split("#").shift();
return(unescape(_local1));
}
static function getSWFId() {
var _local2 = "swf" + (Math.random() * 999999);
flash.external.ExternalInterface.addCallback(_local2, null, function () {
});
var _local1 = flash.external.ExternalInterface.call("SWFInfo.locateSWF", _local2);
if (!_local1) {
_local1 = flash.external.ExternalInterface.call("eval", ((((("(window.SWFInfo = {locateSWF:function(swfUID) {var embedtags = document.getElementsByTagName('embed');var objecttags = document.getElementsByTagName('object');var swfobjects = new Array();for(var j=0; j<embedtags.length; j++)swfobjects.push(embedtags[j]);for(var k=0; k<objecttags.length; k++)swfobjects.push(objecttags[k]);for(var i=0; i<swfobjects.length; i++) {var name = swfobjects[i].name ? swfobjects[i].name : swfobjects[i].id;if(document[name] && document[name][swfUID]) {return name;}" + "}") + "return null;") + "}") + "}).locateSWF('") + _local2) + "');");
}
trace("AS2 LOCATION: " + _local1);
trace("AS2 swfUID:: " + _local2);
var _local3 = (_local1 ? (String(_local1)) : null);
return(_local3);
}
static function publish(root, makePublic) {
var _local1 = getId(root);
setup(_local1);
if (makePublic) {
flashIdList[_local1].swf = root;
} else {
delete flashIdList[_local1].swf;
}
}
static function setupEIFunctions() {
if (!staticInit) {
staticInit = true;
if (flash.external.ExternalInterface.call("eval", "$avms")) {
return(undefined);
}
var _local1 = "";
_local1 = _local1 + "function getSWF(swfId)";
_local1 = _local1 + "{";
_local1 = _local1 + "\tif (navigator.appName.indexOf('Microsoft') != -1)";
_local1 = _local1 + "\t\treturn window[swfId];";
_local1 = _local1 + "\treturn document[swfId];";
_local1 = _local1 + "};";
_local1 = _local1 + "function getSWFIds()";
_local1 = _local1 + "{";
_local1 = _local1 + "\tvar list = new Array();";
_local1 = _local1 + "\tvar swfobjects = document.getElementsByTagName('embed');";
_local1 = _local1 + "\tfor(var i=0; i<swfobjects.length; i++)";
_local1 = _local1 + "\t\tlist.push(swfobjects[i].name ? swfobjects[i].name : swfobjects[i].id);";
_local1 = _local1 + "\tswfobjects = document.getElementsByTagName('object');";
_local1 = _local1 + "\tfor(i=0; i<swfobjects.length; i++)";
_local1 = _local1 + "\t\tlist.push(swfobjects[i].name ? swfobjects[i].name : swfobjects[i].id);";
_local1 = _local1 + "\treturn list;";
_local1 = _local1 + "};";
_local1 = _local1 + "var $avms = new Object();";
_local1 = _local1 + "function addAVMListener(swfId, flashId, event)";
_local1 = _local1 + "{";
_local1 = _local1 + "\tif($avms[event] == null)";
_local1 = _local1 + "\t\t$avms[event] = new Object();";
_local1 = _local1 + "\tif($avms[event][swfId] == null)";
_local1 = _local1 + "\t\t$avms[event][swfId] = new Object();";
_local1 = _local1 + "\t$avms[event][swfId][flashId] = event;";
_local1 = _local1 + "};";
_local1 = _local1 + "function removeAVMListener(swfId, flashId, event)";
_local1 = _local1 + "{";
_local1 = _local1 + "\tdelete $avms[event][swfId][flashId];";
_local1 = _local1 + "};";
_local1 = _local1 + "function dispatchAVMEvent(evt)";
_local1 = _local1 + "{";
_local1 = _local1 + "\tvar type = evt.type;";
_local1 = _local1 + "\tvar swfList = $avms[type];";
_local1 = _local1 + "\tfor(var e in swfList)";
_local1 = _local1 + "\t{";
_local1 = _local1 + "\t\tvar flashList = swfList[e];";
_local1 = _local1 + "\t\tfor(var f in flashList)";
_local1 = _local1 + "\t\t{";
_local1 = _local1 + "\t\t\tgetSWF(e)['dispatchFlash_' + f](f, evt);";
_local1 = _local1 + " \t\t}";
_local1 = _local1 + "\t}";
_local1 = _local1 + "};";
flash.external.ExternalInterface.call("eval", _local1);
}
}
static function setup(id) {
setupEIFunctions();
if (id == null) {
return(false);
}
if (flashIdList[id] == null) {
flashIdList[id] = new Object();
flashIdList[id].dispatchHandler = dispatchHandler;
flashIdList[id].callHandler = callHandler;
flashIdList[id].registry = new Object();
mx.events.EventDispatcher.initialize(flashIdList[id].registry);
flash.external.ExternalInterface.addCallback("dispatchFlash_" + id, flashIdList[id], flashIdList[id].dispatchHandler);
flash.external.ExternalInterface.addCallback("callFlash_" + id, flashIdList[id], flashIdList[id].callHandler);
}
return(true);
}
static var flashIdList = new Object();
static var staticInit = false;
static var __swfID = getSWFId();
}
Symbol 206 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 207 MovieClip [__Packages.com.lumoslabs.framework.ResourceHelper] Frame 0
class com.lumoslabs.framework.ResourceHelper
{
static var resourcePath;
function ResourceHelper () {
}
static function pathURL(path) {
return(rootPath() + path);
}
static function setResourcePath(resourcePath) {
com.lumoslabs.framework.ResourceHelper.resourcePath = resourcePath;
}
static function getResourcePath(path) {
if (resourcePath == undefined) {
resourcePath = getDefaultResourcePath();
}
return((resourcePath + "/") + path);
}
static function getDefaultResourcePath() {
var _local1;
if ((System.capabilities.playerType == "External") || (System.capabilities.playerType == "StandAlone")) {
_local1 = "../resources/";
} else {
_local1 = pathURL("flash/resources/");
}
return(_local1);
}
static function rootPath() {
var _local2;
if (System.security.sandboxType == "remote") {
var _local3 = _root._url.indexOf("flash/");
return(_root._url.substr(0, _local3));
}
_local2 = "";
return(_local2);
}
}
Symbol 208 MovieClip [__Packages.com.lumoslabs.games.PlayEvent] Frame 0
class com.lumoslabs.games.PlayEvent
{
function PlayEvent () {
}
}
Symbol 209 MovieClip [__Packages.com.lumoslabs.games.PromoEvent] Frame 0
class com.lumoslabs.games.PromoEvent
{
function PromoEvent () {
}
}
Symbol 210 MovieClip [__Packages.com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeContainer] Frame 0
class com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeContainer extends com.lumoslabs.games.GameContainer implements com.lumoslabs.util.Observer
{
var _isPausable, game, setupContainerClip, container_mc, finish;
function ChalkboardChallengeContainer (target, depth, x, y, stageWidth, stageHeight) {
super(target, depth, x, y);
}
function setDefaults() {
_isPausable = true;
}
function initGame(params) {
var _local2 = 45;
if (params.time != undefined) {
_local2 = Number(params.time);
} else {
trace("ChalkboardChallengeContainer, no time passed, default used: " + _local2);
}
com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeGame(game).clearAll();
setupContainerClip();
game.clearObservers();
container_mc.onEnterFrame = undefined;
delete container_mc.onEnterFrame;
game = new com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeGame(container_mc, this, _local2);
game.addObserver(this);
var myGame = com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeGame(game);
myGame.init();
container_mc.onEnterFrame = function () {
myGame.update();
};
}
function handleResults(score, num_correct, num_tries, time, session_level) {
var _local2 = new Object();
_local2.score = score;
_local2.num_correct = num_correct;
_local2.num_tries = num_tries;
_local2.time = time;
_local2.session_level = session_level;
finish(_local2);
}
static function main() {
var _local2 = new com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeContainer(_root, 0, 0, 0, Stage.width, Stage.height);
}
}
Symbol 211 MovieClip [__Packages.com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeGame] Frame 0
class com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeGame extends com.lumoslabs.games.Game
{
var MC, gameContainer, trialTime, responseTime, inGrace, released, newResponse, correctResponse, updateFinished, pause, soundEffects, gameState, countIntID, gameTime, startTime, timeLeft, score, responses, rights, totals, correctTotals, times, level, consRights, trial, centerTrial, lastTrialTime, bottomTrial, topTrial, tally, tallyNum, response, endTime, pauseStart;
function ChalkboardChallengeGame (container_mc, gameContainer, trialTime) {
super();
MC = container_mc;
this.gameContainer = gameContainer;
this.trialTime = trialTime;
responseTime = getTimer();
inGrace = false;
released = true;
newResponse = false;
correctResponse = false;
updateFinished = true;
pause = false;
soundEffects = new com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeSounds(MC);
Key.addListener(this);
}
function getSounds() {
return(com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeSounds(soundEffects));
}
function clearAll() {
stopShakeProblems();
MC.myScreenLayer.removeMovieClip();
MC.myTrialLayer.removeMovieClip();
getSounds().stopAllSounds();
Key.removeListener(this);
}
function init() {
MC.createEmptyMovieClip("myScreenLayer", MC.getNextHighestDepth());
MC.myScreenLayer._x = WIDTH / 2;
MC.myScreenLayer._y = HEIGHT / 2;
MC.attachMovie("trialLayer", "myTrialLayer", MC.getNextHighestDepth(), {_x:WIDTH / 2, _y:HEIGHT / 2});
initTrialLayerButtons();
MC.myTrialLayer._visible = false;
initStart();
}
function initStart() {
gameState = "start";
MC.myScreenLayer.attachMovie("startScreen", "myScreen", 0);
var owner = this;
MC.myScreenLayer.myScreen.myHowToButton.onPress = function () {
owner.help();
};
MC.myScreenLayer.myScreen.myStartButton.onPress = function () {
owner.clearStart();
owner.getSounds().stopIntroSound();
owner.initCount();
};
if (!getSounds().getIntroIsPlaying()) {
getSounds().startIntroSound();
}
}
function clearStart() {
MC.myScreenLayer.myScreen.removeMovieClip();
}
function initCount() {
gameState = "count";
MC.myScreenLayer.attachMovie("countScreen", "myScreen", 0);
MC.myScreenLayer.myScreen.myScore.text = "0";
MC.myScreenLayer.myScreen.myLevel.text = "1";
MC.myScreenLayer.myScreen.myMeter.gotoAndStop(getMeterFrame(trialTime + GRACEPERIOD));
MC.myScreenLayer.myScreen.count.text = "3";
countIntID = setInterval(this, "countdown", 1000, 3);
gameContainer.reportPlay();
}
function countdown(secondsLeft) {
clearInterval(countIntID);
if (secondsLeft > 1) {
MC.myScreenLayer.myScreen.count.text = secondsLeft - 1;
countIntID = setInterval(this, "countdown", 1000, secondsLeft - 1);
} else {
clearCount();
initTrials(getTimer());
}
}
function clearCount() {
clearInterval(countIntID);
MC.myScreenLayer.myScreen.removeMovieClip();
}
function initInstruct() {
gameState = "instruct";
MC.myTrialLayer._visible = false;
MC.myScreenLayer.attachMovie("helpScreen", "myScreen", 0);
if (!getSounds().getIntroIsPlaying()) {
getSounds().startIntroSound();
}
doInstructScreen(1);
}
function clearInstruct() {
inGrace = false;
stopShakeProblems();
MC.myScreenLayer.myScreen.removeMovieClip();
}
function initTrials(initTime) {
gameState = "trials";
gameTime = initTime;
startTime = initTime;
timeLeft = trialTime + GRACEPERIOD;
score = 0;
responses = 0;
rights = 0;
totals = {greaterThan:0, equalTo:0, lessThan:0};
correctTotals = {greaterThan:0, equalTo:0, lessThan:0};
times = [];
level = 1;
consRights = 0;
MC.myScreenLayer.attachMovie("trialScreen", "myScreen", 0);
MC.myTrialLayer._visible = true;
trial = new com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeTrial(level, consRights);
initTrialLayer();
trial.displayTrial(centerTrial);
lastTrialTime = getTimer();
pauseTrialLayer(pause);
getSounds().startAmbientSound();
}
function initTrialLayer() {
centerTrial = MC.myTrialLayer.trial0;
centerTrial._alpha = 100;
centerTrial._y = 0;
bottomTrial = MC.myTrialLayer.trial1;
bottomTrial._alpha = 0;
bottomTrial._y = 150;
topTrial = MC.myTrialLayer.trial2;
topTrial._alpha = 0;
topTrial._y = -150;
initTrialClip(centerTrial);
initTrialClip(bottomTrial);
initTrialClip(topTrial);
MC.myTrialLayer.myScore.text = score;
MC.myTrialLayer.myLevel.text = level;
MC.myTrialLayer.myMeter.filter.clip.gotoAndStop(1);
MC.myTrialLayer.myMeter.gotoAndStop(getMeterFrame(timeLeft));
tally = MC.myTrialLayer.tally0;
tallyNum = 0;
resetTally();
tally._alpha = 0;
switchTally();
resetTally();
}
function initTrialClip(clip) {
clip.leftAns._visible = false;
clip.rightAns._visible = false;
clip.feedback._visible = false;
clip.bottomComp._visible = false;
clip._xscale = 100;
clip._yscale = 100;
}
function initTrialLayerButtons() {
var owner = this;
MC.myTrialLayer.myUpButton.onPress = function () {
owner.buttonPress("equalTo", getTimer());
};
MC.myTrialLayer.myRightButton.onPress = function () {
owner.buttonPress("lessThan", getTimer());
};
MC.myTrialLayer.myDownButton.onPress = function () {
owner.buttonPress("equalTo", getTimer());
};
MC.myTrialLayer.myLeftButton.onPress = function () {
owner.buttonPress("greaterThan", getTimer());
};
pauseTrialLayer(pause);
}
function buttonPress(button, buttonTime) {
if (updateFinished) {
updateFinished = false;
responseTime = buttonTime;
response = button;
newResponse = true;
trialResponse();
}
}
function clearTrials() {
MC.myTrialLayer._visible = false;
MC.myScreenLayer.myScreen.removeMovieClip();
getSounds().stopAllSounds();
}
function saveResults(totalTime) {
gameContainer.handleResults(score, rights, responses, totalTime * 1000, level);
}
function initResults() {
stopShakeProblems();
gameState = "results";
var _local3 = Math.round((endTime - startTime) / 1000);
var _local4 = new TextFormat("Trebuchet MS", 28, 6710886, true);
var _local5 = new TextFormat("Trebuchet MS", 40, 6710886, true);
var _local2;
var _local6;
if (responses == 0) {
_local2 = 0;
} else {
_local2 = rights / responses;
}
MC.myScreenLayer.attachMovie("resultsScreen", "myScreen", 0);
MC.myScreenLayer.myScreen.myScore.text = score + " points!";
MC.myScreenLayer.myScreen.myLastLevel.text = level;
MC.myScreenLayer.myScreen.myAccuracy.text = Math.round(100 * _local2) + "%";
MC.myScreenLayer.myScreen.myRights.text = rights;
MC.myScreenLayer.myScreen.myTotalTime.text = _local3 + " seconds";
saveResults(_local3);
var owner = this;
MC.myScreenLayer.myScreen.myDoneButton.onPress = function () {
owner.stopSounds();
owner.finalFinish();
};
getSounds().startIntroSound();
}
function stopSounds() {
getSounds().stopAllSounds();
}
function clearResults() {
MC.myScreenLayer.myScreen.removeMovieClip();
}
function update() {
if ((!pause) && (gameState == "trials")) {
if (timeLeft < 1) {
endTime = getTimer();
clearTrials();
initResults();
} else {
updateTimeLeft(getTimer());
}
}
}
function updateTimeLeft(updateTime) {
if ((updateTime - gameTime) > 1000) {
gameTime = updateTime;
timeLeft--;
}
if ((timeLeft <= TICKPERIOD) && (!getSounds().getTimerSoundIsPlaying())) {
getSounds().playTimerSound();
}
if ((timeLeft <= GRACEPERIOD) && (!inGrace)) {
inGrace = true;
shakeCenterProblems();
}
MC.myTrialLayer.myTime.text = timeLeft;
MC.myTrialLayer.myMeter.gotoAndStop(getMeterFrame(timeLeft));
}
function shakeCenterProblems() {
shakeProblem(centerTrial.rightProblem, "rightX0", "rightY0");
shakeProblem(centerTrial.leftProblem, "leftX0", "leftY0");
}
function shakeBottomProblems() {
shakeProblem(bottomTrial.rightProblem, "rightX0", "rightY0");
shakeProblem(bottomTrial.leftProblem, "leftX0", "leftY0");
}
function stopShakeProblems() {
stopShakeProblem(topTrial.rightProblem, "rightX0", "rightY0");
stopShakeProblem(topTrial.leftProblem, "leftX0", "leftY0");
stopShakeProblem(centerTrial.rightProblem, "rightX0", "rightY0");
stopShakeProblem(centerTrial.leftProblem, "leftX0", "leftY0");
stopShakeProblem(bottomTrial.rightProblem, "rightX0", "rightY0");
stopShakeProblem(bottomTrial.leftProblem, "leftX0", "leftY0");
}
function shakeProblem(problemClip, x0Str, y0Str) {
problemClip[x0Str] = problemClip._x;
problemClip[y0Str] = problemClip._y;
problemClip.onEnterFrame = com.lumoslabs.util.Delegate.create(this, shakeClip, problemClip, SHAKEFRAMES);
}
function stopShakeProblem(problemClip, x0Str, y0Str) {
delete problemClip.onEnterFrame;
problemClip._x = problemClip[x0Str];
problemClip._y = problemClip[y0Str];
}
function shakeClip(clip, framesLeft) {
var _local2 = (Math.random() * 2) * Math.PI;
var _local3 = SHAKEDISPLACE * Math.cos(_local2);
var _local4 = SHAKEDISPLACE * Math.sin(_local2);
setShake(_local3, _local4, clip);
clip.onEnterFrame = com.lumoslabs.util.Delegate.create(this, setReturnShake, -_local3, -_local4, clip, framesLeft);
}
function setShake(xDisplace, yDisplace, clip) {
clip._x = clip._x + xDisplace;
clip._y = clip._y + yDisplace;
}
function setReturnShake(xDisplace, yDisplace, clip, framesLeft) {
setShake(xDisplace, yDisplace, clip);
clip.onEnterFrame = com.lumoslabs.util.Delegate.create(this, shakeClip, clip, framesLeft - 1);
}
function getMeterFrame(time) {
return(Math.max(1, Math.min((6 * (time - GRACEPERIOD)) + 1, 361)));
}
function doInstructScreen(frame) {
MC.myScreenLayer.myScreen.gotoAndStop(frame);
var owner = this;
MC.myScreenLayer.myScreen.playButton.onRelease = function () {
owner.clearInstruct();
owner.getSounds().stopIntroSound();
owner.initCount();
};
if (frame == 1) {
MC.myScreenLayer.myScreen.forwardButton.onRelease = function () {
owner.doInstructScreen(2);
};
} else {
MC.myScreenLayer.myScreen.backButton.onRelease = function () {
owner.doInstructScreen(1);
};
}
}
function onKeyUp() {
released = true;
}
function onKeyDown() {
if ((updateFinished && (released)) && (gameState == "trials")) {
updateFinished = false;
responseTime = getTimer();
switch (Key.getCode()) {
case 38 :
response = "equalTo";
newResponse = true;
break;
case 39 :
response = "lessThan";
newResponse = true;
break;
case 40 :
response = "equalTo";
newResponse = true;
break;
case 37 :
response = "greaterThan";
newResponse = true;
break;
default :
newResponse = false;
updateFinished = true;
}
if (newResponse) {
trialResponse();
released = false;
}
}
}
function trialResponse() {
times.push(responseTime - lastTrialTime);
responses++;
totals[trial.getType()]++;
if (inGrace) {
stopShakeProblems();
shakeBottomProblems();
}
if (response == trial.getType()) {
rights++;
correctTotals[trial.getType()]++;
rightTrialResponse();
nextTrial(true);
} else {
wrongTrialResponse();
nextTrial(false);
}
}
function nextTrial(lastTrialRight) {
trial.displayAnswer(centerTrial, response);
trial = new com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeTrial(level, consRights);
trial.displayTrial(bottomTrial);
centerTrial.yTween = new mx.transitions.Tween(centerTrial, "_y", mx.transitions.easing.Strong.easeOut, centerTrial._y, centerTrial._y - 125, 8, false);
centerTrial.alphaTweenOut = new mx.transitions.Tween(centerTrial, "_alpha", mx.transitions.easing.Strong.easeOut, centerTrial._alpha, 100, 8, false);
centerTrial.xscaleTween = new mx.transitions.Tween(centerTrial, "_xscale", mx.transitions.easing.Regular.easeOut, centerTrial._xscale, 75, 8, false);
centerTrial.yscaleTween = new mx.transitions.Tween(centerTrial, "_yscale", mx.transitions.easing.Regular.easeOut, centerTrial._yscale, 75, 8, false);
topTrial.yTween = new mx.transitions.Tween(topTrial, "_y", mx.transitions.easing.Regular.easeIn, topTrial._y, topTrial._y - 150, 8, false);
topTrial.alphaTweenOut = new mx.transitions.Tween(topTrial, "_alpha", mx.transitions.easing.Regular.easeOut, topTrial._alpha, 0, 8, false);
bottomTrial._y = 0;
bottomTrial._alpha = 100;
var owner = topTrial;
var game = this;
topTrial.alphaTweenOut.onMotionFinished = function () {
owner._xscale = 100;
owner._yscale = 100;
owner._y = 110;
game.newResponse = false;
game.correctResponse = false;
game.updateFinished = true;
game.lastTrialTime = getTimer();
};
var _local2 = bottomTrial;
bottomTrial = topTrial;
topTrial = centerTrial;
centerTrial = _local2;
}
function rightTrialResponse() {
correctResponse = true;
doLevelRight();
doScore(MULT[level - 1] * CSCORE);
centerTrial.feedback.gotoAndStop("positive");
centerTrial.feedback._visible = true;
}
function wrongTrialResponse() {
timeLeft = timeLeft + WRONGTIME;
doLevelWrong();
centerTrial.feedback.gotoAndStop("negative");
centerTrial.feedback._visible = true;
}
function doLevelRight() {
consRights++;
if (consRights == CONSLEVEL) {
getSounds().playBonusSound();
consRights = 0;
tally.gotoAndPlay(1);
animateTally();
switchTally();
resetTally();
if (inGrace) {
inGrace = false;
timeLeft = RIGHTTIME + GRACEPERIOD;
stopShakeProblems();
} else {
timeLeft = timeLeft + RIGHTTIME;
}
if (timeLeft > TICKPERIOD) {
getSounds().stopTimerSound();
}
MC.myScreenLayer.myScreen.myMeter.gotoAndStop(getMeterFrame(timeLeft));
MC.myTrialLayer.myMeter.filter.clip.gotoAndPlay(1);
if (level < MULT.length) {
level++;
MC.myTrialLayer.myLevel.text = level;
}
} else {
getSounds().playFeedbackSound(true);
tally["mark" + consRights].gotoAndPlay(1);
}
}
function resetTally() {
tally._xscale = 100;
tally._yscale = 100;
tally._y = 100;
tally._alpha = 100;
tally.gotoAndStop(1);
var _local2 = 1;
while (_local2 < 5) {
tally["mark" + _local2].gotoAndStop(1);
_local2++;
}
}
function switchTally() {
tallyNum = (tallyNum + 1) % 2;
tally = MC.myTrialLayer["tally" + tallyNum];
}
function animateTally() {
tally.yTween = new mx.transitions.Tween(tally, "_y", mx.transitions.easing.Strong.easeOut, tally._y, tally._y - 30, 8, false);
tally.alphaTweenOut = new mx.transitions.Tween(tally, "_alpha", mx.transitions.easing.Strong.easeOut, tally._alpha, 0, 16, false);
tally.xscaleTween = new mx.transitions.Tween(tally, "_xscale", mx.transitions.easing.Regular.easeOut, tally._xscale, 75, 8, false);
tally.yscaleTween = new mx.transitions.Tween(tally, "_yscale", mx.transitions.easing.Regular.easeOut, tally._yscale, 75, 8, false);
}
function doLevelWrong() {
getSounds().stopBonusSound();
getSounds().playFeedbackSound(false);
if (consRights > 0) {
tally["mark" + consRights].gotoAndPlay(9);
consRights--;
}
}
function doScore(points) {
score = score + points;
MC.myTrialLayer.myScore.text = score;
}
function togglePause() {
getSounds().togglePause();
setPause(!pause);
return(pause);
}
function setPause(pause) {
this.pause = pause;
if (pause) {
pauseStart = getTimer();
Key.removeListener(this);
} else {
lastTrialTime = lastTrialTime + (getTimer() - pauseStart);
Key.addListener(this);
}
pauseTrialLayer(pause);
}
function pauseTrialLayer(pause) {
MC.myTrialLayer.myUpButton.enabled = !pause;
MC.myTrialLayer.myRightButton.enabled = !pause;
MC.myTrialLayer.myDownButton.enabled = !pause;
MC.myTrialLayer.myLeftButton.enabled = !pause;
trial.setPause(pause, centerTrial);
}
function help() {
super.help();
stopShakeProblems();
clearAny();
if (pause) {
togglePause();
}
initInstruct();
}
function clearAny() {
switch (gameState) {
case "start" :
clearStart();
break;
case "instruct" :
clearInstruct();
break;
case "count" :
clearCount();
break;
case "trials" :
clearTrials();
break;
default :
clearResults();
}
}
static var WIDTH = 640;
static var HEIGHT = 480;
static var TICKPERIOD = 10;
static var GRACEPERIOD = 5;
static var SHAKEFRAMES = 12;
static var SHAKEDISPLACE = 2;
static var CSCORE = 50;
static var DELAY = 0;
static var MULT = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
static var CONSLEVEL = 5;
static var RIGHTTIME = 10;
static var WRONGTIME = -4;
}
Symbol 212 MovieClip [__Packages.com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeTrial] Frame 0
class com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeTrial
{
var numOps, operators, operands, value, trialType;
function ChalkboardChallengeTrial (level, consRights) {
initLevel(level, consRights);
setTrialTypeRandom();
initProblems();
generateProblems();
}
function initLevel(level, consRights) {
numOps = getNumOpsObject(level, consRights);
maxDiff = LEVELS[level - 1].maxDiff;
valRange = [maxDiff + 1, maxVal];
ops = LEVELS[level - 1].ops;
}
function getNumOpsObject(level, consRights) {
var _local2 = LEVELS[level - 1].opsNum;
if (Math.random() < 0.5) {
return({left:getNumOps(_local2.left, consRights), right:getNumOps(_local2.right, consRights)});
}
return({left:getNumOps(_local2.right, consRights), right:getNumOps(_local2.left, consRights)});
}
function getNumOps(opsNum, consRights) {
if (((opsNum % 1) > 0.3) && ((opsNum % 1) < 0.5)) {
if ((consRights == 1) || (consRights == 3)) {
return(Math.ceil(opsNum));
}
return(Math.floor(opsNum));
}
if (((opsNum % 1) > 0.7) && ((opsNum % 1) < 0.9)) {
if (consRights == 2) {
return(Math.floor(opsNum));
}
return(Math.ceil(opsNum));
}
return(opsNum);
}
function initProblems() {
operators = {left:new Array(), right:new Array()};
operands = {left:new Array(), right:new Array()};
value = new Object();
}
function setTrialTypeRandom() {
var _local2 = Math.random();
if (_local2 < 0.45) {
trialType = "greaterThan";
} else if (_local2 < 0.55) {
trialType = "equalTo";
} else {
trialType = "lessThan";
}
}
function generateProblems() {
value.left = randomIntegerInside(valRange);
if (trialType == "greaterThan") {
value.right = randomNearWithin(value.left, -maxDiff, valRange);
} else if (trialType == "equalTo") {
value.right = value.left;
} else {
value.right = randomNearWithin(value.left, maxDiff, valRange);
}
if (generateProblem("left") && (generateProblem("right"))) {
if (trialType == "equalTo") {
if (sameProblems() || (reverseEqualTo())) {
initProblems();
generateProblems();
// unexpected jump
}
return(true);
} else {
return(true);
}
} else {
initProblems();
generateProblems();
}
}
function sameProblems() {
return((((numOps.left > 0) || (numOps.right > 0)) && (sameOps())) && (operands.left.join() == operands.right.join()));
}
function sameOps() {
return(operators.left.join() == operators.right.join());
}
function reverseEqualTo() {
return((((sameOps() && (numOps.left == 1)) && (numOps.right == 1)) && ((operators.left[0] == "+") || (operators.left[0] == "x"))) && (operands.left[0] == operands.right[1]));
}
function randomIntegerInside(aRange) {
return(Math.floor(aRange[0] + (Math.random() * ((aRange[1] - aRange[0]) + 1))));
}
function randomNearWithin(near, within, aRange) {
var _local1 = near;
while (_local1 == near) {
if (within > 0) {
_local1 = Math.floor((near + (Math.random() * within)) + 1);
} else {
_local1 = Math.ceil((near + (Math.random() * within)) - 1);
}
}
return(_local1);
}
function isPrime(anInt) {
var _local1 = 0;
var _local2 = PRIMES.length - 1;
var _local3;
while (true) {
if ((_local1 + 1) == _local2) {
return((anInt == PRIMES[_local1]) || (anInt == PRIMES[_local2]));
}
_local3 = Math.round((_local1 + _local2) / 2);
if (anInt > PRIMES[_local3]) {
_local1 = _local3;
} else {
_local2 = _local3;
}
}
}
function findMaxIndex(anNum) {
var _local2 = 0;
var _local1 = PRIMES.length - 1;
var _local3;
while (true) {
if ((_local2 + 1) == _local1) {
if (anNum == PRIMES[_local1]) {
return(_local1);
}
return(_local2);
}
_local3 = Math.round((_local2 + _local1) / 2);
if (anNum > PRIMES[_local3]) {
_local2 = _local3;
} else {
_local1 = _local3;
}
}
}
function generateProblem(side) {
return(generate(operators[side], operands[side], value[side], numOps[side]));
}
function generate(anOps, anOperands, aValue, aNumOps) {
if (aNumOps > 0) {
var _local7 = getRanges(aValue, aNumOps);
var _local2 = getPotentials(_local7, aValue);
if (_local2 == undefined) {
if (anOps.length == 0) {
trace("failed to generate problem");
return(false);
}
return(generate(anOps, anOperands, operate(aValue, String(anOps.shift()), Number(anOperands.shift())), aNumOps + 1));
}
anOps.unshift(_local2.op);
anOperands.unshift(_local2.operand);
return(generate(anOps, anOperands, _local2.value, aNumOps - 1));
}
anOperands.unshift(aValue);
return(true);
}
function getRanges(aValue, aNumOps) {
var _local5 = [1, maxVal];
var _local6 = [1, maxVal];
var _local8 = [2, Math.round(aValue / 2)];
var _local7 = [1, maxVal];
var _local3 = [];
var _local2 = 0;
while (_local2 < ops.length) {
if (ops[_local2] == "+") {
_local3.push(findAddRange(aValue, _local5));
} else if (ops[_local2] == "-") {
_local3.push(findSubRange(aValue, _local6));
} else if (ops[_local2] == "x") {
_local3.push(findMultArray(aValue, _local8));
} else {
_local3.push(findDivRange(aValue, _local7));
}
_local2++;
}
return(_local3);
}
function getPotentials(ranges, aValue) {
var _local5 = [];
var _local4 = [];
var _local2 = 0;
while (_local2 < ranges.length) {
if (ranges[_local2].length > 0) {
_local5.push(ranges[_local2]);
_local4.push(ops[_local2]);
}
_local2++;
}
if (_local4.length > 0) {
var _local7 = _local4.join("").indexOf("/");
var _local6;
if ((_local7 >= 0) && (Math.random() < DChance)) {
_local6 = _local7;
} else {
_local6 = Math.floor(Math.random() * _local4.length);
}
var _local8 = _local4[_local6];
var _local9 = getOperand(_local8, _local5[_local6]);
return({op:_local8, operand:_local9, value:inverseOperate(aValue, _local8, _local9)});
}
return(undefined);
}
function getOperand(anOp, aRange) {
if (anOp == "x") {
return(aRange[Math.floor(Math.random() * aRange.length)]);
}
return(randomIntegerInside(aRange));
}
function findAddRange(anInt, aRange) {
var _local3 = anInt - aRange[1];
var _local2 = anInt - aRange[0];
return(findOperandRange(_local3, _local2, ASRange));
}
function findSubRange(anInt, aRange) {
var _local3 = aRange[0] - anInt;
var _local2 = aRange[1] - anInt;
return(findOperandRange(_local3, _local2, ASRange));
}
function findMultArray(anInt, aRange) {
var _local2 = powerSet(factor(anInt));
var _local3 = [];
for (var _local6 in _local2) {
if (isInside(_local2[_local6], MDRange) && (isInside(anInt / _local2[_local6], aRange))) {
_local3.push(_local2[_local6]);
}
}
return(_local3);
}
function findDivRange(anInt, aRange) {
var _local2 = Math.ceil(aRange[0] / anInt);
var _local3 = Math.floor(aRange[1] / anInt);
return(findOperandRange(_local2, _local3, MDRange));
}
function findOperandRange(min, max, aRange) {
if ((min > aRange[1]) || (max < aRange[0])) {
return([]);
}
return([Math.max(min, aRange[0]), Math.min(max, aRange[1])]);
}
function factor(anInt) {
if (anInt == 1) {
return([]);
}
return(factorHelper(anInt));
}
function factorHelper(anInt) {
if (isPrime(anInt)) {
return([anInt]);
}
var _local5 = findMaxIndex(Math.sqrt(anInt));
var _local3;
var _local2 = 0;
while (_local2 <= _local5) {
_local3 = anInt / PRIMES[_local2];
if ((_local3 % 1) == 0) {
return([PRIMES[_local2]].concat(factorHelper(_local3)));
}
_local2++;
}
}
function powerSet(anArray) {
var _local4 = [].concat(anArray);
var _local2 = 0;
while (_local2 < (anArray.length - 1)) {
var _local1 = _local2 + 1;
while (_local1 < anArray.length) {
_local4.push(anArray[_local2] * anArray[_local1]);
_local1++;
}
_local2++;
}
return(_local4);
}
function operate(operand1, operator, operand2) {
switch (operator) {
case "+" :
return(operand1 + operand2);
case "-" :
return(operand1 - operand2);
case "x" :
return(operand1 * operand2);
case "/" :
return(operand1 / operand2);
}
}
function inverseOperate(operand1, operator, operand2) {
switch (operator) {
case "+" :
return(operand1 - operand2);
case "-" :
return(operand1 + operand2);
case "x" :
return(operand1 / operand2);
case "/" :
return(operand1 * operand2);
}
}
function isInside(value, range) {
return((range[0] <= value) && (value <= range[1]));
}
function getType() {
return(trialType);
}
function toString(side) {
var _local3 = operands[side].shift() + " ";
var _local5 = operands[side].length;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = _local3 + ((operators[side].shift() + " ") + operands[side].shift());
if (_local2 < (numOps[side] - 1)) {
_local3 = ("(" + _local3) + ") ";
}
_local2++;
}
return(_local3);
}
function displayTrial(clip) {
clip.leftAns._visible = false;
clip.rightAns._visible = false;
clip.feedback._visible = false;
clip.topComp._visible = true;
clip.bottomComp._visible = false;
clip.leftProblem._visible = true;
clip.rightProblem._visible = true;
clip.topComp.gotoAndStop("question");
var _local3 = Math.max(3, Math.max(numOps.right + 1, numOps.left + 1));
clip.leftProblem.gotoAndStop(_local3);
clip.rightProblem.gotoAndStop(_local3);
clip.leftProblem.field.text = toString("left");
clip.rightProblem.field.text = toString("right");
}
function displayAnswer(clip, response) {
clip.topComp.gotoAndStop(response);
if (response == trialType) {
clip.feedback.gotoAndStop("positive");
clip.leftProblem._visible = false;
clip.rightProblem._visible = false;
clip.topComp._visible = false;
} else {
clip.feedback.gotoAndStop("negative");
clip.leftProblem._visible = true;
clip.rightProblem._visible = true;
clip.topComp._visible = true;
}
clip.feedback._visible = true;
clip.bottomComp.gotoAndStop(trialType);
clip.bottomComp._visible = true;
clip.leftAns.text = value.left;
clip.leftAns._visible = true;
clip.rightAns.text = value.right;
clip.rightAns._visible = true;
}
function setPause(pause, clip) {
clip.leftProblem._visible = !pause;
clip.rightProblem._visible = !pause;
}
static var PRIMES = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009];
static var ALLOPS = ["+", "-", "x", "/"];
static var LEVELS = [{opsNum:{left:0, right:0}, maxDiff:10, ops:[]}, {opsNum:{left:1, right:0}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:1, right:0.4}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:1, right:1}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:1.4, right:1}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:1.8, right:1}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2, right:1}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2, right:1.4}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2, right:1.8}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2, right:2}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2.4, right:2}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:2.8, right:2}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:3, right:2}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:3, right:2.4}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:3, right:2.8}, maxDiff:10, ops:ALLOPS}, {opsNum:{left:3, right:3}, maxDiff:10, ops:ALLOPS}];
var ops = ALLOPS;
var maxVal = 30;
var valRange = [6, 30];
var maxDiff = 5;
var ASRange = [1, 10];
var MDRange = [2, 10];
var DChance = 0.5;
}
Symbol 213 MovieClip [__Packages.com.lumoslabs.games.nback.NBackSounds] Frame 0
class com.lumoslabs.games.nback.NBackSounds extends com.lumoslabs.games.SoundEffects
{
var ticker_mc, setPositiveFeedbackSound, addSound, setNegativeFeedbackSound, timerSound, bonusSound, ambientSound, stopAmbientSound, context_mc, volume, all_sounds;
function NBackSounds (target) {
super(target);
com.lumoslabs.games.SoundEffects.firstLoadedTarget.createEmptyMovieClip("ticker_mc", com.lumoslabs.games.SoundEffects.firstLoadedTarget.getNextHighestDepth());
ticker_mc = com.lumoslabs.games.SoundEffects.firstLoadedTarget.ticker_mc;
attachSounds();
}
function attachSounds() {
setPositiveFeedbackSound(addSound("correct.wav"));
setNegativeFeedbackSound(addSound("wrong.mp3"));
timerSound = addTicker(TICKER_ID);
bonusSound = addSound(BONUS_ID);
}
function destroy() {
stopAllSounds();
if (ambientSound) {
stopAmbientSound();
}
context_mc.removeMovieClip();
ticker_mc.removeMovieClip();
}
function addTicker(id) {
var _local2 = new com.lumoslabs.games.GameSound(ticker_mc);
_local2.attachSound(id);
_local2.setVolume(volume);
all_sounds.push(_local2);
return(_local2);
}
function playBonusSound() {
if (bonusSound.getPlay() == true) {
return(undefined);
}
bonusSound.start();
}
function stopBonusSound() {
bonusSound.stop(BONUS_ID);
}
function playTimerSound() {
timerSound.start(5, 1);
}
function stopTimerSound() {
timerSound.stop(TICKER_ID);
}
function getTimerSoundIsPlaying() {
return(timerSound.getPlay());
}
function getBonusIsPlaying() {
return(bonusSound.getPlay());
}
static var BONUS_ID = "bonus.mp3";
static var TICKER_ID = "metronome.mp3";
}
Symbol 214 MovieClip [__Packages.com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeSounds] Frame 0
class com.lumoslabs.games.chalkboardchallenge.ChalkboardChallengeSounds extends com.lumoslabs.games.nback.NBackSounds
{
var ambientSound, addSound, introSound;
function ChalkboardChallengeSounds (target) {
super(target);
ambientSound.setVolume(25);
setIntroSound(addSound("intro.mp3"));
introSound.setVolume(25);
}
function setIntroSound(introSound) {
this.introSound = introSound;
introSound.loop = true;
}
function getIntroIsPlaying() {
return(introSound.getPlay());
}
function startIntroSound() {
introSound.start();
}
function stopIntroSound() {
introSound.stop();
}
}
Symbol 215 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 216 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 217 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 218 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(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 var version = "1.1.0.52";
}
Symbol 219 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(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 var version = "1.1.0.52";
}