Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name: Password:
Ambiera Forum > RocketCake
Buttons with sounds
Author Text

Abi
Guest
Quote
2021-02-11 18:22:22

Hi, Please could someone help me with adding sound to a button when it's clicked. Is there an option or do I need to code this using HTML?


niko
Moderator
Quote
2021-02-12 07:50:59

Hi,
do it like this: In RocketCake, add a HTML 5 audio element and select the sound (uncheck the 'controls' option if you want it not to be visible).
Richt-click the HTML 5 audio element, select "HTML Code..." and see what ID it has. It's usually something like "audio_8538c1f".

Then, create your button. Right-click, select "Insert Link " and as mode, select "JavaScript". as URL, enter this:

javascript:document.getElementById('audio_8538c1f').play();

But replace that 'audio_8538c1f' with the ID of your audio. That's it.


milanix
Registered User
Quote
2021-02-12 11:05:32

Right click on button > HTML-код > on click="new Audio('../rc_images/sound-name.mp3').play();"


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

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


   






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