Java Applet executed by OnClick event
I have the following applet:
code="On2.VPXDecoderApplet.class" height="240" width="320">
<param name="EndImage" value="IMG_4763.jpg">
<param name="InputFileName" value="new.avi">
<param name="Seconds" value="50,20">
<param name="SoundSystem" value="JSND">
<param name="StartImage" value="IMG_4763.jpg">
<param name="TimeOut" value="10000">
<param name="JumpToURL" value="http://www.on2.com/sdks.php3">
It streams a video using On2. The problem is that I want this applet to be executed after the user clicks on a particular pic. At the moment the applet is executed automatically when the page is loaded. How can I change that? Can somebody give me an advice? I will be very grateful...
Since I haven't got the code for this I can only guess what needs to be done;
How about making the applet implement the mouseListener interface and add it
as a mouse listener to whatever component you use for displaying the image, and
start the streaming in the mousePressed() calback method in the applet.
But, this is only an option if you have the source code.
Last edited by sjalle; 04-05-2005 at 12:03 PM.
To sjalle: Thank you for your quick respond. What exactly is mouseListener interface ? I have some experience only with PHP and all this is totally new for me...
In short; its how you code to make your java program respond to mouse-events
like press, release, click. The listener concept is an integral part of the java GUI,
and the mouseListener is just one of many listener types.
To sjalle: Thank you once again. I found some resources from which I can learn more about listener. I hope I'll find a solution after a little digging.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center