Author Topic: Problem with applet loading resources  (Read 3444 times)

Offline skullfire

  • byte
  • *
  • Posts: 1
    • View Profile
Problem with applet loading resources
« on: August 29, 2006, 11:14:23 pm »
Well, I can't get the applet to work on an html... only on the applet Viewer on NetBeans. Perhaps there's something wrong with the dir to the resources?

    public static final String Texture_LightPlayerPiece = "/data/marble.jpg";
    public static final String Texture_DarkPlayerPiece = "/data/wood.jpg";

 texMan.addTexture("LightPlayerPiece", new Texture(documentBase, Resources.Texture_LightPlayerPiece));
        texMan.addTexture("DarkPlayerPiece", new Texture(documentBase, Resources.Texture_DarkPlayerPiece));

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Problem with applet loading resources
« Reply #1 on: August 30, 2006, 01:39:36 am »
What exception do you get?

Are u using a jar file? if using a jar file if so then the 3d files and textures have to be outside the jar file. Are you using software or hardware rendering???
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Problem with applet loading resources
« Reply #2 on: August 30, 2006, 10:43:02 pm »
Have you set the codebase-attribute in the applet tag? It could also be worth a try to put the resources into the same directory as the applet and then do a simple
Code: [Select]
public static final String Texture_LightPlayerPiece = "marble.jpg";
public static final String Texture_DarkPlayerPiece = "wood.jpg";

Just to see, if the directory is causing the problem somehow.