ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator "Play a Sound" Bug. $20 USD for a solution.
person icon
james_wards
Registered User
Quote
2018-02-06 15:21:58

Hey everyone,

I have an issue with something quite simple.

I have a button, and I want it to play a LOOPED audio .wav file when I click it. Everytime I click the button however, the audio continues to stack and stack. For example I will click it once, and the audio will play looped as expected. However if I click it 10 more times for example, the audio will stack 10 times and create an absolute mess of sound.

Is there any simple way to get the sound to only play once when clicked and not again if clicked a second time? Any help will be much appreciated.

However gives me the correct answer, I will send you $20 USD on Paypal!

Thanks!

person icon
tim12345
Guest
Quote
2018-02-06 17:18:30

not exactly a $20 question... so I will give you free advice! when clicked---> set 'if a variable (type "clicked" into variable name) does not equal 1' then ---> play the looped sound, AND set variable "clicked" to 1 in the same action. that should do it.

person icon
james_wards
Guest
Quote
2018-02-07 12:17:46

Wow awesome thank you so much for helping me out dude!

person icon
ajay
Registered User
Quote
2018-03-02 20:01:29

Hello dear james_wards

tim12345 absolute correct!!
But u also use this few steps-
when clicked do someting- action-play a sound(uncheck-looped)
Then, Use "Do something later" if your audio file is suppose 30sec then set "Do something on later" as 30000 -action-stop a sound.

& when clicked do something- set or change a variable value set as 1
Every few second do someting-if variable value is equal to-1 then-do something later set 30000-stop a sound-
Also add-
when clicked do something-action-if variable value is equal to the 1-stop all sounds...

person icon
denko
Registered User
Quote
2024-09-17 13:51:21

wrote:
Hello dear james_wards

tim12345 absolute correct!!
But u also use this few steps-
when clicked do someting- action-play a sound(uncheck-looped)
Then, Use "Do something later" if your audio file is suppose 30sec then set "Do something on later" as 30000 -action-stop a sound.

& when clicked do something- set or change a variable value set as 1
Every few second do someting-if variable value is equal to-1 then-do something later set 30000-stop a sound-
Also add-
when clicked do something-action-if variable value is equal to the 1-stop all sounds...


This does not work. It only stacks the sound and plays it like a hundred times on top of each other.

person icon
denko
Registered User
Quote
2024-09-17 16:00:59

I solved it in a different way, a bit fiddly - but it now works exactly as I want.

I will report back with how I did it, in case anyone else has the same problem.

person icon
just_in_case
Moderator
Quote
2024-09-18 13:33:33

@denko, there is no need to re-open very old thread. You are replying to a thread that is about 5 years old.

person icon
guest_Guest
Guest
Quote
2024-09-21 02:53:38

Don't act like you don't open old threads to post shish for your own monetary gain, JIC.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |