Posts in Category "Media"

Embedding assets in your mobile application

Traditionally flash developers have been more focused on the browser to deliver their content. While delivering the content through the browser, developers generally embedded their assets within the root swf. Honestly, there is no other way except loading these images off their servers but this could have resulted in a lag whilst the content was running

With AIR however, developers need to make certain changes to their applications to make them more apt for deployment on mobile devices. With AIR, developers get access to the file system and the assets for their content can be accessed off the file system instead of being embedded within the root swf. Assets for the application should be packaged along with the application and then should be accessed on demand by simply loading them using a Loader.

Continue reading…

Silencing audio on iOS with Ambient Audio Playback Mode

The aural experience of an application is just as impactful as the visual or gestural experiences. A good background score and sound control can be the making of a runaway hit, just as a bad one can ruin a perfectly great application. As a result, it’s very important to get the audio accompaniments of your application just right. In Adobe AIR, the SoundMixer.audioPlaybackMode property gives some control over the behavior of audio output. Now, in the upcoming Adobe AIR 3.4, the application developer has another option to fine tune audio output – the new Ambient AudioPlaybackMode. You can download Adobe AIR 3.4 beta from Adobe Labs.

Upto Adobe AIR 3.3, there were only two modes: Media and Voice. Both these modes play sound in a manner assuming that the sound is central to the operation of the application. In these modes, sound continues to play even when the application is in the background or if the screen is locked. Most importantly, sound played in these modes does not obey the hardware silent switch on iPhones and iPads.

The new Ambient AudioPlaybackMode in Adobe AIR 3.4  fills in the requirement for a sound that is just an accompaniment to your application, not its main purpose. On iOS, Ambient mode allows the user to silence your application by flipping the silent switch or locking the screen. To use Ambient mode, simply set the audioPlaybackMode property of the SoundMixer class to AudioPlaybackMode.AMBIENT.

import   flash.media.AudioPlaybackMode;
import   flash.media.SoundMixer;
SoundMixer.audioPlaybackMode  =  AudioPlaybackMode.AMBIENT;

Continue reading…