Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC:

Creating a hotspot to play sound and then move to another page 7 months 1 day ago #9010

  • maddy
  • maddy's Avatar Topic Author
  • User
  • User
I would like to have a hotspot make a sound and then, when the sound finishes, move on to another page (specifically make the sound of a key turning and door opening - yes, for an escape room!). I can do one or the other but not both. Is there a way to do this? Thanks for any help. (I've put this message in "Creating effective materials" too as I wasn't sure where it fits!)

Please Inloggen or Create an account to join the conversation.

Creating a hotspot to play sound and then move to another page 7 months 1 day ago #9011

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi what page type are you using is it hotspot connector?
Is it something like this that you want to create? training.mitchellmedia.co.uk/xot/play.php?template_id=449#page1
As you can see you can achieve that but only with custom code and it's not straightforward because you have to inspect and find the correct IDs and also obtain the pageID's to link to. I don't think there's an easy way to do this just from the built-in options.
The code I've used in that example added to a script optional property attached to the hotspot connector page is as follows:
$('#mep_0 audio').on('ended', function() {
x_navigateToPage(false,{type:'linkID',ID:'PG1713780621292'});
});
$('#mep_1 audio').on('ended', function() {
x_navigateToPage(false,{type:'linkID',ID:'PG1713784570265'});
});
$('#mep_2 audio').on('ended', function() {
x_navigateToPage(false,{type:'linkID',ID:'PG1713789918321'});
});
So each hotspot has the same audio file attached but each one automatically gets an ID as you add them starting from 0 e.g. #mep_0, #mep_1, #mep_2
then the code triggers when the relevant audio has ended and then navigates to the pageID set in the code.
You can get the pageIDs by adding internal page links to a text area on a hidden page and then viewing the source and copying the ID's and amending the code accordingly. e.g. so in this example I would end up with 7 hotspots and destination pageIDs.
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/
The following user(s) said Thank You: xlearn, maddy

Please Inloggen or Create an account to join the conversation.

Creating a hotspot to play sound and then move to another page 7 months 14 hours ago #9014

  • maddy
  • maddy's Avatar Topic Author
  • User
  • User
That's exactly what I want to do (but was only going to have one door) - I'll give this a try. Thank you!

Please Inloggen or Create an account to join the conversation.

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

Search