I think if you just give the complete path to the earth.jpg file, it will work.
This solution is only if you are running the applet locally in a browser.
Otherwise you will probably have to make a URL, etc. to download textures, etc.
remotely.

"Kasparian, Raffi J." wrote:

> Hello all,
>
> This is my first submission to this group. I have successfully run several
> 3D applets in Internet Explorer 5 but I can't get IE5 to run an applet that
> loads a texture such as EarthApp (from the 3D tutorial). IE just seems to
> hang when it gets to the statement
>                 ImageComponent2D image = loader.getImage();
>
> Does anyone know what the problem is?
>
> Following is the code from the tutorial that contains the above statement:
>
>     Appearance createTwistAppearance(){
>
>         Appearance twistAppear = new Appearance();
>
>         String filename = "earth.jpg";
>
>         System.out.println("attempt to load texture from file: "+filename);
>         TextureLoader loader = new TextureLoader(filename, this);
>         ImageComponent2D image = loader.getImage();//CAUSES IE5 TO HANG
>
>         if(image == null) {
>             System.out.println("load failed for texture: "+filename);
>         }
>
>         Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,
>                                       image.getWidth(), image.getHeight());
>         texture.setImage(0, image);
>         texture.setEnable(true);
>
>         texture.setMagFilter(Texture.BASE_LEVEL_LINEAR);
>         texture.setMinFilter(Texture.BASE_LEVEL_LINEAR);
>
>         twistAppear.setTexture(texture);
>
>         return twistAppear;
>     }
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to