screen goes black and freezes with libUrlDownloadToFile

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
colourpixels
Posts: 83
Joined: Mon Oct 31, 2011 5:28 am

screen goes black and freezes with libUrlDownloadToFile

Post by colourpixels » Wed Jan 18, 2012 7:05 am

I've been trying to use:

Code: Select all

 libUrlDownloadToFile "http://website.com/movie1.mp4"
to download a movie, which is working but the IOS screen is locked for the duration of the download (meaning I can't even update a progress bar). Is that normal or am I doing something wrong?

my progress bar update live here:

Code: Select all

on urlProgress pUrl, pMessage,pbytesR,pbytesT
   
    if pMessage contains "loading" then
      set the uValue of grp "Progress" to ((pbytesR/pbytesT)*100)
     
   End if
end urlProgress
Which is firing, 'cause when I throw an Ask dialogue box in the that displays fine, but other than that my screen goes black until the download completes, at which point all is good again. Any thoughts?

Many thanks for any help

Dale

colourpixels
Posts: 83
Joined: Mon Oct 31, 2011 5:28 am

Re: screen goes black and freezes with libUrlDownloadToFile

Post by colourpixels » Wed Jan 18, 2012 7:16 am

Answering my own question, changing the location from on Opencard to an on Touch even fixed it for me. So I guess the lesson is, don't initiate a download in your open card script :)

Cheers
Dale

Post Reply