I am trying to load a video from the web and then store it on iOS device and then play it.
I am having trouble with this code:
The file is not getting saved in "cache" folder.
It's not playing in the simulator either.
The mov is getting displayed as raw code in msg box however.
There is an error towards the end of the code too.
Code: Select all
on mouseUp
put specialFolderPath("cache") & "/check.mov" into tMypath
if there is a file tMyPath then
iphoneControlSet "ioscontrol", "filename", tMyPath
iphoneControlSet "ioscontrol", "preserveAspect", true
iphoneControlSet "ioscontrol", "showController", true
iphoneControlSet "ioscontrol", "visible", true
iphoneControlSet "ioscontrol", "rect", "184,193,584,720"
iphoneControlDo "ioscontrol", "play"
else
answer "Download Movie"
put "binfile:" before tMyPath
put URL "http://dirtysalsa.com/1/check.mov" into URL tMyPath
end if
end mouseUp
Thanks,
Debdoot