Frame 2
tbytes = _root.getBytesTotal();
lbytes = _root.getBytesLoaded();
perc = int((lbytes / tbytes) * 100);
_root.Disc.SetPercentage(perc);
if (lbytes == tbytes) {
gotoAndStop (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
if (nImages > 0) {
Images._alpha = 100;
} else {
Images._alpha = 50;
}
if (nLevel > 0) {
Continue._alpha = 100;
} else {
Continue._alpha = 50;
}
Instance of Symbol 12 MovieClip "hq" in Frame 4
on (release) {
if (_quality == "LOW") {
_quality = "HIGH";
_root.hq.gotoAndStop(1);
} else {
_quality = "LOW";
_root.hq.gotoAndStop(2);
}
}
Instance of Symbol 15 MovieClip "snd" in Frame 4
on (release) {
if (_root.mute) {
_root.mute = false;
_root.snd.gotoAndStop(1);
} else {
_root.mute = true;
_root.snd.gotoAndStop(2);
}
}
Frame 5
gotoAndPlay (14);
Frame 9
stop();
Frame 10
gotoAndStop (4);
Frame 14
nLevel = 1;
stop();
Frame 15
this.level.Enable();
stop();
Frame 16
this.level.Disable();
stop();
Frame 17
nImages = Math.Max(nImages, 1);
gotoAndPlay (24);
Frame 24
nLevel = 2;
stop();
Frame 25
this.level.Enable();
stop();
Frame 26
this.level.Disable();
stop();
Frame 27
nImages = Math.Max(nImages, 2);
gotoAndPlay (34);
Frame 34
nLevel = 3;
stop();
Frame 35
this.level.Enable();
stop();
Frame 36
this.level.Disable();
stop();
Frame 37
nImages = Math.Max(nImages, 3);
gotoAndPlay (44);
Frame 44
nLevel = 4;
stop();
Frame 45
this.level.Enable();
stop();
Frame 46
this.level.Disable();
stop();
Frame 47
nImages = Math.Max(nImages, 4);
gotoAndPlay (54);
Frame 54
nLevel = 5;
stop();
Frame 55
this.level.Enable();
stop();
Frame 56
this.level.Disable();
stop();
Frame 57
nImages = Math.Max(nImages, 5);
gotoAndPlay (64);
Frame 64
nLevel = 6;
stop();
Frame 65
this.level.Enable();
stop();
Frame 66
this.level.Disable();
stop();
Frame 67
nImages = Math.Max(nImages, 6);
gotoAndStop (74);
Frame 75
if (nImages <= 1) {
forward._alpha = 50;
} else {
forward._alpha = 100;
}
back._alpha = 50;
stop();
Frame 76
if (nImages <= 2) {
forward._alpha = 50;
} else {
forward._alpha = 100;
}
back._alpha = 100;
stop();
Frame 77
if (nImages <= 3) {
forward._alpha = 50;
} else {
forward._alpha = 100;
}
back._alpha = 100;
stop();
Frame 78
if (nImages <= 4) {
forward._alpha = 50;
} else {
forward._alpha = 100;
}
back._alpha = 100;
stop();
Frame 79
if (nImages <= 5) {
forward._alpha = 50;
} else {
forward._alpha = 100;
}
back._alpha = 100;
stop();
Frame 80
forward._alpha = 50;
back._alpha = 100;
stop();
Symbol 5 MovieClip Frame 1
function SetPercentage(perc) {
perc = Math.max(0, Math.min(perc, 100));
dang = perc * 3.6;
}
function SetAdvance(adv) {
advance = adv;
}
function SetAt(val, mval) {
this.SetPercentage((val / mval) * 100);
}
function Init() {
SetAdvance(1);
SetPercentage(0);
}
function MoveMoons() {
target = cang + ((dang - cang) * advance);
d1 = Math.min(target, 180) + 180;
d2 = Math.min(Math.max(0, target - 180), 360);
this.Moon1._rotation = d1;
this.Moon2._rotation = d2;
cang = target;
}
this.Init();
Symbol 5 MovieClip Frame 2
this.MoveMoons();
Symbol 5 MovieClip Frame 3
gotoAndPlay (2);
Symbol 12 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 38 Button
on (release) {
gotoAndPlay (14);
}
Symbol 40 Button
on (release) {
gotoAndPlay (9);
}
Symbol 42 Button
on (release) {
getURL ("http://sketched.furserve.com/", "_blank");
}
Symbol 44 Button
on (release) {
if (nImages > 0) {
gotoAndStop (75);
}
}
Symbol 46 Button
on (release) {
if (nLevel > 0) {
gotoAndStop((nLevel * 10) + 1 +3);
}
}
Symbol 55 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 55 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 61 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 61 MovieClip Frame 2
stop();
Symbol 64 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 70 MovieClip Frame 1
function Glow(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 71 MovieClip Frame 1
function SetPercentage(perc) {
perc = Math.max(0, Math.min(100, perc));
this.ScoreDisc._rotation = -90 + ((9 * perc) / 10);
Score25.Glow(perc >= 25);
Score50.Glow(perc >= 50);
Score75.Glow(perc >= 75);
}
function SetPercentage2(perc) {
perc = Math.max(0, Math.min(100, perc));
this.TimeDisc._rotation = -90 - ((9 * perc) / 10);
Time25.Glow(perc >= 25);
Time50.Glow(perc >= 50);
Time75.Glow(perc >= 75);
}
Symbol 75 MovieClip Frame 1
function Show(b) {
if (b) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 88 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 101 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 114 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 127 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 134 MovieClip Frame 1
function SetPosition(ax, ay) {
Sphere._x = ax;
Sphere._y = ay;
Glow._x = ax;
Glow._y = ay;
Fade1._x = ax;
Fade1._y = ay;
Fade2._x = ax;
Fade2._y = ay;
Fade3._x = ax;
Fade3._y = ay;
}
function SetNoBound() {
btype = 0;
}
function SetBoundedBox(ax1, ay1, ax2, ay2) {
if (ax2 < ax1) {
temp = ax2;
ax2 = ax1;
ax1 = temp;
}
if (ay2 < ay1) {
temp = ay2;
ay2 = ay1;
ay1 = temp;
}
bx1 = ax1;
by1 = ay1;
bx2 = ax2;
by2 = ay2;
btype = 1;
}
function SetBoundedCircle(arad) {
rad = arad;
btype = 2;
}
function SetReport(abool) {
report = abool;
}
function SetDirection(adirx, adiry) {
dirx = adirx;
diry = adiry;
}
function SetSpeed(aspeed) {
if (aspeed > mspeed) {
aspeed = mspeed;
}
speed = aspeed;
}
function SetMaxSpeed(aspeed) {
mspeed = aspeed;
if (speed > mspeed) {
speed = mspeed;
}
}
function SetMaxAcceleration(aacc) {
macc = aacc;
}
function ApplyForce(fx, fy) {
mult = Math.sqrt((dirx * dirx) + (diry * diry)) / speed;
dirx = dirx + (fx * mult);
diry = diry + (fy * mult);
speed = Math.sqrt((dirx * dirx) + (diry * diry)) / mult;
if (speed > mspeed) {
speed = mspeed;
}
}
function SetMagRadius(mr) {
mrad = mr;
}
function Magnet(mx, my, mf) {
mr = Math.sqrt((mx * mx) + (my * my));
if (mr > mrad) {
mf = 0;
} else {
xx1 = Sphere._x;
yy1 = Sphere._y;
dist = Math.pow(mx - xx1, 2) + Math.pow(my - yy1, 2);
dex = (mf * (mx - xx1)) / dist;
dey = (mf * (my - yy1)) / dist;
acc = Math.sqrt((dex * dex) + (dey * dey));
if (acc > macc) {
dex = dex * (macc / acc);
dey = dey * (macc / acc);
}
this.ApplyForce(dex, dey);
}
}
function Enable() {
enabled = true;
this._alpha = 100;
}
function Disable() {
enabled = false;
this._alpha = 0;
}
function Init() {
this.SetPosition(0, 0);
this.SetSpeed(0, 0);
this.SetNoBound();
this.SetMaxSpeed(1000);
this.SetReport(false);
this.Enable;
sSide = new Sound(Sphere);
sSide.attachSound("Ding");
}
function Advance() {
ldir = Math.sqrt((dirx * dirx) + (diry * diry));
Sphere._x = Sphere._x + ((dirx / ldir) * speed);
Sphere._y = Sphere._y + ((diry / ldir) * speed);
}
function BounceBox() {
this.Advance();
if (Sphere._x < bx1) {
dirx = -dirx;
Sphere._x = bx1 + (bx1 - Sphere._x);
}
if (Sphere._x > bx2) {
dirx = -dirx;
Sphere._x = bx2 + (bx2 - Sphere._x);
}
if (Sphere._y < by1) {
diry = -diry;
Sphere._y = by1 + (by1 - Sphere._y);
}
if (Sphere._y > by2) {
diry = -diry;
Sphere._y = by2 + (by2 - Sphere._y);
}
}
function BounceCircle() {
xx1 = Sphere._x;
yy1 = Sphere._y;
this.Advance();
xx2 = Sphere._x;
yy2 = Sphere._y;
rr1 = Math.sqrt((xx1 * xx1) + (yy1 * yy1));
rr2 = Math.sqrt((xx2 * xx2) + (yy2 * yy2));
if (rr2 > (rad * 1.02)) {
qr = (rad - rr1) / (rr2 - rr1);
qx = xx1 + ((xx2 - xx1) * qr);
qy = yy1 + ((yy2 - yy1) * qr);
if (Math.abs(qx) > Math.abs(qy)) {
beta = ((qy * dirx) - (qx * diry)) / ((qx * qx) + (qy * qy));
alpha = (dirx - (beta * qy)) / qx;
} else {
beta = ((qy * dirx) - (qx * diry)) / ((qx * qx) + (qy * qy));
alpha = (diry + (beta * qx)) / qy;
}
dirx = ((-alpha) * qx) + (beta * qy);
diry = ((-alpha) * qy) - (beta * qx);
Sphere._x = xx2 * (-1 + ((2 * rad) / rr2));
Sphere._y = yy2 * (-1 + ((2 * rad) / rr2));
if (report) {
radians = Math.atan2(qy, qx);
if (qy < 0) {
radians = radians + (Math.PI*2);
}
deg = Math.floor(radians / (Math.PI/180));
_root.level.CBounce(deg);
}
if (!_root.mute) {
sSide.setPan(xx2 / 6);
sSide.setVolume(50 + ((speed / mspeed) * 50));
sSide.start(0, 1);
}
}
}
function MoveSphere() {
if (btype == 0) {
this.Advance();
} else if (btype == 1) {
this.BounceBox();
} else if (btype == 2) {
this.BounceCircle();
}
}
function MoveComponents() {
Fade3._x = Fade2._x;
Fade3._y = Fade2._y;
Fade2._x = Fade1._x;
Fade2._y = Fade1._y;
Fade1._x = Glow._x;
Fade1._y = Glow._y;
Glow._x = Sphere._x;
Glow._y = Sphere._y;
}
this.Init();
gotoAndPlay (2);
Symbol 134 MovieClip Frame 2
if (enabled) {
this.MoveSphere();
this.MoveComponents();
}
Symbol 134 MovieClip Frame 3
gotoAndPlay (2);
Symbol 135 MovieClip Frame 1
gotoAndPlay (2);
Symbol 135 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText.Show((n == 1) || (n == 100));
RedGlow.Show((n == 1) || (n == 100));
BlueText.Show((n == 2) || (n == 100));
BlueGlow.Show((n == 2) || (n == 100));
YellowText.Show((n == 3) || (n == 100));
YellowGlow.Show((n == 3) || (n == 100));
GreenText.Show((n == 4) || (n == 100));
GreenGlow.Show((n == 4) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 15, 75);
HitG = Between(deg, 105, 165);
HitY = Between(deg, 195, 255);
HitB = Between(deg, 285, 345);
if ((((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitY && (nlight == 3))) || (HitG && (nlight == 4))) {
nLight = Math.floor(Math.random() * 3) + 1;
nLight = (((onLight + nLight) - 1) % 4) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(20, nHits + 1);
} else if (((HitR || (HitB)) || (HitY)) || (HitG)) {
}
ScoreCounter.SetPercentage((nHits / 10) * 100);
ScoreCounter.SetPercentage2(((nHits - 10) / 10) * 100);
if (enabled && (nHits == 20)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 4) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 135 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 135 MovieClip Frame 4
gotoAndPlay (3);
Symbol 144 Button
on (release) {
_root.play();
}
Symbol 150 Button
on (release) {
gotoAndStop (4);
}
Symbol 166 MovieClip Frame 1
function Show(b) {
if (b) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 167 MovieClip Frame 1
gotoAndPlay (2);
Symbol 167 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText.Show((n == 1) || (n == 100));
RedGlow.Show((n == 1) || (n == 100));
BlueText.Show((n == 2) || (n == 100));
BlueGlow.Show((n == 2) || (n == 100));
YellowText.Show((n == 3) || (n == 100));
YellowGlow.Show((n == 3) || (n == 100));
GreenText.Show((n == 4) || (n == 100));
GreenGlow.Show((n == 4) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 0, 45);
HitG = Between(deg, 90, 135);
HitY = Between(deg, 180, 225);
HitB = Between(deg, 270, 315);
if ((((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitY && (nlight == 3))) || (HitG && (nlight == 4))) {
nLight = Math.floor(Math.random() * 3) + 1;
nLight = (((onLight + nLight) - 1) % 4) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(16, nHits + 1);
} else if (((HitR || (HitB)) || (HitY)) || (HitG)) {
nHits = Math.max(0, nHits - 2);
} else {
nHits = Math.max(0, nHits - 1);
}
ScoreCounter.SetPercentage((nHits / 8) * 100);
ScoreCounter.SetPercentage2(((nHits - 8) / 8) * 100);
if (enabled && (nHits == 16)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 4) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 167 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 167 MovieClip Frame 4
gotoAndPlay (3);
Symbol 176 MovieClip Frame 1
function Show(b) {
if (b) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 189 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 202 MovieClip Frame 1
function Show(b) {
if (b) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 203 MovieClip Frame 1
gotoAndPlay (2);
Symbol 203 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText.Show((n == 1) || (n == 100));
RedGlow.Show((n == 1) || (n == 100));
BlueText.Show((n == 2) || (n == 100));
BlueGlow.Show((n == 2) || (n == 100));
YellowText.Show((n == 3) || (n == 100));
YellowGlow.Show((n == 3) || (n == 100));
GreenText.Show((n == 4) || (n == 100));
GreenGlow.Show((n == 4) || (n == 100));
CyanText.Show((n == 5) || (n == 100));
CyanGlow.Show((n == 5) || (n == 100));
PurpleText.Show((n == 6) || (n == 100));
PurpleGlow.Show((n == 6) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 15, 45);
HitP = Between(deg, 75, 105);
HitB = Between(deg, 135, 165);
HitC = Between(deg, 195, 225);
HitG = Between(deg, 255, 285);
HitY = Between(deg, 315, 345);
if ((((((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitY && (nlight == 3))) || (HitG && (nlight == 4))) || (HitC && (nlight == 5))) || (HitP && (nlight == 6))) {
nLight = Math.floor(Math.random() * 5) + 1;
nLight = (((onLight + nLight) - 1) % 6) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(16, nHits + 1);
} else if (((((HitR || (HitB)) || (HitY)) || (HitG)) || (HitP)) || (HitC)) {
nHits = Math.max(0, nHits - 2);
} else {
nHits = Math.max(0, nHits - 1);
}
ScoreCounter.SetPercentage((nHits / 8) * 100);
ScoreCounter.SetPercentage2(((nHits - 8) / 8) * 100);
if (enabled && (nHits == 16)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 6) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 203 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 203 MovieClip Frame 4
gotoAndPlay (3);
Symbol 210 MovieClip Frame 1
gotoAndPlay (2);
Symbol 210 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText1.Show((n == 1) || (n == 100));
RedGlow1.Show((n == 1) || (n == 100));
BlueText1.Show((n == 2) || (n == 100));
BlueGlow1.Show((n == 2) || (n == 100));
YellowText1.Show((n == 3) || (n == 100));
YellowGlow1.Show((n == 3) || (n == 100));
GreenText1.Show((n == 4) || (n == 100));
GreenGlow1.Show((n == 4) || (n == 100));
RedText2.Show((n == 1) || (n == 100));
RedGlow2.Show((n == 1) || (n == 100));
BlueText2.Show((n == 2) || (n == 100));
BlueGlow2.Show((n == 2) || (n == 100));
YellowText2.Show((n == 3) || (n == 100));
YellowGlow2.Show((n == 3) || (n == 100));
GreenText2.Show((n == 4) || (n == 100));
GreenGlow2.Show((n == 4) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 0, 45) || (Between(deg, 135, 180));
HitG = Between(deg, 45, 90) || (Between(deg, 270, 315));
HitY = Between(deg, 180, 225) || (Between(deg, 315, 360));
HitB = Between(deg, 90, 135) || (Between(deg, 225, 270));
if ((((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitY && (nlight == 3))) || (HitG && (nlight == 4))) {
nLight = Math.floor(Math.random() * 3) + 1;
nLight = (((onLight + nLight) - 1) % 4) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(20, nHits + 1);
} else if (((HitR || (HitB)) || (HitY)) || (HitG)) {
nHits = Math.max(0, nHits - 4);
}
ScoreCounter.SetPercentage((nHits / 10) * 100);
ScoreCounter.SetPercentage2(((nHits - 10) / 10) * 100);
if (enabled && (nHits == 20)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 4) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 210 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 210 MovieClip Frame 4
gotoAndPlay (3);
Symbol 220 MovieClip Frame 1
gotoAndPlay (2);
Symbol 220 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText1.Show((n == 1) || (n == 100));
RedGlow1.Show((n == 1) || (n == 100));
BlueText1.Show((n == 2) || (n == 100));
BlueGlow1.Show((n == 2) || (n == 100));
GreenText1.Show((n == 3) || (n == 100));
GreenGlow1.Show((n == 3) || (n == 100));
RedText2.Show((n == 1) || (n == 100));
RedGlow2.Show((n == 1) || (n == 100));
BlueText2.Show((n == 2) || (n == 100));
BlueGlow2.Show((n == 2) || (n == 100));
GreenText2.Show((n == 3) || (n == 100));
GreenGlow2.Show((n == 3) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 195, 225) || (Between(deg, 285, 315));
HitB = Between(deg, 45, 75) || (Between(deg, 315, 345));
HitG = Between(deg, 75, 105) || (Between(deg, 165, 195));
if (((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitG && (nlight == 3))) {
nLight = Math.floor(Math.random() * 2) + 1;
nLight = (((onLight + nLight) - 1) % 3) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(16, nHits + 1);
} else if ((HitR || (HitB)) || (HitG)) {
nHits = Math.max(0, nHits - 100);
} else {
nHits = Math.max(0, nHits - 1);
}
ScoreCounter.SetPercentage((nHits / 8) * 100);
ScoreCounter.SetPercentage2(((nHits - 8) / 8) * 100);
if (enabled && (nHits == 16)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 3) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 220 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 220 MovieClip Frame 4
gotoAndPlay (3);
Symbol 228 MovieClip Frame 1
gotoAndPlay (2);
Symbol 228 MovieClip Frame 2
function Enable() {
this.Ball.Enable();
this.Activate(nLight);
enabled = true;
}
function Disable() {
this.Ball.Disable();
if (nHits == 0) {
this.Activate(0);
}
enabled = false;
}
function Activate(n) {
RedText.Show((n == 1) || (n == 100));
RedGlow.Show((n == 1) || (n == 100));
BlueText.Show((n == 2) || (n == 100));
BlueGlow.Show((n == 2) || (n == 100));
YellowText.Show((n == 3) || (n == 100));
YellowGlow.Show((n == 3) || (n == 100));
GreenText.Show((n == 4) || (n == 100));
GreenGlow.Show((n == 4) || (n == 100));
CyanText.Show((n == 5) || (n == 100));
CyanGlow.Show((n == 5) || (n == 100));
PurpleText.Show((n == 6) || (n == 100));
PurpleGlow.Show((n == 6) || (n == 100));
}
function Between(ang, amin, amax) {
if (ang < amin) {
ang = ang + 360;
}
return((ang >= amin) && (ang <= amax));
}
function CBounce(deg) {
HitR = Between(deg, 30, 60);
HitY = Between(deg, 75, 105);
HitG = Between(deg, 150, 180);
HitC = Between(deg, 195, 225);
HitB = Between(deg, 270, 300);
HitP = Between(deg, 315, 345);
if ((((((HitR && (nlight == 1)) || (HitB && (nlight == 2))) || (HitY && (nlight == 3))) || (HitG && (nlight == 4))) || (HitC && (nlight == 5))) || (HitP && (nlight == 6))) {
nLight = Math.floor(Math.random() * 5) + 1;
nLight = (((onLight + nLight) - 1) % 6) + 1;
onLight = nLight;
this.Activate(nLight);
nHits = Math.min(16, nHits + 1);
} else if (((((HitR || (HitB)) || (HitY)) || (HitG)) || (HitP)) || (HitC)) {
nHits = Math.max(0, nHits - 100);
} else {
nHits = Math.max(0, nHits - 100);
}
ScoreCounter.SetPercentage((nHits / 8) * 100);
ScoreCounter.SetPercentage2(((nHits - 8) / 8) * 100);
if (enabled && (nHits == 16)) {
this.Activate(100);
_root.play();
}
}
this.Ball.SetPosition(0, 0);
this.Ball.SetDirection(10, 10);
this.Ball.SetSpeed(1);
this.Ball.SetMaxSpeed(15);
this.Ball.SetMaxAcceleration(5);
this.Ball.SetBoundedCircle(175);
this.Ball.SetReport(true);
this.Ball.SetMagRadius(100);
this.ScoreCounter.SetPercentage(0);
this.ScoreCounter.SetPercentage2(0);
this.onMouseDown = function () {
mpressed = true;
};
this.onMouseUp = function () {
mpressed = false;
};
nHits = 0;
nLight = Math.floor(Math.random() * 6) + 1;
onLight = nLight;
this.Activate(nLight);
this.Disable();
gotoAndPlay (3);
Symbol 228 MovieClip Frame 3
if (enabled && (mpressed)) {
this.Ball.Magnet(this._xmouse, this._ymouse, 100);
} else if (enabled) {
this.Ball.Magnet(0, 0, 0);
}
Symbol 228 MovieClip Frame 4
gotoAndPlay (3);
Symbol 242 Button
on (release) {
getURL ("http://sketched.furserve.com/", "_blank");
}
Symbol 244 Button
on (release) {
getURL ("http://go.ezboard.com/bsketched", "_blank");
}
Symbol 250 Button
on (release) {
if (back._alpha == 100) {
prevFrame();
}
}
Symbol 254 Button
on (release) {
if (forward._alpha == 100) {
nextFrame();
}
}
Symbol 255 Button
on (release) {
gotoAndStop (4);
}