PDA

View Full Version : Background music commands


CDrDup
08-20-2005, 05:59 AM
Hi, ALL:

My project is a multimedia biz card. There are 5 screens. The opening screen plays an audio introduction by the client. When you click on screen 2 it starts background music that continues to play when you click on screens 3-5. When you click on screen 1 it stops the background music and plays the audio intro. That's all good. What I'm trying to figure out is the following:

<> While background music is playing, if you go back to screen 2 the music restarts. How can I state in AMS that if bground music is already playing, disregard AudioLoad command?

Thanks!

Rich
:wow

longedge
08-20-2005, 06:33 AM
Hello,

Rather than stopping the audio you need to pause it as explained here (http://www.indigorose.com/forums/showthread.php?t=3420&highlight=audio.pause) and by Corey in this (http://www.indigorose.com/forums/showthread.php?t=12591&highlight=pause) post.

longedge
08-20-2005, 06:56 AM
Just to expand on that a little, on screen 1 pause the audio and then on all the other screens play it. If it's already playing then the command won't do anything but if you go from page 1 to say page 5 the music will continue to play from where it was paused.

CDrDup
08-20-2005, 07:30 AM
Just to expand on that a little, on screen 1 pause the audio and then on all the other screens play it. If it's already playing then the command won't do anything but if you go from page 1 to say page 5 the music will continue to play from where it was paused.

Like they say - BRILLIANT! And so logical...

Thanks, longedge, for the help.

Rich
:p

CDrDup
08-20-2005, 08:11 AM
For those who have been playing at home, I did some tweaking:

SCREEN 1 (with audio intro)

On Show code:

Audio.Stop(CHANNEL_BACKGROUND);
Audio.Stop(CHANNEL_NARRATION);
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\audiotrack.ogg", true, false);

On Close code:

Audio.Stop(CHANNEL_NARRATION);
Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\bgroundtrack.ogg", false, false);
Audio.Play(CHANNEL_BACKGROUND);
Audio.SetLooping(CHANNEL_BACKGROUND, true);

What this does is stop the audio intro (channel_narration) when you click out of screen 1 and starts the background music when you go into any other screen.

Hope this helps!

Rich