netLastModDate()
413
Example
This statement passes a network ID to
netError
to check the error status of a particular
network operation:
--Lingo syntax
on exitFrame
global mynetID
if netError(mynetID)<>"OK" then beep
end
// JavaScript syntax
function exitFrame() {
global mynetID;
if (netError(mynetID) != "OK") {
_sound.beep();
}
}
netLastModDate()
Usage
netLastModDate()
Description
Function; returns the date last modified from the HTTP header for the specified item. The string
is in Universal Time (GMT) format:
Ddd, nn Mmm yyyy hh:mm:ss
GMT
(for example, Thu, 30
Jan 1997 12:00:00 AM GMT). There are variations where days or months are spelled completely.
The string is always in English.
The
netLastModDate
function can be called only after
netDone
and
netError
report that the
operation is complete and successful. After the next operation starts, the Director movie or
projector discards the results of the previous operation to conserve memory.
The actual date string is pulled directly from the HTTP header in the form provided by
the server. However, this string is not always provided, and in that case
netLastModDate
returns
EMPTY
.
Parameters
None.
Example
These statements check the date of a file downloaded from the Internet:
-- Lingo syntax
if netDone() then
theDate = netLastModDate()
if theDate.char[6..11] <> "Jan 30" then
alert "The file is outdated."
end if
end if
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...