Sounds can be embedded in the SWF at author-time or loaded externally at runtime. Although embedded sounds can be manipulated through the timeline properties in the Property inspector, usually embedded and external sounds are controlled dynamically using the Sound object in ActionScript. Sounds can add life to your movies by providing background soundtracks or user-interface feedback.
This sample demonstrates sound loading and playback using a simple set of custom controls. Click the buttons to control the sound or click the numeric stepper to change sounds.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.
More Like This
- Time sample: Stopwatch timer
- Media sample: Dynamic sound generation
- Media sample: TLF text formatting using CSS
- Media sample: Sound channels
- Media sample: Image loading
- Media sample: Dynamic text
- Interactivity sample: Background scrolling
- Interactivity sample: Joystick-controlled movement
- Game sample: Maze
- Drawing sample: 3D rotation