Symbol 24 MovieClip Frame 1
play();
Symbol 24 MovieClip Frame 30
stop();
Symbol 26 MovieClip Frame 1
play();
Symbol 26 MovieClip Frame 30
stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 10
stop();
Symbol 29 MovieClip Frame 20
stop();
Symbol 29 MovieClip Frame 30
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 43 MovieClip Frame 3
stop();
Symbol 43 MovieClip Frame 4
stop();
Symbol 43 MovieClip Frame 5
stop();
Symbol 43 MovieClip Frame 6
stop();
Symbol 43 MovieClip Frame 7
stop();
Symbol 43 MovieClip Frame 8
stop();
Symbol 43 MovieClip Frame 9
stop();
Symbol 43 MovieClip Frame 10
stop();
Symbol 43 MovieClip Frame 11
stop();
Symbol 43 MovieClip Frame 12
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 10
stop();
Symbol 49 MovieClip Frame 1
play();
Symbol 49 MovieClip Frame 30
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 10
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 3
stop();
Symbol 99 MovieClip Frame 4
stop();
Symbol 99 MovieClip Frame 5
stop();
Symbol 99 MovieClip Frame 6
stop();
Symbol 99 MovieClip Frame 7
stop();
Symbol 99 MovieClip Frame 8
stop();
Symbol 99 MovieClip Frame 9
stop();
Symbol 99 MovieClip Frame 10
stop();
Symbol 99 MovieClip Frame 11
stop();
Symbol 99 MovieClip Frame 12
stop();
Symbol 99 MovieClip Frame 13
stop();
Symbol 99 MovieClip Frame 14
stop();
Symbol 99 MovieClip Frame 15
stop();
Symbol 99 MovieClip Frame 16
stop();
Symbol 99 MovieClip Frame 17
stop();
Symbol 99 MovieClip Frame 18
stop();
Symbol 99 MovieClip Frame 19
stop();
Symbol 99 MovieClip Frame 20
stop();
Symbol 99 MovieClip Frame 21
stop();
Symbol 99 MovieClip Frame 22
stop();
Symbol 99 MovieClip Frame 23
stop();
Symbol 99 MovieClip Frame 24
stop();
Symbol 99 MovieClip Frame 25
stop();
Symbol 99 MovieClip Frame 26
stop();
Symbol 99 MovieClip Frame 27
stop();
Symbol 99 MovieClip Frame 28
stop();
Symbol 99 MovieClip Frame 29
stop();
Symbol 99 MovieClip Frame 30
stop();
Symbol 99 MovieClip Frame 31
stop();
Symbol 99 MovieClip Frame 32
stop();
Symbol 99 MovieClip Frame 33
stop();
Symbol 99 MovieClip Frame 34
stop();
Symbol 99 MovieClip Frame 35
stop();
Symbol 99 MovieClip Frame 36
stop();
Symbol 99 MovieClip Frame 37
stop();
Symbol 99 MovieClip Frame 38
stop();
Symbol 99 MovieClip Frame 39
stop();
Symbol 99 MovieClip Frame 40
stop();
Symbol 99 MovieClip Frame 41
stop();
Symbol 99 MovieClip Frame 42
stop();
Symbol 99 MovieClip Frame 43
stop();
Symbol 99 MovieClip Frame 44
stop();
Symbol 99 MovieClip Frame 45
stop();
Symbol 99 MovieClip Frame 46
stop();
Symbol 99 MovieClip Frame 47
stop();
Symbol 99 MovieClip Frame 48
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
stop();
Symbol 113 MovieClip Frame 3
stop();
Symbol 113 MovieClip Frame 4
stop();
Symbol 113 MovieClip Frame 5
stop();
Symbol 113 MovieClip Frame 6
stop();
Symbol 113 MovieClip Frame 7
stop();
Symbol 113 MovieClip Frame 8
stop();
Symbol 113 MovieClip Frame 9
stop();
Symbol 113 MovieClip Frame 10
stop();
Symbol 113 MovieClip Frame 11
stop();
Symbol 113 MovieClip Frame 12
stop();
Symbol 113 MovieClip Frame 13
stop();
Symbol 113 MovieClip Frame 14
stop();
Symbol 113 MovieClip Frame 15
stop();
Symbol 113 MovieClip Frame 16
stop();
Symbol 113 MovieClip Frame 17
stop();
Symbol 113 MovieClip Frame 18
stop();
Symbol 113 MovieClip Frame 19
stop();
Symbol 113 MovieClip Frame 20
stop();
Symbol 113 MovieClip Frame 21
stop();
Symbol 113 MovieClip Frame 22
stop();
Symbol 113 MovieClip Frame 23
stop();
Symbol 113 MovieClip Frame 24
stop();
Symbol 113 MovieClip Frame 25
stop();
Symbol 113 MovieClip Frame 26
stop();
Symbol 113 MovieClip Frame 27
stop();
Symbol 113 MovieClip Frame 28
stop();
Symbol 113 MovieClip Frame 29
stop();
Symbol 113 MovieClip Frame 30
stop();
Symbol 113 MovieClip Frame 31
stop();
Symbol 113 MovieClip Frame 32
stop();
Symbol 113 MovieClip Frame 33
stop();
Symbol 113 MovieClip Frame 34
stop();
Symbol 113 MovieClip Frame 35
stop();
Symbol 113 MovieClip Frame 36
stop();
Symbol 113 MovieClip Frame 37
stop();
Symbol 113 MovieClip Frame 38
stop();
Symbol 113 MovieClip Frame 39
stop();
Symbol 113 MovieClip Frame 40
stop();
Symbol 113 MovieClip Frame 41
stop();
Symbol 113 MovieClip Frame 42
stop();
Symbol 113 MovieClip Frame 43
stop();
Symbol 113 MovieClip Frame 44
stop();
Symbol 113 MovieClip Frame 45
stop();
Symbol 113 MovieClip Frame 46
stop();
Symbol 113 MovieClip Frame 47
stop();
Symbol 113 MovieClip Frame 48
stop();
Symbol 115 MovieClip [Toon] Frame 1
#initclip 24
Object.registerClass("Toon", com.king.starinc.Toon);
#endinitclip
stop();
Symbol 115 MovieClip [Toon] Frame 10
play();
Symbol 115 MovieClip [Toon] Frame 55
stop();
Symbol 115 MovieClip [Toon] Frame 65
play();
Symbol 115 MovieClip [Toon] Frame 75
stop();
Symbol 115 MovieClip [Toon] Frame 81
play();
Symbol 115 MovieClip [Toon] Frame 92
stop();
Symbol 115 MovieClip [Toon] Frame 100
play();
Symbol 115 MovieClip [Toon] Frame 147
stop();
Symbol 135 MovieClip Frame 1
Symbol 135 MovieClip Frame 10
play();
Symbol 135 MovieClip Frame 55
Symbol 135 MovieClip Frame 60
play();
Symbol 135 MovieClip Frame 85
mcPodium.gotoAndStop("b");
Symbol 135 MovieClip Frame 185
mcPodium.gotoAndStop("a");
Symbol 135 MovieClip Frame 189
play();
mcSellAnim2.gotoAndStop(10);
mcSellAnim2.txtProfLoss.text = "118";
Symbol 135 MovieClip Frame 236
stop();
_parent.gotoAndStop("bubbles");
Symbol 195 MovieClip [InfoScreen] Frame 1
#initclip 21
Object.registerClass("InfoScreen", com.king.starinc.InfoScreen);
#endinitclip
stop();
Instance of Symbol 135 MovieClip in Symbol 195 MovieClip [InfoScreen] Frame 1
onClipEvent (enterFrame) {
mcPodium.txtValue.text = Number(mcPodium.txtValue.text) + 1;
}
Symbol 195 MovieClip [InfoScreen] Frame 10
stop();
Symbol 195 MovieClip [InfoScreen] Frame 20
stop();
Symbol 195 MovieClip [InfoScreen] Frame 39
stop();
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 9
play();
Symbol 201 MovieClip Frame 30
gotoAndPlay ("blink");
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 7
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 10
play();
Symbol 229 MovieClip Frame 29
stop();
Symbol 229 MovieClip Frame 35
play();
Symbol 229 MovieClip Frame 66
stop();
Symbol 229 MovieClip Frame 91
play();
Symbol 229 MovieClip Frame 110
stop();
Symbol 229 MovieClip Frame 116
play();
Symbol 229 MovieClip Frame 147
stop();
Symbol 229 MovieClip Frame 173
play();
Symbol 229 MovieClip Frame 192
stop();
Symbol 229 MovieClip Frame 198
play();
Symbol 229 MovieClip Frame 229
stop();
Symbol 229 MovieClip Frame 254
play();
Symbol 229 MovieClip Frame 272
stop();
Symbol 229 MovieClip Frame 278
play();
Symbol 229 MovieClip Frame 286
play();
Symbol 229 MovieClip Frame 329
gotoAndPlay ("blink");
Symbol 236 MovieClip [Game] Frame 1
#initclip 22
Object.registerClass("Game", com.king.starinc.Game);
#endinitclip
stop();
Symbol 236 MovieClip [Game] Frame 10
play();
Symbol 236 MovieClip [Game] Frame 30
stop();
trace("level2");
Symbol 236 MovieClip [Game] Frame 40
play();
Symbol 236 MovieClip [Game] Frame 60
stop();
Symbol 236 MovieClip [Game] Frame 90
stop();
Symbol 239 MovieClip Frame 1
play();
Symbol 239 MovieClip Frame 75
_parent.play();
stop();
Symbol 240 MovieClip Frame 1
play();
Symbol 240 MovieClip Frame 5
stop();
Symbol 240 MovieClip Frame 15
stop();
Symbol 240 MovieClip Frame 25
stop();
Symbol 240 MovieClip Frame 35
stop();
Symbol 240 MovieClip Frame 45
stop();
Symbol 240 MovieClip Frame 54
gotoAndPlay (1);
Symbol 241 MovieClip [StarAgent] Frame 1
#initclip 23
Object.registerClass("StarAgent", com.king.starinc.StarInc);
#endinitclip
Symbol 242 MovieClip [__Packages.com.king.starinc.InfoScreen] Frame 0
class com.king.starinc.InfoScreen extends MovieClip
{
var _y, _x, _visible, txtGameOverCounter, txtIntroCounter, gotoAndStop, txtRoundScore, txtBonus, txtScore, txtTotalCashVal, _parent;
function InfoScreen () {
super();
_y = 240;
_x = 277;
_visible = false;
}
function fadeIn(level, time, timeBonus, score, roundScore, nextStartCash) {
_visible = true;
txtGameOverCounter._visible = true;
txtIntroCounter._visible = true;
if (time > 0) {
com.king.starinc.SoundManager.play("level_cleared");
}
trace(time);
switch (level) {
case 0 :
com.king.starinc.SoundManager.play("theme");
_x = 277;
(gotoAndStop("start"));// not popped
break;
case 1 :
_x = 377;
(gotoAndStop("level1"));// not popped
if (time < 0) {
gameOver(level);
}
break;
case 2 :
_x = 377;
(gotoAndStop("level2"));// not popped
if (time < 0) {
gameOver(level);
}
break;
case 3 :
_x = 377;
if (score >= 20000) {
(gotoAndStop("level3"));// not popped
} else {
trace("buggen h\u00E4r " + level);
gameOver(level);
}
break;
case 4 :
_x = 377;
(gotoAndStop("cleared4"));// not popped
if (time >= 0) {
break;
}
gameOver(level);
}
txtRoundScore.text = roundScore;
txtBonus.text = timeBonus + " K";
txtScore.text = score;
txtTotalCashVal.text = (nextStartCash + timeBonus) + " K";
var _local5 = new mx.transitions.Tween(this, "_y", mx.transitions.easing.Elastic.easeInOut, -200, 200, 1.5, true);
}
function fadeOut(level) {
if (level == 0) {
_x = 277;
} else {
_x = 377;
}
var _local3 = new mx.transitions.Tween(this, "_y", mx.transitions.easing.Elastic.easeInOut, 200, -200, 1.5, true);
_local3.onMotionFinished = function () {
_root.mcStarAgent.startAuth = true;
};
}
function gameOver(level) {
com.king.starinc.SoundManager.play("level_failed");
switch (level) {
case 1 :
(gotoAndStop("gameOver1"));// not popped
break;
case 2 :
(gotoAndStop("gameOver2"));// not popped
break;
case 3 :
(gotoAndStop("gameOver3"));// not popped
break;
case 4 :
(gotoAndStop("gameOver4"));// not popped
}
}
function onPress() {
com.king.starinc.SoundManager.stop("theme");
com.king.starinc.SoundManager.stop("level_cleared");
com.king.starinc.SoundManager.stop("level_failed");
_parent.timeLeft = 0;
txtGameOverCounter._visible = false;
txtIntroCounter._visible = false;
}
}
Symbol 243 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 244 MovieClip [__Packages.com.king.util.Iterator] Frame 0
interface com.king.util.Iterator
{
}
Symbol 245 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 246 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 247 MovieClip [__Packages.com.king.starinc.SoundManager] Frame 0
class com.king.starinc.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.starinc.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.starinc.SoundManager.sounds.get(resource);
_local1.playStatus = false;
com.king.starinc.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 248 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 249 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 250 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 251 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 252 MovieClip [__Packages.com.king.starinc.Game] Frame 0
class com.king.starinc.Game extends MovieClip
{
var toonCounter, timeBonus, score, gameState, now, startTimer, introTimeLeft, lastTime, timeLeft, birthTimer, toonUpdateTimer, roundTime, mcTimeBar, timeBarBlink, random, birthChance, minToonNum, noOfToon, maxToonNum, birthTimerStartValue, bubbleChance, minTime, maxTime, timeFactor, level, startCash, nextStartCash, mcStage, prizeCost, cash, txtPrizeCost, txtCash, roundScore, _parent, timeBonusFactor, attachMovie, getNextHighestDepth, noOfOwned, toonAppCounter, noOfApp, prizeBought;
function Game () {
super();
toonCounter = 0;
timeBonus = 0;
score = 0;
}
function onEnterFrame() {
switch (gameState) {
case STATE_NOT_RUNNING :
break;
case STATE_INTRO :
now = getTimer() - startTimer;
introTimeLeft = introTimeLeft - ((now - lastTime) / 1000);
lastTime = now;
if (introTimeLeft < 0) {
startRound();
}
break;
case STATE_RUNNING :
now = getTimer() - startTimer;
timeLeft = timeLeft - ((now - lastTime) / 1000);
birthTimer = birthTimer - (now - lastTime);
toonUpdateTimer = toonUpdateTimer - (now - lastTime);
lastTime = now;
mcTimeBar._yscale = (timeLeft / roundTime) * 100;
if ((timeLeft < 10) && (timeBarBlink == false)) {
mcTimeBar.gotoAndPlay("blink");
timeBarBlink = true;
com.king.starinc.SoundManager.play("times running out", 25, true);
}
if (timeLeft < 0) {
endRound();
}
if (birthTimer < 0) {
var _local5 = random.nextInt(100);
if ((_local5 < birthChance) || (noOfToon < minToonNum)) {
if (noOfToon < maxToonNum) {
addToon();
}
}
birthTimer = birthTimerStartValue;
}
if (toonUpdateTimer >= 0) {
break;
}
var _local2 = 0;
while (_local2 < toonArr.length) {
if (toonArr[_local2].active == true) {
if (((random.nextInt(100) < bubbleChance) && (toonArr[_local2].bubble == false)) && ((roundTime - timeLeft) > 30)) {
toonArr[_local2].bubbleUp(random.nextInt(100), random.nextInt(6) + 1);
}
if ((toonArr[_local2].bubble == true) && (toonArr[_local2].direction == -1)) {
toonArr[_local2].max = toonArr[_local2].val;
}
if (toonArr[_local2].timeLeft > 0) {
var _local3 = toonArr[_local2].origVal * toonArr[_local2].factor;
var _local4 = 1 - (toonArr[_local2].timeLeft / toonArr[_local2].startTime);
toonArr[_local2].val = Math.round(toonArr[_local2].origVal + ((_local3 * _local4) * toonArr[_local2].direction));
if (toonArr[_local2].val > toonArr[_local2].max) {
toonArr[_local2].val = toonArr[_local2].max;
toonArr[_local2].direction = -1;
toonArr[_local2].timeLeft = 0;
}
if (toonArr[_local2].val < toonArr[_local2].min) {
toonArr[_local2].val = toonArr[_local2].min;
toonArr[_local2].direction = 1;
toonArr[_local2].timeLeft = 0;
}
toonArr[_local2].updateValue();
toonArr[_local2].timeLeft = toonArr[_local2].timeLeft - 250;
} else if (toonArr[_local2].direction == 1) {
toonArr[_local2].startTime = random.nextInt((maxTime - minTime) + minTime) * 1000;
toonArr[_local2].timeLeft = toonArr[_local2].startTime;
toonArr[_local2].origVal = toonArr[_local2].val;
} else {
toonArr[_local2].startTime = (random.nextInt((maxTime - minTime) + minTime) * 1000) * timeFactor;
toonArr[_local2].timeLeft = toonArr[_local2].startTime;
toonArr[_local2].origVal = toonArr[_local2].val;
}
if (toonArr[_local2].owned == false) {
toonArr[_local2].timer = toonArr[_local2].timer - 250;
if (toonArr[_local2].timer < 0) {
removeToon(toonArr[_local2]);
}
}
}
_local2++;
}
toonUpdateTimer = 250;
}
}
function startRoundIntro(lvl) {
level = lvl;
introTimeLeft = 2;
startTimer = getTimer();
lastTime = 0;
switch (level) {
case 1 :
startCash = 200;
nextStartCash = 350;
mcStage.gotoAndPlay("level1in");
prizeCost = 1000;
cash = startCash;
break;
case 2 :
startCash = 350;
nextStartCash = 500;
mcStage.gotoAndPlay("level2in");
_root.mcStarAgent.mcGame.gotoAndPlay("level2anim");
prizeCost = 5000;
cash = startCash + timeBonus;
break;
case 3 :
startCash = 500;
nextStartCash = 1000;
mcStage.gotoAndPlay("level3in");
_root.mcStarAgent.mcGame.gotoAndPlay("level3anim");
prizeCost = 10000;
cash = startCash + timeBonus;
break;
case 4 :
startCash = 1000;
mcStage.gotoAndPlay("level4in");
_root.mcStarAgent.mcGame.gotoAndPlay("level4anim");
prizeCost = 25000;
cash = startCash + timeBonus;
}
com.king.starinc.SoundManager.play("game_loop2", 20, true);
com.king.starinc.SoundManager.play("object down", 50);
txtPrizeCost = prizeCost + " K";
updateCash();
gameState = STATE_INTRO;
}
function startRound() {
setStartValues();
setLevel();
var _local3 = 0;
while (_local3 < minToonNum) {
addToon();
_local3++;
}
mcStage.mcPrize.onPress = function () {
if (_root.mcStarAgent.mcGame.timeLeft > 0) {
if (_root.mcStarAgent.mcGame.cash >= _root.mcStarAgent.mcGame.prizeCost) {
_root.mcStarAgent.mcGame.endRound();
} else {
com.king.starinc.SoundManager.play("too expensive", 50);
}
}
};
gameState = STATE_RUNNING;
}
function endRound() {
trace("end round");
gameState = STATE_NOT_RUNNING;
clearBoard();
txtCash.text = "";
com.king.starinc.SoundManager.stop("game_loop1");
com.king.starinc.SoundManager.stop("game_loop2");
com.king.starinc.SoundManager.stop("times running out");
if (timeLeft < 0) {
com.king.starinc.SoundManager.play("times up");
trace("game over");
if (cash > prizeCost) {
roundScore = roundScore + prizeCost;
} else {
roundScore = roundScore + cash;
}
score = score + roundScore;
_parent.gameOver(timeLeft, score, roundScore);
} else {
trace("next level");
switch (level) {
case 1 :
mcStage.gotoAndPlay("level1out");
roundScore = roundScore + (10 * Math.round(timeLeft));
timeBonus = timeBonusFactor * Math.round(timeLeft);
roundScore = roundScore + prizeCost;
score = score + roundScore;
_parent.showInfoScreen(Math.round(timeLeft), timeBonus, score, roundScore, nextStartCash);
break;
case 2 :
mcStage.gotoAndPlay("level2out");
roundScore = roundScore + (30 * Math.round(timeLeft));
timeBonus = timeBonusFactor * Math.round(timeLeft);
roundScore = roundScore + prizeCost;
score = score + roundScore;
_parent.showInfoScreen(Math.round(timeLeft), timeBonus, score, roundScore, nextStartCash);
break;
case 3 :
mcStage.gotoAndPlay("level3out");
roundScore = roundScore + (50 * Math.round(timeLeft));
timeBonus = timeBonusFactor * Math.round(timeLeft);
roundScore = roundScore + prizeCost;
score = score + roundScore;
if (score >= 20000) {
_parent.showInfoScreen(Math.round(timeLeft), timeBonus, score, roundScore, nextStartCash);
} else {
_parent.gameOver(0, score, roundScore);
}
break;
case 4 :
mcStage.gotoAndPlay("level4out");
roundScore = roundScore + (50 * Math.round(timeLeft));
roundScore = roundScore + prizeCost;
score = score + roundScore;
_parent.gameOver(Math.round(timeLeft), score, roundScore);
}
}
}
function clearBoard() {
var _local2 = 0;
while (_local2 < toonArr.length) {
if (toonArr[_local2] != "") {
if (toonArr[_local2].owned == true) {
sellToon(toonArr[_local2]);
} else {
removeToon(toonArr[_local2]);
}
}
_local2++;
}
toonArr = [];
}
function setLevel() {
}
function addToon() {
var _local8 = attachMovie("Toon", "toon_" + toonCounter, getNextHighestDepth());
var _local6 = true;
if (noOfOwned == 0) {
var _local2 = 0;
while (_local2 < toonArr.length) {
if (toonArr.val < cash) {
_local6 = false;
}
_local2++;
}
} else {
_local6 = false;
}
if (_local6) {
var _local5 = 0;
var _local2 = 0;
while (_local2 < minIntervallArr.length) {
if (((minIntervallArr[_local2] + maxIntervallArr[_local2]) / 2) < cash) {
_local5++;
}
_local2++;
}
if (_local5 == 0) {
_local5 = minIntervallArr.length;
}
var _local7 = random.nextInt(_local5);
} else {
var _local7 = random.nextInt(minIntervallArr.length - 1);
}
var _local4 = true;
while (_local4 == true) {
var _local3 = random.nextInt(positionArr.length - 1);
_local4 = positionArr[_local3];
}
toonAppCounter++;
if (toonAppCounter > noOfApp) {
toonAppCounter = 1;
}
_local8.init(minIntervallArr[_local7], maxIntervallArr[_local7], _local7, toonArr.length, (yPosArr[_local3] - 240) + 45, (xPosArr[_local3] - 377.5) + 34, _local3, this, toonAppCounter);
toonArr.push(_local8);
noOfToon++;
toonCounter++;
}
function removeToon(theToon) {
theToon.active = false;
positionArr[theToon.pos] = false;
noOfToon--;
theToon.gotoAndPlay("starDown");
theToon.animDown();
toonArr[theToon.num] = "";
}
function buyToon(theToon) {
cash = cash - theToon.val;
theToon.boughtVal = theToon.val;
theToon.owned = true;
noOfOwned++;
theToon.mcPodium.gotoAndStop("b");
updateCash();
}
function sellToon(theToon) {
cash = cash + theToon.val;
theToon.owned = false;
noOfOwned--;
theToon.mcPodium.gotoAndStop("a");
if (theToon.boughtVal > theToon.val) {
theToon.loss(theToon.val - theToon.boughtVal);
com.king.starinc.SoundManager.play("sell loss");
} else if (theToon.boughtVal == theToon.val) {
theToon.loss(theToon.val - theToon.boughtVal);
com.king.starinc.SoundManager.play("sell neutral");
} else {
theToon.profit(theToon.val - theToon.boughtVal);
com.king.starinc.SoundManager.play("sell profit", 150);
}
updateCash();
removeToon(theToon);
}
function clickToon(theToon) {
if (theToon.active == true) {
if (theToon.owned) {
sellToon(theToon);
} else if (cash >= theToon.val) {
buyToon(theToon);
com.king.starinc.SoundManager.play("buy");
} else {
theToon.toExpensive();
com.king.starinc.SoundManager.play("too expensive", 50);
}
}
}
function updateCash() {
txtCash.text = cash + " K";
}
function setStartValues() {
random = _parent.random;
noOfOwned = 0;
noOfToon = 0;
noOfApp = 48;
toonAppCounter = random.nextInt(noOfApp);
switch (level) {
case 1 :
birthChance = 55;
break;
case 2 :
birthChance = 70;
break;
case 3 :
birthChance = 100;
}
birthTimerStartValue = 1000;
birthTimer = birthTimerStartValue;
toonUpdateTimer = 150;
minToonNum = level + 1;
maxToonNum = 15;
bubbleChance = level - 1;
startTimer = getTimer();
roundTime = 120;
timeLeft = roundTime;
lastTime = 0;
mcTimeBar._yscale = 100;
mcTimeBar.gotoAndStop("normal");
timeBarBlink = false;
timeBonusFactor = 5 * level;
roundScore = 0;
prizeBought = false;
minIntervallArr[0] = 40;
maxIntervallArr[0] = 128;
minIntervallArr[1] = 45;
maxIntervallArr[1] = 144;
minIntervallArr[2] = 50;
maxIntervallArr[2] = 160;
minIntervallArr[3] = 100;
maxIntervallArr[3] = 320;
minIntervallArr[4] = 105;
maxIntervallArr[4] = 336;
minIntervallArr[5] = 115;
maxIntervallArr[5] = 368;
minIntervallArr[6] = 122;
maxIntervallArr[6] = 390;
minIntervallArr[7] = 162;
maxIntervallArr[7] = 518;
minIntervallArr[8] = 200;
maxIntervallArr[8] = 640;
minIntervallArr[9] = 240;
maxIntervallArr[9] = 768;
if (level > 1) {
minIntervallArr[10] = 540;
maxIntervallArr[10] = 1320;
minIntervallArr[11] = 675;
maxIntervallArr[11] = 1650;
minIntervallArr[12] = 850;
maxIntervallArr[12] = 2090;
minIntervallArr[13] = 900;
maxIntervallArr[13] = 2200;
minIntervallArr[14] = 990;
maxIntervallArr[14] = 2420;
minIntervallArr[15] = 1080;
maxIntervallArr[15] = 2640;
minIntervallArr[16] = 1170;
maxIntervallArr[16] = 2860;
minIntervallArr[17] = 1350;
maxIntervallArr[17] = 3300;
minIntervallArr[18] = 1575;
maxIntervallArr[18] = 3850;
minIntervallArr[19] = 1800;
maxIntervallArr[19] = 4400;
}
if (level > 2) {
minIntervallArr[20] = 2475;
maxIntervallArr[20] = 6050;
minIntervallArr[21] = 2700;
maxIntervallArr[21] = 6600;
minIntervallArr[22] = 2880;
maxIntervallArr[22] = 7040;
minIntervallArr[23] = 2970;
maxIntervallArr[23] = 7260;
minIntervallArr[24] = 3060;
maxIntervallArr[24] = 7480;
minIntervallArr[25] = 3150;
maxIntervallArr[25] = 7700;
minIntervallArr[26] = 3240;
maxIntervallArr[26] = 7920;
minIntervallArr[27] = 3375;
maxIntervallArr[27] = 8250;
minIntervallArr[28] = 3420;
maxIntervallArr[28] = 8360;
minIntervallArr[29] = 3600;
maxIntervallArr[29] = 8800;
}
minTime = 3;
maxTime = 6;
timeFactor = 0.5;
yPosArr[0] = 190;
xPosArr[0] = 680;
positionArr[0] = false;
yPosArr[1] = 262;
xPosArr[1] = 631;
positionArr[1] = false;
yPosArr[2] = 170;
xPosArr[2] = 610;
positionArr[2] = false;
yPosArr[3] = 198;
xPosArr[3] = 550;
positionArr[3] = false;
yPosArr[4] = 296;
xPosArr[4] = 568;
positionArr[4] = false;
yPosArr[5] = 174;
xPosArr[5] = 485;
positionArr[5] = false;
yPosArr[6] = 276;
xPosArr[6] = 496;
positionArr[6] = false;
yPosArr[7] = 310;
xPosArr[7] = 434;
positionArr[7] = false;
yPosArr[8] = 194;
xPosArr[8] = 430;
positionArr[8] = false;
yPosArr[9] = 174;
xPosArr[9] = 350;
positionArr[9] = false;
yPosArr[10] = 266;
xPosArr[10] = 364;
positionArr[10] = false;
yPosArr[11] = 216;
xPosArr[11] = 300;
positionArr[11] = false;
yPosArr[12] = 308;
xPosArr[12] = 308;
positionArr[12] = false;
yPosArr[13] = 270;
xPosArr[13] = 244;
positionArr[13] = false;
yPosArr[14] = 298;
xPosArr[14] = 190;
positionArr[14] = false;
if (level > 1) {
yPosArr[15] = 172;
xPosArr[15] = 232;
positionArr[15] = false;
yPosArr[16] = 204;
xPosArr[16] = 180;
positionArr[16] = false;
yPosArr[17] = 264;
xPosArr[17] = 128;
positionArr[17] = false;
yPosArr[18] = 160;
xPosArr[18] = 110;
positionArr[18] = false;
yPosArr[19] = 224;
xPosArr[19] = 64;
positionArr[19] = false;
}
if (level > 2) {
yPosArr[20] = 128;
xPosArr[20] = 40;
positionArr[20] = false;
yPosArr[21] = 68;
xPosArr[21] = 94;
positionArr[21] = false;
yPosArr[22] = 110;
xPosArr[22] = 162;
positionArr[22] = false;
yPosArr[23] = 80;
xPosArr[23] = 212;
positionArr[23] = false;
yPosArr[24] = 112;
xPosArr[24] = 276;
positionArr[24] = false;
yPosArr[25] = 60;
xPosArr[25] = 556;
positionArr[25] = false;
yPosArr[26] = 90;
xPosArr[26] = 506;
positionArr[6] = false;
yPosArr[27] = 77;
xPosArr[27] = 620;
positionArr[27] = false;
}
}
static var STATE_NOT_RUNNING = 0;
static var STATE_RUNNING = 1;
static var STATE_INTRO = 2;
var toonArr = new Array();
var minIntervallArr = new Array();
var maxIntervallArr = new Array();
var yPosArr = new Array();
var xPosArr = new Array();
var positionArr = new Array();
}
Symbol 253 MovieClip [__Packages.com.king.starinc.StarInc] Frame 0
class com.king.starinc.StarInc extends MovieClip
{
var _y, _x, startAuth, waitForAnim, communicator, gameState, level, gameScore, mcGame, random, txtHeader, txtInfo, txtGood, txtBad, txtStart, txtBubbleInfo, txtCleared, txtScoreTitle, txtCashBonus, txtTotalScore, txtTotalCash, txtNoBonusRound, txtBonusFailed, txtToBonus, txtBonusCleared, txtBonusClearedHeader, txtGameOver, txtExit, txtTooMuch, now, startTimer, timeLeft, lastTime, mcInfoScreen;
function StarInc () {
super();
_y = 0;
_x = 0;
startAuth = false;
waitForAnim = false;
communicator = new com.king.starinc.Communicator();
gameState = STATE_WAIT_FOR_GAMEDATA;
level = 0;
gameScore = 0;
mcGame.mcExitButton.onPress = function () {
trace("MOOOGET!");
trace("ending score " + _root.mcStarAgent.mcGame.score);
_root.mcStarAgent.gameOver(-1, _root.mcStarAgent.mcGame.score, 0);
};
}
function onEnterFrame() {
switch (gameState) {
case STATE_WAIT_FOR_GAMEDATA :
if (DEBUG_MODE) {
_root.gameData = DEBUG_GAME_DATA;
}
if (_root.gameData != undefined) {
communicator.parseGameData(_root.gameData);
random = new com.king.util.Random(communicator.randomSeed);
txtHeader = _global.textMappings.header;
txtInfo = _global.textMappings.info;
txtGood = _global.textMappings.good;
txtBad = _global.textMappings.bad;
txtStart = _global.textMappings.start;
txtBubbleInfo = _global.textMappings.bubble_info;
txtCleared = _global.textMappings.level_cleared;
txtScoreTitle = _global.textMappings.score;
txtCashBonus = _global.textMappings.cash_bonus;
txtTotalScore = _global.textMappings.total_score;
txtTotalCash = _global.textMappings.total_cash;
txtNoBonusRound = _global.textMappings.no_bonus_round;
txtBonusFailed = _global.textMappings.bonus_failed;
txtToBonus = _global.textMappings.to_bonus;
txtBonusCleared = _global.textMappings.bonus_cleared;
txtBonusClearedHeader = _global.textMappings.bonus_cleared_header;
txtGameOver = _global.textMappings.game_over;
txtExit = _global.textMappings.exit;
mcGame.txtTime.text = _global.textMappings.time;
mcGame.txtMoney.text = _global.textMappings.money;
mcGame.mcExitButton.txtExit.text = _global.textMappings.exit;
txtTooMuch = _global.textMappings.too_much;
mcGame.mcSoundButton.onPress = function () {
var _local2 = !com.king.starinc.SoundManager.isSoundEnabled();
com.king.starinc.SoundManager.enableSounds(_local2);
var _local3 = (_local2 ? "on" : "off");
_root.mcStarAgent.mcGame.mcSoundButton.gotoAndPlay(_local3);
};
showInfoScreen(0);
}
break;
case STATE_SHOW_INFO_SCREEN :
now = getTimer() - startTimer;
timeLeft = timeLeft - ((now - lastTime) / 1000);
lastTime = now;
if (timeLeft < 0) {
timeLeft = 0;
}
if (level == 0) {
mcInfoScreen.txtIntroCounter.text = _global.textMappings.game_starts_in.split("{0}").join("" + Math.round(timeLeft));
} else {
mcInfoScreen.txtIntroCounter.text = _global.textMappings.next_level_starts_in.split("{0}").join("" + Math.round(timeLeft));
}
if ((timeLeft <= 0) && (waitForAnim == false)) {
waitForAnim = true;
com.king.starinc.SoundManager.play("level_starts");
mcInfoScreen.fadeOut(level);
}
if (startAuth) {
waitForAnim = false;
startAuth = false;
startGame();
}
break;
case STATE_PLAY_GAME :
break;
case STATE_GAME_OVER :
now = getTimer() - startTimer;
timeLeft = timeLeft - ((now - lastTime) / 1000);
lastTime = now;
if (timeLeft < 0) {
timeLeft = 0;
}
mcInfoScreen.txtGameOverCounter.text = _global.textMappings.game_ends_in.split("{0}").join("" + Math.round(timeLeft));
if (timeLeft > 0) {
break;
}
gamePreQuit();
gameState = STATE_NOT_RUNNIN;
case STATE_NOT_RUNNIN :
}
}
function gamePreQuit() {
trace("gameprequit");
com.king.util.Delay.oneShot(this, gameQuit, 1500);
}
function gameQuit() {
trace("gameQuit");
communicator.gameQuit();
}
function showInfoScreen(time, timeBonus, score, roundScore, nextStartCash) {
startTimer = getTimer();
if (level == 0) {
timeLeft = 15;
} else {
timeLeft = 10;
}
lastTime = 0;
gameState = STATE_SHOW_INFO_SCREEN;
mcInfoScreen.fadeIn(level, time, timeBonus, score, roundScore, nextStartCash);
}
function startGame() {
if (level == 0) {
communicator.gameStarted();
}
level++;
gameState = STATE_PLAY_GAME;
mcGame.startRoundIntro(level);
}
function gameOver(time, score, roundScore) {
trace("gameover function");
startTimer = getTimer();
timeLeft = 10;
lastTime = 0;
gameState = STATE_GAME_OVER;
communicator.gameEnd(score);
mcInfoScreen.fadeIn(level, time, 0, score, roundScore);
}
static var STATE_WAIT_FOR_GAMEDATA = 0;
static var STATE_SHOW_INFO_SCREEN = 1;
static var STATE_PLAY_GAME = 2;
static var STATE_GAME_OVER = 4;
static var STATE_NOT_RUNNIN = 5;
static var DEBUG_MODE = true;
static var DEBUG_GAME_DATA = ((((((((((((("<gamedata randomseed=\"142752034\" timelimit=\"660\"><text id=\"header\">Star INC</text><text id=\"info\">This is how you play Star INC! ... ... ... ... .. .. ... ... .. ... .... ..... </text><text id=\"good\">Good</text><text id=\"bad\">Bad</text><text id=\"start\">Start</text><text id=\"score\">SCORE</text><text id=\"cash_bonus\">CASH BONUS</text><text id=\"total_score\">TOTAL SCORE</text><text id=\"total_cash\">TOTAL CASH</text><text id=\"game_over\">GAME OVER</text><text id=\"level_cleared\">LEVEL CLEARED</text>" + "<text id=\"game_starts_in\">Game starts in {0} seconds</text>") + "<text id=\"game_ends_in\">Game ends in {0} seconds</text>") + "<text id=\"too_much\">Too expensive</text>") + "<text id=\"time\">Time</text>") + "<text id=\"money\">Money</text>") + "<text id=\"exit\">EXIT</text>") + "<text id=\"no_bonus_round\">No soup for you!</text>") + "<text id=\"bonus_failed\">You didnt make it in the bonus round</text>") + "<text id=\"to_bonus\">BONUS LEVEL!</text>") + "<text id=\"bonus_cleared\">You cleared the bonus level! w00t! u wtf pwned the mofo!</text>") + "<text id=\"bonus_cleared_header\">BONUS ROUND CLEARED!</text>") + "<text id=\"next_level_starts_in\">Next level starts in {0} seconds</text>") + "<text id=\"bubble_info\">Info about the bubbles...</text>") + "</gamedata>";
}
Symbol 254 MovieClip [__Packages.com.king.starinc.Communicator] Frame 0
class com.king.starinc.Communicator
{
var levelDatas, randomSeed;
function Communicator () {
levelDatas = new Array();
}
function gameStarted() {
fscommand ("gameStart");
fscommand ("playData", "200=0");
}
function gameQuit() {
if (!hasSentGameOver) {
hasSentGameOver = true;
fscommand ("gameQuit");
}
}
function gameEnd(score) {
if (!hasSentGameEnd) {
hasSentGameEnd = true;
fscommand ("gameEnd", score);
}
}
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();
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++;
}
}
var hasSentGameEnd = false;
var hasSentGameOver = false;
}
Symbol 255 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 256 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 257 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 258 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 259 MovieClip [__Packages.com.king.starinc.Toon] Frame 0
class com.king.starinc.Toon extends MovieClip
{
var min, max, val, origVal, num, pos, owned, gameMC, factor, startTime, timeLeft, direction, active, timer, bubble, _y, _x, gotoAndPlay, mcToon, mcBubble, mcPodium, onEnterFrame, mcSellAnim;
function Toon () {
super();
}
function init(min, max, intervallNum, num, yPos, xPos, posNum, gameMC, app) {
this.min = min;
this.max = max;
val = Math.round((min + max) / 2);
origVal = Math.round((min + max) / 2);
this.num = num;
pos = posNum;
owned = false;
this.gameMC = gameMC;
factor = 0.16;
startTime = 2000;
timeLeft = 2000;
direction = 1;
active = false;
timer = 4000;
bubble = false;
_y = yPos;
_x = xPos;
gameMC.positionArr[posNum] = true;
gotoAndPlay("starUp");
mcToon.gotoAndStop(app);
mcToon.mcHead.gotoAndStop(app);
if (intervallNum < 8.7) {
mcToon.mcHead._xscale = 80;
mcToon.mcHead._yscale = 80;
}
if (intervallNum > 17.4) {
mcToon.mcHead._xscale = 125;
mcToon.mcHead._yscale = 125;
mcBubble._y = mcBubble._y - 15;
mcBubble._x = mcBubble._x - 15;
}
updateValue();
animUp();
}
function onPress() {
gameMC.clickToon(this);
}
function updateValue() {
if (direction == 1) {
mcPodium.mcValue.gotoAndStop("plus");
} else {
mcPodium.mcValue.gotoAndStop("minus");
}
mcPodium.txtValue.text = val + " K";
}
function animUp() {
var start = getTimer();
mcToon._y = 70;
mcPodium._y = 104;
onEnterFrame = function () {
this.mcToon._y = 70 - (70 * ((getTimer() - start) / 750));
this.mcPodium._y = 104 - (70 * ((getTimer() - start) / 750));
if (this.mcToon._y < 0) {
this.onEnterFrame = undefined;
this.active = true;
}
};
}
function animDown() {
var start = getTimer();
onEnterFrame = function () {
this.mcToon._y = 0 + (70 * ((getTimer() - start) / 750));
this.mcPodium._y = 34 + (70 * ((getTimer() - start) / 750));
if ((getTimer() - start) > 1000) {
this.onEnterFrame = undefined;
this.removeMovieClip();
}
};
}
function profit(theVal) {
mcSellAnim.gotoAndStop("profit");
mcSellAnim.txtProfLoss.text = theVal + " K";
mcSellAnim.mcProfitAnim.gotoAndPlay(1);
var _local3 = new mx.transitions.Tween(mcSellAnim, "_y", mx.transitions.easing.None.easeInOut, 29, -71, 1, true);
var _local2 = new mx.transitions.Tween(mcSellAnim, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 1, true);
}
function loss(theVal) {
mcSellAnim.gotoAndStop("loss");
mcSellAnim.txtProfLoss.text = theVal + " K";
mcSellAnim.mcLossAnim.gotoAndPlay(1);
var _local3 = new mx.transitions.Tween(mcSellAnim, "_y", mx.transitions.easing.None.easeInOut, 29, -71, 1, true);
var _local2 = new mx.transitions.Tween(mcSellAnim, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 1, true);
}
function toExpensive() {
mcSellAnim.gotoAndStop("tooMuch");
mcSellAnim._y = 10;
var _local2 = new mx.transitions.Tween(mcSellAnim, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 0.7, true);
}
function bubbleUp(pc, iconNum) {
(gotoAndPlay("bubbleUp"));// not popped
var _local2 = new mx.transitions.Tween(mcBubble, "_yscale", mx.transitions.easing.Elastic.easeOut, 20, 150, 0.6, true);
var _local3 = new mx.transitions.Tween(mcBubble, "_xscale", mx.transitions.easing.Elastic.easeOut, 20, 150, 0.6, true);
bubble = true;
if (pc < 60) {
max = max * 2;
min = 0;
direction = 1;
mcBubble.gotoAndStop(iconNum);
factor = 0.6;
} else {
min = 0;
direction = -1;
mcBubble.gotoAndStop(iconNum + 6);
factor = 0.3;
}
com.king.starinc.SoundManager.play("bubble");
}
}
Symbol 260 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 261 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}