1
Ask a Question / Solved: Access to Assets
« on: February 10, 2017, 08:57:57 am »
Say, I want to make an extension with some specific assets I don't want to put before hand in /extras
for example an image.
I put inside my include.nmml
I can test the access by
It is ok, but I want to be able to test by path ...
I know that I can put a rename tag
<assets path="images/MyImage.png" rename="path/to/MyImage.png"/>
But I unable to find a path that doesn't answer "false" to the question
Assets.exists("path/to/MyImage.png",AssetType.IMAGE)
Thanks for any help
for example an image.
I put inside my include.nmml
Code: [Select]
<assets path="images/MyImage.png" id="MonImage"/>
I can test the access by
Code: [Select]
if (Assets.exists("MonImage", AssetType.IMAGE)){
trace("I've got MyImage by Id");
}
It is ok, but I want to be able to test by path ...
I know that I can put a rename tag
<assets path="images/MyImage.png" rename="path/to/MyImage.png"/>
But I unable to find a path that doesn't answer "false" to the question
Assets.exists("path/to/MyImage.png",AssetType.IMAGE)
Thanks for any help