MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 414

Director scripting reference
Table of Contents

Advertisement

// JavaScript syntax
if (netDone()) {
theDate = netLastModDate();
if (theDate.char[6..11] != "Jan 30") {
alert("The file is outdated");
}
}
See also
netDone(),
netError()
netMIME()
Usage
netMIME()
Description
Function; provides the MIME type of the Internet file that the last network operation returned
(the most recently downloaded HTTP or FTP item).
The
function can be called only after
netMIME
is complete and successful. After the next operation starts, the Director movie or projector
discards the results of the previous operation to conserve memory.
Parameters
None.
Example
This handler checks the MIME type of an item downloaded from the Internet and
responds accordingly:
-- Lingo syntax
on checkNetOperation theURL
if netDone (theURL) then
set myMimeType = netMIME()
case myMimeType of
"image/jpeg": go frame "jpeg info"
"image/gif": go frame "gif info"
"application/x-director": goToNetMovie theURL
"text/html": goToNetPage theURL
otherwise: alert "Please choose a different item."
end case
else
go the frame
end if
end
// JavaScript syntax
function checkNetOperation(theURL) {
if (netDone(theURL)) {
myMimeType = netMIME();
switch (myMimeType) {
case "image/jpeg":
_movie.go("jpeg info");
break;
case "image/gif":
_movie.go("gif info");
414
Chapter 12: Methods
and
netDone
netError
report that the operation

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Director mx 2004

Table of Contents