Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2006, 01:33 AM
Junior Member
 
Join Date: Jan 2003
Posts: 12
Default Sending key press message to FlashPlayer

Hello,

I am working on with an old SWF and I do not have to source code (.fla) for it. What I am trying to accomplish is send a left or right arrow key process when the user click either the left or right mouse button. Here is the code I am working with:

var wnd = FlashPlayer.window;
wnd.onMessage = function (message, wparam, lparam){
if (message == /*WM_LBUTTONUP*/0x202){
//send right arrow key press message to Flash Player
Application.sendMessage(FlashPlayer.window, /*WM_CHAR*/0x102, 37, 0);
}
else if (message == /*WM_RBUTTONUP*/0x205){
//send left arrow key press message to Flash Player
Application.sendMessage(FlashPlayer.window, /*WM_CHAR*/0x102, 37, 0);
}
};

My code is is "trapping" the left and right mouse clicks, but it is not sending the arrow key press messages to the Flash Player. Please let me know how to fix my code.


Thank you.
Reply With Quote
  #2 (permalink)  
Old 09-05-2006, 03:53 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Sending key press message to FlashPlayer

Could you please send us your swf file to us? We will try to help you resolve the problem.
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 03:52 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.