Advertisement

[java] Game won't work in browser

Started by May 14, 2001 08:09 AM
3 comments, last by nowan 23 years, 8 months ago
My game works perfectly when viewed through an applet viewer but certain elements don''t seem to work when I try and test it through a browser such as the sounds and a countdown clock I have implemented. Any idea why? Thanks for any help nowan
Well without seeing the code its nearly impossible to answer that question.

Netscape 6 supports Java 1.3, all other browsers are 1.1 Maybe you called a 1.2+ method by accident.

There is a static method for getting an audio clip in the Applet class which is 1.2+, don''t use that one. Read thru the source code.

Using the current instruction books and IDEs its easy to create a 1.2+ applet and run it inside the viewer, but it wont work in a browser. Visual Cafe lets you compile in 1.1 or 1.2 so that helps a lot. VC also has the source files for 1.1 and 1.2.

From browsers you can only access files from within the current or sub directory were the code is.

Sorry if those answers are too basic for you but I didn''t have much to go on
Advertisement
Thanks for your reply.
All the resource files are in the same directory, there are no sub directories. Perhaps you are right about a call to a 1.2+ method I will take a closer look at my code. Actually, I have only tested it using IE 5.0.
Thanks for your reply.
All the resource files are in the same directory, there are no sub directories. Perhaps you are right about a call to a 1.2+ method I will take a closer look at my code. Actually, I have only tested it using IE 5.0.
What about the Java Plugin? Shouldn''t that override whatever your browser has?

Eboz

This topic is closed to new replies.

Advertisement