Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently April 19th, 2024, 9:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Script help - audio playing/stopping
PostPosted: October 1st, 2021, 10:22 am 
Offline

Joined: August 23rd, 2011, 11:36 am
Posts: 10
Hi

I've created a radio button to play a .wav file (ButtonC02) and then reset the button when the sound ends using this script:

PlaySound( "C:\\Custom\\Custom2.wav", false, 1, V26, 0, -1, 0, 0 , true, 0, true )
ButtonC02.SetState(false)

It works fine but would like the ability to click the button while its playing to stop it playing

Anyone got any pointers how to script that?

Thanks


Top
 Profile  
 
 Post subject: Re: Script help - audio playing/stopping
PostPosted: October 5th, 2021, 5:12 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

If you are creating/publishing to HTML5, you could add a JavaScript (in programming) to a button with a play function and pause function (latter used for stopping a sound).

See: https://stackoverflow.com/questions/43167907/sound-play-stop-pause, for additional information.

HTH

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group