[LEFT]renji.onEnterFrame = function() {
var moveSpeed = 5;
if(Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
dir = “right”
this.gotoAndStop(2);
this._xscale = 100;
}
else if(Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
dir = “left”
this.gotoAndStop(2);
this._xscale = -100;
}
else if((dir == “right”) && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = 100;
}
else if((dir == “left”) && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = -100;
}
while(_root.barrierdown1.hitTest(this)) {
this._y --;
}
}
naruto.onEnterFrame = function() {
var moveSpeed = 5;
if(Key.isDown(68)) {
this._x += moveSpeed;
dir = “right”
this.gotoAndStop(2);
this._xscale = 100;
}
else if(Key.isDown(65)) {
this._x -= moveSpeed;
dir = “left”
this.gotoAndStop(2);
this._xscale = -100;
}
else if((dir == “right”) && Key.isDown(70)) {
this.gotoAndStop(3);
this._xscale = 100;
}
else if((dir == “left”) && Key.isDown(70)) {
this.gotoAndStop(3);
this._xscale = -100;
}
else if(Key.isDown(83)) {
this.gotoAndStop(4);
}
}
var keyDet = new KeyDetection();
keyDet.addCombination("ctrl-dwn", Key.CONTROL, DOWN);
myObj = new Object();
myObj.onKeyCombination = function(name:String) {
switch (name) {
case "ctrl-dwn" :
_root.renji.gotoAndPlay(4)
break;
}
};
keyDet.addListener(myObj);
can any1 tell me what is wrong with that conde? it isnt doing the affect when i try to hold down control and down.it just does nothing.
[/LEFT]