Hello all,
I'm able to close a popup window in my application via the menuChangeHandler,
like so:
private function menuChangeHandler(event) {
if(event.menuItem.attributes.data == "Close") {
getURL("javascript:window.close();");
}
}
However, when I try to close the window via a shortcut key, I get the message
box I'm invoking, but the window itself doesn't close (note that even before I
put the message box code in, the window didn't close, so that's not preventing
the window from closing):
var lastKeyPressedControl:Boolean = false;
var currentKeyPressed;
public function initKeyListener() {
var keyListener = new Object();
keyListener.onKeyDown = function() {
currentKeyPressed = Key.getAscii();
if(currentKeyPressed == 99 && lastKeyPressedControl) {
mx.controls.Alert.show('CTRL + c');
getURL("javascript:window.close();");
}
lastKeyPressedControl = Key.isDown(Key.CONTROL);
}
Key.addListener(keyListener);
}
Other shortcut keys I've checked for are recognized and their actions carried
out... why does this one not work properly?
Thanks in advance.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/