Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)

image path setting in BB10 IDE

Hi,

I am poring some SDL games to BB10. One problem I meet is the image path setting in the project. The project has a folder named " data" where all image and sound files sit. In the folder there are some subfolders named "Image1" "Image2"... Then in each subfolders there are resource files.
As the images are used in the code like " openImage("data/Image1/Image001.png")", I plan to copy the whole data folder to device in app/native/data. But after that the application throws the error "no image001.png file found". I have checked the cocos2d-x source code and tried to follow the TestCpp project. I even also create a linked resource folder "Resource" associated with data folder. But it still doesn't work. Could you please give an idea how to set resource path for this issue? I have got one way which needs specification for each .png file in bar-descriptor.xml as     <asset path="data/Image1/Image001.png">data/Image1/Image001.png</asset>.
But there are about a hundred png files and one typo will kill me!
Thanks.