Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-04-2005, 02:49 PM
Junior Member
 
Join Date: Aug 2005
Posts: 2
Default Closing video on Escape button press

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";      
   }
}
As you mentioned, I created shortcut "Ctrl+E" in a row
Code:
m.appendItem("ID", "id\tCtrl+E");
All works perfectly.

But when I try to set single key, for example "Esc", I get nothing.

Please help me to solve the problem.
Reply With Quote
  #2 (permalink)  
Old 08-05-2005, 02:17 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Closing video on Escape button press

Hi,

Have you got "Send key press to Flash Player" checked in Application Definition -> Interaction?

Might need to make sure that Escape is not assigned as an exit key either?

Cheers,

G.
Reply With Quote
  #3 (permalink)  
Old 08-05-2005, 09:34 AM
Junior Member
 
Join Date: Aug 2005
Posts: 2
Default Re:Closing video on Escape button press

Of course! I have done everything you mentioned.
Reply With Quote
  #4 (permalink)  
Old 08-05-2005, 03:16 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Closing video on Escape button press

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!");
}
}
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:53 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.