User Guide

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.