Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

I would like to add a sound effect when turning the cards 3 months 2 weeks ago #9167

  • IMED
  • IMED's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
Hello everyone,

I'm currently working on creating an interactive memory game using Xerte and I would like to add a sound effect when turning the cards. Specifically, I want a click sound to play whenever a card is flipped.

Could anyone guide me on how to implement this feature? Are there specific scripts or settings within Xerte that I need to modify to achieve this? Any detailed steps or examples would be greatly appreciated!

Thank you in advance for your help.

Best regards,
IMED

Please Inloggen or Create an account to join the conversation.

I would like to add a sound effect when turning the cards 3 months 2 weeks ago #9175

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi
assuming you are referring to Games > Memory Game try the following:
upload your sound file as an mp3
select the project in your workspace then properties > Media and files and then select your mp3 that should give you a link like: yourinstalladdress/USER-FILES/projectidusernameNottingham/media/click.mp3
edit the page text field of your memory game page and switch to source view
add the following in source view:
<audio id="click">
<source src="yourinstalladdress/USER-FILES/projectidusernameNottingham/media/click.mp3" type="audio/mpeg" />>
</audio>
and switch back to normal view - you will not see the audio file.
Add a script optional property and add the following:
$(".card").click(function(){
$('audio#click')[0].play();
});
be careful with the syntax and make sure you have the correct path to your audio file.
HTH
Ron
Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Please Inloggen or Create an account to join the conversation.

I would like to add a sound effect when turning the cards 2 months 3 weeks ago #9198

  • IMED
  • IMED's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
Hi Ron,

Thank you for your detailed instructions. I followed all the steps you outlined, including uploading the MP3 file, adding the audio tag in source view, and implementing the script to play the sound on card clicks. However, the click sound still isn't working. I've double-checked the file path and the syntax, but the issue persists. Do you have any additional suggestions or troubleshooting tips?

Thanks again for your help.

Best regards,
imed
Attachments:

Please Inloggen or Create an account to join the conversation.

I would like to add a sound effect when turning the cards 2 months 3 weeks ago #9199

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi
have you put that script function in an optional text box rather than a script box? The function needs to go in a script optional property.
HTH
Ron
Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Please Inloggen or Create an account to join the conversation.

I would like to add a sound effect when turning the cards 1 month 4 weeks ago #9210

  • IMED
  • IMED's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
Subject: Apologies for the Delay and Inquiry About Resources

Dear Ron,

I hope this message finds you well. I would like to sincerely apologize for the delay in my responses regarding the integration of sound effects in the memory game.

I am very interested in working with Xerte to create projects aimed at preschool and early primary school students. I would greatly appreciate any resources you could share, such as videos or PDFs, that explain how to integrate sound into memory cards, hotspots, and interactive elements in general. Your guidance would be invaluable as I explore this tool further.

Thank you for your support, and I look forward to your response.

Best regards,
Imed

Please Inloggen or Create an account to join the conversation.

I would like to add a sound effect when turning the cards 1 month 4 weeks ago #9212

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi
I'm afraid I don't have any specific guides to hand but will quickly comment as follows:
You can add audio in Xerte in a number of ways:
Some page types have a sound and/or narration option
Wherever you can use the editor toolbar there are buttons to add audio including recording audio
Via script as discussed previously
If you look through our release notes xot.xerte.org.uk/play.php?template_id=81#home as features were added in previous versions there is info and guidance but I'm afraid there isn't a free text search so you'll have to browse each release page and look for any mention of audio.
HTH
Ron
Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: alimcnronm
Time to create page: 0.058 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search