View Full Version : Background Music
brohan
06-24-2008, 07:26 PM
I have added background music to my project. One of my buttons opens up a virtual tour that is located within the project's CD via a seperate program. How can I get the project's background music to mute when the virtual tour program runs, and then unmute when the user closes the virtual tour?
holtgrewe
06-24-2008, 10:34 PM
I have added background music to my project. One of my buttons opens up a virtual tour that is located within the project's CD via a seperate program. How can I get the project's background music to mute when the virtual tour program runs, and then unmute when the user closes the virtual tour?
One way to do this woud be:
Place Audio.Pause(5) and Page.Timer(2000) before or after calling the virtual Tour ,exe file - this will pause the background audio file and start the page timer.
'On timer' from the page that called the executable, you can use Windows.EnumerateProcesses() to determine if the virtual tour program is still running. When it's no longer running use Audio.Play(5) to continue the background music and stop the page timer.
That's a little sketchy but should give you the idea. hth
brohan
06-24-2008, 11:07 PM
Thanks for the info. I am a brand new user, so it is a little sketchy for me, could you be a little more precise please? I really do appreciate the help.
holtgrewe
06-25-2008, 07:58 AM
Thanks for the info. I am a brand new user, so it is a little sketchy for me, could you be a little more precise please? I really do appreciate the help.
This is a very straight forward approach and should give you the idea.
Take a look at the example, clean it up for your purposes, and post back with any questions. hth
brohan
06-25-2008, 03:02 PM
Again, thank you very much. I was able to add what you had in that app into my own, and of course it worked perfectly when loading the calculator progam into my app where I want to load another program, so now I just need to change the program to open.
I really appreciate this!
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.