Join Todd Perkins for an in-depth discussion in this video Creating the Progress class, part of Flash CS4 Professional Audio Techniques.
Now let's start looking at, how to use ActionScript to track the playback…progress of our song.…The first thing, I'm going to do is jump over to ProgressDisplay.as.…This file is in the same package as the player class, so com.lynda.audio and…should thus be into the exact same folder.…Make sure you name it ProgressDisplay, capital P and capital D. I'm importing…a bunch of classes here, so that all the display, events, text and geometry classes.…
I have my class definition here, note that it's not extending any class, and…then I have my constructor method.…Let's create some properties.…So first, public property called resumeTime.…Remember, we created a resumeTime property in the last chapter.…This property is actually going to take the place of that property, so public…var resumeTime:Number = 0.…The other public property called drag and that's going to be a movie clip.…
Public property called bar.…Also a movie clip, a public property called time_ txt.…That's going to be the time text field.…So it's a TextField.…
- Playing and pausing audio in a created player class
- Controlling audio progress and showing it in a text field
- Loading XML playlist data into the final player
- Animating a volume slider and using effects to add depth
- Making Flash applications sharable
- Viewing the finished player and taking it for a spin
Skill Level Intermediate
Q: I am having trouble getting the exercise files to work for this title. For example, when I drag the progress bar of a song to another location on the slider, the movieclip always jumps back to the beginning and the song starts over. What could be causing this error?
A: An update to Flash since the time of recording broke this functionality. The problem appears to happen when Flash compiles the SWF in Flash Player 10. If you change your publish settings to Flash Player 9 instead, you won't see any problems.