views:

81

answers:

1

I'm making something of a java applet gallery for my website (processing applets, if you're interested) and I'd like to keep the applets from running when the site first loads. Then, when the appropriate button is clicked, a piece of javascript would tell the applet to continue execution until another button is pressed to stop it. I know that I can use appletName.start() and appletName.stop(), but it doesn't seem to work on load, at least not well. I'm using element.getElementsById( "applet" ) to get the applets to use the start and stop methods on. It slows Firefox to a crawl for some reason.

A: 

Do you inject the applets with JavaScript or are they already in the HTML?

You need to poll for appletName.isActive(), than you should get an applet that reacts to your pause/resume calls.

digitarald