Livecode Wiki
Advertisement

A Message sent when updates on ongoing url requests are communicated. If there is a message handler by the same name in the message path, then it will be executed.

Message[]

Syntax:

urlProgress <url>, <status>, [<message>, [<bytesTotal>]]

The parameter <url> is the name of the url for which a message is being sent. The parameter <status> is the type of update message being sent - contacted, requested, loading, uploading, downloaded, error, bytesReceived, erroMessage. The parameter <message> is a message sent with some of the status parameters. The parameter <bytesTotal> is Empty if the web server does not send the total data size.

Sent when updates on ongoing url requests are communicated. This message is periodically sent to the object whose script initiated the operation.

Message handler[]

Examples:

on urlProgress pUrl, pStatus
   if pStatus is "downloaded" then
      answer "Finished downloading" with "Okay"
   end if
end urlProgress
on urlProgress pUrl, pStatus, pMessage
   if pStatus is "error" then
      answer "Encountered Error:" && pMessage with "Okay"
   end if
end urlProgress
Advertisement