Header Sep
Latest News
My Rating Score
Login to rate page

March 16, 2007
Getting started with sound in Macromedia Flash Lite

[Back]

 

Next in our series of mobile development tutorials is the new "Getting started with sound in Macromedia Flash Lite" tutorial authored by Hayden Porter from AVIarts, a Flash mobile developer and musician with a special interest in integrating sound and music with mobile devices. Hayden is also the editor for www.sonify.org, an online resource for information on interactive sound for the web and mobile.

Download tutorial here>>

 

This tutorial starts by introducing Flash Lite 1.1 and MIDI, continues by outlining how this applies to Sony Ericsson mobile phones and how to integrate MIDI with Flash Lite. Hayden then guides developers through an example to try and includes useful additional information as appendices. Here's an overview:

Introducing Flash Lite
An important difference between Flash Lite for mobile devices and Flash for desktop PCs is that Flash Lite supports two different sound systems. Some versions of Flash Lite 1.1 support "native audio" features similar to the desktop PC player. Others support "device sound", a new feature enabling Flash Lite to play sound in formats supported by a phone operating system. Sony Ericsson Flash-enabled phones only support "cached device sound", which means that sounds to be played, first have to be stored in the phone, before it can be redirected to the audio player.

Introducing MIDI
Flash Lite 1.1 for Sony Ericsson Java ME phones supports sound in the MIDI format through the device sound implementation. MIDI is probably the most commonly used device sound format world-wide and is also the most widely supported sound format for Flash Lite.

MIDI is an effective sound format for Flash Lite content for Sony Ericsson phones. It can be used for sound effects, user interface sounds, music, or repeating backing tracks in animations, games and applications. The MIDI format is the most widely supported sound format for Flash Lite and its small file size and CPU efficiency are important for optimal performance on mobile devices and for delivering content over the air.

Hayden Porter continues by explaining MIDI sequencers and how to integrate MIDI files with Flash Lite through embedding MIDI in SWF, ActionScript sound control and synchronizing MIDI with animation.

Target Ball game example
Included in the tutorial zip-file is an example to demonstrate how to use MIDI sound effects in a Flash Lite game. Hayden guides you through how to design various MIDI sound effects for the target ball in the game, including falling-through-the-air and impact sounds.

After creating these sound effects, Hayden presents the code for how to turn sounds on and off and then discusses how to synchronize the MIDI sound effect with the animation.

 
Assigning a track to the MIDI file for the sound effect for a tightly wound spring.

Other tutorials currently available include:

If you have a suggestion for another tutorial subject area, please login and add your idea to the "Add comment" option at the end of this article.

More information:

 

My Rating Score
Login to rate page