|
|||
|
Is there any opportunity to close video, created as an MCI object by pressing Escape key?
I tried to do it with menu. I set right mouse click to "Ignore. Then create menu like this: Code:
var m = new Menu;
m.createPopupMenu();
m.appendItem("ID", "id\tCtrl+E");
m.enableAccel = true;
Menu.onCommand = function (id)
{
if (id == "ID")
{
my_video.command = "close";
}
}
Code:
m.appendItem("ID", "id\tCtrl+E");
But when I try to set single key, for example "Esc", I get nothing. Please help me to solve the problem. |
|
|||
|
The enableAccel feature cannot handle the esc key. However, it can be captured in the onMessage event:
Code:
getMainWnd().onMessage = FlashPlayer.window.onMessage =
function (msg, wparam, lparam)
{
if (msg == /*WM_KEYDOWN*/0x100 && wparam == /*VK_ESCAPE*/0x1B)
{
Dialogs.msgBox("Hello!");
}
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|