Macromedia flash mx professional 2004-macromedia flash lite 1.1 authoring guidelines Benutzerhandbuch
Platform integration commands
39
Return value
A value of -1 if the function is not supported; otherwise, the maximum volume level, returned as
a number.
a number.
GetVolumeLevel()
The
GetVolumeLevel()
function returns the current volume level of the mobile phone. It is a
numeric value, in the range of 0 to the maximum value returned by
GetMaxVolumeLevel
.
The
GetVolumeLevel()
function is executed immediately upon invocation. If this function is
not supported, a value of -1 is returned.
Syntax
status = FSCommand2( "GetVolumeLevel” )
Return value
A value of -1 if not supported; otherwise, the volume level, returned as a number.
Vibrate
The commands in this section provide the mobile phone’s vibration information to Flash content
on the mobile phone.
on the mobile phone.
StartVibrate()
The
StartVibrate()
function starts the phone’s vibration feature. The pulse of the vibration is
specified by an “on” time followed by an “off ” time. Both the on time and the off time are
specified in milliseconds, and neither can exceed 5 seconds. The pulse can be repeated
sequentially, up to three times.
specified in milliseconds, and neither can exceed 5 seconds. The pulse can be repeated
sequentially, up to three times.
If a vibration is already occurring, that vibration is stopped before the new specified one is started.
Vibrations are also stopped when the Flash application playback is stopped or paused, and when
Flash Player is exited.
Vibrations are also stopped when the Flash application playback is stopped or paused, and when
Flash Player is exited.
This function is executed immediately upon invocation. If this function is not supported, a value
of -1 is returned.
of -1 is returned.
Syntax
status = FSCommand2( "StartVibrate”, time_on, time_off, repeat )
In this example,
time_on
is the amount of time in milliseconds (the maximum is 5 seconds) that
the vibration is on,
time_off
is the amount of time in milliseconds (the maximum is 5 seconds)
that the vibration is off, and
repeat
is the number of times (a maximum of three) to repeat this
vibration.
Return value
A value of -1 if the function is not supported; 0 if the vibration is started; 1 if an error occurred
and the vibration could not be started.
and the vibration could not be started.