iPhonePickMedia works but strange problem
Posted: Fri Jan 27, 2012 10:19 am
An iPad app I have been working on for some time uses iPhonePlaySound to play song files put in the Documents folder via iTunes file sharing and this has worked with no problem. Now that iPhonePickMedia is available, that would be a much better way of selecting songs, so I have been trying it out. The odd thing is that iPhonePlaySound works fine on a path delivered from Documents, but stubbornly will not play one via iPhonePickMedia.
So I created a simple stack with just three buttons with the following code:
GetSong
global tSongFile
on mouseUp
iPhonePickMedia "music"
put the result into tSongFile
end mouseUp
PlaySong
global tSongFile
on mouseUp
iPhonePlaySound tSongFile "1"
end mouseUp
SimplePlay
global tSongFile
on mouseUp
play tSongFile
end mouseUp
On the iPad, the song will play with the SimplePlay button, but nothing happens with the PlaySong button (which is the one I need).
There is probably a simple answer to this (as usually happens with me) and I'd be grateful for any help.
TIA
Don
So I created a simple stack with just three buttons with the following code:
GetSong
global tSongFile
on mouseUp
iPhonePickMedia "music"
put the result into tSongFile
end mouseUp
PlaySong
global tSongFile
on mouseUp
iPhonePlaySound tSongFile "1"
end mouseUp
SimplePlay
global tSongFile
on mouseUp
play tSongFile
end mouseUp
On the iPad, the song will play with the SimplePlay button, but nothing happens with the PlaySong button (which is the one I need).
There is probably a simple answer to this (as usually happens with me) and I'd be grateful for any help.
TIA
Don