TwelvestoneFlash

keypress events


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
elad
 
2003-01-28

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...

faerieprince
 
2003-01-28

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!

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

keypress events