Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Buttons with sounds

Abi
Guest
Quote
2021-04-22 17:46:40

Hi,

I have a student I'm teaching who wants to add both a hyperlink (to another page in the website) as well as a sound to the bottom as it's clicked. He's set the action of the link to Javascript so that it plays his sound when clicked but we can't seem to also select a hyperlink to get to an different page of the site.

Could anyone suggest a way around this?

Many thanks,

Abi


Abi
Guest
Quote
2021-04-22 17:49:20

Sorry for the typo *button*


erik
Registered User
Quote
2021-04-22 20:49:03

After the command to play the sound, simply add something like this:

location.href = 'page.html';


So if he plays the sound for example by using playsound('foobar.wav'), then your code should look like

playsound('foobar.wav'); location.href = 'page.html';



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (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© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact