decapitator
06-23-2008, 03:06 PM
Hello Everyone,
I came across yet another problem this time about the combination of MXS and a Flash ActiveXObject.
The problem is just like I know from the dotNET listview example about the label edit part. So in that case it isnt such a real problem since they thought of enableAccelerators. So thats what I did in my case with my flash movie... This works.. But not good.
Most of the typing works except for a few things like the RETURN key wont register a new line while if you open the SWF with the flash player (or if you dont have open in your browser) the textField would work as it should. Also when using CTRL+C etc it replaces the selection with some kind of garbage char (this can be worked around in flash itself but its not what it should be).
After some (more like 6) hours of research I managed to find these thingsI figured out that for some CTRL combinations windows actually generates multiple messages. For example, CTRL+C will generate:
WM_KEYDOWN: VK_CONTROL
WM_KEYDOWN: 0x43 (ASCII for 'C')
WM_CHAR: VK_CANCEL (0x03)I believe the problem is that flash is received the VK_CANCEL and trying to draw ASCII character 0x03 which ends up replacing the selection with a garbage character.
I have modified my projector to filter out the sending of non-drawable WM_CHAR messages and this seems to avoid the garbage characters in flash. I will now try to implement the suggested code to see if I can get the copy and paste to actually work!If he's correct about that it explains why its doing the same thing here a bit further down it was replied withOr you could have added code to pre-translate accelerator messages to your window's message loop in your C++ project. That would translate the raw keystroked into the correct windows messages before they get to the Flash player and would have required no code changes in your FLA. That's pretty much how I do it in SWF StudioBut max only has enableAccelerators (or does that come down to the same thing?). If you have tried my example (at the bottom) disabeling it does help a bit if you want to write down text. But it still adds that garbage char when trying copy/paste, and it still freaks on the RETURN key.
Im not expecting much flash guru's here but for what I see its more the MXS side thats not cooperating. Im hoping someone might have come across this in dotNET or something, or has any suggestions on how this could be fixed.
My example files can be found here in the attatchment or at http://www.box.net/shared/s0dxrk6wwg (http://www.box.net/shared/exobm1lkwc) (zip file with ms, fla (Flash CS3), swf and a txt file with the ActionScript used)
From what I know the site works fine although I never used it before, but im forced to use something like that since I'm not allowed ftp access at the office. If there are any problems please notify me and ill try to fix something else.
Regards,
Jenne
Edit: Oh and is there a way to trigger something when a dialog gets focus becouse the enableAccelerators is set back once you click outside the dialog. So when you move back in its on true while it should be off.
Edit2: added attatchment
I came across yet another problem this time about the combination of MXS and a Flash ActiveXObject.
The problem is just like I know from the dotNET listview example about the label edit part. So in that case it isnt such a real problem since they thought of enableAccelerators. So thats what I did in my case with my flash movie... This works.. But not good.
Most of the typing works except for a few things like the RETURN key wont register a new line while if you open the SWF with the flash player (or if you dont have open in your browser) the textField would work as it should. Also when using CTRL+C etc it replaces the selection with some kind of garbage char (this can be worked around in flash itself but its not what it should be).
After some (more like 6) hours of research I managed to find these thingsI figured out that for some CTRL combinations windows actually generates multiple messages. For example, CTRL+C will generate:
WM_KEYDOWN: VK_CONTROL
WM_KEYDOWN: 0x43 (ASCII for 'C')
WM_CHAR: VK_CANCEL (0x03)I believe the problem is that flash is received the VK_CANCEL and trying to draw ASCII character 0x03 which ends up replacing the selection with a garbage character.
I have modified my projector to filter out the sending of non-drawable WM_CHAR messages and this seems to avoid the garbage characters in flash. I will now try to implement the suggested code to see if I can get the copy and paste to actually work!If he's correct about that it explains why its doing the same thing here a bit further down it was replied withOr you could have added code to pre-translate accelerator messages to your window's message loop in your C++ project. That would translate the raw keystroked into the correct windows messages before they get to the Flash player and would have required no code changes in your FLA. That's pretty much how I do it in SWF StudioBut max only has enableAccelerators (or does that come down to the same thing?). If you have tried my example (at the bottom) disabeling it does help a bit if you want to write down text. But it still adds that garbage char when trying copy/paste, and it still freaks on the RETURN key.
Im not expecting much flash guru's here but for what I see its more the MXS side thats not cooperating. Im hoping someone might have come across this in dotNET or something, or has any suggestions on how this could be fixed.
My example files can be found here in the attatchment or at http://www.box.net/shared/s0dxrk6wwg (http://www.box.net/shared/exobm1lkwc) (zip file with ms, fla (Flash CS3), swf and a txt file with the ActionScript used)
From what I know the site works fine although I never used it before, but im forced to use something like that since I'm not allowed ftp access at the office. If there are any problems please notify me and ill try to fix something else.
Regards,
Jenne
Edit: Oh and is there a way to trigger something when a dialog gets focus becouse the enableAccelerators is set back once you click outside the dialog. So when you move back in its on true while it should be off.
Edit2: added attatchment
