UCSC: Music 80R: Flash & Sound Demo: Notes

It should be noted that my demos were done in Flash 8 (2005) and uses ActionScript 2.0. Flash is currently in version "CS" and uses ActionScript 3.0. 3.0 has added a lot of pro­gram­mat­ic sound function, like using cuepoints, but it's really for hardcore programmers only.

Documentation on Sound

In Flash's docs look under:

  • Using Flash: Working with Sound
  • ActionScript 2.0 Language Reference: ActionScript Classes: Sound

Demo Notes

These are the notes I used to step through the demos I gave in class.

Types of Sound Files

  • MP3
  • WAV
  • AIFF Use mp3!

Timeline Based Sound

    Demo File: Demo01_importing.fla
  • Import "glide.mp3"
    Review Libary, test
  • Add 60 frames
  • Drag "glide" to stage, not timeline. OR use properties window (better)
    Don't make new layer
  • Review Properties
    • Sound
    • Effect
    • Sync
    • Event
    • Start
    • Stop
    • Stream (not what you think) we'll come back to this...
  • Insert keyframe @ 30. Set Stop property
  • Test movie
    Demo File: Demo02_short_animation.fla
    Animate to waveform image
  • New File
  • Import tremor
  • Set to 100 frames
  • New layer
  • Select frame 1 in layer 2
  • Use prop win to set sound
  • SET TO STREAMING
  • Demo event vs stream with ENTER playback
  • Playback, show scrubbing
  • Create ball symbol
  • Resize to fill screen
  • Keyframe @ 45, set alpha to 0
  • Set animation
  • Keyframe @ 46, set alpha back to 100
  • Keyframe @ 95, set alpha to 0
  • Set animation
  • Test movie

Behaviors Based Sound

    Demo File: Demo04_behaviors
  • In Docs: Using Flash: Working with Sound: Controlling Sound Playback Using Behaviors
  • Import boing and riff sounds
  • VERY IMPORTANT: Set linkage, explain concept
  • Create button and label
  • Attach to buttons
  • Load Boing button
  • Demo
  • Create Play Boing button
  • Demo Play Boing not working, then working after loading
  • Create Play 99 boings
  • Look at code from buttons
  • Demo Play 99 boings
  • Create Load Riff, Play Riff, Stop Riff, Stop All
  • Demo load, play, and stop riff
  • Play 99 boings
  • Stop Riff wont stop boings, but Stop All will
  • Create Stream Benjamin, Stop and Start
  • Stream mp3 (tends to crash in test movie)
    Demo File: Demo05_Code
  • New Movie - behaviors not just for buttons
  • Import "riff.mp3" (don't set link)
  • Attach load sound behavior to frame
  • Copy and paste play riff and stop riff
  • Bore test movie - anything wrong?
  • Test movie
  • No sound!
  • Set linkage, point out common error
  • Test again.
  • Demo multiple sounds
  • To get around add Stop riff behavior to button, before play

Publish

  • Flash & HTML
  • Set
  • Publish
  • Drag html file to browser
  • Look at source html

Creative Commons License
This web site and its contents are licensed under a
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.
Hosted by GreenGeeks, the Green Energy Web Hosting

This page () was last updated on September 23, 2011