Working with "Streaming" Audio in Flash
We're going to place an audio track in a new movie, edit it, and sych a blob to dance to it. Oh, it's a soothing New Agey piano piece I got for free on the Internet (and worth every penny). I have a feeling you'll love working with it. This assignment is all about getting you ready to do your music videos.
1) Open Flash; save the movie as “yourname_audio.fla” to your local folder.
2) Create AS ALWAYS 2 layers (for 3 total), a “MARKERS” layer on top then below it an “ACTIONS” layer.
3) Name first layer: “audiotrack”
4) Select layer "audiotrack" first keyframe; iImport “creed_leadon.mp3” from Netshare > Multimedia > bocek_mm210 > audio_proj --- note that nothing happens on the stage
5) But, open the library and see that the mp3 IS in there. Drag this mp3 from library to the stage, and look at the keyframe in layer "creed_mp3": you’ll see a little line appears in it.
6) Click on frame 40; insert frame and let the frames fill in.
You’ll see that the “line”you saw on frame 1 is actually a waveform for the audio track of the mp3. Notice that you aren’t at the end of the track. Click and drag the playhead back and forth across the frames (playhead: the red rectangle where the frame numbers are). If all is as it should be, you should hear the track playing forwards and back. This is called "scrubbing." If it doesn't, check the next section for the reason.
7) Let's see what we've got, and what properties are available. Click on any of the frames of the audiotrack layer, and check the properties inspector; it tells you are inspecting a frame object, and if you look on the right, you’ll see a roll down with the name “creed_leadon.mp3,” our soothing mp3; now look below that there are roll-downs for “effect” “sync:” “loop” and an “edit” button. Our sound should say “effect: none” and “sync: streaming”, “loop: 0 times”
Concern yourself only with two of the "sync:" sound object types, "Streaming" and "Event":
Streaming: tracks to frames; can be scrubbed and manipulated on the timeline.
Event: plays whenever the movie opens, and is not tied to the timeline (we won't do this today).
8) Test movie; notice that it only plays to frame 40 and loops. We will make our movie one minute long; 60 seconds.
12 fps for 60 seconds; so that’s, uh
12 x 60 = 720
So go to frame 720 (if it doesn’t let you, place a frame at the end of where it will let you go, and this will free the timeline further) and place a frame. Notice that the layer still contains waveform, which means the audio track is longer even than 720 frames.
9) In the “ACTIONS” layer, place a “stop” action at 720, the end of the movie to prevent looping. Now test your movie. Notice that it ends abruptly. We're going solve this by editing the audio track.
Editing a Sound Object
That's right, you can edit audio inside Flash. We're going to make our soothing, New Age audio track fade to zero as it approaches the end of our movie at frame 720.
10) With a frame in the audio track selected, find the "edit" button on the Properties Inspector, and press it. Doing that brings up this screen:

This shows us a REALLY DETAILED view of the waveforms for the right and left tracks from frame 1 to frame 22. (Yes there are two tracks.) But we need to work on the end of the tracks, so we need to find frame 720.
11) Set up the edit window: make sure the "frames" icon is clicked so the numbers you see in the middle of the screen relate to frame numbers; now click the "-" magnifying glass icon to shrink the waveforms.
12) When the waveforms are pretty small, find frame 720 by clicking the "<" and ">" button or using the scroll bar. You'll see little square attached to lines, as below, in the two track windows. Click and drag them till they look pretty much like this:

So what have you just done? The little squares set the volume or gain of the tracks, and the angled line is how fast the sound drops from 100% to 0. Yes, you have to do it to both tracks. The product of this manipulation is that, starting on about frame 704, the volume drops till at 720 it is silent. Note that when you make this change, the "effect" setting changes to "custom."
Creating a Two-State Graphic
13) Create a layer and name it "blob". In its initial keyframe, draw circle on the stage.
14) Convert this shape to a graphic symbol and name it "gr_blob".
15) INSIDE the graphic, put a keyframe in frame 2; in that frame, squish the blob. Now in frame one the blob is round, and in frame 2 the blob is squished.
16) On the main timeline: click on the object to select, and in the Properties Panel, where it says "loop" change to "single frame." IMPORTANT: note the little window marked "First:"this is where you will call on either frame one or frame 2 of the graphic.
Synching an Object to the Soundtrack Using Markers
This next part requires a little finesse; we'll look at the audiotrack, and place markers where it has the biggest energy pulses, then use the marker positions to "choreograph" a graphic symbol.
17) Place Markers. Look at the audiotrack: wherever the track gets "fat" or "spikes" the highest, place a keyframe in the "MARKERS" layer. Name each "1","2", "3" through 10 or 12, respectively (type in name in the "Frame Label" box of the Properties Panel -- it puts the name and a red flag). DON'T feel you need to do these all the way to the end!
18) Play soundtrack by hitting "return" and see how well the marker keyframes match the beat. If they don't, slide them back and forth, listening to how the audio scrubs. Set all the markers to the beats.
19) At the first beat, slide the playhead over the frame, read down the column, and place a keyframe in the "blob" layer; this allows you to change everything after this keyframe. Now move two frames further on and place another keyframe; this locks the original image in place.
20) At the first keyframe you made, click on the blob and go to the Properites Panel; change the "1" in the "First" window to a "2"; hit enter, and you'll see the second state of your graphic playing. Scrub to see the blob squish on the beat.
21) Repeat placing iterations of the blob "2" state at your other markers.
22) Put a stop at frame one on your Actions layer and create a buttons layer. Make a button that will "gotoAndPlay" frame 2; this is your Play button. Make another button that will "gotoAndPlay" frame 1; this is your Reset button.
YOU'RE DONE. GET CHECKED OFF.
BELOW IS MY FINISHED SWF MADE AS ABOVE:
|