EKG
Building on the Drawing API again and constantly moving the root movie we create a nice and clean EKG effect in Swishmax
The Script
function ekg(){
myX=400;
_root._X=0;
ref=_root.createEmptyMovieClip("line",1);
ref.lineStyle(1,0x000000,0);
ref.moveTo(250,150);
boolStarted = false
}
OnLoad() {
ekg()
}
onEnterFrame(){
if (boolStarted){ref.lineStyle(0,0x3300FF,100);}
myX+=2;_root._X-=2;
if((random(10)+1)>7){line.lineTo(myX,random(300));}else{line.lineTo(myX,150);}
if(_root._X<-2000){line.clear();ekg()}
}
onFrame(2){boolStarted=true}
}