Error: No Image asset

I’m targeting html5 and when I do:-

var atlasBitmapData : BitmapData = Assets.getBitmapData(ATLAS_BITMAP);

where ATLAS_BITMAP is assets/images/metalworks_mobile.png I get:-

[lime.utils.Assets] ERROR: There is no IMAGE asset with an ID of "assets/images/metalworks_mobile.png"

My IDE is using the following command to launch the server:-

/usr/local/lib/haxe/lib/lime/7,1,1/templates/bin/node/node-mac /usr/local/lib/haxe/lib/lime/7,1,1/templates/bin/node/http-server/bin/http-server Export/html5/bin -p 3000 -c-1 --cors -o

where my assets directory is in the bin directory.

What I don’t understand is what is the starting directory for searching for the assets directory?

you have to add the folder in your project.xml

<assets path="assets/images" rename="images"/>

and then use the following path images/metalworks_mobile.png.

I tried that and I’m getting:-

Error: Could not find asset path "asset/images"

should be assets right ?

Yes, it is in the project.xml file, but I just typed in wrong in the reply.

Make sure the path you choose exists relative to the project.xml file