In my app, I’ve downloaded an image file to the system.DocumentDirectory directory. I’d like to use the image as a button but when I reference it (code below), the app crashes. Am I not referencing the file location correctly?
logo = widget.newButton({
defaultFile = 'customlogo.png',
width = 300, height = 180,
x = display.contentWidth * 0.5,
y = display.contentHeight * 0.5 - 250,
onRelease = function()
sounds.play('tap')
display.remove( appSceneGroup)
appSceneGroup = nil
composer.gotoScene( "scenes.class", {time=250, effect="crossFade"})
end