Frame 1
_root._quality = "best";
var nLevel = 0;
var nTotalScore = 0;
var nEndScore = 0;
var nBonusScore = 0;
mcLoader.setMaster(this);
stop();
Instance of Symbol 120 MovieClip [loader anim] "mcLoader" in Frame 1
/* no clip actions */
Frame 2
function getDifficulty() {
var _local1;
if (nLevel < 2) {
_local1 = nLevel + 1;
} else {
_local1 = nLevel + 2;
}
return(_local1);
}
var FX = (new com.digitaloutlook.gameElements.SoundFXmanager(["heatblast_shootID", "diamondhead_shootID", "upgrade_shootID", "stinkfly_shootID", "kraken_submergeID", "kraken_gethitID", "watersplashID", "herohitID", "kraken_shootID", "kraken_submerge_watersoundID", "game_over_musicID", "lightningID", "ben10_theme_loopID", "zoomingzzzzzID"], mcSoundOnOff));
FX.playSound(12, false, 50, true);
Frame 7
stop();
Frame 13
stop();
Frame 20
stop();
Frame 21
mcGamePlay._x = 300;
mcGamePlay._y = 200;
Frame 28
stop();
Frame 34
stop();
Symbol 16 MovieClip Frame 16
stop();
Symbol 29 MovieClip [head] Frame 1
#initclip 21
Object.registerClass("head", com.digitaloutlook.ben10.KrakenHead);
#endinitclip
mcWhiteHead._alpha = 0;
mcWhiteTentakels._alpha = 0;
Symbol 49 MovieClip [krakenSubmergingID] Frame 76
stop();
this._parent._parent.continueAfterSubmerge();
Symbol 54 MovieClip [shockwaveID] Frame 4
this._parent.removeMovieClip();
Symbol 109 MovieClip [kraken_bombID] Frame 25
this.removeMovieClip();
Symbol 119 MovieClip Frame 15
gotoAndPlay ("loop");
Symbol 120 MovieClip [loader anim] Frame 1
#initclip 20
Object.registerClass("loader anim", com.digitaloutlook.standardItems.Preloader);
#endinitclip
Symbol 436 MovieClip [__Packages.com.digitaloutlook.standardItems.Preloader] Frame 0
class com.digitaloutlook.standardItems.Preloader extends MovieClip
{
var stop, mcMaster, nPerc, nFrame, nBT, nBL, nUpdateID, gotoAndStop;
function Preloader () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
(stop());// not popped
if (mcMaster == undefined) {
mcMaster = _root;
}
nPerc = 0;
nFrame = 1;
nBT = mcMaster.getBytesTotal();
nBL = mcMaster.getBytesLoaded();
nUpdateID = setInterval(this, "update", 40);
}
function setMaster(clip) {
mcMaster = clip;
}
function fullyLoaded() {
clearInterval(nUpdateID);
mcMaster.play();
}
function update() {
nBL = mcMaster.getBytesLoaded();
if (nBT < 20000) {
nBT = mcMaster.getBytesTotal();
}
nPerc = nBL / nBT;
if (nBT < 20000) {
nFrame = 1;
} else {
nFrame = Math.floor(nPerc * 100);
if (nFrame == 100) {
fullyLoaded();
}
}
(gotoAndStop(nFrame));// not popped
}
}
Symbol 437 MovieClip [__Packages.com.digitaloutlook.ben10.KrakenHead] Frame 0
class com.digitaloutlook.ben10.KrakenHead extends MovieClip
{
var bHeadStraight, nMoveTime, nMaxAngle, createEmptyMovieClip, getNextHighestDepth, mcMover, nCurrentAngleTarget, _parent, sEnemyDirection, mcMaster, _rotation;
function KrakenHead () {
super();
}
function onLoad() {
configUI();
}
function killMe() {
}
function configUI() {
bHeadStraight = false;
var _local2 = _level0.getDifficulty() / 10;
if (_local2 > 1) {
_local2 = 1;
}
nMoveTime = Math.floor((1.5 - _local2) * 15);
nMaxAngle = Math.floor(50 * _local2) + 20;
createEmptyMovieClip("mcMover", getNextHighestDepth());
mcMover._x = -nMaxAngle;
nCurrentAngleTarget = 0;
moveHead();
}
function setStraight() {
bHeadStraight = true;
}
function headIsStraight() {
_parent.headIsStraight();
}
function moveHead() {
if (!bHeadStraight) {
var _local2 = new mx.transitions.Tween(mcMover, "_x", mx.transitions.easing.Regular.easeInOut, mcMover._x, nCurrentAngleTarget, nMoveTime);
_local2.clip = this;
_local2.onMotionFinished = function () {
this.clip.moveHead();
};
if (sEnemyDirection == "left") {
if (nCurrentAngleTarget == (-nMaxAngle)) {
nCurrentAngleTarget = -0.3 * nMaxAngle;
} else {
nCurrentAngleTarget = -nMaxAngle;
}
} else if (nCurrentAngleTarget == nMaxAngle) {
nCurrentAngleTarget = 0.3 * nMaxAngle;
} else {
nCurrentAngleTarget = nMaxAngle;
}
} else {
var _local2 = new mx.transitions.Tween(mcMover, "_x", mx.transitions.easing.Regular.easeInOut, mcMover._x, 0, nMoveTime);
_local2.clip = this;
_local2.onMotionFinished = function () {
this.clip.headIsStraight();
};
}
}
function setMaster(mc) {
mcMaster = mc;
}
function setDirection(s) {
sEnemyDirection = s;
}
function onEnterFrame() {
_rotation = mcMaster.mcBody._rotation + mcMover._x;
}
}
Symbol 438 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 439 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 440 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 441 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 442 MovieClip [__Packages.com.digitaloutlook.gameElements.SoundFXmanager] Frame 0
class com.digitaloutlook.gameElements.SoundFXmanager
{
var aSoundsToLoad, aSoundRefs, bSoundOn, mcToggleSound;
function SoundFXmanager (soundstoload, soundOnOff) {
aSoundsToLoad = soundstoload;
aSoundRefs = new Array();
var _local2 = 0;
while (_local2 < aSoundsToLoad.length) {
aSoundRefs.push(new com.digitaloutlook.gameElements.SoundFX(this, aSoundsToLoad[_local2]));
_local2++;
}
bSoundOn = true;
mcToggleSound = soundOnOff;
mcToggleSound.ref = this;
mcToggleSound.onRelease = function () {
this.ref.toggleSound();
};
if (bSoundOn) {
mcToggleSound.gotoAndStop("sound_on");
} else {
mcToggleSound.gotoAndStop("sound_off");
}
}
function playSound(id, wait, vol, loop) {
if (id < aSoundRefs.length) {
aSoundRefs[id].playSound(wait, vol, loop);
}
}
function stopSound(id) {
if (id < aSoundRefs.length) {
aSoundRefs[id].stopSound();
}
}
function setSoundVolume(id, n) {
if (id < aSoundRefs.length) {
aSoundRefs[id].changeVolume(n);
}
}
function stopAllSoundFX() {
var _local2 = 0;
while (_local2 < aSoundRefs.length) {
aSoundRefs[_local2].stopSound();
_local2++;
}
}
function toggleSound() {
bSoundOn = !bSoundOn;
var _local2 = 0;
while (_local2 < aSoundRefs.length) {
if (bSoundOn) {
aSoundRefs[_local2].changeVolume();
} else {
aSoundRefs[_local2].changeVolume(0);
}
_local2++;
}
if (bSoundOn) {
mcToggleSound.gotoAndStop("sound_on");
} else {
mcToggleSound.gotoAndStop("sound_off");
}
}
function getSoundOn() {
return(bSoundOn);
}
}
Symbol 443 MovieClip [__Packages.com.digitaloutlook.gameElements.SoundFX] Frame 0
class com.digitaloutlook.gameElements.SoundFX
{
var soundManager, soundEffect, nStartVolume;
function SoundFX (sndmanager, soundID) {
soundManager = sndmanager;
var _local2 = _level0.createEmptyMovieClip(soundID + "sound", 10982 + Math.floor(Math.random() * 1023));
soundEffect = new Sound(_local2);
soundEffect.attachSound(soundID);
}
function playSound(wait, vol, loop) {
if (wait) {
if ((soundEffect.position == soundEffect.duration) || (soundEffect.position == 0)) {
if (loop) {
soundEffect.start(0, 10000);
} else {
soundEffect.start();
}
}
} else if (loop) {
soundEffect.start(0, 10000);
} else {
soundEffect.start();
}
if (vol != undefined) {
nStartVolume = vol;
} else {
nStartVolume = 100;
}
if (soundManager.getSoundOn()) {
if (vol != undefined) {
soundEffect.setVolume(vol);
} else {
soundEffect.setVolume(100);
}
} else {
soundEffect.setVolume(0);
}
}
function stopSound() {
soundEffect.stop();
}
function changeVolume(n) {
if (n != undefined) {
soundEffect.setVolume(n);
} else {
soundEffect.setVolume(nStartVolume);
}
}
}
Symbol 444 MovieClip [__Packages.com.digitaloutlook.ben10.Kraken] Frame 0
class com.digitaloutlook.ben10.Kraken extends MovieClip
{
var nCount, bStopped, mcHead, mcBody, aWhiteBits, sBulletLinkageID, nBurstID, nShootingID, nShootBombWaitID, _parent, mcMaster, aEnemyPos, sDirection, nFact, nBombWaitTime, nAngleDif, nInbetweenBurstTime, nBulletSpeed, nBurstTime, nBulletsInClip, nDifficulty, nBulletDepth, nBulletsLeft, _x, _y, nWhiteTimeOutID;
function Kraken () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
nCount = 0;
bStopped = true;
mcHead.setMaster(this);
mcBody.setMaster(this);
aWhiteBits = [mcHead.mcWhiteHead, mcHead.mcWhiteTentakels, mcBody.mcWhiteBody];
var _local2 = 0;
while (_local2 < aWhiteBits.length) {
aWhiteBits[_local2]._alpha = 0;
_local2++;
}
setLevel(_level0.getDifficulty());
sBulletLinkageID = "bulletBadID";
startChasing();
_level0.FX.playSound(6, false, 10, true);
}
function killMe() {
bStopped = true;
clearInterval(nBurstID);
clearInterval(nShootingID);
clearInterval(nShootBombWaitID);
_level0.FX.stopSound(6);
mcHead.killMe();
mcBody.killMe();
}
function setStraight() {
_level0.FX.playSound(4);
bStopped = true;
clearInterval(nBurstID);
clearInterval(nShootingID);
clearInterval(nShootBombWaitID);
mcHead.setStraight();
mcBody.killMe();
}
function headIsStraight() {
_level0.FX.stopSound(6);
_level0.FX.playSound(9);
_parent.startSubMerge(mcBody._rotation);
}
function setMaster(m) {
mcMaster = m;
bStopped = false;
}
function enemyAngle(a, s) {
aEnemyPos = a;
sDirection = s;
mcHead.setDirection(sDirection);
}
function getTargetPos() {
return(aEnemyPos);
}
function setLevel(n) {
nFact = 1 - (n / 10);
if (nFact < 0.2) {
nFact = 0.2;
}
nBombWaitTime = 10000 * nFact;
nAngleDif = (1 - (nFact * 0.2)) * 100;
nInbetweenBurstTime = 700 + Math.floor(nFact * 1700);
nBulletSpeed = 10 + ((1 - nFact) * 6);
nBurstTime = 180 + Math.floor(nFact * 180);
nBulletsInClip = 4 + Math.floor((1 - nFact) * 4);
nDifficulty = n;
nBulletDepth = 1000;
}
function doBurst() {
if (!bStopped) {
clearInterval(nBurstID);
nBulletsLeft = nBulletsInClip;
nBurstTime = 90 + Math.floor(Math.random() * (nFact * 250));
nShootingID = setInterval(this, "shoot", nBurstTime);
}
}
function shoot() {
if (!bStopped) {
nBulletsLeft--;
if (nBulletsLeft == 0) {
clearInterval(nShootingID);
nInbetweenBurstTime = 400 + Math.floor(Math.random() * (nFact * 1600));
nBurstID = setInterval(this, "doBurst", nInbetweenBurstTime);
}
nBulletDepth++;
var _local3 = mcHead._rotation + 180;
var _local4 = sBulletLinkageID + nBulletDepth;
var _local2 = [_x + mcHead._x, _y + mcHead._y];
new com.digitaloutlook.gameElements.FlyingObject(mcMaster, sBulletLinkageID, _local4, nBulletDepth, _local3, _local2, nBulletSpeed, 35, "kraken");
_level0.FX.playSound(8);
}
}
function shootBomb() {
clearInterval(nShootBombWaitID);
mcMaster.shootBombs(mcHead._rotation + 180);
nShootBombWaitID = setInterval(this, "shootBomb", Math.floor(Math.random() * 3000) + nBombWaitTime);
}
function startChasing() {
nShootBombWaitID = setInterval(this, "shootBomb", Math.floor(Math.random() * 3000) + nBombWaitTime);
mcBody.startChasing(nDifficulty);
doBurst();
nBurstID = setInterval(this, "doBurst", nInbetweenBurstTime);
}
function unWhite() {
clearInterval(nWhiteTimeOutID);
var _local2 = 0;
while (_local2 < aWhiteBits.length) {
aWhiteBits[_local2]._alpha = 0;
_local2++;
}
}
function getHit(a) {
clearInterval(nWhiteTimeOutID);
_level0.FX.playSound(5, true);
var _local2 = 0;
while (_local2 < aWhiteBits.length) {
aWhiteBits[_local2]._alpha = a;
_local2++;
}
nWhiteTimeOutID = setInterval(this, "unWhite", 80);
}
}
Symbol 445 MovieClip [__Packages.com.digitaloutlook.gameElements.FlyingObject] Frame 0
class com.digitaloutlook.gameElements.FlyingObject
{
var nStartAngle, sGB, nPI, mcClip, nDx, nDy, mcObject, nUpdateID;
function FlyingObject (clip, linkageID, clipName, _depth, startAngle, startPoint, startSpeed, lifespan, gb) {
nStartAngle = startAngle;
sGB = gb;
nPI = Math.PI;
mcClip = clip;
nDx = startSpeed * Math.sin((nPI / 180) * nStartAngle);
nDy = (-startSpeed) * Math.cos((nPI / 180) * nStartAngle);
_depth = clip.getNextHighestDepth();
mcObject = clip.attachMovie(linkageID, clipName, _depth);
if (sGB == "good") {
clip.aHeroBullets.push(mcObject);
} else if (sGB == "kraken") {
clip.aKrakenBullets.push(mcObject);
}
mcObject._x = startPoint[0];
mcObject._y = startPoint[1];
mcObject.nLifeSpan = lifespan;
mcObject.nStartAngle = nStartAngle;
mcObject._rotation = nStartAngle;
mcObject.ref = this;
mcObject.onEnterFrame = function () {
this.ref.update();
};
}
function update() {
mcObject._x = mcObject._x + nDx;
mcObject._y = mcObject._y + nDy;
mcObject.nLifeSpan--;
if (mcObject.nLifeSpan <= 0) {
killMe();
}
}
function killMe() {
clearInterval(nUpdateID);
if (sGB == "good") {
for (var _local2 in mcClip.aHeroBullets) {
if (mcClip.aHeroBullets[_local2] == mcObject) {
mcClip.aHeroBullets.splice(_local2, 1);
}
}
} else if (sGB == "kraken") {
for (var _local2 in mcClip.aKrakenBullets) {
if (mcClip.aKrakenBullets[_local2] == mcObject) {
mcClip.aKrakenBullets.splice(_local2, 1);
}
}
}
mcObject.removeMovieClip();
}
}
Symbol 446 MovieClip [__Packages.com.digitaloutlook.gameElements.ScoreDisplay] Frame 0
class com.digitaloutlook.gameElements.ScoreDisplay extends MovieClip
{
var nScoreLength, nScore, aTextFields, mcScoreText;
function ScoreDisplay () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
nScoreLength = 6;
nScore = _level0.nTotalScore;
aTextFields = new Array();
aTextFields.push(mcScoreText.whiteScore);
var _local2 = 0;
while (_local2 < 8) {
aTextFields.push(mcScoreText["blackScore" + _local2]);
_local2++;
}
setScore(nScore);
}
function resetScore() {
var _local4 = "";
var _local3 = 0;
while (_local3 < nScoreLength) {
_local4 = _local4 + "0";
_local3++;
}
var _local2 = 0;
while (_local2 < aTextFields.length) {
aTextFields[_local2].text = _local4;
_local2++;
}
}
function setScore(n) {
_level0.nTotalScore = n;
var _local3 = "" + n;
while (_local3.length < nScoreLength) {
_local3 = "0" + _local3;
}
var _local2 = 0;
while (_local2 < aTextFields.length) {
aTextFields[_local2].text = _local3;
_local2++;
}
}
function addScore(n) {
nScore = nScore + n;
setScore(nScore);
}
function removeScore() {
}
}
Symbol 447 MovieClip [__Packages.com.digitaloutlook.gameElements.LevelDisplay] Frame 0
class com.digitaloutlook.gameElements.LevelDisplay extends MovieClip
{
var aTextFields, mcLevelText;
function LevelDisplay () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
aTextFields = new Array();
aTextFields.push(mcLevelText.whiteScore);
var _local3 = 0;
while (_local3 < 8) {
aTextFields.push(mcLevelText["blackScore" + _local3]);
_local3++;
}
var _local2 = 0;
while (_local2 < aTextFields.length) {
aTextFields[_local2].text = _level0.nLevel + 1;
_local2++;
}
}
}
Symbol 448 MovieClip [__Packages.com.digitaloutlook.gameElements.Timer] Frame 0
class com.digitaloutlook.gameElements.Timer extends MovieClip
{
var nTimeLength, aTextFields, mcTimeText, nStart, nTimeLeft, nStep, mcMaster, nStartTime, nTimerID;
function Timer () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
nTimeLength = 2;
aTextFields = new Array();
aTextFields.push(mcTimeText.whiteScore);
var _local2 = 0;
while (_local2 < 9) {
aTextFields.push(mcTimeText["blackScore" + _local2]);
_local2++;
}
if (nStart == undefined) {
nStart = 0;
}
setTimeText(nStart);
}
function setStartVal(n) {
nStart = n;
}
function makeStep() {
nTimeLeft = nTimeLeft - nStep;
if (nTimeLeft <= 0) {
nTimeLeft = 0;
mcMaster.timesUp();
}
setTimeText(nTimeLeft);
}
function setTimeText(n) {
var _local3 = "" + n;
while (_local3.length < nTimeLength) {
_local3 = "0" + _local3;
}
var _local2 = 0;
while (_local2 < aTextFields.length) {
aTextFields[_local2].text = _local3;
_local2++;
}
}
function resetTimer() {
setTimeText(nStartTime);
}
function stopTimer() {
clearInterval(nTimerID);
return(nTimeLeft);
}
function startTimer(masta, amount, step, interval) {
mcMaster = masta;
nStartTime = amount;
nTimeLeft = nStartTime;
nStep = step;
resetTimer();
nTimerID = setInterval(this, "makeStep", interval);
}
}
Symbol 449 MovieClip [__Packages.com.digitaloutlook.gameElements.DamageIndicator] Frame 0
class com.digitaloutlook.gameElements.DamageIndicator extends MovieClip
{
var mcMover, createEmptyMovieClip, getNextHighestDepth, nTotalFrames, nDamage, mcFlasher, nStartDamage, mcScale;
function DamageIndicator () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
mcMover = createEmptyMovieClip("mover", getNextHighestDepth());
nTotalFrames = 100;
resetDamage();
}
function receiveDamage(n) {
nDamage = nDamage - n;
if (nDamage < 0) {
nDamage = 0;
}
mcFlasher.play();
var _local2 = (1 - (nDamage / nStartDamage)) * nTotalFrames;
var _local3 = new mx.transitions.Tween(mcMover, "_x", mx.transitions.easing.Regular.easeOut, mcMover._x, _local2, 10);
return(nDamage);
}
function getFinalDamage() {
return(nDamage);
}
function onEnterFrame() {
mcScale.gotoAndStop(Math.floor(mcMover._x));
}
function resetDamage(d) {
mcMover._x = 1;
mcScale.gotoAndStop(1);
mcFlasher.gotoAndStop(1);
nStartDamage = d;
nDamage = d;
}
}
Symbol 450 MovieClip [__Packages.com.digitaloutlook.ben10.GameMain] Frame 0
class com.digitaloutlook.ben10.GameMain extends MovieClip
{
var aKrakenBombs, bGameStarted, nLevel, _parent, aHeroIDs, aHeroNames, aShotSoundIDs, nLevelTime, mcTop, mcTreesOnTop, mcFrame, mcKrakenDamageIndicator, mcHeroDamageIndicator, nBombDepth, BenHero, aHeroBullets, aKrakenBullets, mcKraken, mcSubmerge, createEmptyMovieClip, nStartFollowCount, nFollowCount, mcHero;
function GameMain () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
aKrakenBombs = new Array();
bGameStarted = false;
nLevel = _parent.nLevel;
aHeroIDs = ["heatBlastID", "diamondHeadID", "upgradeID", "stinkflyID"];
aHeroNames = ["HEATBLAST", "DIAMONDHEAD", "UPGRADE", "STINKFLY"];
aShotSoundIDs = [0, 1, 2, 3];
nLevelTime = 50;
mcTop.mcTimer.setStartVal(nLevelTime);
mcTreesOnTop.swapDepths(99);
mcFrame.swapDepths(111);
mcKrakenDamageIndicator.swapDepths(112);
mcHeroDamageIndicator.swapDepths(113);
mcTop.swapDepths(114);
nBombDepth = 15;
}
function moveItIn() {
new mx.transitions.Tween(mcHeroDamageIndicator, "_x", mx.transitions.easing.Regular.easeOut, mcHeroDamageIndicator._x, mcHeroDamageIndicator._x + 215, 20);
new mx.transitions.Tween(mcKrakenDamageIndicator, "_x", mx.transitions.easing.Regular.easeOut, mcKrakenDamageIndicator._x, mcKrakenDamageIndicator._x - 215, 20);
new mx.transitions.Tween(mcTop, "_y", mx.transitions.easing.Regular.easeOut, mcTop._y, mcTop._y + 75, 20);
}
function setHeroIcon() {
var _local2 = aHeroNames[_level0.nLevel % aHeroNames.length];
mcHeroDamageIndicator.mcCharacters.charname.text = _local2;
mcHeroDamageIndicator.mcCharacters.gotoAndStop(_local2);
}
function timesUp() {
stopGame("lose");
}
function stopGame(s) {
BenHero.killMe();
var _local2 = 0;
while (_local2 < aHeroBullets.length) {
aHeroBullets[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aKrakenBullets.length) {
aKrakenBullets[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aKrakenBombs.length) {
aKrakenBombs[_local2].removeMovieClip();
_local2++;
}
_level0.FX.stopSound(13);
switch (s) {
case "win" :
_parent.nBonusScore = (mcTop.mcTimer.stopTimer() * 20) + mcHeroDamageIndicator.getFinalDamage();
_parent.nTotalScore = _parent.nTotalScore + _parent.nBonusScore;
mcKraken.setStraight();
break;
case "lose" :
mcKraken.killMe();
_parent.nEndScore = _parent.nTotalScore;
_parent.winlose = "lose";
_parent.gotoAndPlay("transform");
break;
case "back" :
_parent.winlose = "";
_parent.whichchar = undefined;
_parent.nTotalScore = 0;
_parent.nLevel = 0;
mcKraken.killMe();
_parent.gotoAndPlay("intro");
}
}
function startSubMerge(r) {
trace("SUBMERGE");
mcSubmerge = createEmptyMovieClip("krakenSub", 103020);
mcSubmerge._x = mcKraken._x;
mcSubmerge._y = mcKraken._y;
mcSubmerge._rotation = r + 180;
mcKraken._visible = false;
mcSubmerge.attachMovie("krakenSubmergingID", "krakka", 1);
}
function continueAfterSubmerge() {
_parent.nLevel++;
_parent.winlose = "win";
_parent.gotoAndPlay("transform");
}
function startLevel() {
aHeroBullets = new Array();
aKrakenBullets = new Array();
mcKraken.setMaster(this);
mcKrakenDamageIndicator.resetDamage(1000);
mcHeroDamageIndicator.resetDamage(1000);
nStartFollowCount = Math.floor((1 / (_level0.getDifficulty() + 1)) * 20);
nFollowCount = 0;
var _local2 = _level0.nLevel % aHeroIDs.length;
var _local3 = aHeroIDs[_local2];
var _local5 = "bullet" + _local3;
var _local4 = aShotSoundIDs[_local2];
BenHero = new com.digitaloutlook.ben10.Hero(this, _local3, _local5, "mcHero", 15, _local4);
mcTop.mcTimer.startTimer(this, nLevelTime, 1, 1000);
bGameStarted = true;
}
function doDamageToKraken(bulletAngle, krakenAngle) {
var _local2 = (bulletAngle - krakenAngle) % 360;
var _local3 = 60;
var _local4 = 0;
if (_local2 < 0) {
if (_local2 > (-_local3)) {
_local4 = 1 - Math.abs(_local2 / _local3);
}
} else if (_local2 < _local3) {
_local4 = 1 - Math.abs(_local2 / _local3);
} else if (_local2 > (360 - _local3)) {
_local4 = 1 - Math.abs((360 - _local2) / _local3);
}
if (_local4 > 0) {
var _local5 = 20 * Math.pow(_local4, 2);
mcKraken.getHit(Math.floor(Math.pow(_local4, 2) * 100));
mcTop.mcScoreDisplay.addScore(Math.floor(_local5));
var _local6 = mcKrakenDamageIndicator.receiveDamage(_local5);
if (_local6 == 0) {
stopGame("win");
}
}
}
function update() {
checkKrakenShootAngle();
checkBulletHit();
}
function checkBulletHit() {
var _local3 = 0;
while (_local3 < aHeroBullets.length) {
if (checkDistance(aHeroBullets[_local3], mcKraken, 10)) {
doDamageToKraken(aHeroBullets[_local3].nStartAngle, mcKraken.mcBody._rotation);
aHeroBullets[_local3].nLifeSpan = -1;
_local3 = 123456789 /* 0x75BCD15 */;
}
var _local2 = 0;
while (_local2 < aKrakenBombs.length) {
if (checkDistance(aHeroBullets[_local3], aKrakenBombs[_local2], 10)) {
aHeroBullets[_local3].nLifeSpan = -1;
aKrakenBombs[_local2].goDie = true;
_local2 = 238762478 /* 0xE3B39EE */;
_local3 = 123456789 /* 0x75BCD15 */;
}
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < aKrakenBombs.length) {
if (checkDistance(aKrakenBombs[_local3], mcHero, 10)) {
var _local4 = mcHeroDamageIndicator.receiveDamage(400 * ((1 + _level0.getDifficulty()) * 0.2));
BenHero.showHit();
aKrakenBombs[_local3].goDie = true;
if (_local4 <= 0) {
stopGame("lose");
}
_local3 = 123456789 /* 0x75BCD15 */;
}
_local3++;
}
_local3 = 0;
while (_local3 < aKrakenBullets.length) {
if (checkDistance(aKrakenBullets[_local3], mcHero, 10)) {
trace("KRAK " + aKrakenBullets);
var _local4 = mcHeroDamageIndicator.receiveDamage(100 * ((1 + _level0.getDifficulty()) * 0.15));
BenHero.showHit();
aKrakenBullets[_local3].nLifeSpan = -1;
if (_local4 == 0) {
stopGame("lose");
}
_local3 = 123456789 /* 0x75BCD15 */;
}
_local3++;
}
}
function shootBombs(a) {
var _local2 = (5 + _level0.getDifficulty()) / 5;
var _local3 = 144 / _local2;
nBombDepth++;
new com.digitaloutlook.ben10.KrakenBomb(this, "kraken_bombID", "bomb" + nBombDepth, nBombDepth, (a + 150) + Math.floor(Math.random() * 60), [mcKraken._x, mcKraken._y], _local2, _local3, "bomb");
aKrakenBombs.push(this["bomb" + nBombDepth]);
}
function checkKrakenShootAngle() {
var _local2 = Math.floor(20 - ((_level0.getDifficulty() / 5) * 10));
if (_local2 < 10) {
_local2 = 10;
}
var _local3 = BenHero.getStepsAheadPos(_local2);
mcKraken.enemyAngle(_local3, BenHero.getDirection());
}
function checkDistance(inClip, inClip2, inHitDist) {
if ((inClip == undefined) || (inClip2 == undefined)) {
return(false);
}
var _local5 = distance(inClip._x, inClip._y, inClip2._x, inClip2._y);
var _local2 = 0;
if (inHitDist == "undefined") {
if (inClip._width > inClip._height) {
_local2 = _local2 + inClip._width;
} else {
_local2 = _local2 + inClip._height;
}
if (inClip2._width > inClip2._height) {
_local2 = _local2 + inClip2._width;
} else {
_local2 = _local2 + inClip2._height;
}
} else {
_local2 = inHitDist;
}
if ((_local5 / 2) <= _local2) {
return(true);
}
return(false);
}
function onEnterFrame() {
if (bGameStarted) {
update();
BenHero.moving();
}
}
function distance(x1, y1, x2, y2) {
var _local1 = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
return(_local1);
}
}
Symbol 451 MovieClip [__Packages.com.digitaloutlook.ben10.Hero] Frame 0
class com.digitaloutlook.ben10.Hero
{
var mcMaster, bCanChange, nShotSoundID, sBulletLinkageID, nBulletSpeed, nBulletDepth, sDirection, nOvalWidth, nOvalHeight, aCentre, nPos, nStep, mcHero, objKeylister, nDirectionTimeoutID, sKeyDown;
function Hero (masta, linkageID, bullet, clipName, _depth, shotsound) {
mcMaster = masta;
bCanChange = true;
nShotSoundID = shotsound;
sBulletLinkageID = bullet;
nBulletSpeed = 20;
nBulletDepth = 100000 /* 0x0186A0 */;
var _local3 = Math.random();
if (_local3 > 0.5) {
sDirection = "left";
} else {
sDirection = "right";
}
nOvalWidth = 370;
nOvalHeight = 295;
aCentre = [0, 20];
nPos = Math.floor(Math.random() * 100);
var _local2 = 1 - (_level0.getDifficulty() / 10);
if (_local2 < 0.2) {
_local2 = 0.2;
}
nStep = Math.PI / (80 * (0.5 + (_local2 / 2)));
mcHero = mcMaster.attachMovie(linkageID, clipName, _depth);
objKeylister = new Object();
objKeylister.clip = this;
objKeylister.onKeyDown = function () {
switch (Key.getCode()) {
case 32 :
this.clip.setKey("space");
break;
case 38 :
this.clip.changeDirection();
break;
default :
this.clip.setKey("");
}
};
objKeylister.onKeyUp = function () {
this.clip.keyReleased();
};
Key.addListener(objKeylister);
placeOnOval();
}
function killMe() {
Key.removeListener(objKeylister);
mcHero.removeMovieClip();
trace(mcHero + "KILLED");
}
function changeDirection() {
if (bCanChange) {
bCanChange = false;
nDirectionTimeoutID = setInterval(this, "dirTimeOut", 160);
if (sDirection == "left") {
sDirection = "right";
} else {
sDirection = "left";
}
}
}
function dirTimeOut() {
clearInterval(nDirectionTimeoutID);
bCanChange = true;
}
function moving() {
if (sDirection == "right") {
nPos = nPos + nStep;
} else {
nPos = nPos - nStep;
}
placeOnOval();
}
function setKey(s) {
sKeyDown = s;
trace("KEY: " + s);
}
function keyReleased() {
switch (sKeyDown) {
case "space" :
if (mcMaster.aHeroBullets.length < 2) {
_level0.FX.playSound(nShotSoundID);
nBulletDepth++;
var _local2 = mcHero._rotation + 270;
if (sDirection == "right") {
_local2 = _local2 - 180;
}
var _local4 = sBulletLinkageID + nBulletDepth;
var _local3 = [mcHero._x, mcHero._y];
new com.digitaloutlook.gameElements.FlyingObject(mcMaster, sBulletLinkageID, _local4, nBulletDepth, _local2, _local3, nBulletSpeed, 15, "good");
}
break;
case "up" :
}
setKey("");
}
function placeOnOval() {
mcHero._x = (Math.cos(nPos) * (nOvalWidth / 2)) + aCentre[0];
mcHero._y = (Math.sin(nPos) * (nOvalHeight / 2)) + aCentre[1];
var _local4 = mcHero._x - aCentre[0];
var _local5 = mcHero._y - aCentre[1];
var _local3 = Math.atan2(_local5, _local4);
var _local2 = (_local3 * 180) / Math.PI;
if (sDirection == "right") {
_local2 = _local2 + 180;
}
mcHero._rotation = _local2;
}
function getStepsAheadPos(n) {
if (sDirection == "left") {
n = -n;
}
var _local5 = (Math.cos(nPos + (n * nStep)) * (nOvalWidth / 2)) + aCentre[0];
var _local4 = (Math.sin(nPos + (n * nStep)) * (nOvalHeight / 2)) + aCentre[1];
var _local3 = [_local5, _local4];
return(_local3);
}
function getDirection() {
return(sDirection);
}
function showHit() {
_level0.FX.playSound(7, true);
mcHero.createEmptyMovieClip("mcBlastwave", 10001);
mcHero.mcBlastwave.attachMovie("shockwaveID", "blast", 1234628);
}
}
Symbol 452 MovieClip [__Packages.com.digitaloutlook.ben10.KrakenBomb] Frame 0
class com.digitaloutlook.ben10.KrakenBomb extends com.digitaloutlook.gameElements.FlyingObject
{
var nStartAngle, bDying, sGB, nPI, mcClip, nDx, nDy, nOvalWidth, nOvalHeight, aCentre, nPos, nRotSpeed, sState, mcObject, nUpdateID;
function KrakenBomb (clip, linkageID, clipName, _depth, startAngle, startPoint, startSpeed, moveframes, gb) {
super();
nStartAngle = startAngle;
bDying = false;
sGB = gb;
nPI = Math.PI;
mcClip = clip;
nDx = startSpeed * Math.sin((nPI / 180) * (nStartAngle + 90));
nDy = (-startSpeed) * Math.cos((nPI / 180) * (nStartAngle + 90));
nOvalWidth = 370;
nOvalHeight = 295;
aCentre = [0, 20];
nPos = (nPI / 180) * nStartAngle;
var _local3 = 1 - (_level0.getDifficulty() / 10);
if (_local3 < 0.2) {
_local3 = 0.2;
}
nRotSpeed = Math.PI / (200 * (0.5 + (_local3 / 2)));
if (Math.random() > 0.5) {
nRotSpeed = nRotSpeed * -1;
}
nDx = nDx * (nOvalWidth / nOvalHeight);
sState = "fly";
_depth = clip.getNextHighestDepth();
mcObject = clip.attachMovie(linkageID, clipName, _depth);
mcObject.stop();
mcObject._x = startPoint[0];
mcObject._y = startPoint[1];
mcObject.nMoveFrames = moveframes;
mcObject.nStartAngle = nStartAngle;
mcObject.goDie = false;
mcObject._rotation = nStartAngle;
mcObject.ref = this;
mcObject.onEnterFrame = function () {
this.ref.update();
};
_level0.FX.playSound(13, false, 100, true);
}
function update() {
if (mcObject.goDie) {
sState = "die";
}
switch (sState) {
case "fly" :
mcObject._x = mcObject._x + nDx;
mcObject._y = mcObject._y + nDy;
mcObject.nMoveFrames--;
if (mcObject.nMoveFrames <= 0) {
mcObject.lifeSpanOnOuterRing = (_level0.getDifficulty() + 2) * 30;
sState = "stay";
}
break;
case "stay" :
placeOnOval();
mcObject.lifeSpanOnOuterRing--;
if (mcObject.lifeSpanOnOuterRing <= 0) {
sState = "die";
}
break;
case "die" :
killMe();
}
}
function killMe() {
if (!bDying) {
bDying = true;
clearInterval(nUpdateID);
var _local2 = new Array();
for (var _local3 in mcClip.aKrakenBombs) {
if (mcClip.aKrakenBombs[_local3] != mcObject) {
_local2.push(mcClip.aKrakenBombs[_local3]);
}
}
mcClip.aKrakenBombs = _local2;
if (mcClip.aKrakenBombs.length == 0) {
_level0.FX.stopSound(13);
}
mcObject.gotoAndPlay("die");
}
}
function placeOnOval() {
nPos = nPos + nRotSpeed;
mcObject._x = (Math.cos(nPos) * (nOvalWidth / 2)) + aCentre[0];
mcObject._y = (Math.sin(nPos) * (nOvalHeight / 2)) + aCentre[1];
}
function distance(x1, y1, x2, y2) {
var _local1 = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
return(_local1);
}
}
Symbol 453 MovieClip [__Packages.com.digitaloutlook.gameElements.AngleFollow] Frame 0
class com.digitaloutlook.gameElements.AngleFollow extends MovieClip
{
var mcMover, createEmptyMovieClip, getNextHighestDepth, nCount, nXspeed, nYspeed, nXloc, nYloc, nXp2go, nYp2go, nMaxSpeed, nSpeedMultiplyer, mcMaster, _rotation;
function AngleFollow () {
super();
}
function onLoad() {
configUI();
}
function configUI() {
mcMover = createEmptyMovieClip("mover", getNextHighestDepth());
nCount = 0;
nXspeed = 0;
nYspeed = 0;
nXloc = 0;
nYloc = 0;
nXp2go = 0;
nYp2go = 0;
nMaxSpeed = (_level0.getDifficulty() + 1) * 2;
nSpeedMultiplyer = 0.016 * (_level0.getDifficulty() + 1);
}
function calculateRotation() {
var _local3 = mcMaster._x - mcMover._x;
var _local4 = mcMaster._y - mcMover._y;
var _local2 = Math.atan2(_local4, _local3);
var _local5 = ((_local2 * 180) / Math.PI) + 90;
return(_local5);
}
function setMaster(m) {
mcMaster = m;
}
function onEnterFrame() {
moveMover();
angleright();
}
function angleright() {
_rotation = calculateRotation();
}
function moveMover() {
var _local4 = mcMaster.getTargetPos();
if (_local4 != undefined) {
nCount = nCount + 0.08;
var _local3 = _level0.getDifficulty() / 8;
if (_local3 > 1) {
_local3 = 1;
}
if (_local3 < 0.3) {
_local3 = 0.3;
}
var _local2 = Math.abs((_local3 + (Math.sin(nCount) * (1 - _local3))) * nMaxSpeed);
nXp2go = _local4[0];
nXspeed = (nXp2go - nXloc) * nSpeedMultiplyer;
if (nXspeed > 0) {
if (nXspeed > _local2) {
nXspeed = _local2;
}
} else if (nXspeed < (-_local2)) {
nXspeed = -_local2;
}
nXloc = nXloc + nXspeed;
mcMover._x = nXloc;
nYp2go = _local4[1];
nYspeed = (nYp2go - nYloc) * nSpeedMultiplyer;
if (nYspeed > 0) {
if (nYspeed > _local2) {
nYspeed = _local2;
}
} else if (nYspeed < (-_local2)) {
nYspeed = -_local2;
}
nYloc = nYloc + nYspeed;
mcMover._y = nYloc;
}
}
}
Symbol 454 MovieClip [__Packages.com.digitaloutlook.ben10.KrakenBody] Frame 0
class com.digitaloutlook.ben10.KrakenBody extends com.digitaloutlook.gameElements.AngleFollow
{
var nStartTweenID;
function KrakenBody () {
super();
}
function startChasing(n) {
var _local1 = 1 - (n / 25);
if (_local1 < 0.2) {
_local1 = 0.2;
}
}
function killMe() {
clearInterval(nStartTweenID);
}
}
Symbol 131 MovieClip Frame 60
gotoAndPlay ("loop");
Symbol 163 MovieClip Frame 30
gotoAndPlay ("loop");
Symbol 166 Button
on (release) {
wheretonow = "instructions";
play();
}
Symbol 168 Button
on (release) {
play();
}
Symbol 169 Button
on (release) {
wheretonow = "transform";
play();
}
Symbol 172 MovieClip Frame 1
_level0.FX.setSoundVolume(12);
Symbol 172 MovieClip Frame 65
stop();
Symbol 172 MovieClip Frame 85
_parent.gotoAndPlay(wheretonow);
Symbol 189 MovieClip Frame 30
gotoAndPlay ("loop");
Symbol 191 Button
on (release) {
wheretonow = "intro";
play();
}
Symbol 227 Button
on (release) {
wheretonow = "transform";
play();
}
Symbol 228 MovieClip Frame 1
_level0.FX.setSoundVolume(12);
Symbol 228 MovieClip Frame 22
stop();
Symbol 228 MovieClip Frame 30
_parent.gotoAndPlay(wheretonow);
Symbol 234 MovieClip Frame 13
gotoAndPlay ("loop");
Symbol 249 MovieClip Frame 1
this.whiteScore.text = "LEVEL " + (_level0.nLevel + 1);
var i = 0;
while (i < 9) {
this["blackScore" + i].text = "LEVEL " + (_level0.nLevel + 1);
i++;
}
Symbol 250 MovieClip Frame 18
_parent.play();
stop();
Symbol 286 MovieClip Frame 89
_parent.play();
stop();
Symbol 309 MovieClip Frame 1
if (_root.winlose eq "lose") {
gotoAndPlay ("fail");
} else if (_root.whichchar == undefined) {
gotoAndPlay ("start_anim");
} else {
gotoAndPlay("char" + _root.whichchar);
}
Symbol 309 MovieClip Frame 38
_level0.FX.setSoundVolume(12, 0);
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 80
_root.whichchar = 1;
_parent.play();
Symbol 309 MovieClip Frame 89
stop();
Symbol 309 MovieClip Frame 90
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 125
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 165
_root.whichchar = 2;
_parent.play();
Symbol 309 MovieClip Frame 175
stop();
Symbol 309 MovieClip Frame 176
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 211
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 251
_root.whichchar = 3;
_parent.play();
Symbol 309 MovieClip Frame 261
stop();
Symbol 309 MovieClip Frame 262
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 297
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 337
_root.whichchar = 4;
_parent.play();
Symbol 309 MovieClip Frame 347
stop();
Symbol 309 MovieClip Frame 348
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 383
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 423
_root.whichchar = 1;
_parent.play();
Symbol 309 MovieClip Frame 431
_level0.FX.playSound(11);
Symbol 309 MovieClip Frame 470
_parent.gotoAndPlay("game_over");
Symbol 321 MovieClip Frame 48
gotoAndPlay ("loop");
Symbol 325 MovieClip [body] Frame 1
#initclip 29
Object.registerClass("body", com.digitaloutlook.ben10.KrakenBody);
#endinitclip
Symbol 326 MovieClip [KRAKEN] Frame 1
#initclip 22
Object.registerClass("KRAKEN", com.digitaloutlook.ben10.Kraken);
#endinitclip
Symbol 340 MovieClip [Score Display] Frame 1
#initclip 23
Object.registerClass("Score Display", com.digitaloutlook.gameElements.ScoreDisplay);
#endinitclip
Symbol 352 MovieClip [Level plus text] Frame 1
#initclip 24
Object.registerClass("Level plus text", com.digitaloutlook.gameElements.LevelDisplay);
#endinitclip
Symbol 366 MovieClip [Timer] Frame 1
#initclip 25
Object.registerClass("Timer", com.digitaloutlook.gameElements.Timer);
#endinitclip
Symbol 368 Button
on (release) {
_parent.stopGame("back");
}
Symbol 389 MovieClip Frame 1
stop();
Symbol 392 MovieClip [interface - hero] Frame 1
#initclip 26
Object.registerClass("interface - hero", com.digitaloutlook.gameElements.DamageIndicator);
#endinitclip
Symbol 405 MovieClip [interface - kraken] Frame 1
#initclip 27
Object.registerClass("interface - kraken", com.digitaloutlook.gameElements.DamageIndicator);
#endinitclip
Symbol 414 MovieClip Frame 69
stop();
_parent.play();
Symbol 415 MovieClip [gamePlayID] Frame 1
#initclip 28
Object.registerClass("gamePlayID", com.digitaloutlook.ben10.GameMain);
#endinitclip
Symbol 415 MovieClip [gamePlayID] Frame 10
setHeroIcon();
moveItIn();
Symbol 415 MovieClip [gamePlayID] Frame 21
stop();
Symbol 415 MovieClip [gamePlayID] Frame 22
stop();
startLevel();
Symbol 427 Button
on (release) {
_level0.nLevel = 0;
_level0.nTotalScore = 0;
_level0.nEndScore = 0;
_level0.nBonusScore = 0;
_level0.whichchar = undefined;
wheretonow = "instructions";
play();
}
Symbol 429 Button
on (release) {
_level0.nLevel = 0;
_level0.nTotalScore = 0;
_level0.nEndScore = 0;
_level0.nBonusScore = 0;
_level0.whichchar = undefined;
wheretonow = "transform";
play();
}
Symbol 431 Button
on (release) {
_level0.nTotalScore = 0;
_level0.nEndScore = 0;
_level0.nBonusScore = 0;
wheretonow = "gameplay";
play();
}
Symbol 435 MovieClip Frame 1
_root.winlose = "";
_level0.FX.playSound(10);
_level0.FX.setSoundVolume(12, 20);
var aEndTexts = ["What went wrong? You could have done more damage just shouting at him!", "Not bad! But looks like you need a whole lot more practice.", "Nice work! To do better, try zapping him directly in his chest.", "Great! Ben Ten could do with your help more often! Fancy another go?", "You rock! That Kraken got a lesson he\u2019s not going to forget in a hurry!", "Awesome! With you around, the world is safe\u2026 for now.", "Ultimate Respect! You are a gaming god!"];
var es = Math.floor(_level0.nEndScore / 1500);
trace((("_level0.nEndScore: " + _level0.nEndScore) + " es: ") + es);
if (es > (aEndTexts.length - 1)) {
es = aEndTexts.length - 1;
}
endText = aEndTexts[es];
Symbol 435 MovieClip Frame 45
stop();
Symbol 435 MovieClip Frame 65
_parent.gotoAndPlay(wheretonow);