I can’t find where in the docs that shows me how to get the image name used in display.newImageRect.
“imagename.png”
“path/to/image/imagename.png” - this is path from where your main.lua is
sorry I wasn’t clear.
Given: image = display.newImageRect( “xyz.jpg”, 320, 480)
I there a way to access something like image.name to get "xyz.jpg, or do I just create a var, image.name = “xyz.jpg”?
Nope, you must remember name somewhere because name isn’t available after creation. It’s just parametr what file to load and that’s all
I’ll ask from curiosity: Why do you need it?
the reason I ask is I noticed that some examples using storyboard hard code the image name. that lead me to wonder if there was a property available for the display.newimagerect object.
They have to be hard coded
“imagename.png”
“path/to/image/imagename.png” - this is path from where your main.lua is
sorry I wasn’t clear.
Given: image = display.newImageRect( “xyz.jpg”, 320, 480)
I there a way to access something like image.name to get "xyz.jpg, or do I just create a var, image.name = “xyz.jpg”?
Nope, you must remember name somewhere because name isn’t available after creation. It’s just parametr what file to load and that’s all
I’ll ask from curiosity: Why do you need it?
the reason I ask is I noticed that some examples using storyboard hard code the image name. that lead me to wonder if there was a property available for the display.newimagerect object.
They have to be hard coded