Hi All
i just simply cant get this to work
i have download a file from the internet 114.mp3 to the DocumentsDirectory
i used seperate code to download the 114.mp3 file to DocumentsDirectory
but i just can get it to play with the following code, please help
it returns file not found/does not exist
i have also copied the file manually into the DocumentsDirectory ,but just wont work
local path = system.pathForFile( “114.mp3”, system.DocumentsDirectory )
local fhd = io.open( path )
– Determine if file exists
if fhd then
print( “File exists”…path )
--media.playSound( ‘path’ )
media.playSound( ‘114.mp3’ )
fhd:close()
else
print( “File does not exist!” )
end
Really all i am trying to do is this
1.request to play 114.mp3
2.if 114.mp3 already exists in folder play file
3.if 114.mp3 does not exist download from internet and play
thankyou, please help
p.s 114.mp3 can be any mp3 file