header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Kim
Points:0
Posts:0

8/9/2010 3:40:29 AM

Title: keyEquivalent


can anyone provide me an example to invoke a function on a key stroke using keyEquivalent ?



1
Dave
Points: 970
Posts:1
8/9/2010 8:51:28 AM



you can add keylistener which is invoked when key is pressed

//call this function to add keylistener
public function addKeyListener():void{
	// add listener to stage to capture key down
	stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDownOccured);

}
// listener function
private function KeyDownOccured(evt:KeyboardEvent):void{
	trace("Key pressed is: "+evt.keyCode);
}


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 2+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions