Skip to main content
Known Participant
April 19, 2010
Question

Audio cues itself in timeline

  • April 19, 2010
  • 1 reply
  • 320 views

Hi everyone,

I'm having an issue that I never ran across using AS2, and I'm completely baffled.

I'm making a program that is going to be, more or less, an interactive training program.  Each frame is a separate "page" of training, and has its own unique audio clip that plays.

The frames are laid out like this:  On the main timeline, there is a movie clip object.  Inside that object is the interface the user interacts with, along with a movie clip that contains the audio, set to stream (I have it set to stream because they sometimes have to move around in the training within the timeframe of that audio clip.  If I have it set to event, I can't have them skip a section of the audio clip, etc)

Things have been going well, but I just added a new layer to my main timeline, containing a navigation bar (a few movie clips), and all hell has broken loose.  Every single audio clip starts playing at once, right from the beginning, even though the frames that contain those audio clips haven't even come up yet.

So...any ideas?  Are audio clips used completely differently in AS3 than AS2?  I've figured out the SoundMixer class, and I have SoundMixer.stopAll(); on the first frame of each movie clip that contains the audio clips (the audio clips start on frame 2) as a safeguard, but man.  I am stumped.  Any help would be GREATLY appreciated.

This topic has been closed for replies.

1 reply

kenchtahmAuthor
Known Participant
April 19, 2010

I'm not sure exactly what changed, but now MOST of the issues have sorted themselves out.  I don't know what changed, but I'm back to a problem I was having before (which sorted itself out by istelf each time, but I'd like to have a little more control over that...)

The issue now is that when I skip over frames, some audio clips from the frames I skip start playing, even though those clips were never cued (since the frames they exist on were skipped).  Again, each movie clip that contains audio has SoundMixer.stopAll(); on the first frame, and the audio starts on the second frame, set to streaming.

kenchtahmAuthor
Known Participant
April 19, 2010

Managed to get it.  The problem was that I was putting an instance of the audio into the object, rather than calling it by AS, because I wasn't aware of the SoundChannel .position property.  It's going to take a bit of tinkering, but it looks like calling it the way you're actually supposed to will work just fine.  (Go figure)