Hi Egon,
I’ve to improve my applet defining a config file where someone can decide what world or another object to load without handling java’s code… I’ve created a config file and I’ve added this code to my applet:
String line;
String worldValue;
String tempFile;
char checkStart;
File f = null;
BufferedReader br = null;
public void init() {
tempFile="ThreeDSim.cfg";
f = new File(tempFile);
try{
br = new BufferedReader(new FileReader(f));
}catch(FileNotFoundException fnfe){
System.out.println("File not found...");
fnfe.printStackTrace();
}
try {
while ((line = br.readLine()) != null) {
if (line.length()>0) {
checkStart = line.charAt(0);
if (checkStart != '*') {
if (line.startsWith("world")) {
worldValue=line.substring(6);
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
.
.
.
Obviously, when I open my html page the applet doesn’t load because I’m trying to access a file in an applet context. So, I’ve defined a certificate to let the applet to access the file…. using the certificate I can now access the file and reading informations without problems…. But, the problem now is that no texture is visible in my applet (as you know, I’m loading texture one by one in this way:texMan.addTexture("car1.jpg",new Texture(getDocumentBase(),"textures/car1.jpg"));
). If is remove the certificate, textures become visible.... but I can’t access the file…. There’s an explanation for this behaviour?
Bye and thanks