I am trying to add a stop background music button than when checked it would apply to all pages... Im lost on how to do this. help.....Thanks
Global Fuction??
Collapse
X
-
-
But, I believe the power in this little code chunk would be for the stopping of all sounds in the project! Here below I have created a function (the code can be "called" (which means "used)) by just one line of code then in the rest of your program. Now, you usually want to put functions (that you create) in the Global Functions section.
Here's that new function code:
Code:function fnStopAllSounds() tblPages = Application.GetPages() for i,v in tblPages do Audio.Stop(CHANNEL_ALL) end end
Code:fnStopAllSounds()
Intrigued
Comment
-
-
Oh, not sure what I was going to do with that function but it looks like I got my wires crossed, sorry.
If you are using the Audio actions then try this line of code, sorry again:
Audio.Stop(CHANNEL_ALL) -- All sounds
Audio.Stop(CHANNEL_BACKGROUND) -- Just the Background sound
I believe I had "function creation on the brain" due to rhosk's post linking to functions. D'oh!Intrigued
Comment
-
-
I too misinterpreted because of the original subject line. Intrigued has nailed the answer for you, sorry for the confusion.
Comment
-
Comment