Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect key press with letter

Status
Not open for further replies.

raznov

Programmer
Apr 8, 2002
110
US
I need the syntax for a multiple key press... I want to use control + z to make something happen... so far it only detects the control key.. The asc11 number is 90 I looked it up.

if(Key.isDown(Key.CONTROL+Key(90))){
_level2._root.ctrlzmc.play()
trace("dothis")
}

Thanks,
KIM
 
Sorry, I just found a post that answered my question... the correct syntax is...

if (Key.isDown(Key.CONTROL) && Key.isDown(90)) {
_level2._root.ctrlzmc.play()
trace("dothis")
}

the way I had it I was adding the values instead of concatinating the string... right?

KIM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top