View Full Version : Audio theme for multiple pages
randy vild
04-08-2005, 05:59 AM
I have a home page on video card and when the button "Founding Fathers" is hit I would like a theme song to play ( I understand how to do this) however,
there are 10 icons of founding fathers on the directory. When one is hit and new page appears I would like the theme song to continue...is this possible?
Thank you,
Randy
longedge
04-08-2005, 12:55 PM
If you look in the menu under Project/Audio Settings you'll find that you can specify background music there.
randy vild
04-08-2005, 04:24 PM
Yes I understand that. However, if I do that that song plays right when card is launched and I already have music on home page. I want this particular song to play in seperated page then when clicking any of the 10 icons on that page to have the music continue for anything in that wing.
Is this possible?
Thank you,
Randy
longedge
04-09-2005, 01:48 AM
Yes - it's the background channel, just stop and start it in pre-load, on button clicks or whatever as necessary.
randy vild
04-09-2005, 11:01 PM
I'm new at this. Right now I have no audio in my background. When I need audio in a page I insert a flash audio. So now I tried what you suggested and put the song I want to be played on a particular wing. This song plays on my home page so I stoped it with actions/on show/stop audio however, when I do this you hear the first second of the song then it cuts off.
Is it possible for you to show me with step by step using / (forward slashes)?
Im just now starting to understand steps in codes.
Is it possible to use the flash swf. audio file on page to continue play to other pages?
Thank you,
Randy
yosik
04-09-2005, 11:56 PM
Randy,
If I understand you correctly. Don't put any song in your onPreload event. Instead, in your button onClick event put the following action:
Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\yourtheme.wav", true, false);
This will load your song in your background audio channel, start playing automatically and NOT loop (hence the "false").
When you want to stop that audio channel, just add the following action to your event (button onclick for example)
Audio.Stop(CHANNEL_BACKGROUND);
If you refer to the help file, under the audio section, you"ll find further details.
Good luck
Yossi
longedge
04-10-2005, 02:06 AM
Yosik - I wasn't sure about this so I just tried it out,
<hang head in shame> I haven't read the helpfile so if it says something in there about the situation that's why I don't know :) </hang head in shame>
Dynamically loading audio to the background channel doesn't seem to have the same effect as placing audio in the 'playlist' in the Project/Audio Settings. I don't know if they should both produce the same result. I think Randy wants a soundtrack that is 'independant' of the pages.
Randy, does the attached example do the sort of thing that you want?
randy vild
04-10-2005, 03:07 AM
Yosik,
When I try your advice i get an error C-Stack overflow.
longedge,
yes this is what I want however if I do this my home page then has this music and then there are two songs playing at once.
Imagine there is a home page (I placed flash swf audio file) then someone clicks on button "Freedom and Faith" when you enter this page a different song plays here and there are 10 icons that bring you to other pages within this particular wing. like your sample you made I want people to navigate though each icon of this wing and hear the same song.
Thank you,
Randy
longedge
04-10-2005, 03:39 AM
When you put a flash object onto a page then it is just that, on that page. If you put the same object on another page, then without some intervention from you when you go to the new page, the flash object on the new page is also 'new' ( if you see what I mean ).
I'm fairly sure that with some additional coding you could detect a play position when you navigate away from one page and then on the new page start the new flash object from the same position, but inevitably there is going to be a break.
The audio that is in the Project/Audio Settings plays 'across' pages and that is as far as I can see what you are trying to achieve :) .
p.s. There appears to be a problem on your system. Yosik's code works perfectly well in itself and shouldn't cause any problem.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.