Hi Experts,

    I am working on KEYBOARD controls using FLEX but this code snippet is
not working please help me out

 and please give directions to know about Key Code values

 Thanks u all in Advance

  Cheers
 RAJESHWAR MOTHE

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute"    initialize="initApp()">
<mx:Script><![CDATA[

import mx.controls.Alert;
private function initApp():void {
application.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
}
//This function quits the application if the user presses Shift+Q.
private function keyHandler(event:KeyboardEvent):void {
var bShiftPressed:Boolean = event.shiftKey;
if (bShiftPressed) {
var curKeyCode:int = event.keyCode;
if (curKeyCode == 81) { // 81 is the keycode value for the Q key
// Quit the application by closing the browser using JavaScript.
 var url:URLRequest = new URLRequest("javascript:window.close()");

 navigateToURL(url,"_self");

}
}
}
]]></mx:Script>


</mx:Application>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4132
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to