Interactive Resume Code Backup

My idea was noble, but I lost my thumbdrive and my file didn’t seem to save so here seems safer:

onClipEvent (load) {
 //—Change these how you like – just keep them over 0
 speed = 10;
 scrolldistance = 3;
 //—–
 facing = 0;
 moviewidth = Stage.width;
 // moviewidth = Stage.width/2;
 movieheight = Stage.height;
 //rightsensor = (moviewidth – ((moviewidth / 1.5) * scrolldistance));
 leftsensor = ((moviewidth / 1.5) * scrolldistance);
  rightsensor = 25; //fixed sensor turn
 leftsensor = 150;
 fg5 = speed * 0.9;
 fg4 = speed * 0.4;
 fg3 = speed * 0.3;
 fg2 = speed * 0.2;
 fg1 = speed * 0.1;
 playerspd = speed;
 bg1 = speed * 0.9;
 bg2 = speed * 0.8;
 bg3 = speed * 0.7;
 bg4 = speed * 0.4;
 bg5 = speed * 0.5;
 dbg = speed * 0.1;
}
onClipEvent (enterFrame) {
 if(facing ==0){
 _xscale = 100;
 }else{
 _xscale = 100;
 }
 if (Key.isDown(Key.LEFT)) {
 facing = 0;
 this.gotoAndStop(3);
 if (_x <= leftsensor) {
 _root.BACKGROUND._x += bg4;
 //trace(_root.BACKGROUND._x);
 } else {
 _x -= playerspd;
 }
 }
 if (Key.isDown(Key.RIGHT)) {
 facing = 0;
 this.gotoAndStop(2);
 if (_x >= rightsensor) {
 _root.BACKGROUND._x -= bg4;
 //trace(_root.BACKGROUND._x);
 } else {
 _x += playerspd;
 }
 }
 if (!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)){
 this.gotoAndStop(1);
 }
 
 // three lines below allow char_mc to turn back to front with no key press
 //if (!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)){
 //this.gotoAndStop(1);
 //}

Faucet Pre-Alpha 1.2 code backup 11/25

KLind

Leave a Reply

You must be logged in to post a comment.