Symbol 191 MovieClip [Letter] Frame 1
#initclip 25
Object.registerClass("Letter", com.king.wordbomb.Letter);
#endinitclip
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 11
stop();
Symbol 194 MovieClip Frame 24
stop();
Symbol 195 MovieClip [EnteredWord] Frame 1
#initclip 22
Object.registerClass("EnteredWord", com.king.wordbomb.EnteredWord);
#endinitclip
Symbol 268 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 366 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 46
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 46
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 46
Symbol 457 MovieClip [Game] Frame 1
#initclip 23
Object.registerClass("Game", com.king.wordbomb.Game);
#endinitclip
Symbol 469 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 50
stop();
Symbol 581 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 1
Symbol 617 MovieClip Frame 46
stop();
Symbol 635 MovieClip [WordBomb] Frame 1
#initclip 24
Object.registerClass("WordBomb", com.king.wordbomb.WordBomb);
#endinitclip
Symbol 636 MovieClip [__Packages.com.king.wordbomb.EnteredWord] Frame 0
class com.king.wordbomb.EnteredWord extends MovieClip
{
var twnArr, twnYArr, twnShadowArr, lettArr, lettShadowArr, lettFlipArr, lettDiveArr, word, wordWidth, _y, _x, attachMovie, getNextHighestDepth, twn, twnShadow, _parent;
function EnteredWord () {
super();
twnArr = new Array();
twnYArr = new Array();
twnShadowArr = new Array();
lettArr = new Array();
lettShadowArr = new Array();
lettFlipArr = new Array();
lettDiveArr = new Array();
}
function init(num, theWord) {
word = theWord;
wordWidth = word.length * 28;
_y = 85 + (num * 29);
var _local2 = 0;
if (num % 2) {
_local2 = -14;
}
_x = (377.5 - ((28 * (theWord.length / 2)) + _local2)) + (wordWidth / 2);
letterAttach();
}
function letterAttach() {
var _local2 = 0;
while (_local2 < word.length) {
var _local3 = attachMovie("LetterShadow", "letterShadow_" + _local2, getNextHighestDepth());
_local3._x = ((28 * _local2) - (wordWidth / 2)) + 2;
_local3._y = -12;
_local3._alpha = 40;
var _local7 = new flash.filters.BlurFilter(8, 8, 2);
var _local5 = _local3.filters;
_local5.push(_local7);
_local3.filters = _local5;
lettShadowArr[_local2] = _local3;
_local3._width = 28;
_local3._height = 28;
var _local4 = attachMovie("BlackLetterShell", "blackLetter_" + _local2, getNextHighestDepth());
_local4._x = (28 * _local2) - (wordWidth / 2);
_local4._y = -14;
_local4._width = 28;
_local4._height = 28;
lettArr[_local2] = _local4;
lettArr[_local2].direction = 2;
var _local6 = "K" + word.charCodeAt(_local2);
_local4.mcBlackLetter.gotoAndStop(_local6);
_local2++;
}
}
function correction(right, score) {
var _local2 = 0;
while (_local2 < word.length) {
var _local3;
if (right == false) {
_local3 = word.length - (_local2 + 1);
} else {
_local3 = _local2;
}
var _local4 = new Object();
var _local6 = new Object();
lettFlipArr[_local2] = _local4;
lettDiveArr[_local2] = _local6;
lettFlipArr[_local2].onMotionFinished = function () {
this.twn.yoyo();
var _local2 = this.obj.direction;
if (this.obj.direction >= 2) {
this.obj.mcBlackLetter.mcBackSide._alpha = 100;
this.obj.direction++;
if (this.obj.direction == 4) {
this.obj.direction = 0;
}
} else {
this.obj.mcBlackLetter.mcBackSide._alpha = 0;
this.obj.direction++;
}
};
lettDiveArr[_local2].onMotionFinished = function () {
var _local2 = new mx.transitions.Tween(this.obj, "_y", mx.transitions.easing.None.easeInOut, this.obj._y, this.obj._y + 150, 0.3, true);
var _local4 = new mx.transitions.Tween(this.obj, "_xscale", mx.transitions.easing.None.easeInOut, this.obj._xscale, 0, 0.2, true);
var _local7 = new mx.transitions.Tween(this.obj, "_yscale", mx.transitions.easing.None.easeInOut, this.obj._yscale, 0, 0.2, true);
var _local6 = new mx.transitions.Tween(this.shadow, "_y", mx.transitions.easing.None.easeInOut, this.shadow._y, this.obj._y + 150, 0.3, true);
var _local3 = new mx.transitions.Tween(this.shadow, "_xscale", mx.transitions.easing.None.easeInOut, this.shadow._xscale, 0, 0.2, true);
var _local5 = new mx.transitions.Tween(this.shadow, "_yscale", mx.transitions.easing.None.easeInOut, this.shadow._yscale, 0, 0.2, true);
if (this.root != undefined) {
this.parent.roundScore = this.score;
this.root.gotoAndPlay(2);
if (right) {
}
}
if (this.home != undefined) {
this.home.stopTween();
}
};
twn = new mx.transitions.Tween(lettArr[_local2].mcBlackLetter, "_width", mx.transitions.easing.None.easeInOut, lettArr[_local2]._width, 4, 0.1, true);
lettShadowArr[_local2]._alpha = 10;
twnShadow = new mx.transitions.Tween(lettShadowArr[_local2], "_width", mx.transitions.easing.None.easeInOut, lettShadowArr[_local2]._width, 4, 0.1, true);
var _local7 = new mx.transitions.Tween(lettArr[_local2], "_rotation", mx.transitions.easing.None.easeInOut, 0, -10, 0.2, true);
if (right) {
var _local14 = new mx.transitions.Tween(lettArr[_local2], "_x", mx.transitions.easing.None.easeInOut, lettArr[_local2]._x, -250 - (lettArr[_local2]._x / 2), 0.4 + (0.3 * _local3), true);
var _local9 = new mx.transitions.Tween(lettShadowArr[_local2], "_x", mx.transitions.easing.Regular.easeIn, lettShadowArr[_local2]._x, -250 - (lettShadowArr[_local2]._x / 2), 0.4 + (0.3 * _local3), true);
} else {
var _local14 = new mx.transitions.Tween(lettArr[_local2], "_x", mx.transitions.easing.None.easeInOut, lettArr[_local2]._x, 230 - (lettArr[_local2]._x / 2), 0.4 + (0.3 * _local3), true);
var _local9 = new mx.transitions.Tween(lettShadowArr[_local2], "_x", mx.transitions.easing.Regular.easeIn, lettShadowArr[_local2]._x, 230 - (lettShadowArr[_local2]._x / 2), 0.4 + (0.3 * _local3), true);
}
var _local5 = new mx.transitions.Tween(lettArr[_local2], "_y", mx.transitions.easing.Strong.easeOut, lettArr[_local2]._y, lettArr[_local2]._y - (_y - 40), 0.4 + (0.2 * _local3), true);
var _local11 = new mx.transitions.Tween(lettArr[_local2], "_xscale", mx.transitions.easing.None.easeInOut, lettArr[_local2]._xscale, lettArr[_local2]._xscale * 1.5, 0.3, true);
var _local16 = new mx.transitions.Tween(lettArr[_local2], "_yscale", mx.transitions.easing.None.easeInOut, lettArr[_local2]._yscale, lettArr[_local2]._yscale * 1.5, 0.3, true);
var _local10 = new mx.transitions.Tween(lettShadowArr[_local2], "_xscale", mx.transitions.easing.None.easeInOut, lettShadowArr[_local2]._xscale, lettShadowArr[_local2]._xscale * 1.5, 0.3, true);
var _local12 = new mx.transitions.Tween(lettShadowArr[_local2], "_yscale", mx.transitions.easing.None.easeInOut, lettShadowArr[_local2]._yscale, lettShadowArr[_local2]._yscale * 1.5, 0.3, true);
lettFlipArr[_local2].obj = lettArr[_local2];
lettFlipArr[_local2].twn = twn;
lettFlipArr[_local2].shadow = twnShadow;
lettDiveArr[_local2].obj = lettArr[_local2];
lettDiveArr[_local2].shadow = lettShadowArr[_local2];
lettDiveArr[_local2].parent = _parent;
lettDiveArr[_local2].score = score;
if (right) {
lettDiveArr[word.length - 1].root = _parent.mcRightPoof;
lettDiveArr[word.length - 1].home = this;
com.king.wordbomb.SoundManager.play("right", 30, false);
} else {
lettDiveArr[0].root = _parent.mcWrongPoof;
lettDiveArr[0].home = this;
com.king.wordbomb.SoundManager.play("wrong", 30, false);
}
twnArr[_local2] = twn;
twnYArr[_local2] = _local5;
twnShadowArr[_local2] = twnShadow;
twnArr[_local2].addListener(lettFlipArr[_local2]);
twnYArr[_local2].addListener(lettDiveArr[_local2]);
twnShadowArr[_local2].onMotionFinished = function () {
this.yoyo();
};
_local2++;
}
}
function stopTween() {
trace("Stopping tween");
var _local2 = 0;
while (_local2 < lettFlipArr.length) {
lettFlipArr[_local2].twn.stop();
lettFlipArr[_local2].shadow.stop();
twnShadowArr[_local2].stop();
twnArr[_local2].onMotionFinished = undefined;
twnYArr[_local2].onMotionFinished = undefined;
twnShadowArr[_local2].onMotionFinished = undefined;
twnArr[_local2].removeListener(lettFlipArr[_local2]);
twnYArr[_local2].removeListener(lettDiveArr[_local2]);
_local2++;
}
}
function tracer() {
trace("Send in the clowns");
}
}
Symbol 637 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 638 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 639 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 640 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 641 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 642 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 643 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 644 MovieClip [__Packages.com.king.util.Iterator] Frame 0
interface com.king.util.Iterator
{
}
Symbol 645 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 646 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 647 MovieClip [__Packages.com.king.wordbomb.SoundManager] Frame 0
class com.king.wordbomb.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.wordbomb.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.wordbomb.SoundManager.sounds.get(resource);
_local1.playStatus = false;
com.king.wordbomb.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 648 MovieClip [__Packages.com.king.wordbomb.Game] Frame 0
class com.king.wordbomb.Game extends MovieClip
{
var gameState, round, communicator, delay, levelScore, roundScore, mcSmoke1, mcSmoke2, mcSmoke3, mcSmoke4, mcSmoke5, mcSmoke6, now, startTimer, timeLeft, lastTime, _parent, levelCleared, levelStartTimer, levelTime, roundStartTimer, attachMovie, getNextHighestDepth, wordLength, mcHappySun, mcAngryMoon, right, txtCounter;
function Game () {
super();
gameState = STATE_NOT_RUNNING;
round = 0;
communicator = new com.king.wordbomb.Communicator();
delay = new com.king.util.Delay();
levelScore = 0;
roundScore = 0;
smokeArr[0] = mcSmoke1;
smokeArr[1] = mcSmoke2;
smokeArr[2] = mcSmoke3;
smokeArr[3] = mcSmoke4;
smokeArr[4] = mcSmoke5;
smokeArr[5] = mcSmoke6;
}
function onEnterFrame() {
switch (gameState) {
case STATE_NOT_RUNNING :
break;
case STATE_RUNNING :
now = getTimer() - startTimer;
timeLeft = timeLeft - (now - lastTime);
lastTime = now;
_parent.mcPalchette.mcNumber.gotoAndStop(Math.ceil(timeLeft / 1000) + 1);
if (timeLeft >= 0) {
break;
}
enterWord();
}
}
function startLevel(levelData) {
levelDataArr = levelData.split("-");
levelScore = 0;
levelCleared = false;
levelStartTimer = getTimer();
communicator.sendLevelStart(levelStartTimer);
levelTime = ((levelDataArr.length * 10) + (levelDataArr.length - 1)) * 1000;
startRound();
}
function startRound() {
com.king.wordbomb.SoundManager.play("puff", 50, false);
timeLeft = 10000;
lastTime = 0;
roundScore = 0;
setKeyListener();
parseLevelData();
setLetters();
startTimer = getTimer();
roundStartTimer = startTimer;
communicator.sendRoundStart(roundStartTimer);
gameState = STATE_RUNNING;
}
function parseLevelData() {
roundDataArr = levelDataArr[round].split(",");
var _local2 = 0;
while (_local2 < roundDataArr.length) {
wordArr[_local2] = "";
_local2++;
}
}
function setLetters() {
var _local2 = 0;
while (_local2 < roundDataArr.length) {
var _local3 = attachMovie("LetterShadow", "letterShadow_" + _local2, getNextHighestDepth());
_local3._y = 280;
_local3._x = 217 + (65 * _local2);
_local3._alpha = 40;
_local3._width = 44;
_local3._height = 44;
var _local6 = new flash.filters.BlurFilter(8, 8, 2);
var _local4 = _local3.filters;
_local4.push(_local6);
_local3.filters = _local4;
letterShadowArr[_local2] = _local3;
var _local5 = attachMovie("Letter", "bonusLetter_" + _local2, getNextHighestDepth());
lettersArr[_local2] = _local5;
_local5.init(_local2, roundDataArr[_local2]);
_local2++;
}
}
function insertLetter(letter, codeNum) {
com.king.wordbomb.SoundManager.play("letterType", 50, false);
var _local6 = "A" + codeNum;
this[_local6].gotoAndPlay(2);
var _local2 = 0;
while (_local2 < lettersArr.length) {
if (wordArr[_local2] == "") {
if (roundDataArr[_local2] != "") {
wordArr[_local2] = roundDataArr[_local2];
_local2 = lettersArr.length;
} else {
wordArr[_local2] = letter;
var _local3 = "K" + String(codeNum);
lettersArr[_local2].gotoAndStop(_local3);
_local2 = lettersArr.length;
}
}
_local2++;
}
}
function deleteLetter() {
var _local2 = lettersArr.length - 1;
while (_local2 >= 0) {
if (wordArr[_local2] != "") {
wordArr[_local2] = "";
if (roundDataArr[_local2] == "") {
lettersArr[_local2].gotoAndStop(1);
}
_local2 = -1;
}
_local2--;
}
}
function enterWord() {
com.king.wordbomb.SoundManager.play("enterWord", 100, false);
gameState = STATE_NOT_RUNNING;
var _local3 = getTimer();
wordTimeBonusArr[round] = Math.ceil((1 - ((_local3 - roundStartTimer) / 10000)) * 300);
var _local4 = 0;
var _local2 = 0;
while (_local2 < roundDataArr.length) {
if (roundDataArr[_local2] != "") {
wordArr[_local2] = roundDataArr[_local2];
}
_local2++;
}
if ((wordArr[wordArr.length - 1] != "") && (wordArr[wordArr.length - 2] != "")) {
wordListArr[round] = buildWord(true);
} else {
wordListArr[round] = buildWord(false);
}
communicator.sendWord(wordListArr[round], _local3);
Key.removeListener(keyListener);
removeLetters();
updateWordList();
com.king.util.Delay.oneShot(this, endRound, 1000);
}
function updateWordList() {
var _local2 = attachMovie("EnteredWord", "enteredWord_" + round, getNextHighestDepth());
enteredWordArr[round] = _local2;
_local2.init(round, wordListArr[round]);
}
function buildWord(filled) {
var _local3 = "";
var _local2 = 0;
while (_local2 < lettersArr.length) {
if (filled) {
_local3 = _local3 + wordArr[_local2];
} else {
_local3 = _local3 + " ";
}
_local2++;
}
return(_local3);
}
function removeLetters() {
var _local2 = 0;
while (_local2 < lettersArr.length) {
lettersArr[_local2].txtLetter.text = "";
var _local3 = new mx.transitions.Tween(lettersArr[_local2], "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.1, true);
var _local4 = new mx.transitions.Tween(letterShadowArr[_local2], "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.1, true);
_local2++;
}
}
function endRound() {
if ((round + 1) == levelDataArr.length) {
wordLength = lettersArr.length;
clearRound();
var _local2 = getTimer();
communicator.sendWords(wordListArr, _local2 - _parent.clientTimerStart);
_parent.mcPalchette.mcNumber.gotoAndStop(22);
} else {
round++;
clearRound();
startRound();
}
}
function endLevel() {
com.king.wordbomb.SoundManager.stop("whirlwind");
var _local2 = new mx.transitions.Tween(mcHappySun.mcBlackHole, "_alpha", mx.transitions.easing.None.easeInOut, 100, 0, 0.5, true);
var _local5 = new mx.transitions.Tween(mcHappySun.mcHappySun, "_alpha", mx.transitions.easing.None.easeInOut, 0, 100, 0.5, true);
var _local4 = new mx.transitions.Tween(mcAngryMoon.mcBlackHole, "_alpha", mx.transitions.easing.None.easeInOut, 100, 0, 0.5, true);
var _local3 = new mx.transitions.Tween(mcAngryMoon.mcAngryMoon, "_alpha", mx.transitions.easing.None.easeInOut, 0, 100, 0.5, true);
if (_parent.isGameOver == false) {
clearLevel();
round = 0;
communicator.sendLevelEnd(levelScore);
_parent.endLevel(levelCleared, levelScore, right);
}
}
function clearRound() {
var _local2 = 0;
while (_local2 < lettersArr.length) {
lettersArr[_local2].removeMovieClip();
letterShadowArr[_local2].removeMovieClip();
_local2++;
}
lettersArr = [];
roundDataArr = [];
wordArr = [];
txtCounter.text = "";
}
function clearLevel() {
var _local2 = 0;
while (_local2 < enteredWordArr.length) {
enteredWordArr[_local2].removeMovieClip();
_local2++;
}
enteredWordArr = [];
}
function replace(str, from, to) {
return(str.split(from).join(to));
}
function responseReceived(response) {
_root.response = undefined;
response = replace(response, "<", "<");
response = replace(response, ">", ">");
response = replace(response, """, "\"");
var _local12 = new XML(response);
var _local4 = _local12.childNodes[0].childNodes;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].nodeName == "time") {
var _local6 = new String(_local4[_local3].firstChild.nodeValue);
var _local5 = _local6.split("-");
var _local7 = _local5[0];
var _local10 = _local5[1];
var _local9 = _local5[2];
var _local8 = _local5[3];
if (_local7 == "false") {
}
_parent.txtTimer.text = "reply:";
_parent.txtTimer.text = _parent.txtTimer.text + new String(_local4[_local3].firstChild.nodeValue);
}
if (_local4[_local3].nodeName == "word") {
responseWordsArr[_local4[_local3].attributes.id] = new String(_local4[_local3].firstChild.nodeValue);
}
_local3++;
}
correctWords();
}
function correctWords() {
com.king.wordbomb.SoundManager.play("whirlwind", 60, true);
var _local5 = new mx.transitions.Tween(mcHappySun.mcBlackHole, "_alpha", mx.transitions.easing.None.easeInOut, 0, 100, 0.5, true);
var _local6 = new mx.transitions.Tween(mcHappySun.mcBlackHole, "_rotation", mx.transitions.easing.None.easeInOut, 0, 1440 * enteredWordArr.length, enteredWordArr.length * 2, true);
var _local10 = new mx.transitions.Tween(mcHappySun.mcHappySun, "_alpha", mx.transitions.easing.None.easeInOut, 100, 0, 0.5, true);
var _local9 = new mx.transitions.Tween(mcAngryMoon.mcBlackHole, "_alpha", mx.transitions.easing.None.easeInOut, 0, 100, 0.5, true);
var _local7 = new mx.transitions.Tween(mcAngryMoon.mcBlackHole, "_rotation", mx.transitions.easing.None.easeInOut, 0, 1440 * enteredWordArr.length, enteredWordArr.length * 2, true);
var _local8 = new mx.transitions.Tween(mcAngryMoon.mcAngryMoon, "_alpha", mx.transitions.easing.None.easeInOut, 100, 0, 0.5, true);
right = 0;
var _local2 = 0;
while (_local2 < enteredWordArr.length) {
if (responseWordsArr[_local2] == "true") {
right++;
roundScore = 0;
_parent.usedWordsArr.push(enteredWordArr[_local2].word);
var _local4 = 0;
var _local3 = 0;
while (_local3 < _parent.usedWordsArr.length) {
if (_parent.usedWordsArr[_local3] == enteredWordArr[_local2].word) {
_local4++;
}
_local3++;
}
if (_local4 < 2) {
switch (wordListArr[_local2].length) {
case 3 :
roundScore = roundScore + 200;
levelScore = levelScore + 200;
break;
case 4 :
roundScore = roundScore + 300;
levelScore = levelScore + 300;
break;
case 5 :
if (levelDataArr[_local2].length < 6) {
roundScore = roundScore + 400;
levelScore = levelScore + 400;
} else {
roundScore = roundScore + 500;
levelScore = levelScore + 500;
}
break;
case 6 :
if (levelDataArr[_local2].length < 7) {
roundScore = roundScore + 600;
levelScore = levelScore + 600;
} else {
roundScore = roundScore + 750;
levelScore = levelScore + 750;
}
}
roundScore = roundScore + wordTimeBonusArr[_local2];
levelScore = levelScore + wordTimeBonusArr[_local2];
}
com.king.util.Delay.oneShot(this, wordMovement, 1000 * _local2, enteredWordArr[_local2], true, roundScore);
} else {
roundScore = 0;
com.king.util.Delay.oneShot(this, wordMovement, 1000 * _local2, enteredWordArr[_local2], false, roundScore);
}
_local2++;
}
if ((wordLength > 4) && (right == enteredWordArr.length)) {
levelCleared = true;
} else if ((wordLength == 4) && (right >= 3)) {
levelCleared = true;
} else if ((wordLength == 3) && (right >= 2)) {
levelCleared = true;
}
com.king.util.Delay.oneShot(this, endLevel, 1500 * enteredWordArr.length);
}
function wordMovement(theWord, right, score) {
theWord.correction(right, score);
}
function setKeyListener() {
keyListener.onKeyDown = function () {
switch (Key.getCode()) {
case 40 :
_root.mcGame.mcTextTwisterBonus.clearWord();
break;
case 38 :
_root.mcWordBomb.mcGame.enterWord();
break;
case 13 :
_root.mcWordBomb.mcGame.enterWord();
break;
case 37 :
_root.mcWordBomb.mcGame.deleteLetter();
break;
case 8 :
_root.mcWordBomb.mcGame.deleteLetter();
break;
default :
var _local2 = chr(Key.getAscii()).toUpperCase().charCodeAt(0);
var _local3 = com.king.wordbomb.Communicator.CHROME_BUG_LANGUAGE;
if ((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 196) && (_local2 <= 198))) || (_local2 == 214)) || (_local2 == 216)) || (_local2 == 220)) {
_root.mcWordBomb.mcGame.insertLetter(chr(Key.getAscii()).toUpperCase(), chr(Key.getAscii()).toUpperCase().charCodeAt(0));
} else if ((_local2 == 93) || (_local2 == 125)) {
_root.mcWordBomb.mcGame.insertLetter("\u00C5", "\u00C5".charCodeAt(0));
} else if ((_local2 == 39) || (_local2 == 34)) {
if (_local3 == "da") {
trace("da \u00D8");
_root.mcWordBomb.mcGame.insertLetter("\u00D8", "\u00D8".charCodeAt(0));
} else if (_local3 == "no") {
trace("no \u00C6");
_root.mcWordBomb.mcGame.insertLetter("\u00C6", "\u00C6".charCodeAt(0));
} else {
trace("sv");
_root.mcWordBomb.mcGame.insertLetter("\u00C4", "\u00C4".charCodeAt(0));
}
} else if ((_local2 == 96) || (_local2 == 126)) {
if (_local3 == "da") {
trace("da \u00C6");
_root.mcWordBomb.mcGame.insertLetter("\u00C6", "\u00C6".charCodeAt(0));
} else if (_local3 == "no") {
trace("no \u00D8");
_root.mcWordBomb.mcGame.insertLetter("\u00D8", "\u00D8".charCodeAt(0));
} else {
trace("sv \u00D6");
_root.mcWordBomb.mcGame.insertLetter("\u00D6", "\u00D6".charCodeAt(0));
}
} else if ((_local2 == 58) || (_local2 == 59)) {
_root.mcWordBomb.mcGame.insertLetter("\u00DC", "\u00DC".charCodeAt(0));
} else {
trace("big nono");
}
}
};
keyListener.onKeyUp = function () {
};
Key.addListener(keyListener);
}
static var STATE_NOT_RUNNING = 0;
static var STATE_RUNNING = 1;
var levelDataArr = new Array();
var roundDataArr = new Array();
var lettersArr = new Array();
var letterShadowArr = new Array();
var wordListArr = new Array();
var wordArr = new Array();
var enteredWordArr = new Array();
var enteredWordLettersArr = new Array();
var responseWordsArr = new Array();
var wordTimeBonusArr = new Array();
var smokeArr = new Array();
var keyListener = new Object();
}
Symbol 649 MovieClip [__Packages.com.king.wordbomb.Communicator] Frame 0
class com.king.wordbomb.Communicator
{
var levelDatas, randomSeed;
function Communicator () {
levelDatas = new Array();
}
function gameStarted() {
if (!hasSentGameStart) {
trace("GAME START");
hasSentGameStart = true;
fscommand ("gameStart");
}
}
function gameQuit() {
if (!hasSentGameOver) {
trace("GAME QUIT");
hasSentGameOver = true;
fscommand ("gameQuit");
}
}
function gameEnd(score) {
if (!hasSentGameEnd) {
trace("GAME ENDS");
hasSentGameEnd = true;
fscommand ("gameEnd", score);
}
}
function sendLevelStart(timeStamp) {
fscommand ("playData", (CMD_START_LEVEL + ",") + timeStamp);
}
function sendRoundStart(timeStamp) {
fscommand ("playData", (CMD_START_ROUND + ",") + timeStamp);
}
function sendWord(word, timeStamp) {
fscommand ("playData", (((CMD_SEND_WORD + ",") + word) + " ") + timeStamp);
}
function sendLevelEnd(points) {
fscommand ("playData", (CMD_END_LEVEL + "=") + points);
}
function sendPlayerLife(playerLife) {
fscommand ("playData", (CMD_PLAYER_LIFE + ",") + playerLife);
}
function sendTimeMismatch(clientTime, serverTime) {
}
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);
}
if (_local5[_local4].nodeName == "language") {
CHROME_BUG_LANGUAGE = new String(_local5[_local4].firstChild.nodeValue);
}
_local4++;
}
}
function sendWords(wordsArr, timeSpent) {
var _local5 = "<words>";
_local5 = _local5 + (("<time id=\"0\">" + timeSpent) + "</time>");
var _local2 = 0;
while (_local2 < wordsArr.length) {
_local5 = _local5 + (((("<word id=\"" + _local2) + "\">") + wordsArr[_local2]) + "</word>");
_local2++;
}
_local5 = _local5 + "</words>";
fscommand ("request", _local5);
if (_root.mcWordBomb.DEBUG_MODE) {
var _local4;
_local2 = 0;
while (_local2 < wordsArr.length) {
if (_local2 % 2) {
_local4 = _local4 + (("<word id=\"" + _local2) + "\">false</word>");
} else {
_local4 = _local4 + (("<word id=\"" + _local2) + "\">true</word>");
}
_local2++;
}
_root.response = ("<words>" + _local4) + "</words>";
}
}
static var CHROME_BUG_LANGUAGE = "not set";
static var CMD_START_LEVEL = 531;
static var CMD_START_ROUND = 753;
static var CMD_SEND_WORD = 191;
static var CMD_END_LEVEL = 297;
static var CMD_TIME_MISMATCH = 189;
static var CMD_PLAYER_LIFE = 898;
var hasSentGameStart = false;
var hasSentGameEnd = false;
var hasSentGameOver = false;
}
Symbol 650 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 651 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 652 MovieClip [__Packages.com.king.wordbomb.WordBomb] Frame 0
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.king) {
_global.com.king = new Object();
}
if (!_global.com.king.wordbomb) {
_global.com.king.wordbomb = new Object();
}
if (!_global.com.king.wordbomb.WordBomb) {
var _local1 = function () {
super();
this.communicator = new com.king.wordbomb.Communicator();
this.delay = new com.king.util.Delay();
this.gameState = com.king.wordbomb.WordBomb.STATE_WAIT_FOR_GAMEDATA;
this.soundOn = true;
this.level = -1;
this.playerLife = 2;
this.playerScore = 0;
this.roundScore = 0;
this.showingInfo = false;
this.soundCounter = 4000;
this.isGameOver = false;
this.txtScore.text = this.playerScore;
this.mcLifeStone1.gotoAndStop(1);
this.mcLifeStone2.gotoAndStop(2);
this.mcNextLevelScreen._visible = false;
this.mcGameOverScreen.onPress = function () {
_root.mcWordBomb.timeLeft = 0;
};
this.frames = 0;
this.lastFps = 0;
this.pearlPosYArr[0] = 9;
this.pearlPosXArr[0] = 36;
this.pearlPosYArr[1] = 4;
this.pearlPosXArr[1] = 64;
this.pearlPosYArr[2] = 15;
this.pearlPosXArr[2] = 89;
this.pearlPosYArr[3] = 36;
this.pearlPosXArr[3] = 105;
this.pearlPosYArr[4] = 64;
this.pearlPosXArr[4] = 108;
this.pearlPosYArr[5] = 90;
this.pearlPosXArr[5] = 98;
this.pearlPosYArr[6] = 106;
this.pearlPosXArr[6] = 75;
this.pearlPosYArr[7] = 108;
this.pearlPosXArr[7] = 50;
this.pearlPosYArr[8] = 98;
this.pearlPosXArr[8] = 23;
this.pearlPosYArr[9] = 77;
this.pearlPosXArr[9] = 9;
this.pearlPosYArr[10] = 49;
this.pearlPosXArr[10] = 5;
this.pearlPosYArr[11] = 24;
this.pearlPosXArr[11] = 15;
this.ambientSoundArr[0] = "ambient1";
this.ambientSoundArr[1] = "ambient2";
this.ambientSoundArr[2] = "ambient3";
this.ambientSoundArr[3] = "ambient4";
this.ambientSoundArr[4] = "ambient5";
this.ambientSoundArr[5] = "ambient6";
this.ambientSoundArr[6] = "ambient7";
this.ambientSoundArr[7] = "ambient8";
this.ambientSoundArr[8] = "ambient9";
this.palBasePosY = 430;
this.palBasePosX = 466;
this.palPosYArr[0] = 320;
this.palPosXArr[0] = 184;
this.palPosYArr[1] = 315;
this.palPosXArr[1] = 370;
this.rot = true;
this.mcFiller.onPress = function () {
if (((this._parent.gameState == com.king.wordbomb.WordBomb.STATE_GAME_OVER) || (this._parent.gameState == com.king.wordbomb.WordBomb.STATE_OPEN_GAME_USER_END)) || (this._parent.gameState == com.king.wordbomb.WordBomb.STATE_NOT_RUNNING)) {
this._parent.timeLeft = 0;
} else if (this._parent.allowStart) {
this._visible = false;
this._parent.mcInfoScreen._visible = false;
this._parent.mcBottomScreen._visible = false;
this._parent.mcIntro._visible = false;
this._parent.delayStart();
}
};
this.btnEndGame.onPress = function () {
if ((this._parent.gameState != com.king.wordbomb.WordBomb.STATE_GAME_OVER) && (this._parent.gameState != com.king.wordbomb.WordBomb.STATE_SHOW_INFO_SCREEN)) {
this._parent.mcGame.gameState = this._parent.mcGame.STATE_NOT_RUNNING;
Key.removeListener(this._parent.mcGame.keyListener);
Key.removeListener(this._parent.keyListener);
this._parent.mcGame.clearRound();
this._parent.mcGame.clearLevel();
var _local3 = new mx.transitions.Tween(this._parent.mcPalchette, "_y", mx.transitions.easing.Strong.easeInOut, this._parent.mcPalchette._y, this._parent.palBasePosY, 1.6, true);
var _local4 = new mx.transitions.Tween(this._parent.mcPalchette, "_x", mx.transitions.easing.Strong.easeInOut, this._parent.mcPalchette._x, this._parent.palBasePosX, 1.6, true);
this._parent.mcNextLevelScreen.mcText.txtHeader.text = _global.textMappings.game_over;
this._parent.mcNextLevelScreen.mcText.txtRoundScore.text = this._parent.roundScore;
this._parent.mcNextLevelScreen.mcText.txtTotalScore.text = this._parent.playerScore;
this._parent.mcNextLevelScreen.mcText.txtCleared.text = "";
this._parent.mcNextLevelScreen.mcText.txtLostLife.text = "";
this._parent.mcBottomScreen.mcText.txtInfo.text = _global.textMappings.you_lose;
this._parent.mcBottomScreen.mcText.txtCont.text = _global.textMappings.end_game;
this._parent.gameOver();
}
};
this.btnToggleSound.onPress = function () {
com.king.wordbomb.SoundManager.toggleSound();
if (this._parent.soundOn) {
this._parent.txtToggleSound = _global.textMappings.sound_on;
this._parent.soundOn = false;
} else {
this._parent.txtToggleSound = _global.textMappings.sound_off;
this._parent.soundOn = true;
}
};
};
_global.com.king.wordbomb.WordBomb = _local1;
//_global.com.king.wordbomb.WordBomb extends MovieClip
var _local2 = _local1.prototype;
_local2.onEnterFrame = function () {
com.king.util.TimeVerifier.checkTime();
this.fpsTimer = getTimer();
this.frames = this.frames + 1;
if ((this.fpsTimer - this.lastFps) > 250) {
this.fps = (1000 / (this.fpsTimer - this.lastFps)) * this.frames;
this.txtFPS.text = Math.round(this.fps);
this.frames = 0;
this.lastFps = this.fpsTimer;
}
switch (this.gameState) {
case com.king.wordbomb.WordBomb.STATE_WAIT_FOR_GAMEDATA :
if (this.DEBUG_MODE) {
_root.gameData = com.king.wordbomb.WordBomb.DEBUG_GAME_DATA;
}
if (_root.gameData != undefined) {
this.communicator.gameStarted();
this.communicator.parseGameData(_root.gameData);
this.random = new com.king.util.Random(this.communicator.randomSeed);
var _local4 = this.communicator.levelDatas[0];
this.levelData = _local4.split("\u00A4");
this.mcZodiak.gotoAndStop(this.levelData.length - 5);
this.mcNextLevelScreen.mcText.txtRoundScoreTitle.text = _global.textMappings.round_score;
this.mcNextLevelScreen.mcText.txtTotalScoreTitle.text = _global.textMappings.total_score;
this.mcInfoScreen.mcText.txtHeader.text = _global.textMappings.game_name;
this.mcIntro.mcText.txtIntroHeader.text = _global.textMappings.introtext_header;
this.mcIntro.mcText.txtIntro.text = _global.textMappings.introtext_1;
this.mcIntro.mcText.txtIntroClick.text = "";
this.mcIntro.mcText.txtIntroCounter.text = "";
this.mcBottomScreen.mcText.txtInfo.text = "";
this.mcBottomScreen.mcText.txtCont.text = "";
this.txtToggleSound = _global.textMappings.sound_off;
this.txtEndGame = _global.textMappings.end_game_btn;
this.showInfoScreen();
}
break;
case com.king.wordbomb.WordBomb.STATE_SHOW_INFO_SCREEN :
if (_root.response != undefined) {
this.allowStart = true;
this.clientTimerStart = getTimer();
this.mcIntro.mcText.txtIntroClick.text = _global.textMappings.click_start;
_root.response = undefined;
}
this.now = getTimer() - this.startTimer;
this.animTime = this.animTime - (this.now - this.lastTime);
this.lastTime = this.now;
this.mcIntro.mcText.mcBlob.gotoAndStop(Math.min(Math.max(Math.round((1 - (this.animTime / 1000)) * 50), 1), 50));
break;
case com.king.wordbomb.WordBomb.STATE_PLAY_GAME :
if (_root.response != undefined) {
this.txtTimer.text = _root.response;
this.mcGame.responseReceived(_root.response);
this.clientTimerStart = getTimer();
_root.response = undefined;
}
this.now = getTimer();
this.soundCounter = this.soundCounter - (this.now - this.lastTime);
this.lastTime = this.now;
if (this.soundCounter < 0) {
var _local5 = this.random.nextInt(9);
var _local6 = 50;
if (_local5 > 5) {
_local6 = 30;
}
com.king.wordbomb.SoundManager.play(this.ambientSoundArr[_local5], _local6, false);
this.soundCounter = this.random.nextInt(2000) + 5000;
}
break;
case com.king.wordbomb.WordBomb.STATE_BETWEEN_ROUNDS :
this.now = getTimer() - this.startTimer;
this.timeLeft = this.timeLeft - (this.now - this.lastTime);
this.animTime = this.animTime - (this.now - this.lastTime);
this.lastTime = this.now;
this.theGoto = Math.min(Math.max(Math.round((1 - (this.animTime / 1000)) * 50), 1), 50);
if (this.theGoto != this.lastGoto) {
this.mcNextLevelScreen.mcText.mcBlob.gotoAndStop(this.theGoto);
this.mcBottomScreen.mcText.mcBlob.gotoAndStop(this.theGoto);
}
this.mcBottomScreen.mcText.txtCount.text = _global.textMappings.level_count.split("[0]").join("" + Math.round(this.timeLeft / 1000));
this.lastGoto = this.theGoto;
if (this.showingInfo == false) {
if (this.timeLeft < 2800) {
this.mcBottomScreen.mcText.txtCont.text = _global.textMappings.any_key;
this.showingInfo = true;
}
}
if (this.timeLeft <= 0) {
this.mcNextLevelScreen._visible = false;
this.mcBottomScreen._visible = false;
this.showingInfo = false;
Key.removeListener(this.keyListener);
this.startGame();
}
break;
case com.king.wordbomb.WordBomb.STATE_GAME_OVER :
this.now = getTimer() - this.startTimer;
this.timeLeft = this.timeLeft - (this.now - this.lastTime);
this.animTime = this.animTime - (this.now - this.lastTime);
this.lastTime = this.now;
this.theGoto = Math.min(Math.max(Math.round((1 - (this.animTime / 1000)) * 50), 1), 50);
if (this.theGoto != this.lastGoto) {
this.mcNextLevelScreen.mcText.mcBlob.gotoAndStop(this.theGoto);
this.mcBottomScreen.mcText.mcBlob.gotoAndStop(this.theGoto);
}
this.lastGoto = this.theGoto;
if (this.timeLeft <= 0) {
com.king.util.Delay.oneShot(this, this.gameQuit, 1500);
this.timeLeft = 0;
}
this.mcBottomScreen.mcText.txtCount.text = _global.textMappings.end_game_counter.split("[0]").join("" + Math.round(this.timeLeft / 1000));
break;
case com.king.wordbomb.WordBomb.STATE_NOT_RUNNING :
break;
case com.king.wordbomb.WordBomb.STATE_OPEN_GAME_USER_END :
this.now = getTimer() - this.startTimer;
this.timeLeft = this.timeLeft - (this.now - this.lastTime);
this.animTime = this.animTime - (this.now - this.lastTime);
this.lastTime = this.now;
this.mcIntro.mcText.mcBlob.gotoAndStop(Math.min(Math.max(Math.round((1 - (this.animTime / 1000)) * 50), 1), 50));
this.mcIntro.mcText.txtIntroCounter.text = _global.textMappings.end_game_counter.split("[0]").join("" + Math.round(this.timeLeft / 1000));
if (this.timeLeft > 0) {
break;
}
this.gameState = com.king.wordbomb.WordBomb.STATE_NOT_RUNNING;
com.king.util.Delay.oneShot(this, this.gameQuit, 1500);
this.timeLeft = 0;
}
};
_local2.showInfoScreen = function () {
com.king.wordbomb.SoundManager.play("intro", 50, true);
this.lastTime = 0;
this.startTimer = getTimer();
this.animTime = 1000;
this.mcPalchette.mcNumber.gotoAndStop(22);
this.mcFiller._x = 0;
this.mcFiller._y = 0;
this.mcFiller._width = _root._width;
this.mcFiller._height = _root._height;
this.mcFiller._alpha = 0;
this.mcInfoScreen._visible = true;
this.mcInfoScreen._y = 50;
this.mcInfoScreen._x = 200;
this.mcBottomScreen._visible = true;
this.mcBottomScreen._y = 280;
this.mcBottomScreen._x = 200;
this.gameState = com.king.wordbomb.WordBomb.STATE_SHOW_INFO_SCREEN;
var _local3 = new Array("a");
this.communicator.sendWords(_local3, 1000);
};
_local2.delayStart = function () {
com.king.util.Delay.oneShot(this, this.startGame, 2000);
};
_local2.startGame = function () {
this.levelStartTimer = getTimer();
this.lastTime = 0;
this.soundCounter = this.random.nextInt(2000) + 2000;
this.gameState = com.king.wordbomb.WordBomb.STATE_PLAY_GAME;
com.king.wordbomb.SoundManager.stop("intro");
this.level = this.level + 1;
if (this.level == 0) {
this.mcZodiak.mcPearl._y = this.pearlPosYArr[this.level];
this.mcZodiak.mcPearl._x = this.pearlPosXArr[this.level];
} else {
var _local3 = new mx.transitions.Tween(this.mcZodiak.mcPearl, "_y", mx.transitions.easing.Strong.easeOut, this.mcZodiak.mcPearl._y, this.pearlPosYArr[this.level], 0.8, true);
var _local4 = new mx.transitions.Tween(this.mcZodiak.mcPearl, "_x", mx.transitions.easing.Strong.easeOut, this.mcZodiak.mcPearl._x, this.pearlPosXArr[this.level], 0.8, true);
}
var _local5 = new mx.transitions.Tween(this.mcPalchette, "_y", mx.transitions.easing.Strong.easeInOut, this.mcPalchette._y, this.palPosYArr[this.random.nextInt(2)], 1.6, true);
var _local6 = new mx.transitions.Tween(this.mcPalchette, "_x", mx.transitions.easing.Strong.easeInOut, this.mcPalchette._x, this.palPosXArr[this.random.nextInt(2)], 1.6, true);
if (this.rot) {
var _local7 = new mx.transitions.Tween(this.mcPalchette.mcBase, "_rotation", mx.transitions.easing.Strong.easeInOut, this.mcPalchette.mcBase._rotation, this.mcPalchette.mcBase._rotation - 90, 1.6, true);
this.rot = false;
} else {
var _local7 = new mx.transitions.Tween(this.mcPalchette.mcBase, "_rotation", mx.transitions.easing.Strong.easeInOut, this.mcPalchette.mcBase._rotation, this.mcPalchette.mcBase._rotation + 90, 1.6, true);
this.rot = true;
}
if ((_global.userType[0] == 0) && (this.level == 2)) {
this.openUserEnd();
} else {
this.mcGame.startLevel(this.levelData[this.level]);
}
};
_local2.openUserEnd = function () {
this.lastTime = 0;
this.startTimer = getTimer();
this.animTime = 1000;
this.timeLeft = 10000;
this.mcIntro.mcText.txtIntro.text = _global.textMappings.open_game_user;
this.mcIntro.mcText.txtIntroClick.text = _global.textMappings.end_game;
this.mcIntro.mcText.txtIntroHeader.text = _global.textMappings.open_game_user_header;
this.mcIntro.mcKeyAnim._visible = false;
this.mcIntro._visible = true;
this.mcFiller._visible = true;
this.communicator.gameEnd(this.playerScore);
this.gameState = com.king.wordbomb.WordBomb.STATE_OPEN_GAME_USER_END;
};
_local2.endLevel = function (cleared, score, noOfCorrect) {
var _local6 = new mx.transitions.Tween(this.mcPalchette, "_y", mx.transitions.easing.Strong.easeInOut, this.mcPalchette._y, this.palBasePosY, 1.6, true);
var _local7 = new mx.transitions.Tween(this.mcPalchette, "_x", mx.transitions.easing.Strong.easeInOut, this.mcPalchette._x, this.palBasePosX, 1.6, true);
if (this.rot) {
var _local8 = new mx.transitions.Tween(this.mcPalchette.mcBase, "_rotation", mx.transitions.easing.Strong.easeInOut, this.mcPalchette.mcBase._rotation, this.mcPalchette.mcBase._rotation - 90, 1.6, true);
this.rot = false;
} else {
var _local8 = new mx.transitions.Tween(this.mcPalchette.mcBase, "_rotation", mx.transitions.easing.Strong.easeInOut, this.mcPalchette.mcBase._rotation, this.mcPalchette.mcBase._rotation + 90, 1.6, true);
this.rot = true;
}
this.mcNextLevelScreen.mcText.txtCleared.text = _global.textMappings.no_of_cleared.split("[0]").join("" + noOfCorrect);
this.mcNextLevelScreen.mcText.txtLostLife.text = "";
if (cleared == false) {
com.king.wordbomb.SoundManager.play("ghost", 100, false);
this.mcNextLevelScreen.mcText.txtLostLife.text = _global.textMappings.lost_life;
this.playerLife = this.playerLife - 1;
switch (this.playerLife) {
case 0 :
var _local9 = new mx.transitions.Tween(this.mcHand, "_x", mx.transitions.easing.Strong.easeInOut, 820, 518, 1.5, true);
var _local10 = new mx.transitions.Tween(this.mcHand, "_y", mx.transitions.easing.None.easeInOut, 240, 280, 1.5, true);
var _local11 = new mx.transitions.Tween(this.mcHand, "_rotation", mx.transitions.easing.Strong.easeInOut, -50, 0, 1.5, true);
this.handList.stoneObj = this.mcLifeStone1;
this.handList.handObj = this.mcHand;
_local9.addListener(this.handList);
this.handList.onMotionFinished = function () {
com.king.wordbomb.SoundManager.play("death", 100, false);
var _local2 = new mx.transitions.Tween(this.stoneObj, "_x", mx.transitions.easing.Strong.easeInOut, this.stoneObj._x, this.stoneObj._x + 302, 0.5, true);
_local2 = new mx.transitions.Tween(this.handObj, "_x", mx.transitions.easing.Strong.easeInOut, 518, 820, 0.5, true);
};
break;
case 1 :
this.mcLifeStone2.mcSmoke.gotoAndPlay(2);
this.mcLifeStone2.mcLifeStone._visible = false;
}
this.mcLifeBar.gotoAndStop(this.playerLife);
}
this.roundScore = score;
this.playerScore = this.playerScore + score;
this.txtScore.text = this.playerScore;
if (this.playerLife == 0) {
this.mcNextLevelScreen.mcText.txtHeader.text = _global.textMappings.game_over;
this.mcNextLevelScreen.mcText.txtRoundScore.text = this.roundScore;
this.mcNextLevelScreen.mcText.txtTotalScore.text = this.playerScore;
this.mcBottomScreen.mcText.txtInfo.text = _global.textMappings.you_lose;
this.mcBottomScreen.mcText.txtCont.text = _global.textMappings.end_game;
this.gameOver();
} else if ((this.levelData.length - 1) == this.level) {
this.mcNextLevelScreen.mcText.txtHeader.text = _global.textMappings.game_cleared;
this.mcNextLevelScreen.mcText.txtRoundScore.text = this.roundScore;
this.mcNextLevelScreen.mcText.txtTotalScore.text = this.playerScore;
this.mcBottomScreen.mcText.txtInfo.text = _global.textMappings.you_won;
this.mcBottomScreen.mcText.txtCont.text = _global.textMappings.end_game;
this.gameOver();
} else {
this.showNextLevelScreen();
this.startTimer = getTimer();
this.timeLeft = 4000;
this.animTime = 1000;
this.lastTime = 0;
this.gameState = com.king.wordbomb.WordBomb.STATE_BETWEEN_ROUNDS;
}
};
_local2.showNextLevelScreen = function () {
this.mcNextLevelScreen.mcText.mcBlob.gotoAndStop(1);
this.mcNextLevelScreen._visible = true;
this.mcNextLevelScreen._y = 50;
this.mcNextLevelScreen._x = 200;
this.mcBottomScreen.mcText.mcBlob.gotoAndStop(1);
this.mcBottomScreen._visible = true;
this.mcBottomScreen._y = 280;
this.mcBottomScreen._x = 200;
this.mcNextLevelScreen.mcText.txtHeader.text = _global.textMappings.round_over;
this.mcNextLevelScreen.mcText.txtRoundScore.text = this.roundScore;
this.mcNextLevelScreen.mcText.txtTotalScore.text = this.playerScore;
var _local3 = this.levelData[this.level + 1].split("-");
var _local4 = _local3[0].length;
var _local5 = _local3.length;
if (_local4 >= 5) {
var _local6 = _local5;
} else {
var _local6 = _local4 - 1;
}
this.mcBottomScreen.mcText.txtCont.text = "";
this.mcBottomScreen.mcText.txtInfo.text = _global.textMappings.number_of_cleared.split("[0]").join("" + _local6).split("[1]").join("" + _local5);
this.keyListener.onKeyDown = function () {
if (_root.mcWordBomb.timeLeft < 2800) {
_root.mcWordBomb.timeLeft = 0;
}
};
Key.addListener(this.keyListener);
};
_local2.gameOver = function () {
this.isGameOver = true;
if (this.playerLife > 0) {
this.playPosOutro();
} else {
com.king.util.Delay.oneShot(this, this.playNegOutro, 2700);
}
this.communicator.sendPlayerLife(this.playerLife);
this.mcNextLevelScreen.mcText.mcBlob.gotoAndStop(1);
this.mcNextLevelScreen._visible = true;
this.mcNextLevelScreen._y = 50;
this.mcNextLevelScreen._x = 200;
this.mcBottomScreen.mcText.mcBlob.gotoAndStop(1);
this.mcBottomScreen._visible = true;
this.mcBottomScreen._y = 280;
this.mcBottomScreen._x = 200;
this.startTimer = getTimer();
this.timeLeft = 10000;
this.animTime = 1000;
this.lastTime = 0;
this.communicator.gameEnd(this.playerScore);
this.mcFiller._visible = true;
this.gameState = com.king.wordbomb.WordBomb.STATE_GAME_OVER;
};
_local2.gameQuit = function () {
com.king.wordbomb.SoundManager.toggleSound();
this.gameState = com.king.wordbomb.WordBomb.STATE_NOT_RUNNING;
this.communicator.gameQuit();
};
_local2.playNegOutro = function () {
com.king.wordbomb.SoundManager.play("negOutro", 100, false);
};
_local2.playPosOutro = function () {
com.king.wordbomb.SoundManager.play("posOutro", 100, false);
};
_local1.STATE_WAIT_FOR_GAMEDATA = 0;
_local1.STATE_SHOW_INFO_SCREEN = 1;
_local1.STATE_PLAY_GAME = 2;
_local1.STATE_BETWEEN_ROUNDS = 3;
_local1.STATE_GAME_OVER = 4;
_local1.STATE_GAME_WON = 5;
_local1.STATE_NOT_RUNNING = 6;
_local1.STATE_OPEN_GAME_USER_END = 7;
_local2.levelData = new Array();
_local2.sortedData = new Array();
_local2.usedWordsArr = new Array();
_local2.pearlPosYArr = new Array();
_local2.pearlPosXArr = new Array();
_local2.palPosYArr = new Array();
_local2.palPosXArr = new Array();
_local2.ambientSoundArr = new Array();
_local2.allowStart = false;
_local2.handList = new Object();
_local2.keyListener = new Object();
_local2.DEBUG_MODE = true;
_local1.DEBUG_GAME_DATA = "<gamedata randomseed=\"1024\" timelimit=\"660\" ><language id=\"0\">da</language><level id=\"0\">,A,,-,A,,\u00A4,,M-,E,-,,U\u00A4,,L,-,,V,-,,,E-,,,E-,,R,\u00A4,,,,M-,,,E,-,,,,U\u00A4,,,,M-,,,E,-,,,,U\u00A4,,,,M-,,,E,-,,,,U</level><text id=\"game_start_count\">The game starts in [0] seconds!</text><text id=\"level_count\">Next round starts in [0] seconds!</text><text id=\"game_name\">Ouija Word</text><text id=\"introtext_1\">Pellentesque a lectus. In accumsan luctus diam. Praesent blandit sollicitudin risus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In nonummy. Integer eu justo. Fusce molestie facilisis nisi. Aenean justo. Donec purus. Integer aliquet sem quis nisl. Suspendisse faucibus nulla sed ante. In lacus massa, varius ac, tincidunt sed, cursus at, mi. </text><text id=\"introtext_header\">intro header</text><text id=\"round_over\">Round over!</text><text id=\"round_score\">Round Score:</text><text id=\"total_score\">Total Score:</text><text id=\"number_of_cleared\">You must clear [0] of the next [1] words</text><text id=\"any_key\">To start, press any key</text><text id=\"click_start\">Click to continue</text><text id=\"lost_life\">You have lost a life </text><text id=\"no_of_cleared\">You cleared [0] words</text><text id=\"game_over\">Game Over</text><text id=\"game_cleared\">All levels cleared!</text><text id=\"you_won\">You beat the game mate! w00t!</text><text id=\"you_lose\">omg u wtf suxxorz! L2P noobcake!</text><text id=\"end_game\">Click to end game</text><text id=\"end_game_counter\">The game will end in [0] seconds</text><text id=\"sound_on\">Sound On</text><text id=\"sound_off\">Sound Off</text><text id=\"end_game_btn\">End Game</text><text id=\"open_game_user\">Register to play more...</text><text id=\"open_game_user_header\">This was a trail</text><userType id=\"0\">1</userType></gamedata>";
(ASSetPropFlags(_global.com.king.wordbomb.WordBomb.prototype, null, 1));// not popped
}
#endinitclip
Symbol 653 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 _local4 = getTimer();
if (!hasStarted) {
startClientTime = _local2;
startGetTimer = _local4;
hasStarted = true;
}
var _local3 = Math.abs(_local2 - startClientTime) - (_local4 - startGetTimer);
_root.debugtxt.txt.text = (("" + _root.clientTime) + " : ") + _local3;
if (_root.clientTime != undefined) {
if (_local3 > 8000) {
if (!hasWarned) {
fscommand ("playData", ("77," + int(_local3)) + "=0");
hasWarned = true;
}
}
}
}
static var hasStarted = false;
static var hasWarned = false;
}
Symbol 654 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 655 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 656 MovieClip [__Packages.com.king.wordbomb.Letter] Frame 0
class com.king.wordbomb.Letter extends MovieClip
{
var _y, _x, gotoAndStop, letter, _parent;
function Letter () {
super();
}
function init(num, let) {
_y = 255;
_x = 193 + (65 * num);
if (let != "") {
var _local2 = "K" + let.charCodeAt(0);
gotoAndStop(_local2);
letter._visible = false;
}
_parent.smokeArr[num].gotoAndPlay(2);
}
}