i have a problem.
i'm rotating an object with the following... on the main timeline i have the following actions
/*stop();
this.onEnterFrame = function(){ if (activeObj == true){ if (gridObj == "pos"){ objmc._rotation += 1; } else if (gridObj == "neg"){ objmc._rotation -= 1; } } } */
and on the buttons I have the following...
rotate left button...
/* on (release) { activeObj = false; } on (press) { activeObj = true; gridObj = "pos"; } */
i have similar actions on the rotate right button. My problem however is this. Instead of rotating the object with a mouse event I want to do it with a keyPress . When I add the keypress actions to the buttons, the object will not stop rotating once the key has been pressed once. Any help would be much appreciated...
if (activeObj){ rest of code... }
I have had problems in the past with checking booleen values using 'true' or 'false' and this seemed to work for me. You are just checking to see if 'activeObj' is set to 'true' without writing all that out.
Hope this helps!