TRANS FAILED: Unable to load image file error..

Monkey Targets Forums/HTML5/TRANS FAILED: Unable to load image file error..

AaronK(Posted 2012) [#1]
Hi guys. I'm building my app generally with GLFW but I decided to do an HTML build to see it in action, however I always get this error

TRANS FAILED: Unable to load image file path/to/game.data/file.png

Is there some issue with pngs and HTML or do I have to structure my data directory in a certain way for HTML?

Cheers


therevills(Posted 2012) [#2]
How are running your HTML? Monkey HTML5 games need to be run from a server.


slenkar(Posted 2012) [#3]
do you have any mixing of / and \?

post the actual file path here


AaronK(Posted 2012) [#4]
Hi guys.

@therevills, I'm just running it form within Monk with Build and Run. All the demos work OK.

@slenkar, No paths, I'm just loading images from the data directory. The path is

Users/me/Development/Game/Game.data/test_640.png'


slenkar(Posted 2012) [#5]
try without the underscore, try without the numbers,
make sure there are no varialbles or files with the same name
just tossing random ideas atcha that MIGHT work


therevills(Posted 2012) [#6]
Could you share the code and image?


DruggedBunny(Posted 2012) [#7]

TRANS FAILED: Unable to load image file path/to/game.data/file.png



I notice this is lower-case (though obviously you've manually edited this), whereas the path you've posted above is mixed -- are you using the same case in your code?

I'm not totally sure if Monkey treats media filenames with case-sensitivity (or if it might have different effects on different targets)...

If that's not it, does the PNG load into a simple test app? What happens if you backup the existing PNG and replace it with a known-working PNG from the Monkey/bananas folder? (Giving it the name of the 'real' PNG.)

Failing that, what therevills said! ^^