Instance of Symbol 88 MovieClip "thimblerig" in Frame 1
onClipEvent (load) {
EasyMovementTime = 0.8;
MediumMovementTime = 0.6;
HardMovementTime = 0.4;
VeryHardMovementTime = 0.2;
MovementRadius = 50;
ShowBallTime = 1.5;
ShowEndBallTime = 1.5;
WaitTime = 1.5;
SwitchAmount = 25;
}
Symbol 20 Button
on (release) {
MovementTime = EasyMovementTime;
gotoAndStop ("hideball");
}
Symbol 24 Button
on (release) {
MovementTime = MediumMovementTime;
gotoAndStop ("hideball");
}
Symbol 29 Button
on (release) {
MovementTime = HardMovementTime;
gotoAndStop ("hideball");
}
Symbol 33 Button
on (release) {
MovementTime = VeryHardMovementTime;
gotoAndStop ("hideball");
}
Symbol 37 Button
on (press) {
getURL ("http://www.winterrowd.com", "_top");
}
Symbol 50 MovieClip Frame 100
_parent.gotoAndStop("shuffle");
Symbol 55 Button
on (release) {
gotoAndStop ("choose");
}
Symbol 61 Button
on (release) {
gotoAndStop ("startframe");
}
Symbol 76 Button
on (release) {
getURL ("http://www.winterrowd.com/findbieber", "_top");
}
Symbol 79 Button
on (press) {
getURL ("http://twitter.com/home?status=Playing+a+justin+bieber+game!+Find+Bieber+in+the+Crowd!+http://www.winterrowd.com/findbieber+Via+@Winterrowd", "_blank");
}
Symbol 82 Button
on (press) {
getURL ("http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.winterrowd.com/findbieber", "_blank");
}
Symbol 87 Button
on (press) {
getURL ("http://www.facebook.com/sharer.php?u=http://www.winterrowd.com/findbieber&t=Find+Bieber+in+the+Crowd", "_blank");
}
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
cup1depth = cup1.getDepth();
cup2depth = cup2.getDepth();
cup3depth = cup3.getDepth();
ball._y = 215;
cupnumber = Math.ceil(Math.random() * 3);
ball.cup = (cupMC = eval ("cup" + cupnumber));
ball._x = (cupnumber * 170) - 45;
showBallTween = new mx.transitions.Tween(cupMC, "_y", mx.transitions.easing.Regular.easeInOut, cupMC._y, cupMC._y - 80, ShowBallTime, true);
showBallTween.onMotionFinished = function () {
waitTween = new mx.transitions.Tween(cupMC, "wait", mx.transitions.easing.Regular.easeInOut, 0, 0, WaitTime, true);
waitTween.onMotionFinished = function () {
hideBallTween = new mx.transitions.Tween(cupMC, "_y", mx.transitions.easing.Regular.easeInOut, cupMC._y, cupMC._y + 80, ShowBallTime, true);
hideBallTween.onMotionFinished = function () {
gotoAndStop ("countdown");
};
};
};
Symbol 88 MovieClip Frame 4
function switchCups(switchcount) {
ball._visible = false;
numA = Math.ceil(Math.random() * 3);
numB = Math.ceil(Math.random() * 3);
while (numA == numB) {
numB = Math.ceil(Math.random() * 3);
}
if (numA > numB) {
temp = numB;
numB = numA;
numA = temp;
}
numC = (6 - numA) - numB;
cupA = eval ("cup" + numA);
cupB = eval ("cup" + numB);
cupC = eval ("cup" + numC);
cupA._y = (cupB._y = (cupC._y = 100));
cupB.swapDepths(this.getNextHighestDepth());
cupC.swapDepths(this.getNextHighestDepth());
cupA.swapDepths(this.getNextHighestDepth());
TweenAy1 = new mx.transitions.Tween(cupA, "_y", mx.transitions.easing.Regular.easeInOut, cupA._y, cupA._y + MovementRadius, MovementTime * 0.5, true);
TweenBy1 = new mx.transitions.Tween(cupB, "_y", mx.transitions.easing.Regular.easeInOut, cupB._y, cupB._y - MovementRadius, MovementTime * 0.5, true);
TweenAx = new mx.transitions.Tween(cupA, "_x", mx.transitions.easing.Regular.easeInOut, cupA._x, cupB._x, MovementTime, true);
TweenBx = new mx.transitions.Tween(cupB, "_x", mx.transitions.easing.Regular.easeInOut, cupB._x, cupA._x, MovementTime, true);
oldAx = cupA._x;
oldBx = cupB._x;
TweenAy1.onMotionFinished = function () {
TweenAy2 = new mx.transitions.Tween(cupA, "_y", mx.transitions.easing.Regular.easeInOut, cupA._y, cupA._y - MovementRadius, MovementTime * 0.5, true);
TweenBy2 = new mx.transitions.Tween(cupB, "_y", mx.transitions.easing.Regular.easeInOut, cupB._y, cupB._y + MovementRadius, MovementTime * 0.5, true);
tweensfinished = 0;
TweenAy2.onMotionFinished = (TweenBy2.onMotionFinished = (TweenAx.onMotionFinished = (TweenBx.onMotionFinished = function () {
ball._x = ball.cup._x + 60;
tweensfinished = tweensfinished + 1;
if (tweensfinished == 4) {
if (switchcount > 1) {
switchCups(switchcount - 1);
} else if (MovementTime != VeryHardMovementTime) {
ball._visible = true;
gotoAndStop ("chooseprompt");
} else {
cup1._visible = false;
cup2._visible = false;
cup3._visible = false;
stopAllSounds();
gotoAndPlay ("scream");
}
}
})));
};
}
stilltoswitch = SwitchAmount;
switchCups(stilltoswitch);
Symbol 88 MovieClip Frame 5
cupA._x = oldBx;
cupB._x = oldAx;
cupA._y = (cupB._y = cupC._y);
cup1.swapDepths(cup1depth);
cup2.swapDepths(cup2depth);
cup3.swapDepths(cup3depth);
Symbol 88 MovieClip Frame 6
function liftCup(cup) {
if (!guessed) {
guessed = true;
showBallTween2 = new mx.transitions.Tween(cup, "_y", mx.transitions.easing.Regular.easeInOut, cup._y, cup._y - 80, ShowEndBallTime, true);
showBallTween2.onMotionFinished = function () {
if ((ball._x < (cup._x + cup._width)) && (ball._x > cup._x)) {
gotoAndStop ("win");
} else {
i = 1;
while (i < 4) {
tempcup = eval ("cup" + i);
if ((ball._x < (tempcup._x + tempcup._width)) && (ball._x > tempcup._x)) {
showBallTween3 = new mx.transitions.Tween(tempcup, "_y", mx.transitions.easing.Regular.easeInOut, tempcup._y, tempcup._y - 80, ShowEndBallTime, true);
showBallTween3.onMotionFinished = function () {
gotoAndStop ("lose");
};
}
i++;
}
}
};
}
}
guessed = false;
Instance of Symbol 7 MovieClip "cup3" in Symbol 88 MovieClip Frame 6
on (release) {
_parent.liftCup(this);
}
Instance of Symbol 7 MovieClip "cup2" in Symbol 88 MovieClip Frame 6
on (release) {
_parent.liftCup(this);
}
Instance of Symbol 7 MovieClip "cup1" in Symbol 88 MovieClip Frame 6
on (release) {
_parent.liftCup(this);
}
Symbol 88 MovieClip Frame 7
stopAllSounds();
Symbol 88 MovieClip Frame 8
stopAllSounds();
Symbol 88 MovieClip Frame 104
stop();
Symbol 89 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 90 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 91 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 92 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";
}