284
Chapter 12: Methods
date() (System)
Usage
-- Lingo syntax
_system.date({
yyyymmdd
})
// JavaScript syntax
_system.date({
yyyymmdd
});
Description
System method; returns the current date in the system clock.
The format Director uses for the date varies, depending on how the date is formatted on the
computer.
•
In Windows, you can customize the date display by using the International control panel.
(Windows stores the current short date format in the System.ini file. Use this value to
determine what the parts of the short date indicate.)
•
On the Macintosh, you can customize the date display by using the Date and Time
control panel.
Parameters
yyyymmdd
Optional. A number that specifies the four-digit year (
yyyy
), two-digit month (
mm
),
and two-digit day (
dd
) of the returned date.
Example
This statement tests whether the current date is January 1 by checking whether the first four
characters of the date are 1/1. If it is January 1, the alert “Happy New Year!” appears:
-- Lingo syntax
if (_system.date().char[1..4] = "1/1/") then
_player.alert("Happy New Year!")
end if
// JavaScript syntax
if (_system.date().toString().substr(0, 4) == "1/1/") {
_player.alert("Happy New Year!");
}
See also
System
delay()
Usage
-- Lingo syntax
_movie.delay(
intTicks
)
// JavaScript syntax
_movie.delay(
intTicks
);
Description
Movie method; pauses the playhead for a given amount of time.
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...