Downloading Files From The Internet With Lingo - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

Checking whether a frame's contents are loaded
Use the
frameReady()
frame requires are available locally. See

Downloading files from the Internet with Lingo

Lingo uses the Internet's resources by obtaining files from the Internet. The data is copied to the
local disk or cache. After data is available on the local computer, use Lingo to retrieve the data for
the movie. See "Retrieving network operation results with Lingo" on page 597.
For a movie or projector that is playing outside a browser, background loading isn't required.
However, preloading is a good idea because it improves playback performance.
All network Lingo operations that obtain data from the network begin downloading the data and
return a network ID. The data isn't immediately available.
An unlimited number of network Lingo operations can take place at once. When multiple
network Lingo operations run simultaneously, rely on the network ID that the function returns to
distinguish which operation is complete. Be aware that running more than four operations at
once usually adversely impacts performance.
When using network Lingo, the current handler must finish before an operation's result can
return. For best results, place Lingo that initiates a network operation and Lingo that uses the
operation's result in different handlers. An
whether an operation is complete.
To execute a network Lingo operation:
Start the operation.
1
For example, the following statement initiates a text downloading operation and assigns the
network ID returned by the
set theNetID = getNetText("http://www.thenews.com")
Make sure the operation finishes.
2
To check an operation's status regularly until the function indicates that the operation is
complete, use the
For example, the following statement loops in the current frame until the download operation
is complete:
if not netDone(theNetID) then go to the frame
Check whether the operation was successful by using the
3
in the Lingo Dictionary.
netError()
Obtain the results if the operation is complete.
4
To cancel a network operation in progress:
Use the
netAbort
frees up capacity for Internet access, which lets other network operations finish faster. See
in the Lingo Dictionary.
netAbort
596
Chapter 27
function to determine whether all the media elements that the specified
frameReady()
on exitFrame
getNetText()
function. See
netDone()
command to cancel a network operation without waiting for a result. This
in the Lingo Dictionary.
handler is a good location for checking
operation to the variable
in the Lingo Dictionary.
netDone()
netError()
:
theNetID
function. See

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents