Hello everybody!
This is my first post.
First of all thanks for any help you’ll be able to provide me!!
I’m stuck with a strange and stupid problem…
I’m trying to create a movieclip composed by downloaded images…
I downloaded all the images I need in “system.DocumentsDirectory”.
I’m doing this because my app is multi-language and I’ll download a particular language only if it’s requested by the user or needed.
In the .lua file where I need to use those images I try to create a table but when I start my app the console keeps telling me tha corona failed to find the images, here’s the log:
WARNING: Failed to find image(/Users/lucapinciani/Library/Application Support/Corona Simulator/Space Last copy-FFA5C4308FCFF3269A9FB4C99C5594E8/Documents/help\_0007.png)
then the movieclip.lua crashes at line 43 when it tries to insert the single frame…
g:insert(animFrames[i])
because it could find the image…
I double checked and the images exist inside the sandbox folder of the app…
I also printed on screen what’s inside that folder using a for statment like this one:
local doc\_path = system.pathForFile("/help",system.DocumentsDirectory )
for file in lfs.dir(doc\_path) do
-- file is the current file or directory name
print( "Found file: " .. file )
end
and everything is perfectly at its place…
Here’s how I tryed to create my table…
local path=system.pathForFile("",system.DocumentsDirectory )
tabellaBaloon = { [1] = path.."/help\_0007.png",
[2] = path.."/help\_0008.png",
[3] = path.."/help\_0011.png",
[4] = path.."/help\_0015.png",
[5] = path.."/help\_0018.png" }
-- I also tried this method..
tabellaBaloon = { [1] = system.pathForFile("help\_0007.png",system.DocumentsDirectory ),
[2] = system.pathForFile("help\_0008.png",system.DocumentsDirectory ),
[3] = system.pathForFile("help\_0011.png",system.DocumentsDirectory ),
[4] = system.pathForFile("help\_0015.png",system.DocumentsDirectory ),
[5] = system.pathForFile("help\_0018.png",system.DocumentsDirectory ) }
local baloon = movieclip.newAnim(tabellaBaloon)
none of these worked, corona keeps failing find images…
The funny thing is that I tried to create an image and everything worked perfectly!!
local imageLang=display.newImage("help\_0007.png",system.DocumentsDirectory,true )
I really don’t know what else try…
help please!
Thank you all!
[import]uid: 89720 topic_id: 30561 reply_id: 330561[/import]