Combined Code
frame 1 {
stop();
}
movieClip 4 {
}
movieClip 7 {
}
instance of movieClip 7 {
onClipEvent (load) {
bytesLoaded = 0;
bytesTotal = 0;
bytesTotal = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
if (bytesLoaded < bytesTotal) {
bytesLoaded = _root.getBytesLoaded();
percentLoaded = Math.round(100 * bytesLoaded / bytesTotal);
if (bytesLoaded < bytesTotal) {
displayText = 'LOADING: ' + percentLoaded + '%';
bar._xscale = percentLoaded;
} else {
displayText = 'LOADING COMPLETE';
bar._xscale = 100;
_root.nextFrame();
}
}
}
}
button 11 {
on (release) {
play();
}
}
frame 3 {
stop();
}
button 19 {
on (release) {
gotoAndStop(5);
}
}
button 23 {
on (release) {
gotoAndStop(4);
}
}
movieClip 25 {
}
frame 4 {
stop();
}
button 37 {
on (release) {
gotoAndStop(3);
}
}
frame 5 {
stop();
}
movieClip 42 {
}
movieClip 44 {
}
instance container of movieClip 44 {
onClipEvent (load) {
_root.circle1._alpha = 0;
_root.circle2._alpha = 0;
_root.circle3._alpha = 0;
_root.circle4._alpha = 0;
_root.circle5._alpha = 0;
}
}
movieClip 46 {
frame 1 {
stop();
}
frame 2 {
_root.circle1._alpha = 0;
_root.circle2._alpha = 0;
_root.circle3._alpha = 0;
_root.circle4._alpha = 0;
_root.circle5._alpha = 0;
_root.red.goToAndStop(1);
_root.blue.goToAndStop(1);
_root.yellow.goToAndStop(1);
_root.green.goToAndStop(1);
}
frame 30 {
if (_root.position == 1) {
_root.circle1._alpha = 100;
}
if (_root.position == 2) {
_root.circle2._alpha = 100;
}
if (_root.position == 3) {
_root.circle3._alpha = 100;
}
if (_root.position == 4) {
_root.circle4._alpha = 100;
}
if (_root.position == 5) {
_root.circle5._alpha = 100;
}
if (_root.colour == 1) {
_root.red.play();
circleColor = new Color('_root.circle1');
circleColor.setRGB(16711680);
circleColor = new Color('_root.circle2');
circleColor.setRGB(16711680);
circleColor = new Color('_root.circle3');
circleColor.setRGB(16711680);
circleColor = new Color('_root.circle4');
circleColor.setRGB(16711680);
circleColor = new Color('_root.circle5');
circleColor.setRGB(16711680);
}
if (_root.colour == 2) {
_root.blue.play();
circleColor = new Color('_root.circle1');
circleColor.setRGB(16512);
circleColor = new Color('_root.circle2');
circleColor.setRGB(16512);
circleColor = new Color('_root.circle3');
circleColor.setRGB(16512);
circleColor = new Color('_root.circle4');
circleColor.setRGB(16512);
circleColor = new Color('_root.circle5');
circleColor.setRGB(16512);
}
if (_root.colour == 3) {
_root.yellow.play();
circleColor = new Color('_root.circle1');
circleColor.setRGB(16776960);
circleColor = new Color('_root.circle2');
circleColor.setRGB(16776960);
circleColor = new Color('_root.circle3');
circleColor.setRGB(16776960);
circleColor = new Color('_root.circle4');
circleColor.setRGB(16776960);
circleColor = new Color('_root.circle5');
circleColor.setRGB(16776960);
}
if (_root.colour == 4) {
_root.green.play();
circleColor = new Color('_root.circle1');
circleColor.setRGB(65280);
circleColor = new Color('_root.circle2');
circleColor.setRGB(65280);
circleColor = new Color('_root.circle3');
circleColor.setRGB(65280);
circleColor = new Color('_root.circle4');
circleColor.setRGB(65280);
circleColor = new Color('_root.circle5');
circleColor.setRGB(65280);
}
}
}
movieClip 52 {
frame 1 {
stop();
}
frame 21 {
gotoAndPlay(2);
}
}
movieClip 57 {
frame 1 {
stop();
}
frame 21 {
gotoAndPlay(2);
}
}
movieClip 62 {
frame 1 {
stop();
}
frame 21 {
gotoAndPlay(2);
}
}
movieClip 67 {
frame 1 {
stop();
}
frame 21 {
gotoAndPlay(2);
}
}
button 73 {
on (release) {
gotoAndStop(3);
_root.round = 0;
}
}
button 78 {
on (release) {
_root.hand.goToAndPlay(2);
++_root.round;
position = Math.floor(Math.random() * 5 + 1);
colour = Math.floor(Math.random() * 4 + 1);
}
on (keyPress '<Space>') {
_root.hand.goToAndPlay(2);
++_root.round;
position = Math.floor(Math.random() * 5 + 1);
colour = Math.floor(Math.random() * 4 + 1);
}
}