minSpeed
859
Example
This statement converts milliseconds to seconds and minutes by dividing the number of
milliseconds by 1000 and dividing that result by 60, and then sets the variable
currentMinutes
to the result:
-- Lingo syntax
currentSeconds = _system.milliseconds/1000
currentMinutes = currentSeconds/60
// JavaScript syntax
var currentSeconds = _system.milliseconds/1000;
var currentMinutes = currentSeconds/60;
The resolution accuracy of the count is machine and operating system dependent.
This handler counts the milliseconds and posts an alert if you’ve been working too long:
-- Lingo syntax
on idle
if (_system.milliseconds > (1000 * 60 * 60 * 4)) then
_player.alert("Take a break")
end if
end
// JavaScript syntax
function idle() {
if (_system.milliseconds > (1000 * 60 * 60 * 4)) {
_player.alert("Take a break");
}
}
See also
System
minSpeed
Usage
member(
whichCastmember
).modelResource(
whichModelResource
).
emitter.minSpeed
Description
3D property; when used with a model resource whose type is
#particle
, allows you to get and
set the minimum speed at which particles are emitted. Each particle’s initial velocity is randomly
selected between the emitter’s
minSpeed
and
maxSpeed
properties.
The value is a floating-point number and must be greater than 0.0.
Example
In this example, ThermoSystem is a model resource of the type
#particle
. This statement sets
the
minSpeed
property of ThermoSystem to 5, which causes the slowest particles of
ThermoSystem to move somewhat slowly. Within a given particle system, the slower a particle
moves, the shorter the distance it will travel.
member("Fires").modelResource("ThermoSystem").emitter.\
minSpeed = 5
See also
maxSpeed
,
emitter
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...