-
Java Applet executed by OnClick event
I have the following applet:
<applet archive="truemotion_debug.jar"
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">
</applet>
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 11:03 AM.
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks