The playback of audio files through Flash Platform runtimes on Android devices is fairly straightforward. We can point to files bundled with our application, as this recipe demonstrates, files on the device storage, or files over a remote network connection. No matter where the file is located, playback is accomplished in the same way.
We must load the audio file into a
Sound object and will then have the ability to manipulate playback, volume, pan, among other properties. In this recipe, we will allow the user to control volume through the rotation of a basic dial:
import flash.display.Sprite; import flash.display.StageAlign; ...