Hi All,
I am having some trouble with an effect I am trying to achieve. What I want is to do is have an arrow rotate in the direction of a keypress.
This is what I have and it doesnt quite work correctly
Key.addListener(arrow)
arrow.onKeyDown = function(){
if(Key.Left) this._rotation = 270;
if(Key.Right) this._rotation = 90;
if(Key.Up) this._rotation = 0;
if(Key.Down) this._rotation = 180;
}
Just changing the values does not help.
Any ideas,
Brian
I am having some trouble with an effect I am trying to achieve. What I want is to do is have an arrow rotate in the direction of a keypress.
This is what I have and it doesnt quite work correctly
Key.addListener(arrow)
arrow.onKeyDown = function(){
if(Key.Left) this._rotation = 270;
if(Key.Right) this._rotation = 90;
if(Key.Up) this._rotation = 0;
if(Key.Down) this._rotation = 180;
}
Just changing the values does not help.
Any ideas,
Brian