main timeline
var rl = myrandom();
var rd = myrandom();
var ru = myrandom();
var rr = myrandom();
var lc=0, dc=0, rc=0, uc=0;
var lci=0, dci=0, rci=0, uci=0;
var tl, td, tu, tr;
perfect = 0;
missed = 0;
fals = 0;
var s = new Sound(this);
var sr = "s1";// + (random(2)+1);
playSound(sr);
emc.loadMovie("intro.swf");
var t1 = setInterval(showdance, 10000);
function showdance(){
clearInterval(t1);
emc.loadMovie("dance.swf");
}
var k = new Object();
Key.addListener(k);
k.onKeyDown = function() {
if(Key.getCode()==Key.SPACE){
emc2.loadMovie("good.swf");
}
if(Key.getCode()==Key.LEFT){
if(bar.hitTest(_root["l"+lc]._x, _root["l"+lc]._y, true)){
emc2.loadMovie("good.swf");
perfect+=1500;
_root["l"+lc].expired = true;
_root["l"+lc].hit = true;
lc++;
}else{
fals++;
}
}
if(Key.getCode()==Key.DOWN){
if(bar.hitTest(_root["d"+dc]._x, _root["d"+dc]._y, true)){
emc2.loadMovie("good.swf");
perfect+=1500;
_root["d"+dc].expired = true;
_root["d"+dc].hit = true;
dc++;
}else{
fals++;
}
}
if(Key.getCode()==Key.UP){
if(bar.hitTest(_root["u"+uc]._x, _root["u"+uc]._y, true)){
emc2.loadMovie("good.swf");
perfect+=1500;
_root["u"+uc].expired = true;
_root["u"+uc].hit = true;
uc++;
}else{
fals++;
}
}
if(Key.getCode()==Key.RIGHT){
if(bar.hitTest(_root["r"+rc]._x, _root["r"+rc]._y, true)){
emc2.loadMovie("good.swf");
perfect+=1500;
_root["r"+rc].expired = true;
_root["r"+rc].hit = true;
rc++;
}else{
fals++;
}
}
};
tl = setInterval(showArrowl, 2500);
td = setInterval(showArrowd, 3000);
tu = setInterval(showArrowu, 2800);
tr = setInterval(showArrowr, 2700);
function myrandom(){
return (random(3)+3)*1000;
}
function showArrowl(){
var mc = attachMovie("leftarrow","l"+lci,_root.getNextHighestDepth());
lci++;
mc._y = Stage.height;
var rd = myrandom();
mc._x = 525.8;
clearInterval(tl);
tl = setInterval(showArrowl, rd);
}
function showArrowd(){
var mc = attachMovie("downarrow","d"+dci,_root.getNextHighestDepth());
dci++;
mc._y = Stage.height;
var rd = myrandom();
mc._x = 648.9;
clearInterval(td);
td = setInterval(showArrowd, rd);
}
function showArrowu(){
var mc = attachMovie("uparrow","u"+uci,_root.getNextHighestDepth());
uci++;
mc._y = Stage.height;
var rd = myrandom();
mc._x = 588.3;
clearInterval(tu);
tu = setInterval(showArrowu, rd);
}
function showArrowr(){
var mc = attachMovie("rightarrow","r"+rci,_root.getNextHighestDepth());
rci++;
mc._y = Stage.height;
var rd = myrandom();
mc._x = 709.4;
clearInterval(tr);
tr = setInterval(showArrowr, rd);
}
function playSound(soundId){
var s = new Sound(this);
s.attachSound(soundId);
s.start(0,1);
}
var t2 = setInterval(showpage, 77000);
function showpage(){
clearInterval(t2);
gotoAndPlay("Scene 7",1);
}
var t3 = setInterval(showpage2, 74550);
function showpage2(){
clearInterval(tu);
clearInterval(td);
clearInterval(tl);
clearInterval(tr);
}
stop();
arrow
var expired = false;
var hit = false;
onEnterFrame = function(){
this._y -= 5;
if(this._y < -100){
this.removeMovieClip();
}else if(this._y < (_root.bar._y - _root.bar._height/2)){
if(expired==false){
expired = true;
_root.dc++;
_root.missed++;
}
}
if(hit==true){
this.loadMovie("yellow.swf");
}
}
stop();
Wednesday, August 26, 2009
Wednesday, August 5, 2009
Subscribe to:
Comments (Atom)










