Description
System message and event handler; called periodically to determine how much of an object has
been downloaded from the Internet. The handler is called only if
has been called, and the handler has been added to a movie script.
The
on streamStatus
URL
Displays the Internet address of the data being retrieved.
Displays the state of the stream being downloaded. Possible values are
state
Started
Displays the number of bytes retrieved from the network so far.
bytesSoFar
bytesTotal
Displays the total number of bytes in the stream, if known. The value may be 0 if the
HTTP server does not include the content length in the MIME header.
Displays an empty string ("") if the download has not finished; OK (
error
download completed successfully; displays an error code if the download was
unsuccessful.
These parameters are automatically filled in by Director with information regarding the progress
of the download. The handler is called by Director automatically, and there is no way to control
when the next call will be. If information regarding a particular operation is needed, call
getStreamStatus()
You can initiate network streams using Lingo commands, by linking media from a URL, or by
using an external cast member from a URL. A
information about all network streams.
Place the
streamStatus
Example
This handler determines the state of a streamed object and displays the URL of the object:
-- Lingo syntax
on streamStatus URL, state, bytesSoFar, bytesTotal
if state = "Complete" then
put(URL && "download finished")
end if
end streamStatus
// JavaScript syntax
function streamStatus(URL, state, bytesSoFar, bytesTotal) {
if (state == "Complete") {
put(URL + " download finished");
}
}
See also
getStreamStatus(),
198
Chapter 10: Events and Messages
event handler has the following parameters:
,
,
InProgress
Complete
.
handler in a movie script.
tellStreamStatus()
tellStreamStatus (TRUE)
, and
.
Error
handler will be called with
streamStatus
,
Connecting
) if the
OK
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers