[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4721: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3851)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4723: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3851)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4724: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3851)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4725: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3851)
New MMBforums • View topic - ScriptTimer Question

ScriptTimer Question

Multimedia Builder

ScriptTimer Question

Postby Sk8cynic » Mon Aug 19, 2019 2:21 pm

Hi,

I created a script timer that incrementally lowers the volume (fades out) of the music on a page when a button (FadeBtn) is pressed.
The script I have is:

VolumeDown()
ScriptTimer("FadeBtn","500")
VolumeDown()
ScriptTimer("FadeBtn","500")
VolumeDown()
ScriptTimer("FadeBtn","500")
VolumeDown()
ScriptTimer("FadeBtn","500")

The script runs fine but when the volume is returned to its initial setting (100), the timer runs automatically and lowers the volume as long as it is on the same page.

According the Help File, the only way to kill a scriptimer is to leave the page and then return or go to another page. That is true and the timer works if another page is chosen. I want to be able to kill the script each time it is run on the same page. I tried using things like PageTimer with a zero value to reset the page but that doesn't seem to work.

Anybody run into this and is there a way to kill/stop the scripttimer if it's still on the same page?

Thanks for any help!
Sk8cynic
 
Posts: 28
Joined: Thu Oct 04, 2012 12:51 pm

Re: ScriptTimer Question

Postby dgilmour » Mon Aug 19, 2019 3:06 pm

dgilmour
 
Posts: 524
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko

Re: ScriptTimer Question

Postby Sk8cynic » Mon Aug 19, 2019 4:08 pm

dgilmour,

Thank you for your quick reply! It worked perfectly! I forgot to ask...how do I stop the sound at the end of the timing period? (my bad)

Thank you again for your help!
Sk8cynic
 
Posts: 28
Joined: Thu Oct 04, 2012 12:51 pm

Re: ScriptTimer Question

Postby dgilmour » Mon Aug 19, 2019 7:33 pm

dgilmour
 
Posts: 524
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko

Re: ScriptTimer Question

Postby Sk8cynic » Mon Aug 19, 2019 9:03 pm

dgilmour,

LOVE IT! Perfect!

Again, thank you so much!!
Sk8cynic
 
Posts: 28
Joined: Thu Oct 04, 2012 12:51 pm


Return to MMB

Who is online

Users browsing this forum: No registered users and 2 guests