To execute a network script operation:
Start the operation.
1
For example, the following statement initiates a text downloading operation and assigns the
network ID returned by the
theNetID = getNetText("http://www.thenews.com")
Make sure that the operation finishes.
2
To check an operation's status regularly until the method indicates that the operation is
complete, use the
netDone()
Scripting Reference topics in the Director Help Panel.
For example, the following statement loops in the current frame until the download operation
is complete:
if not(netDone(theNetID)) then _movie.go(_movie.frame)
Check whether the operation was successful by using the
3
information about this method, see the Scripting Reference topics in the Director Help Panel.
Obtain the results if the operation is complete.
4
Note: You can also use getStreamStatus() to determine the status of a network operation. You can
use
to check whether an operation is "done" or "not done". By using getStreamStatus(),
netDone()
you can check on an operation's progress, as it displays how many total bytes there are and how
many have been downloaded so far.
To cancel a network operation in progress:
•
Use the
netAbort()
frees up capacity for Internet access, which lets other network operations finish faster. For more
information about this method, see the Scripting Reference topics in the Director Help Panel.
To retrieve a file as text:
Use the
1
getNetText()
information about this method, see the Scripting Reference topics in the Director Help Panel.
Use the
2
netTextResult()
. For more information about this method, see the Scripting Reference topics in
postNetText
the Director Help Panel.
To retrieve and play a new Shockwave movie from the network:
•
Use the
gotoNetMovie()
Reference topics in the Director Help Panel.
The current movie continues to run until the new movie is ready to play. After the new movie is
ready, the player quits the current movie and plays the new movie in the same display area as the
calling movie.
To open a URL in the user's browser:
•
Use the
gotoNetPage()
content, HTML, or another MIME type. For more information about this method, see the
Scripting Reference topics in the Director Help Panel.
You can specify that this method replaces a page's content or opens a new page. If the browser is
not open, the method launches the browser. If the
which the movie is playing, the movie keeps playing until the browser replaces the page.
getNetText()
method. For more information about this method, see the
method to cancel a network operation without waiting for a result. This
method or the
postNetText
method to return the text you retrieved with
method. For more information about this method, see the Scripting
method. This method works whether the URL refers to Shockwave
Downloading files from the Internet with Lingo or JavaScript syntax
operation to the variable
netError()
method to start retrieving text. For more
method replaces the page in
gotoNetPage
:
theNetID
method. For more
or
getNetText
475
Need help?
Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?
Questions and answers