Is it possible to detect a key press along side a mouse click eg
A movie clip clicked
Click = false
But if the same movie is clicked whilst holding down the Ctrl key
Click = true
Basically its an action listener for the control key.
What is the best way to do this (when I say best I really mean easiest)
I will be using this in a jigsaw puzzle scenario and when a piece is Ctrl Clicked the piece will rotate but when its clicked regularly it will just follow the mouse.
:h:
*Originally posted by rolando.lopez *
**so the Key.isDown function is available without a listener? **
yes.
a key listener recieves events based on key actions. That means when a key action occurs, something like a key down, the “onKeyDown” function within the listener will be called. Listeners have no effect on things outside of that object and the methods within it.
Key.isDown is a property all the same as Key.CONTROL - no need for a listener - and if it was needed, it would need to be Key, not some random object