MACROMEDIA FLASH 8-DEVELOPING FLASH LITE 2.X Develop Manual page 54

Developing flash lite 2.x applications
Hide thumbs Also See for FLASH 8-DEVELOPING FLASH LITE 2.X:
Table of Contents

Advertisement

About synchronizing device sounds with animation
Device sounds in Flash Lite are always treated as event sounds. This means that you can't
synchronize device sounds with animation in the timeline in the same manner that you can
with native Flash sounds. However, you can use device sounds to approximate true
synchronized sound by setting the Flash Lite player's
When this property is set to
SWF file's specified frame rate. As long as the device sound data is authored for the correct
duration, and as long as the device plays back sound data at the expected rate, animation and
sound will be close to being synchronized.
For example, suppose you have a device sound that's 5 seconds long. During playback, you'd
like this sound to play in synch with animation in the timeline. Also assume that your
application's frame rate is set to 15 FPS. When you start the sound—either by attaching it to
a frame in the timeline or calling
_forceframerate = "true"
Lite ensures that the playback head has advanced 15 frames in the timeline. If, for some
reason, the player cannot render each frame in the animation during this time, it drops frames
to maintain the specified frame rate.
For more information about the
in Flash Lite 2.x ActionScript Language Reference.
Determining supported device sound formats
The
System.capabilities.audioMIMETypes
types that the device supports. You can use this information to determine what types of device
audio your application can play. The array's indexes are the same as the supported MIME
types, so you can easily check whether a device supports a specific type of audio.
For example, the following code first checks whether the device supports playback of MIDI
audio before loading an external MIDI file:
if (System.capabilities.audioMIMETypes["audio/midi"]) {
my_sound.loadSound("soundtrack.mid");
}
54
Working with Sound, Video, and Images
, Flash Lite drops frames from animation to maintain the
true
Sound.start()
. Subsequently, for each second of device audio playback, Flash
_forceframerate
property contains an array of audio MIME
_forceframerate
—you simultaneously set
property, see
_forceframerate
property to
.
true
property

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-DEVELOPING FLASH LITE 2.X and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents