HMStoFrames()
357
Example
This frame script checks to see if the mouse is currently located over a button in a Flash movie
sprite in channel 5 and, if it is, the script sets a text field used to display a status message:
-- Lingo syntax
on exitFrame
if sprite(5).hitTest(_mouse.mouseLoc) = #button then
member("Message Line").text = "Click here to play the movie."
_movie.updatestage()
else
member("Message Line").text = ""
end if
_movie.go(_movie.frame)
end
// JavaScript syntax
function exitFrame() {
var hT = sprite(5).hitTest(_mouse.mouseLoc);
if (hT = "button") {
member("Message Line").text = "Click here to play the movie.";
_movie.updatestage();
} else {
member("Message Line").text = "";
}
_movie.go(_movie.frame)
}
HMStoFrames()
Usage
HMStoFrames(
hms
,
tempo
,
dropFrame
,
fractionalSeconds
)
Description
Function; converts movies measured in hours, minutes, and seconds to the equivalent number of
frames or converts a number of hours, minutes, and seconds into time if you set the
tempo
argument to 1 (1 frame = 1 second).
Parameters
hms
Required. A string expression that specifies the time in the form
sHH:MM:SS.FFD
, where:
tempo
Required. Specifies the tempo in frames per second.
s
A character is used if the time is less than zero, or a space if the time is greater than or equal
to zero.
HH
Hours.
MM
Minutes.
SS
Seconds.
FF
Indicates a fraction of a second if
fractionalSeconds
is
TRUE
or frames if
fractionalSeconds
is
FALSE
.
D
A d is used if
dropFrame
is
TRUE
, or a space if
dropFrame
is
FALSE
.
Содержание 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...