This site requires JavaScript, please enable it in your browser!
Greenfoot back
ajmetal
ajmetal wrote ...

2014/10/1

Image file issue

ajmetal ajmetal

2014/10/1

#
Im trying to create a new class for a projectile in my game but every time I try to set the image I get this error: java.io.FileNotFoundException: C:\Users\ajmetal\Desktop\project\images\Laser.png (The system cannot find the file specified) The image is in my scenario's image folder. What's worse and most unusual is that after I try to set the image and receive the error message the image is DELETED from the image folder. I have to create another one and save it to the folder again. I've tried this with multiple different images and all of them give the same error message and are automatically deleted.
NikZ NikZ

2014/10/1

#
You don't need C:\Users\ajmetal\Desktop\project\images\. You just need Laser.png. Your scenario is trying to find a folder called C: in your images folder.
ajmetal ajmetal

2014/10/1

#
Thanks I figured it out. Whenever I try to set an image by right clicking the class it will only accept images from outside the images folder of my scenario. When calling a method (like for animation) you can use images you've saved in the image folder.
You need to login to post a reply.