Symbol 29 MovieClip [PuffAnim] Frame 1
#initclip 73
Object.registerClass("PuffAnim", com.king.TopModel.PuffAnim);
#endinitclip
Symbol 60 MovieClip Frame 1
stop();
Symbol 119 MovieClip [ModelFalling] Frame 1
#initclip 49
Object.registerClass("ModelFalling", com.king.TopModel.ModelFalling);
#endinitclip
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 26
gotoAndStop (1);
Symbol 138 MovieClip [BarTarget] Frame 1
#initclip 50
Object.registerClass("BarTarget", com.king.TopModel.BarTarget);
#endinitclip
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 146 MovieClip [LatteMachine] Frame 1
#initclip 51
Object.registerClass("LatteMachine", com.king.TopModel.LatteMachine);
#endinitclip
stop();
Symbol 149 MovieClip [ScoreText] Frame 1
#initclip 52
Object.registerClass("ScoreText", com.king.TopModel.ScoreText);
#endinitclip
Symbol 160 MovieClip [BarPose] Frame 1
#initclip 53
Object.registerClass("BarPose", com.king.TopModel.BarPose);
#endinitclip
stop();
Symbol 168 MovieClip [Bar] Frame 1
#initclip 54
Object.registerClass("Bar", com.king.TopModel.Bar);
#endinitclip
Symbol 172 MovieClip [PatienceBar] Frame 1
#initclip 55
Object.registerClass("PatienceBar", com.king.TopModel.Bar);
#endinitclip
Symbol 194 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 124
gotoAndStop (1);
Symbol 200 MovieClip [Model] Frame 1
#initclip 56
Object.registerClass("Model", com.king.TopModel.Model);
#endinitclip
Symbol 210 MovieClip [StationHairColor] Frame 1
#initclip 57
Object.registerClass("StationHairColor", com.king.TopModel.StationHairColor);
#endinitclip
Symbol 215 MovieClip [StationDoor] Frame 1
#initclip 58
Object.registerClass("StationDoor", com.king.TopModel.StationDoor);
#endinitclip
Symbol 223 MovieClip [StationRest] Frame 1
#initclip 59
Object.registerClass("StationRest", com.king.TopModel.StationRest);
#endinitclip
Symbol 228 MovieClip [StationNails] Frame 1
#initclip 60
Object.registerClass("StationNails", com.king.TopModel.StationNails);
#endinitclip
Symbol 234 MovieClip [StationClothes] Frame 1
#initclip 61
Object.registerClass("StationClothes", com.king.TopModel.StationClothes);
#endinitclip
Symbol 240 MovieClip [StationMakeUp] Frame 1
#initclip 62
Object.registerClass("StationMakeUp", com.king.TopModel.StationMakeUp);
#endinitclip
Symbol 245 MovieClip [StationPose] Frame 1
#initclip 63
Object.registerClass("StationPose", com.king.TopModel.StationPose);
#endinitclip
Symbol 250 MovieClip [StationHairCut] Frame 1
#initclip 64
Object.registerClass("StationHairCut", com.king.TopModel.StationHairCut);
#endinitclip
Symbol 254 MovieClip [BarEnd] Frame 1
#initclip 65
Object.registerClass("BarEnd", com.king.TopModel.BarEnd);
#endinitclip
Symbol 267 MovieClip [Photo] Frame 1
#initclip 66
Object.registerClass("Photo", com.king.TopModel.Photo);
#endinitclip
Symbol 276 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 293 MovieClip [StationAnims] Frame 1
#initclip 67
Object.registerClass("StationAnims", com.king.TopModel.StationAnims);
#endinitclip
Symbol 297 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 302 MovieClip [JudgeAnim] Frame 1
#initclip 68
Object.registerClass("JudgeAnim", com.king.TopModel.JudgeAnim);
#endinitclip
Symbol 306 MovieClip [LatteMug] Frame 1
#initclip 69
Object.registerClass("LatteMug", com.king.TopModel.LatteMug);
#endinitclip
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 353 MovieClip Frame 1
stop();
Symbol 354 MovieClip [Summary] Frame 1
#initclip 70
Object.registerClass("Summary", com.king.TopModel.Summary);
#endinitclip
Symbol 359 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 1
stop();
Symbol 365 MovieClip [Game] Frame 1
#initclip 71
Object.registerClass("Game", com.king.TopModel.Game);
#endinitclip
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 5
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 442 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 504 MovieClip [TopModel] Frame 1
#initclip 72
Object.registerClass("TopModel", com.king.TopModel.TopModel);
#endinitclip
Symbol 505 MovieClip [__Packages.com.king.TopModel.ModelFalling] Frame 0
class com.king.TopModel.ModelFalling extends MovieClip
{
var running, goto, gotoAndStop, animDone, _parent, _x, _y, mcModel, removeMovieClip;
function ModelFalling () {
super();
}
function tick(tick, tps) {
if (running) {
goto = goto + 2;
(gotoAndStop(goto));// not popped
if (goto == 50) {
animDone = true;
_parent.createPuff(_x + 65, _y + 65);
}
}
}
function render(tick, alpha) {
}
function init(model) {
_x = model._x - 10;
_y = model._y - 30;
mcModel.mcFace.gotoAndStop(model.faceType);
mcModel.mcFace.mcFaceType.gotoAndStop(3);
mcModel.mcHair.gotoAndStop(model.hairType);
mcModel.mcHair.mcHairColor.gotoAndStop(model.hairColor);
mcModel.mcBody.gotoAndStop(12);
mcModel.mcBody.mcPose.gotoAndStop(model.dressColor);
animDone = false;
goto = 0;
running = true;
}
function deleteMe() {
removeMovieClip();
}
}
Symbol 506 MovieClip [__Packages.com.king.TopModel.BarTarget] Frame 0
class com.king.TopModel.BarTarget extends MovieClip
{
var communicator, running, gotoAndStop, barPressed, station, mcStarAnim, runTime, _y, _x, barVal, barInc, removeMovieClip;
function BarTarget () {
super();
communicator = new com.king.util.Communicator();
}
function tick(tick, tps) {
if (running) {
goto = goto + (100 / (roundTime * tps));
(gotoAndStop(goto));// not popped
if (barPressed) {
station.returnBarValue(goto, tick, tps);
running = false;
barPressed = false;
communicator.barTargetClicked(tick, station.stationNum);
if (goto >= 90) {
mcStarAnim.gotoAndPlay(2);
}
} else if (runTime <= 0) {
station.returnBarValue(-1, tick, tps);
running = false;
deleteMe();
}
if (goto == 100) {
goto = 0;
runTime = runTime - roundTime;
}
}
}
function render(tick, alpha) {
}
function init(stat, rt, barValue) {
station = stat;
runTime = rt;
_y = station._y + 50;
_x = station._x;
barVal = 0;
barInc = true;
running = true;
barPressed = false;
}
function onPress() {
barPressed = true;
}
function deleteMe() {
removeMovieClip();
}
var roundTime = 1;
var goto = 0;
}
Symbol 507 MovieClip [__Packages.com.king.util.Communicator] Frame 0
class com.king.util.Communicator
{
var levelDatas, randomSeed, lang;
function Communicator () {
levelDatas = new Array();
}
function gameStarted() {
trace("GAME START");
if (!hasSentGameStart) {
hasSentGameStart = true;
fscommand ("gameStart");
}
}
function gameQuit() {
trace("GAME QUIT");
if (!hasSentGameOver) {
hasSentGameOver = true;
fscommand ("gameQuit");
}
}
function gameEnd(score) {
trace("GAME ENDS");
if (!hasSentGameEnd) {
hasSentGameEnd = true;
fscommand ("gameEnd", score);
}
}
function startFirstRound(tick) {
fscommand ("playData", (CMD_START_FIRST_ROUND + ",") + tick);
}
function sendModelClicked(tick, modelNum) {
fscommand ("playData", (((CMD_MODEL_CLICKED + ",") + tick) + " ") + modelNum);
}
function sendModelMove(tick, modelNum, stationNum) {
fscommand ("playData", (((((CMD_MODEL_MOVE + ",") + tick) + " ") + modelNum) + " ") + stationNum);
}
function sendModelReleased(tick, modelNum) {
fscommand ("playData", (((CMD_MODEL_RELEASED + ",") + tick) + " ") + modelNum);
}
function latteClick(tick) {
fscommand ("playData", (CMD_LATTE_CLICKED + ",") + tick);
}
function latteMugReleased(tick, modelNum) {
fscommand ("playData", (((CMD_LATTE_MUG_RELEASED + ",") + tick) + " ") + modelNum);
}
function barClicked(tick, stationNum) {
fscommand ("playData", (((CMD_BAR_CLICKED + ",") + tick) + " ") + stationNum);
}
function barTargetClicked(tick, stationNum) {
fscommand ("playData", (((CMD_BARTARGET_CLICKED + ",") + tick) + " ") + stationNum);
}
function barPoseClicked(tick, stationNum) {
fscommand ("playData", (((CMD_BARPOSE_CLICKED + ",") + tick) + " ") + stationNum);
}
function sendEndRound(tick) {
fscommand ("playData", (CMD_END_ROUND + ",") + tick);
}
function gameLastTick(tick) {
if (!hasSentLastTick) {
hasSentLastTick = true;
fscommand ("playData", (CMD_LAST_TICK + ",") + tick);
}
}
function sendScore(tick, score) {
fscommand ("playData", (((CMD_SEND_SCORE + ",") + tick) + " ") + score);
}
function scoreUpdate(tick, score) {
fscommand ("playData", (((CMD_SCORE_UPDATE + ",") + tick) + " ") + score);
}
function sendClientSpawn(tick) {
fscommand ("playData", (CMD_CLIENT_SPAWN + ",") + tick);
}
function sendRandomNum(tick, rndNum) {
fscommand ("playData", (((CMD_SEND_RANDOM_NUM + ",") + tick) + " ") + rndNum);
}
function parseGameData(gameData) {
var _local6 = new XML(_root.gameData);
_global.textMappings = new Object();
_global.userType = new Object();
var _local5 = _local6.childNodes[0].childNodes;
randomSeed = new Number(_local6.childNodes[0].attributes.randomseed).valueOf();
lang = _local6.childNodes[0].attributes.lang.valueOf();
var _local4 = 0;
while (_local4 < _local5.length) {
_root.debugText.text = _root.debugText.text + ("\r" + _local5[_local4].nodeName);
if (_local5[_local4].nodeName == "text") {
_global.textMappings[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
if (_local5[_local4].nodeName == "level") {
levelDatas[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
if (_local5[_local4].nodeName == "userType") {
_global.userType[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
_local4++;
}
}
static var CMD_START_FIRST_ROUND = 266;
static var CMD_MODEL_CLICKED = 389;
static var CMD_MODEL_MOVE = 222;
static var CMD_MODEL_RELEASED = 212;
static var CMD_LATTE_CLICKED = 554;
static var CMD_LATTE_MUG_RELEASED = 696;
static var CMD_BAR_CLICKED = 774;
static var CMD_BARTARGET_CLICKED = 757;
static var CMD_BARPOSE_CLICKED = 159;
static var CMD_END_ROUND = 853;
static var CMD_LAST_TICK = 912;
static var CMD_SEND_SCORE = 428;
static var CMD_SCORE_UPDATE = 397;
static var CMD_CLIENT_SPAWN = 13;
static var CMD_SEND_RANDOM_NUM = 99;
var hasSentGameStart = false;
var hasSentGameEnd = false;
var hasSentGameOver = false;
var hasSentLastTick = false;
}
Symbol 508 MovieClip [__Packages.com.king.TopModel.LatteMachine] Frame 0
class com.king.TopModel.LatteMachine extends MovieClip
{
var communicator, currentTick, startTick, shakeCounter, atFrame, gotoAndStop, _x, _y, _parent, mcLatteCup_1, mcLatteCup_2, mcLatteCup_3;
function LatteMachine () {
super();
communicator = new com.king.util.Communicator();
}
function tick(tick, tps) {
currentTick = tick;
if (running) {
if (startTick == -1) {
startTick = tick;
communicator.latteClick(tick);
}
var _local3 = (runTime * tps) - (tick - startTick);
if (_local3 == 0) {
workDone();
}
shakeCounter++;
if (shakeCounter == 1) {
if (atFrame == 1) {
(gotoAndStop(2));// not popped
atFrame = 2;
} else {
(gotoAndStop(1));// not popped
atFrame = 1;
}
shakeCounter = 0;
}
}
}
function render(tick, alpha) {
}
function init() {
_x = 250;
_y = 56;
noOfMugs = 3;
}
function onPress() {
if ((latte == false) && (running == false)) {
if (noOfMugs > 0) {
startWork();
noOfMugs--;
}
} else if (latte == true) {
_parent.latteMug.onPress();
}
}
function onReleaseOutside() {
if ((latte == true) && (_parent.latteMug.active == true)) {
_parent.latteMug.onRelease();
}
}
function startWork() {
com.king.util.SoundManager.play("click_go", 50, false);
com.king.util.SoundManager.play("coffee", 50, true);
shakeCounter = 0;
atFrame = 1;
running = true;
startTick = -1;
}
function workDone(tick) {
com.king.util.SoundManager.stop("coffee");
com.king.util.SoundManager.play("coffe_ready", 50, false);
(gotoAndStop(1));// not popped
running = false;
latte = true;
switch (noOfMugs) {
case 2 :
mcLatteCup_1.gotoAndStop(2);
break;
case 1 :
mcLatteCup_2.gotoAndStop(2);
break;
case 0 :
mcLatteCup_3.gotoAndStop(2);
}
_parent.createMug();
}
var runTime = 6;
var running = false;
var latte = false;
var noOfMugs = 3;
}
Symbol 509 MovieClip [__Packages.com.king.util.Map] Frame 0
class com.king.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var _local3 in init) {
map["" + _local3] = init[_local3];
}
lastSize = -1;
}
function put(key, value) {
map["" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["" + key]);
}
function remove(key) {
var _local2 = "" + key;
var _local3 = map[_local2];
delete map[_local2];
lastSize = -1;
return(_local3);
}
function contains(key) {
return(map["" + key] != undefined);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var _local2 in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var _local2 = "";
for (var _local3 in map) {
_local2 = _local2 + (((_local3 + "=>") + map[_local3]) + newline);
}
trace(_local2);
}
function toArray() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = map[_local3];
}
return(_local2);
}
function keySet() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = _local3;
}
return(_local2);
}
function get iterator() {
return(new com.king.util.MapIterator(this));
}
function get valueIterator() {
return(new com.king.util.MapValueIterator(this));
}
function foreach(fn) {
var _local3 = arguments.slice(1);
if (_local3.length > 0) {
do {
if ((in map) == null) {
break;
}
var _local5 = in map;
} while (fn(_local5, map[_local5], _local3[0], _local3[1], _local3[2], _local3[3], _local3[4]) != false);
do {
} while ("foreach" != null);
} else {
do {
if ((in map) == null) {
break;
}
var _local5 = in map;
} while (fn(_local5, map[_local5]) != false);
do {
} while (_local2 != null);
}
lastSize = -1;
}
function get _content() {
return(map);
}
}
Symbol 510 MovieClip [__Packages.com.king.util.Iterator] Frame 0
interface com.king.util.Iterator
{
}
Symbol 511 MovieClip [__Packages.com.king.util.MapIterator] Frame 0
class com.king.util.MapIterator implements com.king.util.Iterator
{
var map, keys, ptr;
function MapIterator (map) {
this.map = map;
keys = map.keySet();
ptr = 0;
}
function next() {
if (ptr < keys.length) {
return(keys[ptr++]);
}
return(undefined);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 512 MovieClip [__Packages.com.king.util.MapValueIterator] Frame 0
class com.king.util.MapValueIterator implements com.king.util.Iterator
{
var map, mapRef, keys, ptr;
function MapValueIterator (map) {
this.map = map;
mapRef = map._content;
keys = map.keySet();
ptr = 0;
}
function next() {
return(mapRef[keys[ptr++]]);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 513 MovieClip [__Packages.com.king.util.SoundManager] Frame 0
class com.king.util.SoundManager
{
static var globalSound;
function SoundManager () {
}
static function isSoundEnabled() {
return(soundEnabled);
}
static function enableSounds(enabled) {
soundEnabled = enabled;
if (!enabled) {
muteAll();
} else {
restoreMuteAll();
}
}
static function toggleSound() {
if (globalSound == undefined) {
globalSound = new Sound(_root);
}
soundOn = !soundOn;
globalSound.setVolume((soundOn ? 100 : 0));
}
static function stopAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(0);
soundEntry.isMuted = true;
});
}
static function restoreMuteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(soundEntry.realVol);
soundEntry.isMuted = false;
});
}
static function stop(resource) {
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
_local1.sound.stop();
_local1.playStatus = false;
}
}
static function getCalibratedVolume(flashVolume) {
flashVolume = Math.min(100, flashVolume);
flashVolume = Math.max(0, flashVolume);
return(Math.ceil(Math.pow(flashVolume / 100, 1.46) * 100));
}
static function setVolume(resource, percent) {
var _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
var _local2 = getCalibratedVolume(percent);
if (!_local1.isMuted) {
_local1.sound.setVolume(_local2);
}
_local1.realVol = _local2;
}
}
static function isPlaying(resource) {
var _local1 = sounds.get(resource);
return((_local1 != undefined) && (_local1.playStatus == true));
}
static function initialize(list) {
for (var _local9 in list) {
var resource = list[_local9];
var _local3 = _root.getNextHighestDepth();
var _local2 = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + _local3, _local3));
_local2.attachSound(resource);
_local2.onSoundComplete = function () {
var _local1 = com.king.util.SoundManager.sounds.get(resource);
_local1.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:_local2, playStatus:false});
}
}
static function play(resource, volume, isLoop, fn) {
if (volume == undefined) {
volume = 100;
}
if (isLoop == undefined) {
isLoop = false;
}
volume = getCalibratedVolume(volume);
var _local2 = sounds.get(resource);
if (_local2 != undefined) {
_local2.sound.setVolume((soundEnabled ? (volume) : 0));
_local2.realVol = volume;
_local2.isMuted = !soundEnabled;
_local2.playStatus = true;
_local2.onPlayedFn = fn;
_local2.sound.start(0, (isLoop ? 32767 : 1));
} else {
var _local6 = _root.getNextHighestDepth();
var _local4 = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + _local6, _local6));
_local4.attachSound(resource);
_local4.onSoundComplete = function () {
var _local1 = com.king.util.SoundManager.sounds.get(resource);
_local1.playStatus = false;
com.king.util.SoundManager.onPlayed_(resource);
};
_local4.setVolume((soundEnabled ? (volume) : 0));
_local4.start(0, (isLoop ? 32767 : 1));
sounds.put(resource, {isMuted:!soundEnabled, realVol:volume, onPlayedFn:fn, sound:_local4, playStatus:true});
}
}
static function onPlayed_(name) {
var _local1 = sounds.get(name);
if ((_local1 != undefined) && (_local1.onPlayedFn != undefined)) {
_local1.onPlayedFn();
}
}
static var sounds = new com.king.util.Map();
static var soundEnabled = true;
static var soundOn = true;
}
Symbol 514 MovieClip [__Packages.com.king.TopModel.ScoreText] Frame 0
class com.king.TopModel.ScoreText extends MovieClip
{
var goto, _y, _alpha, animDone, txtScoreText, _x, removeMovieClip;
function ScoreText () {
super();
}
function tick(tick, tps) {
goto++;
_y = _y - 4;
if (goto > 15) {
_alpha = _alpha - 20;
}
if (goto > 20) {
animDone = true;
}
}
function render(tick, alpha) {
}
function init(num, x, y) {
animDone = false;
goto = 0;
txtScoreText.text = num;
_x = x;
_y = y;
}
function deleteMe() {
removeMovieClip();
}
}
Symbol 515 MovieClip [__Packages.com.king.TopModel.BarPose] Frame 0
class com.king.TopModel.BarPose extends MovieClip
{
var communicator, running, barInc, barVal, mcBarMarker, runTime, gotoAndStop, barPressed, station, mcStarAnim, _y, _x, removeMovieClip;
function BarPose () {
super();
communicator = new com.king.util.Communicator();
}
function tick(tick, tps) {
if (running) {
if (barInc == true) {
barVal = barVal + (100 / ((roundTime / 2) * tps));
trace(barVal);
if (barVal >= 100) {
barInc = false;
barVal = 100 - (barVal - 100);
}
mcBarMarker._y = barVal * -1;
} else {
barVal = barVal - (100 / ((roundTime / 2) * tps));
if (barVal <= 0) {
barInc = true;
barVal = barVal * -1;
runTime = runTime - roundTime;
}
mcBarMarker._y = barVal * -1;
}
if (barVal >= 90) {
(gotoAndStop(90));// not popped
} else if (barVal >= 80) {
(gotoAndStop(2));// not popped
} else {
(gotoAndStop(1));// not popped
}
if (barPressed) {
station.returnBarValue(barVal, tick, tps);
running = false;
barPressed = false;
communicator.barPoseClicked(tick, station.stationNum);
if (barVal >= 90) {
mcStarAnim.gotoAndPlay(2);
}
} else if (runTime <= 0) {
station.returnBarValue(0, tick, tps);
deleteMe();
}
}
}
function render(tick, alpha) {
}
function init(stat, rt, barValue) {
station = stat;
runTime = rt;
_y = station._y + 120;
_x = station._x + 70;
barVal = 0;
barInc = true;
running = true;
barPressed = false;
}
function onPress() {
barPressed = true;
}
function deleteMe() {
removeMovieClip();
}
var roundTime = 1;
}
Symbol 516 MovieClip [__Packages.com.king.TopModel.Bar] Frame 0
class com.king.TopModel.Bar extends MovieClip
{
var communicator, colorWheel1, colorWheel2, mockY, runTime, barPressed, station, mcColorWheel1, mcColorWheel2, _y, _x, _rotation, mcArrow, removeMovieClip;
function Bar () {
super();
communicator = new com.king.util.Communicator();
}
function onEnterFrame() {
}
function tick(tick, tps) {
colorWheel1 = colorWheel1 - ((100 / tps) / roundTime);
colorWheel2 = colorWheel2 - ((100 / tps) / roundTime);
mockY = mockY + ((100 / tps) / roundTime);
if (colorWheel1 <= -150) {
colorWheel1 = colorWheel1 + 200;
}
if (colorWheel2 <= -150) {
colorWheel2 = colorWheel2 + 200;
}
if (mockY >= 100) {
mockY = mockY - 100;
runTime = runTime - roundTime;
}
if (barPressed) {
station.returnBarValue(Math.round(mockY), tick, tps);
barPressed = false;
communicator.barClicked(tick, station.stationNum);
deleteMe();
} else if (runTime <= 0) {
station.returnBarValue(101, tick, tps);
deleteMe();
}
}
function render(tick, alpha) {
mcColorWheel1._y = colorWheel1;
mcColorWheel2._y = colorWheel2;
}
function init(stat, rt, barValue) {
station = stat;
runTime = rt;
_y = station._y + 12;
_x = station._x + 40;
_rotation = 90;
colorWheel1 = mcColorWheel1._y;
colorWheel2 = mcColorWheel2._y;
mockY = 0;
barPressed = false;
mcArrow.gotoAndStop(barValue / 25);
}
function onPress() {
barPressed = true;
}
function deleteMe() {
removeMovieClip();
}
var roundTime = 1;
}
Symbol 517 MovieClip [__Packages.com.king.TopModel.Model] Frame 0
class com.king.TopModel.Model extends MovieClip
{
var _visible, communicator, currentTick, _alpha, activeY, _ymouse, activeX, _xmouse, _parent, modelState, waitingStartTick, ticksPerSec, waitingTimer, patCounter, gameLevel, modelNum, runAnim, remTicks, mcModel, goto, dressColor, animFrame1, animFrame2, lattePopCounter, mcLattePop, starAnim, starAnimCounter, mcStarAnim, cryAnim, cryCounter, cryAtFrame, mcCryAnim, hitTest, _y, _x, updateApperance, faceType, faceExp, hairType, hairColor, pose, updatePatience, mcPatienceBar, hideBubblesBool, iconArr, bubbleArr, showBubblesBool, mcBubbles, reqArr, random, waitingTimerValue, wrongStation, passed;
function Model () {
super();
_visible = false;
communicator = new com.king.util.Communicator();
}
function tick(tick, tps) {
currentTick = tick;
if (initAnim) {
_alpha = _alpha + 10;
if (_alpha >= 100) {
_alpha = 100;
initAnim = false;
}
}
if (pressed) {
activeY = _ymouse;
activeX = _xmouse;
active = true;
_parent.dragModel(this, tick);
pressed = false;
}
switch (modelState) {
case STATE_WAITING :
if (waitingStartTick == undefined) {
waitingStartTick = tick;
}
if ((currentTick - waitingStartTick) >= (waitingTimer * ticksPerSec)) {
if (patCounter == 0) {
patience = patience - 1;
patCounter = 20 - (gameLevel * 3);
if (patience == 49) {
var _local4 = Math.random() * 2;
if (_local4 < 1) {
com.king.util.SoundManager.play("model_angry_1", 50, false);
} else {
com.king.util.SoundManager.play("model_angry_2", 50, false);
}
}
if (patience <= 0) {
outOfPatience();
if (this == _parent.activeModel) {
_parent.activeModel = undefined;
communicator.sendModelReleased(tick, modelNum);
}
}
} else {
patCounter--;
}
if (patience > 0) {
updatePatienceBar();
}
}
if ((((patience <= 20) && (modelFreaking == false)) && (gameLevel > 1)) && (_parent.activeModel != this)) {
var _local4 = Math.random() * 2;
if (_local4 < 1) {
com.king.util.SoundManager.play("model_cry_1", 50, false);
} else {
com.king.util.SoundManager.play("model_cry_2", 50, false);
}
modelSetFreaking();
} else if ((((patience > 20) && (modelFreaking == true)) && (gameLevel > 1)) && (_parent.activeModel != this)) {
modelEndFreaking();
}
break;
case STATE_WORKING :
if (!runAnim) {
break;
}
remTicks = remTicks - 1;
if (remTicks != 0) {
break;
}
mcModel.mcBody.gotoAndStop(goto);
mcModel.mcBody.mcPose.mcDressColor.gotoAndStop(dressColor);
if (goto == animFrame1) {
goto = animFrame2;
} else {
goto = animFrame1;
}
remTicks = Math.round(tps / 3);
case STATE_DEAD :
}
if (lattePop) {
lattePopCounter = lattePopCounter + 5;
mcLattePop.gotoAndStop(lattePopCounter);
if (lattePopCounter >= 124) {
lattePop = false;
mcLattePop.gotoAndStop(1);
}
}
if (starAnim) {
starAnimCounter = starAnimCounter + (300 / tps);
mcStarAnim.gotoAndStop(starAnimCounter);
if (starAnimCounter >= 100) {
starAnim = false;
mcStarAnim.gotoAndStop(1);
mcStarAnim._visible = false;
}
}
if (cryAnim) {
cryCounter++;
if (cryCounter == 10) {
if (cryAtFrame == 1) {
mcCryAnim.gotoAndStop(2);
cryAtFrame = 2;
} else {
mcCryAnim.gotoAndStop(1);
cryAtFrame = 1;
}
cryCounter = 0;
}
}
if (_parent.latteMug.active == true) {
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (mugHL == false)) {
mugHL = true;
_parent.latteMug._alpha = 100;
} else if ((hitTest(_root._xmouse, _root._ymouse) == false) && (mugHL == true)) {
mugHL = false;
_parent.latteMug._alpha = 60;
}
}
}
function render(tick, alpha) {
if (active) {
_y = _root._ymouse - activeY;
_x = _root._xmouse - activeX;
}
if (updateApperance) {
mcModel.mcFace.gotoAndStop(faceType);
mcModel.mcFace.mcFaceType.gotoAndStop(faceExp);
mcModel.mcHair.gotoAndStop(hairType);
mcModel.mcHair.mcHairColor.gotoAndStop(hairColor);
mcModel.mcBody.gotoAndStop(pose);
mcModel.mcBody.mcPose.gotoAndStop(1);
mcModel.mcBody.mcPose.mcDressColor.gotoAndStop(dressColor);
_visible = true;
updateApperance = false;
}
if (updatePatience) {
var _local4 = Math.max(patience, 1);
mcPatienceBar.gotoAndStop(_local4);
updatePatience = false;
}
if (hideBubblesBool) {
var _local3 = 0;
while (_local3 < 3) {
iconArr[_local3]._visible = false;
bubbleArr[_local3]._visible = false;
_local3++;
}
hideBubblesBool = false;
}
if (showBubblesBool) {
mcBubbles.gotoAndStop(Math.min(reqArr.length, 3));
var _local3 = 0;
while (_local3 < 3) {
if (_local3 < reqArr.length) {
bubbleArr[_local3]._visible = true;
iconArr[_local3]._visible = true;
iconArr[_local3].gotoAndStop(reqArr[_local3] + 1);
}
_local3++;
}
mcBubbles._visible = true;
showBubblesBool = false;
}
if (modelState == STATE_DEAD) {
if (_visible == true) {
_visible = false;
}
_x = -500;
}
}
function init(num, statArr, waitTime, tps, lvl, rnd) {
random = rnd;
var _local2 = random.nextInt(5) + 1;
dressColor = random.nextInt(4) + 1;
pose = 3;
hairType = _local2;
hairColor = random.nextInt(4) + 1;
faceType = _local2;
faceExp = 1;
updateApperance = true;
modelNum = num;
ticksPerSec = tps;
gameLevel = lvl;
_y = -500;
_x = -500;
reqArr = new Array();
bubbleArr = new Array();
iconArr = new Array();
reqArr = statArr;
waitingTimerValue = waitTime;
waitingTimer = waitingTimerValue;
patCounter = 0;
bubbleArr[0] = mcBubbles.mcBubble1;
bubbleArr[1] = mcBubbles.mcBubble2;
bubbleArr[2] = mcBubbles.mcBubble3;
iconArr[0] = mcBubbles.mcIcon1;
iconArr[1] = mcBubbles.mcIcon2;
iconArr[2] = mcBubbles.mcIcon3;
mcStarAnim._visible = false;
mcCryAnim._visible = false;
hideBubbles();
showBubbles();
updatePatienceBar();
}
function onPress() {
if (modelFreaking == false) {
if ((modelState == STATE_WAITING) && (_parent.activeModel == undefined)) {
mcModel._alpha = 60;
pressed = true;
}
}
}
function onRelease() {
if (active == true) {
if (modelFreaking == false) {
mcModel._alpha = 100;
if (modelState != STATE_DEAD) {
_parent.releasedModel = this;
}
}
}
}
function onReleaseOutside() {
onRelease();
}
function setWaiting() {
waitingTimer = waitingTimerValue;
waitingStartTick = undefined;
patCounter = 0;
showBubbles();
modelState = STATE_WAITING;
}
function setWorking(stationNumber) {
modelState = STATE_WORKING;
updateApperance = true;
wrongStation = false;
var _local3 = false;
var _local2 = 0;
while (_local2 < Math.min(3, reqArr.length)) {
if (reqArr[_local2] == stationNumber) {
_local3 = true;
}
_local2++;
}
if (_local3 == false) {
wrongStation = true;
patience = patience - 40;
updatePatienceBar();
}
hideBubbles();
}
function workDone(stationNumber, stationScore) {
runAnim = false;
if (wrongStation == false) {
if ((stationNumber < 2) || (stationNumber == 3)) {
_parent.updateScore(stationScore + patience);
_parent.createScore(stationScore + patience, _x, _y - 40);
}
}
var _local2 = 0;
while (_local2 < reqArr.length) {
if (reqArr[_local2] == stationNumber) {
reqArr.splice(_local2, 1);
}
_local2++;
}
if (reqArr.length == 0) {
com.king.util.SoundManager.play("model_ready", 50, false);
reqArr.push(6);
}
mcStarAnim._visible = true;
starAnim = true;
starAnimCounter = 1;
setWaiting();
}
function showBubbles() {
showBubblesBool = true;
}
function hideBubbles() {
hideBubblesBool = true;
}
function updatePatienceBar() {
updatePatience = true;
var _local2 = faceExp;
if ((((patience <= 20) && (gameLevel > 1)) && (_parent.activeModel != this)) && ((modelState == STATE_WAITING) || (modelState == STATE_DEAD))) {
faceExp = 4;
} else if (patience < 50) {
faceExp = 3;
} else if ((patience >= 50) && (patience < 90)) {
faceExp = 2;
} else {
faceExp = 1;
}
if (_local2 != faceExp) {
updateApperance = true;
}
}
function judgeModel() {
hideBubbles();
if (patience >= 90) {
com.king.util.SoundManager.play("jury_bonus", 50, false);
passed = true;
_parent.updateScore(patience * 3);
_parent.noOfPassed++;
_root.mcTopModel.txtPassed.text = Number(_root.mcTopModel.txtPassed.text) + 1;
_parent.createJudgeAnim(true, true);
_parent.createScore(patience * 3, _x, _y);
} else if (patience >= 50) {
com.king.util.SoundManager.play("jury_passed", 50, false);
passed = true;
_parent.updateScore(patience * 2);
_parent.noOfPassed++;
_root.mcTopModel.txtPassed.text = Number(_root.mcTopModel.txtPassed.text) + 1;
_parent.createJudgeAnim(true, false);
_parent.createScore(patience * 2, _x, _y);
} else {
com.king.util.SoundManager.play("jury_failed", 50, false);
passed = false;
_root.mcTopModel.txtRejects.text = Number(_root.mcTopModel.txtRejects.text) + 1;
_parent.createJudgeAnim(false, false);
_parent.createScore(0, _x, _y);
}
lastStation.stationBusy = false;
modelState = STATE_DEAD;
_parent.modelsDone++;
_x = -500;
_visible = false;
}
function outOfPatience() {
lastStation.stationBusy = false;
_parent.modelsDone++;
active = false;
_parent.createPuff(_x, _y);
modelState = STATE_DEAD;
}
function pushedOut() {
faceExp = 3;
patience = 0;
_parent.createFallingAnim(this);
_parent.modelsDone++;
modelState = STATE_DEAD;
}
function runModelAnim(frame1, frame2) {
runAnim = true;
remTicks = 1;
animFrame1 = frame1;
animFrame2 = frame2;
goto = animFrame1;
}
function getLatte() {
var _local2 = Math.random() * 2;
if (_local2 < 1) {
com.king.util.SoundManager.play("model_happy_1", 50, false);
} else {
com.king.util.SoundManager.play("model_happy_2", 50, false);
}
if (_parent.latteMachine.noOfMugs == 0) {
_parent.latteMachine.gotoAndStop(3);
}
patience = Math.min(patience + 30, 100);
lattePop = true;
lattePopCounter = 1;
updatePatienceBar();
}
function modelSetFreaking() {
updatePatienceBar();
faceExp = 4;
pose = 11;
modelFreaking = true;
updateApperance = true;
cryAnim = true;
cryCounter = 7;
mcCryAnim._visible = true;
}
function modelEndFreaking() {
updatePatienceBar();
pose = lastStation.poseType;
modelFreaking = false;
updateApperance = true;
cryAnim = false;
mcCryAnim._visible = false;
}
static var STATE_WAITING = 0;
static var STATE_WORKING = 1;
static var STATE_DEAD = 2;
var active = false;
var modelBusy = false;
var onStage = false;
var lastStation = undefined;
var patience = 100;
var mugHL = false;
var pressed = false;
var initAnim = false;
var modelFreaking = false;
var lattePop = false;
}
Symbol 518 MovieClip [__Packages.com.king.TopModel.StationHairColor] Frame 0
class com.king.TopModel.StationHairColor extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight, mcHighLight2, stationState, _parent, activeHL, currentTick, bar, statAnim, workingStartTick, customer, returnScore, hitTest, barValue;
function StationHairColor () {
super();
}
function init(num, type, tps) {
_x = 330;
_y = 80;
offSetX = 13;
offSetY = 10;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight._visible = false;
mcHighLight2._visible = false;
stationState = STATE_RESTING;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
bar.tick(tick, tps);
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
statAnim.deleteMe();
statAnim = undefined;
customer.workDone(stationNumber, Math.round(returnScore));
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
activeHL._visible = false;
}
}
}
function render(tick, alpha) {
switch (stationState) {
case STATE_WORKING :
bar.render(tick, alpha);
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
returnScore = 0;
workingStartTick = tick;
stationState = STATE_WORKING;
workTimer = runTime;
customer = model;
customer.setWorking(stationNumber);
barValue = random.nextInt(4) + 1;
while (barValue == customer.hairColor) {
barValue = random.nextInt(4) + 1;
}
barValue = barValue * 25;
if (customer.wrongStation == false) {
bar = _parent.createBar(this, "Bar", runTime, barValue);
} else {
var _local3 = _parent.createStationAnim(14, runTime, _x, _y - 50, customer.hairColor);
statAnim = _local3;
}
}
function returnBarValue(numValue, tick, tps) {
var _local7 = _parent.createStationAnim(stationNumber, runTime, _x + 5, _y - 50, 0);
statAnim = _local7;
returnScore = stationScore;
var _local6;
if (((tick - workingStartTick) / tps) < 1) {
_local6 = stationExtraScore * 3;
} else if (((tick - workingStartTick) / tps) < 2) {
_local6 = stationExtraScore * 2;
} else {
_local6 = stationExtraScore * 1;
}
returnScore = returnScore + _local6;
if ((numValue <= 25) && (barValue == 25)) {
com.king.util.SoundManager.play("choise_best", 50, false);
if (((tick - workingStartTick) / tps) < 1) {
customer.mcStarAnim2.gotoAndPlay(2);
}
} else if (((numValue > 25) && (numValue <= 50)) && (barValue == 50)) {
com.king.util.SoundManager.play("choise_best", 50, false);
if (((tick - workingStartTick) / tps) < 1) {
customer.mcStarAnim2.gotoAndPlay(2);
}
} else if (((numValue > 50) && (numValue <= 75)) && (barValue == 75)) {
com.king.util.SoundManager.play("choise_best", 50, false);
if (((tick - workingStartTick) / tps) < 1) {
customer.mcStarAnim2.gotoAndPlay(2);
}
} else if (((numValue > 75) && (numValue <= 100)) && (barValue == 100)) {
com.king.util.SoundManager.play("choise_best", 50, false);
if (((tick - workingStartTick) / tps) < 1) {
customer.mcStarAnim2.gotoAndPlay(2);
}
} else {
com.king.util.SoundManager.play("choise_bad", 50, false);
customer.patience = customer.patience - 40;
customer.updatePatienceBar();
returnScore = 0;
}
_parent.updateScore(returnScore);
_parent.createScore(returnScore, customer._x, customer._y - 40);
var _local3 = customer.hairColor;
if (numValue <= 25) {
_local3 = 1;
} else if ((numValue > 25) && (numValue <= 50)) {
_local3 = 2;
} else if ((numValue > 50) && (numValue <= 75)) {
_local3 = 3;
} else if ((numValue > 75) && (numValue <= 100)) {
_local3 = 4;
}
customer.hairColor = _local3;
customer.updateApperance = true;
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var stationExtraScore = 30;
var runTime = 3;
var workTimer = 0;
var poseType = 2;
}
Symbol 519 MovieClip [__Packages.com.king.TopModel.StationDoor] Frame 0
class com.king.TopModel.StationDoor extends MovieClip
{
var _y, _x, stationNum, mcHighLight, mcHighLight2, _parent, activeHL, BB1, BB2;
function StationDoor () {
super();
}
function init(num) {
_y = 365;
_x = 695;
stationNum = num;
mcHighLight._visible = false;
mcHighLight2._visible = false;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function render() {
}
function tick(tick, tps) {
if ((_parent.activeModel != undefined) && (stationBusy == false)) {
if ((BB1.hitTest(_root._xmouse, _root._ymouse) == true) || ((BB2.hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false))) {
highlighted = true;
activeHL._visible = true;
} else if (((BB1.hitTest(_root._xmouse, _root._ymouse) == false) && (BB2.hitTest(_root._xmouse, _root._ymouse) == false)) && (highlighted == true)) {
highlighted = false;
activeHL._visible = false;
}
}
}
function onPress() {
}
function activateStation(model, random, tick) {
if ((model.reqArr.length == 1) && (model.reqArr[0] == 6)) {
model.judgeModel();
} else {
model.patience = 0;
model.updatePatienceBar();
model.judgeModel();
}
}
var stationBusy = false;
var highlighted = false;
}
Symbol 520 MovieClip [__Packages.com.king.TopModel.StationRest] Frame 0
class com.king.TopModel.StationRest extends MovieClip
{
var _y, _x, offSetX, offSetY, stationNum, mcHighLight, mcHighLight2, _parent, activeHL, hitTest, customer;
function StationRest () {
super();
}
function init(num, type) {
_y = 385;
_x = 80 + (110 * num);
offSetX = 3;
offSetY = -15;
stationNum = num;
mcHighLight._visible = false;
mcHighLight2._visible = false;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick) {
if ((_parent.activeModel != undefined) && (stationBusy == false)) {
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else if ((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true)) {
highlighted = false;
activeHL._visible = false;
}
}
}
function render() {
}
function onPress() {
}
function activateStation(model, random, tick) {
customer = model;
model.updateApperance = true;
}
var stationBusy = false;
var highlighted = false;
var poseType = 3;
}
Symbol 521 MovieClip [__Packages.com.king.TopModel.StationNails] Frame 0
class com.king.TopModel.StationNails extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight, mcHighLight2, stationState, _parent, activeHL, currentTick, statAnim, workingStartTick, customer, hitTest, startTime, lastTime;
function StationNails () {
super();
}
function init(num, type, tps) {
_x = 245;
_y = 210;
offSetX = 13;
offSetY = 10;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight._visible = false;
mcHighLight2._visible = false;
stationState = STATE_RESTING;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
statAnim.deleteMe();
statAnim = undefined;
customer.workDone(stationNumber, stationScore);
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
activeHL._visible = false;
}
}
}
function render() {
switch (stationState) {
case STATE_WORKING :
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
workingStartTick = tick;
stationState = STATE_WORKING;
startTime = getTimer();
workTimer = runTime;
lastTime = 0;
customer = model;
customer.setWorking(stationNumber);
if (customer.wrongStation) {
var _local2 = _parent.createStationAnim(14, runTime, _x, _y - 50, customer.hairColor);
statAnim = _local2;
} else {
var _local2 = _parent.createStationAnim(stationNumber, runTime, _x - 10, _y + 20, customer.hairColor);
statAnim = _local2;
}
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var runTime = 4;
var workTimer = 0;
var poseType = 6;
}
Symbol 522 MovieClip [__Packages.com.king.TopModel.StationClothes] Frame 0
class com.king.TopModel.StationClothes extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight, mcHighLight2, stationState, _parent, activeHL, currentTick, bar, statAnim, workingStartTick, customer, returnScore, hitTest, barValue;
function StationClothes () {
super();
}
function init(num, type, tps) {
_x = 125;
_y = 20;
offSetX = 13;
offSetY = 80;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight._visible = false;
mcHighLight2._visible = false;
stationState = STATE_RESTING;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
bar.tick(tick, tps);
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
bar.deleteMe();
statAnim.deleteMe();
statAnim = undefined;
customer._alpha = 100;
customer.workDone(stationNumber, Math.round(returnScore));
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
activeHL._visible = false;
}
}
}
function render() {
switch (stationState) {
case STATE_WORKING :
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
workingStartTick = tick;
stationState = STATE_WORKING;
customer = model;
customer.setWorking(stationNumber);
if (customer.wrongStation == false) {
bar = _parent.createBar(this, "BarTarget", runTime, barValue);
customer._alpha = 0;
var _local2 = _parent.createStationAnim(stationNumber, runTime, _x, _y, customer.dressColor, _parent.depthCounter_3);
_parent.depthCounter_3++;
statAnim = _local2;
} else {
var _local2 = _parent.createStationAnim(14, runTime, _x, _y + 20, customer.hairColor);
statAnim = _local2;
}
}
function returnBarValue(numValue, tick, tps) {
returnScore = stationScore;
var _local3;
_local3 = numValue;
returnScore = returnScore + _local3;
if (numValue >= 90) {
com.king.util.SoundManager.play("choise_best", 50, false);
returnScore = Math.round(returnScore * 1.5);
} else if (numValue > 0) {
com.king.util.SoundManager.play("choise_good", 50, false);
}
if (numValue == -1) {
com.king.util.SoundManager.play("choise_bad", 50, false);
customer.patience = customer.patience - 40;
customer.updatePatienceBar();
returnScore = 0;
}
_parent.updateScore(returnScore);
_parent.createScore(returnScore, customer._x, customer._y - 40);
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var stationExtraScore = 30;
var runTime = 3;
var workTimer = 0;
var poseType = 4;
}
Symbol 523 MovieClip [__Packages.com.king.TopModel.StationMakeUp] Frame 0
class com.king.TopModel.StationMakeUp extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight, mcHighLight2, stationState, _parent, activeHL, currentTick, statAnim, workingStartTick, customer, hitTest, startTime, lastTime;
function StationMakeUp () {
super();
}
function init(num, type, tps) {
_x = 510;
_y = 110;
offSetX = 56;
offSetY = -33;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight._visible = false;
mcHighLight2._visible = false;
stationState = STATE_RESTING;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
statAnim.deleteMe();
statAnim = undefined;
customer.workDone(stationNumber, stationScore);
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
activeHL._visible = false;
}
}
}
function render() {
switch (stationState) {
case STATE_WORKING :
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
workingStartTick = tick;
stationState = STATE_WORKING;
startTime = getTimer();
workTimer = runTime;
lastTime = 0;
customer = model;
customer.setWorking(stationNumber);
if (customer.wrongStation) {
var _local2 = _parent.createStationAnim(14, runTime, _x + 42, _y - 95, 0);
statAnim = _local2;
} else {
var _local2 = _parent.createStationAnim(stationNumber, runTime, _x + 60, _y - 73, 0);
statAnim = _local2;
}
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var runTime = 4;
var workTimer = 0;
var poseType = 5;
}
Symbol 524 MovieClip [__Packages.com.king.TopModel.StationPose] Frame 0
class com.king.TopModel.StationPose extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight2, activeHL, stationState, currentTick, bar, statAnim, workingStartTick, customer, returnScore, _parent, hitTest, barValue;
function StationPose () {
super();
}
function init(num, type, tps) {
_x = 520;
_y = 250;
offSetX = 13;
offSetY = 10;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight2._visible = false;
activeHL = mcHighLight2;
stationState = STATE_RESTING;
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
bar.tick(tick, tps);
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
bar.deleteMe();
statAnim.deleteMe();
statAnim = undefined;
customer.workDone(stationNumber, Math.round(returnScore));
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
mcHighLight2._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
mcHighLight2._visible = false;
}
}
}
function render(tick, alpha) {
switch (stationState) {
case STATE_WORKING :
bar.render(tick, alpha);
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
returnScore = 0;
workingStartTick = tick;
stationState = STATE_WORKING;
workTimer = runTime;
customer = model;
customer.setWorking(stationNumber);
if (customer.wrongStation == false) {
bar = _parent.createBar(this, "BarPose", runTime, barValue);
customer.runModelAnim(9, 10);
} else {
var _local2 = _parent.createStationAnim(14, runTime, _x, _y - 50, customer.hairColor);
statAnim = _local2;
}
}
function returnBarValue(numValue, tick, tps) {
returnScore = stationScore;
var _local3 = numValue;
returnScore = returnScore + _local3;
if (numValue >= 90) {
com.king.util.SoundManager.play("choise_best", 50, false);
returnScore = Math.round(returnScore * 1.5);
} else if (numValue >= 80) {
com.king.util.SoundManager.play("choise_good", 50, false);
} else {
com.king.util.SoundManager.play("choise_bad", 50, false);
customer.patience = customer.patience - 40;
customer.updatePatienceBar();
returnScore = 0;
}
_parent.updateScore(returnScore);
_parent.createScore(returnScore, customer._x, customer._y - 40);
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var stationExtraScore = 30;
var runTime = 3;
var workTimer = 0;
var poseType = 4;
}
Symbol 525 MovieClip [__Packages.com.king.TopModel.StationHairCut] Frame 0
class com.king.TopModel.StationHairCut extends MovieClip
{
var _x, _y, offSetX, offSetY, stationNum, stationNumber, ticksPerSec, mcHighLight, mcHighLight2, stationState, _parent, activeHL, currentTick, statAnim, workingStartTick, customer, hitTest, lastTime;
function StationHairCut () {
super();
}
function init(num, type, tps) {
_x = 390;
_y = 210;
offSetX = 13;
offSetY = 10;
stationNum = num;
stationNumber = type;
ticksPerSec = tps;
mcHighLight._visible = false;
mcHighLight2._visible = false;
stationState = STATE_RESTING;
if (_parent.level == 1) {
activeHL = mcHighLight;
} else {
activeHL = mcHighLight2;
}
}
function tick(tick, tps) {
currentTick = tick;
switch (stationState) {
case STATE_WORKING :
statAnim.tick(tick, tps);
if ((currentTick - workingStartTick) >= (runTime * ticksPerSec)) {
statAnim.deleteMe();
statAnim = undefined;
customer.workDone(stationNumber, stationScore);
stationState = STATE_RESTING;
}
break;
case STATE_RESTING :
if (!((_parent.activeModel != undefined) && (stationBusy == false))) {
break;
}
if ((hitTest(_root._xmouse, _root._ymouse) == true) && (highlighted == false)) {
highlighted = true;
activeHL._visible = true;
} else {
if (!((hitTest(_root._xmouse, _root._ymouse) == false) && (highlighted == true))) {
break;
}
highlighted = false;
activeHL._visible = false;
}
}
}
function render() {
switch (stationState) {
case STATE_WORKING :
break;
case STATE_RESTING :
}
}
function onPress() {
}
function activateStation(model, random, tick) {
workingStartTick = tick;
stationState = STATE_WORKING;
workTimer = runTime;
lastTime = 0;
customer = model;
customer.setWorking(stationNumber);
if (customer.wrongStation) {
var _local2 = _parent.createStationAnim(14, runTime, _x, _y - 50, customer.hairColor);
statAnim = _local2;
} else {
customer.runModelAnim(7, 8);
var _local2 = _parent.createStationAnim(stationNumber, runTime, _x - 10, _y - 60, customer.hairColor);
statAnim = _local2;
}
}
static var STATE_WORKING = 0;
static var STATE_RESTING = 1;
var stationBusy = false;
var highlighted = false;
var stationScore = 0;
var runTime = 4;
var workTimer = 0;
var poseType = 2;
}
Symbol 526 MovieClip [__Packages.com.king.TopModel.BarEnd] Frame 0
class com.king.TopModel.BarEnd extends MovieClip
{
var now, startTime, timeLeft, lastTime, mcBarMarker, station, _y, _x, removeMovieClip;
function BarEnd () {
super();
}
function onEnterFrame() {
if (running) {
now = getTimer() - startTime;
timeLeft = timeLeft - Math.max(now - lastTime, 0);
var _local2 = ((1 - (timeLeft / roundTime)) * 100) * -1;
mcBarMarker._y = _local2;
lastTime = now;
if (timeLeft <= 0) {
timeLeft = roundTime + timeLeft;
}
}
}
function init(stat) {
trace("init bar");
startTime = getTimer();
lastTime = 0;
running = true;
timeLeft = roundTime;
station = stat;
_y = station._y - 40;
_x = station._x;
}
function onPress() {
running = false;
station.returnBarValue(Math.round(mcBarMarker._y * -1));
removeMovieClip();
}
var running = false;
var roundTime = 1000;
}
Symbol 527 MovieClip [__Packages.com.king.TopModel.Photo] Frame 0
class com.king.TopModel.Photo extends MovieClip
{
var _y, _x, passed, gotoAndStop, mcPhoto;
function Photo () {
super();
}
function init(num, dressColor, hairColor, hairType, faceType, faceExp, psd) {
_y = 1000;
_x = 1000;
passed = psd;
if (passed) {
(gotoAndStop(1));// not popped
} else {
(gotoAndStop(2));// not popped
}
mcPhoto.mcModel.mcFace.gotoAndStop(faceType);
mcPhoto.mcModel.mcFace.mcFaceType.gotoAndStop(faceExp);
mcPhoto.mcModel.mcHair.gotoAndStop(hairType);
mcPhoto.mcModel.mcHair.mcHairColor.gotoAndStop(hairColor);
mcPhoto.mcModel.mcBody.gotoAndStop(1);
mcPhoto.mcModel.mcBody.mcPose.gotoAndStop(1);
mcPhoto.mcModel.mcBody.mcPose.mcDressColor.gotoAndStop(dressColor);
}
}
Symbol 528 MovieClip [__Packages.com.king.TopModel.StationAnims] Frame 0
class com.king.TopModel.StationAnims extends MovieClip
{
var remTicks, mcAnim, goto, colorNum, _x, _y, gotoAndStop, runTime, removeMovieClip;
function StationAnims () {
super();
}
function tick(tick, tps) {
remTicks = remTicks - 1;
if (remTicks == 0) {
mcAnim.gotoAndStop(goto);
if (colorNum != 0) {
mcAnim.mcColor.gotoAndStop(colorNum);
}
if (goto == 1) {
goto = 2;
} else {
goto = 1;
}
remTicks = Math.round(tps / 3);
}
}
function render(tick, alpha) {
}
function init(type, rt, x, y, cn) {
_x = x;
_y = y;
(gotoAndStop(type + 1));// not popped
runTime = rt;
goto = 2;
remTicks = 1;
colorNum = cn;
}
function deleteMe() {
removeMovieClip();
}
}
Symbol 529 MovieClip [__Packages.com.king.TopModel.JudgeAnim] Frame 0
class com.king.TopModel.JudgeAnim extends MovieClip
{
var theGoto, modelCleared, mcThumbUp, mcThumbDown, starAnim, mcStarAnim, animDone, _x, _y, removeMovieClip;
function JudgeAnim () {
super();
}
function tick(tick, tps) {
theGoto++;
if (modelCleared) {
mcThumbUp.gotoAndStop(theGoto);
} else {
mcThumbDown.gotoAndStop(theGoto);
}
if ((theGoto == 21) && (starAnim == true)) {
mcStarAnim.gotoAndPlay(2);
}
if (theGoto > 37) {
animDone = true;
}
}
function render(tick, alpha) {
}
function init(mc, extra) {
animDone = false;
theGoto = 0;
starAnim = extra;
_x = 670;
_y = 350;
modelCleared = mc;
if (modelCleared) {
mcThumbDown._visible = false;
} else {
mcThumbUp._visible = false;
}
}
function deleteMe() {
removeMovieClip();
}
}
Symbol 530 MovieClip [__Packages.com.king.TopModel.LatteMug] Frame 0
class com.king.TopModel.LatteMug extends MovieClip
{
var _y, _height, _x, _width, gotoAndStop, _alpha, activeY, _ymouse, activeX, _xmouse, _parent;
function LatteMug () {
super();
}
function tick(tick, tps) {
if (active) {
_y = _root._ymouse - (_height / 2);
_x = _root._xmouse - (_width / 2);
}
}
function render(tick, alpha) {
}
function init(x, y) {
active = false;
(gotoAndStop(1));// not popped
_x = x + 20;
_y = y + 72;
_alpha = 100;
}
function onPress() {
_alpha = 60;
activeY = _ymouse;
activeX = _xmouse;
active = true;
_parent.dragMug(this);
}
function onRelease() {
_parent.releasedMug = true;
}
function onReleaseOutside() {
onRelease();
}
var active = false;
}
Symbol 531 MovieClip [__Packages.com.king.TopModel.Summary] Frame 0
class com.king.TopModel.Summary extends MovieClip
{
var _visible, delay, step, mcEndAnim, attachMovie, getNextHighestDepth, gotoAndStop, _parent;
function Summary () {
super();
_visible = false;
delay = new com.king.util.Delay();
}
function tick(tick, tps) {
if (step == 1) {
}
if (step == 2) {
}
if (step == 3) {
endAnimCounter++;
mcEndAnim.gotoAndStop(endAnimCounter);
if (endAnimCounter == 192) {
}
}
}
function init() {
}
function setUp(modelArr) {
var _local2 = 0;
while (_local2 < modelArr.length) {
var _local4 = attachMovie("Photo", "photo_" + _local2, getNextHighestDepth());
var _local5 = modelArr[_local2].dressColor;
var _local9 = modelArr[_local2].hairColor;
var _local7 = modelArr[_local2].hairType;
var _local8 = modelArr[_local2].faceType;
var _local6 = Math.min(modelArr[_local2].faceExp, 3);
_local4.init(_local2, _local5, _local9, _local7, _local8, _local6, modelArr[_local2].passed);
photoArr[_local2] = _local4;
_local2++;
}
}
function run(slide) {
step = slide;
(gotoAndStop(slide));// not popped
_visible = true;
var _local2 = 0;
while (_local2 < photoArr.length) {
var _local3 = 210;
if (photoArr[_local2].passed) {
_local3 = 20;
}
var _local4 = new Array(_local2, _local3);
com.king.util.Delay.oneShot(this, sendPhoto, 200 * _local2, _local2, _local3);
_local2++;
}
}
function sendPhoto(i, yPlace) {
var _local4 = new mx.transitions.Tween(photoArr[i], "_y", mx.transitions.easing.Regular.easeOut, 600, yPlace + (Math.random() * 20), 0.5, true);
var _local5 = new mx.transitions.Tween(photoArr[i], "_x", mx.transitions.easing.Regular.easeOut, 375, (100 + (i * 30)) + (Math.random() * 20), 0.5, true);
var _local3 = new mx.transitions.Tween(photoArr[i], "_rotation", mx.transitions.easing.Regular.easeIn, 0, 20 - (Math.random() * 40), 0.5, true);
}
function removePhotos() {
var _local2 = 0;
while (_local2 < photoArr.length) {
photoArr[_local2].removeMovieClip();
_local2++;
}
}
function remove() {
_visible = false;
}
function onPress() {
_parent.ticksLeft = 1;
}
var photoArr = new Array();
var endAnimCounter = 0;
}
Symbol 532 MovieClip [__Packages.com.king.util.Delay] Frame 0
class com.king.util.Delay
{
var m_fn, m_param, m_context, m_delay, m_started, m_timerId;
function Delay (context, fn, delay) {
m_fn = fn;
m_param = new Array();
var _local3 = 3;
while (_local3 < arguments.length) {
m_param.push(arguments[_local3]);
_local3++;
}
m_context = context;
m_delay = delay;
m_started = getTimer();
m_timerId = setInterval(mx.utils.Delegate.create(this, onEvent), delay);
}
function onEvent() {
if (getTimer() >= (m_delay + m_started)) {
clearInterval(m_timerId);
m_fn.apply(m_context, m_param);
m_fn = undefined;
m_param = undefined;
}
}
static function oneShot(context, fn, delay) {
var _local3 = new com.king.util.Delay(context, fn, delay);
_local3.m_param = new Array();
var _local2 = 3;
while (_local2 < arguments.length) {
_local3.m_param.push(arguments[_local2]);
_local2++;
}
}
}
Symbol 533 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 534 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 535 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 536 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 537 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";
}
Symbol 538 MovieClip [__Packages.com.king.TopModel.Game] Frame 0
class com.king.TopModel.Game extends MovieClip
{
var communicator, delay, depthCounter_1, depthCounter_2, depthCounter_3, gameState, currentTick, _parent, latteMachine, latteMug, modelsDone, level, noOfSpawn, startTick, random, timeLeft, lastTime, barCounter, noOfPassed, attachMovie, getNextHighestDepth;
function Game () {
super();
communicator = new com.king.util.Communicator();
delay = new com.king.util.Delay();
stationLevelArr[0] = [0, 1, 2, 3];
stationLevelArr[1] = [0, 1, 2, 3, 4];
stationLevelArr[2] = [0, 1, 2, 3, 4, 5];
stationTypeArr[0] = "StationHairCut";
stationTypeArr[1] = "StationNails";
stationTypeArr[2] = "StationClothes";
stationTypeArr[3] = "StationMakeUp";
stationTypeArr[4] = "StationHairColor";
stationTypeArr[5] = "StationPose";
depthCounter_1 = 100000 /* 0x0186A0 */;
depthCounter_2 = 50000;
depthCounter_3 = 1000;
gameState = STATE_NOT_RUNNING;
}
function tick(tick, tps) {
currentTick = tick;
if ((tick % 100) == 0) {
communicator.sendScore(tick, _parent.score + roundScore);
}
if (releasedModel != undefined) {
releaseModel(releasedModel, tick);
releasedModel = undefined;
}
latteMachine.tick(tick, tps);
if (latteMug != undefined) {
latteMug.tick(tick, tps);
}
if (releasedMug) {
releaseMug(tick);
releasedMug = undefined;
}
var _local4 = 0;
while (_local4 < modelArr.length) {
if (modelArr[_local4].onStage) {
modelArr[_local4].tick(tick, tps);
}
_local4++;
}
_local4 = 0;
while (_local4 < stationArr.length) {
stationArr[_local4].tick(tick, tps);
_local4++;
}
_local4 = 0;
while (_local4 < judgeAnimArr.length) {
if (judgeAnimArr[_local4].animDone == true) {
judgeAnimArr[_local4].deleteMe();
judgeAnimArr.splice(_local4, 1);
} else {
judgeAnimArr[_local4].tick(tick, tps);
}
_local4++;
}
_local4 = 0;
while (_local4 < scoreTextArr.length) {
if (scoreTextArr[_local4].animDone == true) {
scoreTextArr[_local4].deleteMe();
scoreTextArr.splice(_local4, 1);
} else {
scoreTextArr[_local4].tick(tick, tps);
}
_local4++;
}
_local4 = 0;
while (_local4 < fallingAnimArr.length) {
if (fallingAnimArr[_local4].animDone == true) {
fallingAnimArr[_local4].deleteMe();
fallingAnimArr.splice(_local4, 1);
} else {
fallingAnimArr[_local4].tick(tick, tps);
}
_local4++;
}
_local4 = 0;
while (_local4 < puffAnimArr.length) {
if (puffAnimArr[_local4].animDone == true) {
puffAnimArr[_local4].deleteMe();
puffAnimArr.splice(_local4, 1);
} else {
puffAnimArr[_local4].tick(tick, tps);
}
_local4++;
}
if (((modelsDone == noOfModels) && (judgeAnimArr.length == 0)) && (puffAnimArr.length == 0)) {
communicator.sendEndRound(tick);
sendModelApp();
clearLevel();
endRound();
}
if (activeModel == undefined) {
var _local6 = 0;
if (level == 1) {
var _local5 = 7;
} else {
var _local5 = 6;
}
_local4 = 0;
while (_local4 < noOfSpawn) {
_local6 = _local6 + _local5;
if ((_local4 % 3) == 1) {
_local5--;
}
_local4++;
}
if ((((tick - startTick) / TICKS_PER_SEC) >= _local6) && (noOfSpawn <= (noOfModels - 2))) {
communicator.sendClientSpawn(tick);
spawnModel(modelArr[noOfSpawn + 1]);
noOfSpawn++;
}
}
}
function render(tick, alpha) {
var _local2 = 0;
while (_local2 < modelArr.length) {
if (modelArr[_local2].onStage) {
modelArr[_local2].render();
}
_local2++;
}
_local2 = 0;
while (_local2 < stationArr.length) {
stationArr[_local2].render();
stationArr[_local2].activeHL._visible = stationArr[_local2].highlighted;
_local2++;
}
}
function startRound(lvl, rnd, currentTick) {
com.king.util.SoundManager.play("model_spawn_1", 50, false);
com.king.util.SoundManager.play("game_loop", 20, true);
level = lvl;
random = rnd;
timeLeft = modelIntervall;
startTick = currentTick;
lastTime = 0;
modelsDone = 0;
barCounter = 0;
noOfSpawn = 1;
noOfPassed = 0;
setStations();
setModelBehaviors();
gameState = STATE_RUNNING;
communicator.startFirstRound(currentTick);
}
function endRound() {
com.king.util.SoundManager.stop("game_loop");
com.king.util.SoundManager.stop("coffee");
_parent.updateScore();
_parent.endRound(noOfPassed);
roundScore = 0;
}
function clearLevel() {
var _local2 = 0;
while (_local2 < stationArr.length) {
stationArr[_local2].removeMovieClip();
_local2++;
}
stationArr = [];
_local2 = 0;
while (_local2 < modelArr.length) {
modelArr[_local2].removeMovieClip();
_local2++;
}
modelArr = [];
latteMachine.removeMovieClip();
latteMug.removeMovieClip();
latteMug = undefined;
}
function sendModelApp() {
_parent.extractModelData(modelArr);
}
function setModelBehaviors() {
var _local2 = 0;
while (_local2 < noOfModels) {
var _local7 = attachMovie("Model", "model_" + _local2, depthCounter_1);
var _local6;
if (level <= 2) {
_local6 = random.nextInt(1) + 2;
} else if (_local2 < 5) {
_local6 = random.nextInt(1) + 2;
} else {
_local6 = random.nextInt(2) + 2;
}
var _local4 = [];
var _local5 = 0;
while (_local5 < _local6) {
_local4[_local5] = stationLevelArr[level - 1][random.nextInt(stationLevelArr[level - 1].length)];
var _local3 = 0;
while (_local3 < (_local4.length - 1)) {
if (_local4[_local3] == _local4[_local5]) {
_local5--;
_local3 = _local4.length;
}
_local3++;
}
_local5++;
}
_local7.init(_local2, _local4, 1, TICKS_PER_SEC, level, random);
modelArr[_local2] = _local7;
depthCounter_1++;
if (_local2 < 2) {
modelArr[_local2].coordX = stationArr[_local2]._x + stationArr[_local2].offSetX;
modelArr[_local2].coordY = stationArr[_local2]._y + stationArr[_local2].offSetY;
modelArr[_local2]._x = modelArr[_local2].coordX;
modelArr[_local2]._y = modelArr[_local2].coordY;
modelArr[_local2].onStage = true;
modelArr[_local2].setWaiting();
modelArr[_local2].lastStation = stationArr[_local2];
stationArr[_local2].stationBusy = true;
stationArr[_local2].customer = modelArr[_local2];
}
_local2++;
}
}
function setStations() {
var _local2 = 0;
while (_local2 < 4) {
var _local3 = attachMovie("StationRest", "stationRest_" + _local2, depthCounter_1);
_local3.init(_local2);
depthCounter_1++;
stationArr.push(_local3);
_local2++;
}
if (level > 1) {
var _local7 = attachMovie("LatteMachine", "latteMachine_", depthCounter_3);
_local7.init();
latteMachine = _local7;
depthCounter_3++;
}
_local2 = 0;
while (_local2 < stationLevelArr[level - 1].length) {
if (_local2 < 2) {
var _local5 = depthCounter_2;
} else {
var _local5 = depthCounter_3;
}
var _local4 = attachMovie(stationTypeArr[stationLevelArr[level - 1][_local2]], "station_" + _local2, _local5);
_local4.init(stationArr.length, stationLevelArr[level - 1][_local2], TICKS_PER_SEC);
stationArr.push(_local4);
if (_local2 < 2) {
depthCounter_2++;
} else {
depthCounter_3++;
}
_local2++;
}
var _local6 = attachMovie("StationDoor", "stationDoor_" + _local2, depthCounter_1);
depthCounter_1++;
_local6.init(stationArr.length);
stationArr.push(_local6);
}
function dragModel(model, tick) {
com.king.util.SoundManager.play("model_drag", 50, false);
activeModel = model;
model.pose = 1;
model.updateApperance = true;
model.setDepthTo(mx.managers.DepthManager.kTopmost);
depthCounter_1++;
depthCounter_2++;
depthCounter_3++;
communicator.sendModelClicked(tick, model.modelNum);
}
function dragMug(mug) {
mug.setDepthTo(mx.managers.DepthManager.kTopmost);
depthCounter_1++;
depthCounter_2++;
depthCounter_3++;
mug.gotoAndStop(2);
}
function releaseMug(tick) {
var _local2 = 0;
while (_local2 < modelArr.length) {
if (modelArr[_local2].mugHL == true) {
communicator.latteMugReleased(tick, modelArr[_local2].modelNum);
latteMug.removeMovieClip();
latteMug = undefined;
latteMachine.latte = false;
modelArr[_local2].getLatte();
_local2 = modelArr.length;
} else if (_local2 == (modelArr.length - 1)) {
latteMug.init(latteMachine._x, latteMachine._y);
}
_local2++;
}
}
function releaseModel(model, tick) {
activeModel = undefined;
model.activeY = undefined;
model.activeX = undefined;
model.active = false;
var _local5 = false;
var _local2 = 0;
while (_local2 < stationArr.length) {
if (stationArr[_local2].highlighted) {
com.king.util.SoundManager.play("click_go", 50, false);
_local5 = true;
model.coordX = stationArr[_local2]._x + stationArr[_local2].offSetX;
model.coordY = stationArr[_local2]._y + stationArr[_local2].offSetY;
model.pose = stationArr[_local2].poseType;
stationArr[_local2].stationBusy = true;
stationArr[_local2].highlighted = false;
if (model.lastStation != undefined) {
model.lastStation.customer = undefined;
model.lastStation.stationBusy = false;
}
model.lastStation = stationArr[_local2];
stationArr[_local2].activateStation(model, random, tick);
model.setDepthAbove(stationArr[_local2]);
communicator.sendModelMove(tick, model.modelNum, stationArr[_local2].stationNum);
}
_local2++;
}
if (_local5 == false) {
com.king.util.SoundManager.play("click_return", 50, false);
model.pose = model.lastStation.poseType;
model.updateApperance = true;
model.setDepthAbove(model.lastStation);
}
model._x = model.coordX;
model._y = model.coordY;
communicator.sendModelReleased(tick, model.modelNum);
}
function createBar(station, barType, runTime, barValue) {
var _local2 = attachMovie(barType, "bar" + barCounter, getNextHighestDepth());
_local2.init(station, runTime, barValue);
barCounter++;
return(_local2);
}
function updateScore(scr) {
communicator.scoreUpdate(currentTick, scr);
roundScore = roundScore + scr;
_parent.txtScore.text = Number(_parent.score + roundScore);
}
function spawnModel(newModel) {
var _local4 = Math.random() * 3;
if (_local4 < 1) {
com.king.util.SoundManager.play("model_spawn_1", 50, false);
} else if (_local4 < 2) {
com.king.util.SoundManager.play("model_spawn_2", 50, false);
} else {
com.king.util.SoundManager.play("model_spawn_3", 50, false);
}
trace("spawnModel");
var _local3 = 3;
while (_local3 >= 0) {
if (stationArr[_local3].stationBusy == false) {
newModel.coordX = stationArr[_local3]._x + stationArr[_local3].offSetX;
newModel.coordY = stationArr[_local3]._y + stationArr[_local3].offSetY;
newModel._x = newModel.coordX;
newModel._y = newModel.coordY;
newModel.onStage = true;
newModel.lastStation = stationArr[_local3];
stationArr[_local3].stationBusy = true;
stationArr[_local3].customer = newModel;
newModel._alpha = 0;
newModel.initAnim = true;
newModel.setWaiting();
break;
}
if (_local3 == 0) {
stationArr[3].customer.pushedOut();
stationArr[3].stationBusy = false;
stationArr[3].customer = undefined;
newModel.coordX = stationArr[3]._x + stationArr[3].offSetX;
newModel.coordY = stationArr[3]._y + stationArr[3].offSetY;
newModel._x = newModel.coordX;
newModel._y = newModel.coordY;
newModel.onStage = true;
newModel.lastStation = stationArr[3];
stationArr[3].stationBusy = true;
stationArr[3].customer = newModel;
newModel._alpha = 0;
newModel.initAnim = true;
newModel.setWaiting();
}
_local3--;
}
}
function createStationAnim(statNum, rt, x, y, color, depth) {
if (depth == undefined) {
var _local3 = getNextHighestDepth();
} else {
var _local3 = depth;
}
var _local2 = attachMovie("StationAnims", "statAnim_" + statAnimCounter, _local3);
_local2.init(statNum, rt, x, y, color);
statAnimCounter++;
return(_local2);
}
function createJudgeAnim(modelCleared, extra) {
var _local2 = attachMovie("JudgeAnim", "judgeAnim_" + judgeCounter, getNextHighestDepth());
_local2.init(modelCleared, extra);
judgeAnimArr.push(_local2);
judgeCounter++;
}
function createScore(num, x, y) {
var _local2 = attachMovie("ScoreText", "scoreText_" + scoreTextCounter, getNextHighestDepth());
_local2.init(num, x, y);
scoreTextArr.push(_local2);
scoreTextCounter++;
}
function createMug() {
var _local2 = attachMovie("LatteMug", "latteMug_", getNextHighestDepth());
_local2.init(latteMachine._x, latteMachine._y);
latteMug = _local2;
}
function createFallingAnim(model) {
var _local2 = attachMovie("ModelFalling", "modelFalling", getNextHighestDepth());
fallingAnimArr.push(_local2);
_local2.init(model);
}
function createPuff(x, y) {
com.king.util.SoundManager.play("puff", 50, false);
var _local2 = attachMovie("PuffAnim", "puffAnim" + puffAnimCounter, getNextHighestDepth());
_local2.init(x, y);
puffAnimArr.push(_local2);
puffAnimCounter++;
}
static var STATE_RUNNING = 0;
static var STATE_NOT_RUNNING = 1;
static var TICKS_PER_SEC = 25;
var noOfModels = 10;
var modelArr = new Array();
var stationArr = new Array();
var stationLevelArr = new Array();
var stationTypeArr = new Array();
var judgeAnimArr = new Array();
var scoreTextArr = new Array();
var fallingAnimArr = new Array();
var puffAnimArr = new Array();
var roundScore = 0;
var modelIntervall = 5000;
var statAnimCounter = 0;
var scoreTextCounter = 0;
var puffAnimCounter = 0;
var releasedModel = undefined;
var releasedMug = undefined;
var judgeCounter = 0;
var activeModel = undefined;
}
Symbol 539 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(MovieClip(this), _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local1 = targetDepth;
var _local2 = targetDepth;
if (direction == "down") {
while (depthTable[_local2] != undefined) {
_local2--;
}
return(_local2);
}
while (depthTable[_local1] != undefined) {
_local1++;
}
return(_local1);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 540 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 541 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 542 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 543 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 544 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 545 MovieClip [__Packages.com.king.timing.Timeable] Frame 0
interface com.king.timing.Timeable
{
}
Symbol 546 MovieClip [__Packages.com.king.TopModel.TopModel] Frame 0
class com.king.TopModel.TopModel extends MovieClip implements com.king.timing.Timeable
{
var _alpha, m_mainTimer, onEnterFrame, communicator, delay, frames, lastFps, mcToggleSound, mcExitGame, mcInfoScreens, mcOpenPlayerEnd, mcStartAnim, gameState, currentTick, random, lang, mcSummary, mcGame, mcGameOver, txtScoreText, txtBonusText, txtTotalScoreText, txtLevel, txtInstructionHeader, txtInstruction1, txtInstruction2, txtInstruction3, txtInstruction4, txtInstruction5, userType, soundTicks, infoTicksLeft, noOfInfos, infoGoto, animTicks, animLength, activeInfo, lastShown, ticksLeft, removeSummary, noOfPassed, saTicksLeft, fpsTimer, fps, txtFPS, mcIntroScreen, levelString, lastRoundScore, txtCleared, txtInTheRunning;
function TopModel () {
super();
_alpha = 0;
m_mainTimer = new com.king.timing.Timer(this, TICKS_PER_SEC);
onEnterFrame = mx.utils.Delegate.create(this, drive);
communicator = new com.king.util.Communicator();
delay = new com.king.util.Delay();
frames = 0;
lastFps = 0;
mcToggleSound.onPress = function () {
com.king.util.SoundManager.toggleSound();
if (this._parent.soundOn) {
this._parent.mcToggleSound.txtSound.text = _global.textMappings.sound_off;
this._parent.mcToggleSound.mcSoundButton.gotoAndStop("off");
this._parent.soundOn = false;
} else {
this._parent.mcToggleSound.txtSound.text = _global.textMappings.sound_on;
this._parent.mcToggleSound.mcSoundButton.gotoAndStop("on");
this._parent.soundOn = true;
}
};
mcExitGame.onPress = function () {
this._parent.exitGamePressed();
};
mcInfoScreens.onPress = function () {
this._parent.infoTicksLeft = 1;
};
mcOpenPlayerEnd.onPress = function () {
this._parent.ticksLeft = 1;
};
mcInfoScreens.mcInfoScreen1._visible = false;
mcInfoScreens.mcInfoScreen2._visible = false;
mcInfoScreens.mcInfoScreen3._visible = false;
mcInfoScreens.mcInfoScreen4._visible = false;
mcInfoScreens.mcInfoScreen5._visible = false;
mcStartAnim._visible = false;
mcOpenPlayerEnd._visible = false;
gameState = STATE_WAIT_FOR_GAMEDATA;
}
function drive() {
m_mainTimer.advanceTime2();
}
function tick(tick) {
currentTick = tick;
com.king.util.TimeVerifier.checkTime();
switch (gameState) {
case STATE_WAIT_FOR_GAMEDATA :
if (DEBUG_MODE) {
_root.gameData = DEBUG_GAME_DATA;
}
if (_root.gameData != undefined) {
communicator.gameStarted();
communicator.parseGameData(_root.gameData);
random = new com.king.util.Random(communicator.randomSeed);
lang = communicator.lang;
if (lang.toLowerCase() != "de") {
mcSummary.mcLogo.gotoAndStop(2);
mcSummary.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcIntroScreen.mcFPLogo.gotoAndStop(2);
mcInfoScreens.mcIntroScreen.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcInfoScreen1.mcLogo.gotoAndStop(2);
mcInfoScreens.mcInfoScreen1.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcInfoScreen2.mcLogo.gotoAndStop(2);
mcInfoScreens.mcInfoScreen2.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcInfoScreen3.mcLogo.gotoAndStop(2);
mcInfoScreens.mcInfoScreen3.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcInfoScreen4.mcLogo.gotoAndStop(2);
mcInfoScreens.mcInfoScreen4.mcSignBG.gotoAndStop(2);
mcInfoScreens.mcInfoScreen5.mcLogo.gotoAndStop(2);
mcInfoScreens.mcInfoScreen5.mcSignBG.gotoAndStop(2);
mcGame.mcBackGround.mcLevel1BG.gotoAndStop(2);
}
mcGameOver.txtGameOver.text = _global.textMappings.game_over;
txtScoreText = _global.textMappings.score;
txtBonusText = _global.textMappings.bonus_text;
txtTotalScoreText = _global.textMappings.total_score;
txtLevel = _global.textMappings.level;
mcToggleSound.txtSound.text = _global.textMappings.sound_on;
mcExitGame.txtQuit.text = _global.textMappings.exit_game;
txtInstructionHeader = _global.textMappings.intro_header;
txtInstruction1 = _global.textMappings.intro_text_1;
txtInstruction2 = _global.textMappings.intro_text_2;
txtInstruction3 = _global.textMappings.intro_text_3;
txtInstruction4 = _global.textMappings.intro_text_4;
txtInstruction5 = _global.textMappings.intro_text_5;
mcOpenPlayerEnd.txtOpenPlayerHeader.text = _global.textMappings.open_user_end_header;
mcOpenPlayerEnd.txtOpenPlayerText.text = _global.textMappings.open_user_end;
userType = _global.userType[0];
_alpha = 100;
showInfoScreen();
}
break;
case STATE_SHOW_INFO_SCREEN :
soundTicks = soundTicks - 1;
if (soundTicks <= 0) {
com.king.util.SoundManager.play("game_loop", 50, true);
soundTicks = TICKS_PER_SEC * 100;
}
mcInfoScreens.mcIntroScreen.txtCounter.text = _global.textMappings.game_next_screen.split("[0]").join("" + Math.round(infoTicksLeft / 25));
mcInfoScreens.mcInfoScreen1.txtCounter.text = _global.textMappings.game_next_screen.split("[0]").join("" + Math.round(infoTicksLeft / 25));
mcInfoScreens.mcInfoScreen2.txtCounter.text = _global.textMappings.game_starts_in.split("[0]").join("" + Math.round(infoTicksLeft / 25));
mcInfoScreens.mcInfoScreen3.txtCounter.text = _global.textMappings.game_starts_in.split("[0]").join("" + Math.round(infoTicksLeft / 25));
mcInfoScreens.mcInfoScreen4.txtCounter.text = _global.textMappings.game_starts_in.split("[0]").join("" + Math.round(infoTicksLeft / 25));
mcInfoScreens.mcInfoScreen5.txtCounter.text = _global.textMappings.game_starts_in.split("[0]").join("" + Math.round(infoTicksLeft / 25));
infoTicksLeft = infoTicksLeft - 1;
if (noOfInfos > 0) {
infoGoto = infoGoto + (animLength / animTicks);
var _local6 = Math.round(infoGoto);
activeInfo.gotoAndStop(_local6);
}
if (infoTicksLeft <= 0) {
switch (noOfInfos) {
case 0 :
mcInfoScreens.mcIntroScreen.mcStars.gotoAndStop(1);
mcInfoScreens.mcIntroScreen._visible = false;
mcInfoScreens.mcInfoScreen1._visible = true;
activeInfo = mcInfoScreens.mcInfoScreen1.mcInstruction;
animTicks = 250;
animLength = 605;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 0;
break;
case 1 :
mcInfoScreens.mcInfoScreen1._visible = false;
mcInfoScreens.mcInfoScreen2._visible = true;
activeInfo = mcInfoScreens.mcInfoScreen2.mcInstruction;
animTicks = 250;
animLength = 234;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 1;
break;
case 2 :
mcInfoScreens.mcInfoScreen2._visible = false;
mcInfoScreens.mcInfoScreen3._visible = true;
activeInfo = mcInfoScreens.mcInfoScreen3.mcInstruction;
animTicks = 250;
animLength = 234;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 2;
startRound();
break;
case 3 :
mcInfoScreens.mcInfoScreen3._visible = false;
mcInfoScreens.mcInfoScreen4._visible = true;
activeInfo = mcInfoScreens.mcInfoScreen4.mcInstruction;
animTicks = 180;
animLength = 310;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 3;
break;
case 4 :
mcInfoScreens.mcInfoScreen4._visible = false;
mcInfoScreens.mcInfoScreen5._visible = true;
activeInfo = mcInfoScreens.mcInfoScreen5.mcInstruction;
animTicks = 250;
animLength = 228;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 4;
if (userType == 0) {
openPlayerEnd();
} else {
startRound();
}
break;
case 5 :
mcInfoScreens.mcInfoScreen5._visible = false;
activeInfo = mcInfoScreens.mcInfoScreen5.mcInstruction;
animTicks = 250;
animLength = 234;
infoTicksLeft = 250;
infoGoto = 0;
noOfInfos++;
lastShown = 2;
startRound();
}
}
break;
case STATE_PLAY_GAME :
mcGame.tick(tick, TICKS_PER_SEC);
break;
case STATE_BETWEEN_ROUNDS :
soundTicks = soundTicks - 1;
if (soundTicks <= 0) {
com.king.util.SoundManager.play("game_loop", 50, true);
soundTicks = TICKS_PER_SEC * 100;
}
ticksLeft = ticksLeft - 1;
mcSummary.txtCounter.text = _global.textMappings.game_starts_in.split("[0]").join("" + Math.round(ticksLeft / 25));
if ((ticksLeft == 0) && (mcSummary.step == 1)) {
ticksLeft = 10 * TICKS_PER_SEC;
mcSummary.removePhotos();
mcSummary.step++;
mcSummary.gotoAndStop(mcSummary.step);
mcSummary.txtCleared.text = _global.textMappings.level_passed;
} else if (ticksLeft == 0) {
removeSummary = true;
gameState = STATE_SHOW_INFO_SCREEN;
mcInfoScreens._visible = true;
}
break;
case STATE_END_GAME :
ticksLeft = ticksLeft - 1;
mcSummary.txtCounter.text = _global.textMappings.game_ends.split("[0]").join("" + Math.round(ticksLeft / 25));
mcSummary.tick(tick, TICKS_PER_SEC);
if ((ticksLeft == 0) && (mcSummary.step == 1)) {
ticksLeft = 10 * TICKS_PER_SEC;
mcSummary.removePhotos();
if ((level == 3) && (noOfPassed >= 8)) {
mcSummary.step = 3;
mcSummary.gotoAndStop(mcSummary.step);
mcSummary.txtCleared.text = _global.textMappings.game_cleared;
} else {
mcSummary.step++;
mcSummary.gotoAndStop(mcSummary.step);
}
} else if (ticksLeft == 0) {
gamePreQuit();
}
break;
case STATE_OPEN_PLAYER_GAME_OVER :
ticksLeft = ticksLeft - 1;
mcOpenPlayerEnd.txtCounter.text = _global.textMappings.game_ends.split("[0]").join("" + Math.round(ticksLeft / 25));
if (ticksLeft == 0) {
gamePreQuit();
}
break;
case STATE_NOT_RUNNING :
break;
case STATE_START_ANIM :
saTicksLeft = saTicksLeft - 1;
var _local4 = Math.round((1 - (saTicksLeft / 50)) * 179);
mcStartAnim.gotoAndStop(_local4);
if (saTicksLeft != 0) {
break;
}
mcStartAnim._visible = false;
startRound();
}
}
function render(tick, alpha) {
fpsTimer = getTimer();
frames++;
if ((fpsTimer - lastFps) > 250) {
fps = (1000 / (fpsTimer - lastFps)) * frames;
txtFPS.text = Math.round(fps);
frames = 0;
lastFps = fpsTimer;
}
if (!(gameState === STATE_PLAY_GAME)) {
} else {
mcGame.render(tick, alpha);
}
if (removeSummary) {
mcSummary.remove();
removeSummary = false;
}
}
function showInfoScreen() {
com.king.util.SoundManager.play("intro", 50, false);
infoTicksLeft = 250;
noOfInfos = 0;
activeInfo = undefined;
mcIntroScreen._visible = true;
soundTicks = 22 * TICKS_PER_SEC;
gameState = STATE_SHOW_INFO_SCREEN;
}
function nextLevel() {
ticksLeft = 5 * TICKS_PER_SEC;
soundTicks = 14 * TICKS_PER_SEC;
mcSummary.run(1);
gameState = STATE_BETWEEN_ROUNDS;
}
function endGame(num) {
ticksLeft = 5 * TICKS_PER_SEC;
mcSummary.run(num);
gameState = STATE_END_GAME;
}
function startRound() {
com.king.util.SoundManager.stop("intro");
com.king.util.SoundManager.stop("game_loop");
com.king.util.SoundManager.stop("level_cleared");
mcInfoScreens._visible = false;
level++;
levelString = level;
mcGame.mcBackGround.gotoAndStop(level);
gameState = STATE_PLAY_GAME;
mcGame.startRound(level, random, currentTick);
}
function updateScore() {
lastRoundScore = mcGame.roundScore;
score = score + mcGame.roundScore;
}
function endRound(nop) {
noOfPassed = nop;
switch (level) {
case 1 :
if (noOfPassed >= 6) {
com.king.util.SoundManager.play("level_cleared", 50, false);
txtCleared = _global.textMappings.level_passed;
txtInTheRunning = _global.textMappings.still_in_running;
nextLevel();
} else {
com.king.util.SoundManager.play("game_failed", 50, false);
txtCleared = _global.textMappings.game_over;
txtInTheRunning = _global.textMappings.not_still_in_running;
endGame(1);
}
break;
case 2 :
if (noOfPassed >= 7) {
com.king.util.SoundManager.play("level_cleared", 50, false);
txtCleared = _global.textMappings.level_passed;
txtInTheRunning = _global.textMappings.still_in_running;
nextLevel(1);
} else {
com.king.util.SoundManager.play("game_failed", 50, false);
txtCleared = _global.textMappings.game_over;
txtInTheRunning = _global.textMappings.not_still_in_running;
endGame(1);
}
break;
case 3 :
if (noOfPassed >= 8) {
com.king.util.SoundManager.play("game_cleared", 50, false);
txtCleared = _global.textMappings.level_passed;
txtInTheRunning = _global.textMappings.you_are_top_model;
endGame(1);
} else {
com.king.util.SoundManager.play("game_failed", 50, false);
txtCleared = _global.textMappings.game_over;
txtInTheRunning = "";
endGame(1);
}
}
}
function openPlayerEnd() {
mcOpenPlayerEnd._visible = true;
ticksLeft = 5 * TICKS_PER_SEC;
gameState = STATE_OPEN_PLAYER_GAME_OVER;
}
function extractModelData(modelArr) {
mcSummary.setUp(modelArr);
}
function gamePreQuit() {
gameState = STATE_NOT_RUNNING;
communicator.gameLastTick(currentTick);
communicator.gameEnd(score);
com.king.util.Delay.oneShot(this, gameQuit, 1500);
}
function gameQuit() {
communicator.gameQuit();
}
function exitGamePressed() {
if ((gameState != STATE_END_GAME) && (gameState != STATE_NOT_RUNNING)) {
txtCleared = _global.textMappings.game_over;
gameState = STATE_NOT_RUNNING;
communicator.gameLastTick(currentTick);
updateScore();
endGame(2);
}
}
function startAnim() {
mcInfoScreens._visible = false;
saTicksLeft = 50;
mcStartAnim._visible = true;
gameState = STATE_START_ANIM;
}
static var STATE_WAIT_FOR_GAMEDATA = 0;
static var STATE_SHOW_INFO_SCREEN = 1;
static var STATE_PLAY_GAME = 2;
static var STATE_BETWEEN_ROUNDS = 3;
static var STATE_END_GAME = 4;
static var STATE_GAME_OVER = 5;
static var STATE_OPEN_PLAYER_GAME_OVER = 6;
static var STATE_NOT_RUNNING = 7;
static var STATE_START_ANIM = 8;
static var TICKS_PER_SEC = 25;
var soundOn = true;
var score = 0;
var level = 0;
static var DEBUG_MODE = false;
static var DEBUG_GAME_DATA = "<gamedata randomseed=\"320\" timelimit=\"660\" lang=\"de\"><text id=\"game_starts_in\">The game starts in [0] seconds!</text><text id=\"game_next_screen\">Next info screen in [0] seconds!</text><text id=\"game_ends\">Game ends in [0] seconds!</text><text id=\"score\">Score</text><text id=\"level_passed\">Level Cleared</text><text id=\"game_over\">Game Over</text><text id=\"still_in_running\">gratsizzle my nizzle.. You are still in the running towards becoming the next pimpadizzle</text><text id=\"not_still_in_running\">Why must you fail at every attempt at masonry!?!?</text><text id=\"bonus_text\">Bonus</text><text id=\"total_score\">Total Score</text><text id=\"intro_header\">Instructions</text><text id=\"intro_text_1\">information for info sign 1</text><text id=\"intro_text_2\">information for info sign 2</text><text id=\"intro_text_3\">information for info sign 3</text><text id=\"intro_text_4\">information for info sign 4</text><text id=\"intro_text_5\">information for info sign 5</text><text id=\"open_user_end\">You gotto reg to play more ya' cheap bastard!</text><text id=\"open_user_end_header\">Go register mofo!</text><text id=\"sound_on\">Sound On-</text><text id=\"sound_off\">Sound Off</text><text id=\"exit_game\">Exit Game</text><text id=\"level\">Level</text><text id=\"you_are_top_model\">You are the next pimpadizzle! w00t!</text><userType id=\"0\">1</userType></gamedata>";
}
Symbol 547 MovieClip [__Packages.com.king.timing.Timer] Frame 0
class com.king.timing.Timer
{
var timeable;
function Timer (timeable, gameTicksPerSecond) {
millisPerGameTick = 1000 / gameTicksPerSecond;
this.timeable = timeable;
maxTickTime = 500;
}
function getMillisPerTick() {
return(millisPerGameTick);
}
function setMaxTickTime(millis) {
maxTickTime = millis;
}
function advanceTime2() {
var _local3 = getTimer();
if (startTime < 0) {
startTime = _local3;
unprocessedTime = millisPerGameTick;
}
time = _local3 - startTime;
var _local5 = time - lastTime;
lastTime = time;
unprocessedTime = unprocessedTime + _local5;
if (unprocessedTime >= millisPerGameTick) {
var _local2 = maxTickTime + _local3;
do {
timeable.tick(tick);
tick++;
unprocessedTime = unprocessedTime - millisPerGameTick;
} while ((unprocessedTime >= millisPerGameTick) && (getTimer() < _local2));
}
var _local4 = (unprocessedTime % millisPerGameTick) / millisPerGameTick;
com.king.timing.IFloat.setAlpha(_local4);
timeable.render(tick, _local4);
}
function advanceTime() {
time = getTimer();
var _local3 = time - lastTime;
lastTime = time;
unprocessedTime = unprocessedTime + _local3;
var _local2 = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = unprocessedTime - millisPerGameTick;
timeable.tick(tick);
tick++;
_local2++;
if (_local2 >= 10) {
unprocessedTime = 0;
}
}
var _local4 = unprocessedTime / millisPerGameTick;
timeable.render(tick, _local4);
}
var time = 0;
var startTime = -1;
var lastTime = 0;
var unprocessedTime = 0;
var tick = 0;
var millisPerGameTick = 0;
var maxTickTime = -1;
}
Symbol 548 MovieClip [__Packages.com.king.timing.IFloat] Frame 0
class com.king.timing.IFloat
{
static var alpha;
var ivalue, lastValue;
function IFloat (initial) {
ivalue = initial;
lastValue = initial;
alpha = 0;
}
function setTo(initial) {
ivalue = initial;
lastValue = initial;
}
function set(newValue) {
lastValue = ivalue;
ivalue = newValue;
}
function get(lalpha) {
return(lastValue + ((ivalue - lastValue) * lalpha));
}
static function setAlpha(na) {
alpha = na;
}
function get value() {
return(lastValue + ((ivalue - lastValue) * alpha));
}
function set value(v) {
ivalue = v;
lastValue = v;
//return(value);
}
}
Symbol 549 MovieClip [__Packages.com.king.util.TimeVerifier] Frame 0
class com.king.util.TimeVerifier
{
static var startClientTime, startGetTimer;
function TimeVerifier () {
}
static function checkTime() {
var _local2 = _root.clientTime;
if (_local2 == undefined) {
_local2 = 0;
}
var _local3 = getTimer();
if (!hasStarted) {
startClientTime = _local2;
startGetTimer = _local3;
hasStarted = true;
}
var _local4 = Math.abs(_local2 - startClientTime) - (_local3 - startGetTimer);
if ((_root.clientTime != undefined) && (_local4 > 7500)) {
if (!hasWarned) {
fscommand ("playData", ("684," + int(_local4)) + "=0");
hasWarned = true;
}
}
}
static var hasStarted = false;
static var hasWarned = false;
}
Symbol 550 MovieClip [__Packages.com.king.util.Random] Frame 0
class com.king.util.Random
{
var mta, mti, lastSeed;
function Random (aSeed) {
mta = new Array(N);
mti = N + 1;
if (aSeed != undefined) {
init_genrand(aSeed);
}
}
function set seed(s) {
init_genrand(s);
//return(seed);
}
function get seed() {
return(lastSeed);
}
function nextInt(n) {
return((genrand_int32() & 2147483647) % n);
}
function nextFloat() {
return(next(24) / 16777216);
}
function next(bits) {
if (bits < 32) {
return(genrand_int32() & ((1 << bits) - 1));
}
return(genrand_int32());
}
function init_genrand(s) {
s = int(s);
var _local5 = getTimer();
lastSeed = s;
mta[0] = s;
var _local2 = s;
var _local3 = new com.king.util.Integer64();
mti = 1;
while (mti < N) {
_local3.init32((_local2 >>> 30) ^ _local2);
_local3.mulu32(1812433253);
_local2 = (mta[mti] = int(_local3.lsb + mti));
mti++;
}
var _local6 = getTimer();
}
function genrand_int32() {
var _local3 = 0;
if (mti >= N) {
if (mti == (N + 1)) {
init_genrand(5489);
}
var _local4 = getTimer();
var _local2 = 0;
_local2 = 0;
while (_local2 < (N - M)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + M] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
while (_local2 < (N - 1)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + (M - N)] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
_local3 = (mta[N - 1] & UPPER_MASK) | (mta[0] & LOWER_MASK);
mta[N - 1] = (mta[M - 1] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
mti = 0;
var _local5 = getTimer();
}
_local3 = mta[mti++];
_local3 = _local3 ^ (_local3 >>> 11);
_local3 = _local3 ^ ((_local3 << 7) & 2636928640);
_local3 = _local3 ^ ((_local3 << 15) & 4022730752);
_local3 = _local3 ^ (_local3 >>> 18);
return(_local3);
}
static var N = 624;
static var M = 397;
static var MATRIX_A = 2567483615;
static var UPPER_MASK = 2147483648;
static var LOWER_MASK = 2147483647;
static var mag01 = [0, 2567483615];
}
Symbol 551 MovieClip [__Packages.com.king.util.Integer64] Frame 0
class com.king.util.Integer64
{
var r, p, s;
function Integer64 (lowInt) {
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (lowInt != undefined) {
merge(lowInt);
}
}
function init(v) {
var _local2 = 0;
while (_local2 < p.length) {
p[_local2] = v.p[_local2];
_local2++;
}
}
function init32(n) {
p[0] = n & 32767;
n = n >>> 15;
p[1] = n & 32767;
n = n >>> 15;
p[2] = n & 3;
p[3] = 0;
p[4] = 0;
}
function get lsb() {
return((p[0] | (p[1] << SH)) | ((p[2] & 3) << 30));
}
function get msb() {
return((((p[2] >> 2) | ((p[3] << SH) >> 2)) | ((p[4] << (SH * 2)) >> 2)) & 2147483647);
}
function binaryShiftLeft(step) {
var _local2 = 0;
while (_local2 < step) {
shl();
_local2++;
}
}
function binaryShiftRight(step) {
var _local4 = (step / SH) >> 0;
var _local5 = step - (_local4 * SH);
var _local2 = p.length - 1;
while (_local2 > 0) {
var _local3 = 0;
while (_local3 < _local4) {
p[_local3] = p[_local3 + 1];
_local3++;
}
p[_local2--] = 0;
}
if (_local5 > 0) {
var _local3 = 0;
while (_local3 < _local5) {
shr();
_local3++;
}
}
}
function binaryNot(o) {
p[0] = p[0] ^ o.p[0];
p[1] = p[1] ^ o.p[1];
p[2] = p[2] ^ o.p[2];
p[3] = p[3] ^ o.p[3];
p[4] = p[4] ^ o.p[4];
}
function add64(o) {
var _local4 = 0;
var _local3 = 1;
var _local2 = 0;
while ((_local3 < p.length) && (o.p[_local2] != 0)) {
_local3++;
}
_local2 = 0;
while (_local2 < _local3) {
_local4 = _local4 + (p[_local2] + o.p[_local2]);
p[_local2] = _local4 & MASK;
_local4 = _local4 >> SH;
_local2++;
}
}
function add32(num) {
var _local2 = 0;
var _local5 = num & MASK;
num = num >> SH;
var _local6 = num & MASK;
num = num >> SH;
var _local4 = num & 3;
_local2 = _local2 + (p[0] + _local5);
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[1] + _local6);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[2] + _local4);
p[2] = _local2 & MASK;
}
function mulu32(num) {
var _local3 = 0;
s[0] = num & MASK;
num = num >>> 15;
s[1] = num & MASK;
num = num >>> 15;
s[2] = num & 3;
var _local2 = 0;
while (_local2 < 3) {
var _local4 = s[_local2];
_local3 = _local4 * p[0];
r[_local2][0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[1]);
r[_local2][1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[2]);
r[_local2][2] = _local3 & 3;
_local2++;
}
_local3 = r[0][0];
p[0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (r[0][1] + r[1][0]);
p[1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local3 & 3;
p[3] = 0;
p[4] = 0;
}
function mul64(o) {
var _local2 = 0;
var _local3 = 0;
while (_local3 < 5) {
var _local4 = o.p[_local3];
_local2 = _local4 * p[0];
r[_local3][0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[1]);
r[_local3][1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[2]);
r[_local3][2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[3]);
r[_local3][3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[4]);
r[_local3][4] = _local2 & MASK;
_local3++;
}
_local2 = r[0][0];
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (r[0][1] + r[1][0]);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]);
p[3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]);
p[4] = _local2 & 7;
}
function mul32(value) {
mul64(new com.king.util.Integer64(value));
}
function merge(a) {
var _local2 = 0;
while (_local2 < 3) {
p[_local2] = p[_local2] + (a & 32767);
a = a >>> 15;
_local2++;
}
return(a);
}
function shl() {
var _local5 = 0;
var _local4 = 0;
var _local2 = 0;
var _local3 = p.length;
while (_local2 < _local3) {
_local5 = (p[_local2] & 16384) >> 14;
p[_local2] = p[_local2] << 1;
p[_local2] = (p[_local2] | _local4) & 32767;
_local2++;
_local4 = _local5;
}
}
function shr() {
var _local4 = 0;
var _local3 = 0;
var _local2 = p.length - 1;
while (_local2 >= 0) {
_local4 = (p[_local2] & 1) << 14;
p[_local2] = p[_local2] >> 1;
p[_local2] = (p[_local2] | _local3) & 32767;
_local2--;
_local3 = _local4;
}
}
static var MASK = 32767;
static var SH = 15;
}
Symbol 552 MovieClip [__Packages.com.king.TopModel.PuffAnim] Frame 0
class com.king.TopModel.PuffAnim extends MovieClip
{
var goto, gotoAndStop, animDone, _x, _y, removeMovieClip;
function PuffAnim () {
super();
}
function tick(tick, tps) {
goto = goto + 6;
(gotoAndStop(goto));// not popped
if (goto >= 100) {
animDone = true;
}
}
function render(tick, alpha) {
}
function init(x, y) {
animDone = false;
goto = 0;
_x = x - 15;
_y = y - 15;
}
function deleteMe() {
removeMovieClip();
}
}