Frame 1
function doSomething() {
getURL ("http://www.neuroproductions.be", _blank);
}
stop();
startter._visible = false;
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("NEURO PRODUCTIONS - Copyright 2006", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
this.onEnterFrame = function () {
nu = this.getBytesLoaded();
totaal = this.getBytesTotal();
loader.bar._xscale = (nu / totaal) * 100;
if (nu == totaal) {
startter._visible = true;
loader._visible = false;
delete this.onEnterFrame;
}
};
startter.onRelease = function () {
gotoAndStop (2);
};
Frame 2
function doSomething() {
getURL ("http://www.neuroproductions.be", _blank);
}
function setLevel() {
scorevlak_mc.level_txt.text = currentLevel;
trace("currentlevel: " + currentLevel);
dropSpeed = dropspeed_arr[currentLevel - 1];
balMainSpeed = balMainSpeed_arr[currentLevel - 1];
maxcount = maxcount_arr[currentLevel - 1];
}
function levelTrace() {
life = 100;
scorevlak_mc.lifebar_mc._xscale = life;
currentLevel++;
scorevlak_mc.level_txt.text = currentLevel;
level_mc.level_txt.text = "LEVEL " + currentLevel;
level_mc.fadeIn();
level_mc.gotoAndPlay(2);
_root.onEnterFrame = function () {
if (level_mc._currentframe == level_mc._totalframes) {
delete _root.onEnterFrame;
level_mc.fadeOut();
trace("startgame");
setTimeout(startgame, 10);
}
};
}
function lifeBonus() {
lifeBonus_mc.life_txt.text = "";
lifeBonus_mc.bonus_txt.text = "";
lifeBonus_mc.score_txt.text = "";
lifeBonus_mc.fadeIn();
currentLife = life;
bonus = 0;
_root.my_sound = new Sound();
_root.my_sound.attachSound("Click");
_root.my_sound.start(0, 1000);
_root.my_sound.setVolume(0);
_root.onEnterFrame = function () {
if (lifeBonus_mc._alpha == 100) {
_root.my_sound.setVolume(100);
bonus = bonus + 5;
score = score + 5;
currentLife = currentLife - 3;
scorevlak_mc.score_txt.text = score;
scorevlak_mc.lifebar_mc._xscale = currentLife;
lifeBonus_mc.life_txt.text = "life: " + currentLife;
lifeBonus_mc.bonus_txt.text = "bonus: " + bonus;
lifeBonus_mc.score_txt.text = "score: " + score;
if (currentLife <= 0) {
my_sound.stop();
scorevlak_mc.lifebar_mc._xscale = 0;
lifeBonus_mc.life_txt.text = "life: 0";
delete _root.onEnterFrame;
lifeBonus_mc.fadeOut();
level_mc.level_txt.text = "LEVEL " + currentLevel;
new mx.transitions.Tween(levelAchter_mc, "_x", mx.transitions.easing.Strong.easeInOut, levelAchter_mc._x, levelAchter_mc._x - 480, 1.5, true);
setTimeout(levelTrace, 800);
}
}
};
}
function setbal() {
if (random(1000) == 1) {
balstring = "bal2";
} else {
balstring = "bal";
}
return(balstring);
}
function startgame() {
song_need = true;
if (song_bool) {
_root.my_song.start(0, 1000);
}
setLevel();
_root.onEnterFrame = function () {
video.draw(my_video);
subCount++;
if (subCount > dropSpeed) {
subCount = 0;
mainCount++;
var _local3 = this.attachMovie("bal", "bal" + mainCount, mainCount);
_local3._x = random(Stage.width - 50) + 25;
if (random(2) == 1) {
_local3._xscale = -100;
}
_local3.down = true;
_local3.val();
scorevlak_mc.togo_txt.text = maxcount - mainCount;
if (mainCount >= maxcount) {
mainCount = 0;
delete _root.onEnterFrame;
i = 0;
while (i < (maxcount + 2)) {
_root["bal" + i].fadeOff();
i++;
}
song_need = false;
songFade();
setTimeout(lifeBonus, 1000);
}
}
};
}
function nextLevel() {
life = 100;
scorevlak_mc.lifebar_mc._xscale = life;
trace("nextLevel");
levelTrace();
}
function gameOver() {
song_need = false;
songFade();
delete _root.onEnterFrame;
i = 0;
while (i <= maxcount) {
removeMovieClip("bal" + i);
i++;
}
start_btn.start_txt.text = "REPLAY";
start_btn.fadeIn();
mainCount = 0;
subCount = 0;
score = 0;
bonus = 0;
life = 100;
currentLevel = 0;
gameOver_mc._visible = true;
}
function songFade() {
this.createEmptyMovieClip("song_holder", -1000);
song_holder.vol = 100;
song_holder.onEnterFrame = function () {
this.vol = this.vol - 10;
my_song.setVolume(this.vol);
if (this.vol <= 0) {
my_song.stop();
my_song.setVolume(100);
delete this.onEnterFrame;
}
};
}
function delSong() {
delete _root.my_song;
}
function setSong() {
_root.my_song = new Sound();
_root.my_song.attachSound("song");
if (song_need) {
_root.my_song.start(0, 1000);
}
}
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("NEURO PRODUCTIONS - Copyright 2006", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
var dropspeed_arr = new Array(10, 8, 7, 6, 5, 5, 5, 5, 2, 1);
var balMainSpeed_arr = new Array(10, 10, 12, 12, 15, 16, 18, 20, 12, 30);
var maxcount_arr = new Array(20, 50, 50, 50, 100, 150, 200, 400, 500, 900);
gameOver_mc._visible = false;
level_mc._visible = false;
lifeBonus_mc._visible = false;
var my_cam = Camera.get();
var my_video;
my_video.attachVideo(my_cam);
video = new flash.display.BitmapData(my_video._width, my_video._height);
var mainCount = 0;
var subCount = 0;
var score = 0;
var bonus = 0;
var life = 100;
var currentLife;
var currentLevel = 0;
wolken.swapDepths(10001);
fullmasc_mc.swapDepths(10002);
var dropSpeed;
var balMainSpeed;
var maxcount;
start_btn.onRelease = function () {
levelAchter_mc._x = 0;
setSong();
gameOver_mc._visible = false;
this.fadeOut();
score = 0;
life = 100;
scorevlak_mc.score_txt.text = score;
scorevlak_mc.lifebar_mc._xscale = life;
setTimeout(levelTrace, 500);
};
MovieClip.prototype.val = function () {
balSpeed = balMainSpeed;
var pos_oud;
var _local4;
this.onEnterFrame = function () {
pos = (video.getPixel(160 - (this._x / 3), this._y / 3) >> 8) & 255;
if ((pos > (pos_oud + 20)) || (pos1 < (pos_oud - 20))) {
if (this._currentframe == 1) {
this.down = false;
var _local3 = new Sound();
_local3.attachSound("zap_snd");
_local3.start();
score = score + 10;
scorevlak_mc.score_txt.text = score;
this.gotoAndPlay(2);
}
}
if (this.down == true) {
this._y = this._y + balSpeed;
} else {
this._y = this._y - (balSpeed / 2);
}
pos_oud = (video.getPixel(160 - (this._x / 3), this._y / 3) >> 8) & 255;
if ((this._y >= 370) && (this._currentframe == 1)) {
var _local2 = this._parent.attachMovie("explosie_mc", "explosie" + this.getNextHighestDepth(), this._parent.getNextHighestDepth());
_local2.my_sound = new Sound();
_local2.my_sound.attachSound("Boing");
_local2.my_sound.start();
_local2._x = this._x;
_local2._y = 390;
life = life - 25;
scorevlak_mc.lifebar_mc._xscale = life;
if (life <= 0) {
gameOver();
}
delete this.onEnterFrame;
removeMovieClip(this);
}
};
};
var fadeSpeed = 10;
MovieClip.prototype.fadeIn = function () {
this._alpha = 0;
this._visible = true;
this.onEnterFrame = function () {
this._alpha = this._alpha + fadeSpeed;
if (this._alpha >= 100) {
this._alpha = 100;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.fadeOut = function () {
this._alpha = 100;
this.onEnterFrame = function () {
this._alpha = this._alpha - (fadeSpeed * 2);
if (this._alpha <= 0) {
this._alpha = 0;
this._visible = false;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.fadeOff = function () {
this._alpha = 100;
this.onEnterFrame = function () {
this._alpha = this._alpha - (fadeSpeed * 2);
if (this._alpha <= 0) {
this._alpha = 0;
this._visible = false;
delete this.onEnterFrame;
}
};
};
var song_bool = true;
var song_need = false;
scorevlak_mc.song_btn.onRelease = function () {
if (song_bool) {
this.gotoAndStop(2);
delSong();
song_bool = false;
stopAllSounds();
} else {
this.gotoAndStop(1);
song_bool = true;
setSong();
}
};
Symbol 14 MovieClip [bal] Frame 1
stop();
Symbol 14 MovieClip [bal] Frame 18
stop();
removeMovieClip(this);
Symbol 22 MovieClip [explosie_mc] Frame 29
stop();
removeMovieClip(this);
Symbol 96 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 97 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 98 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 99 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 65 Button
on (release) {
getURL ("http://www.neuroproductions.be", "_blank");
}
Symbol 69 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 41
stop();