View Full Version : Media Player Object Plugin & e_key
I have a problem, in a page (640x480 pixels) I insert the media player plugin (352x288 pixels), I used On_show event of the page for load and play the video, but the e_key on On_key event donīt work.
In the documentation you say that the video object have the focus in the Z_order, but my video object is more small that the page, that is to say, there is place so that the page has the focus, and activates the events On_key event.
what I can make to control the video with the keyboard?.
In the video fullscreen mode, apparently returns to the normal video mode if one presses the key esc, I can I assign another key to this function?
02-03-2004, 06:41 PM
(Directed toward first question of yours)
[Edit] I put a MediaPlay object on my page and with the code suggestions here (tweaked to your project of course) should work, as it did for me! [/End Edit]
Let me explain how I handled the same sort of "setback" with e_Key events and Flash objects:
I first placed the Flash object (movie) in the spot on a page in my project where I wanted it.
Next, I put an Input box on that same page. (Needed one anyway).
Then on the Page's On Show event I put Page.SetFocus("ListBox1");.
Which led me to insert the following code into the Listbox's On Key event area:
if e_Key == 27 then
close = Dialog.Message("confirm", "Are you sure you want to quit this application?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON2);
if close == IDYES then
When the Page "shows" (loads up) the Listbox object receives 'focus' and then is ready to receive the key press (if it ever comes from the user) of the ESC key (ASCII code # 27).
If the ESC key is pressed I have code to stop the Flash object from playing its 'movie'.
*Note: This stumped me longer than any other problem to date with concerns to AMS 5.0 (Pro). As the Flash movie (or it seemed) stopped e_Key events from 'firing'. I hope this helps you through your situation, if I understood it correctly.
Thank you for your patience.
The problem is that the Media Player Object Plugin, doesn't have the on_key event.
however, the key was in your solution..
1) In a page (Page1) I insert the media player plugin (VideoPlugin1).
In the On Show event of Page1: I load the video file
then I play the video.
2) In the Media Player Plugin (VideoPlugin1).
that now is playing the video..
In the On Play event:
And now the solution...
return the focus to the page1
and now I have the On key event available of the Page1 for control the MediaPlayer, for example.
In the On key event of the Page1
if e_Key == 96 then
thanks for your help.
02-04-2004, 10:13 AM
I am glad this helped to find a proper solution.
Don't forget to check in to using:
...with a e_Key event for the second question you posted!
I Try to return from the fullscreen mode, but it looks like that the only way is to press the esc key.
I am using a remote control (streamzap), and I cannot assign to the key esc to him.
I thought about modifying the size of the object video, in order to simulate the size they fullscreen.
the idea is to use the page of bottom with black color with a size of for example 640x480 pixels, and change to the size of the object video to 640x470 pixels, this way it would be left an area of the page that could receive the events on key.
I tried to do this with: Plugin.SetSize("Movie1", 640, 480); where Movie1 is the name of the media player object plugin, but I have not obtained any result.
there is some way to solve this?
Powered by vBulletin™ Version 4.0.6 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.