Images revert when you get directed back to page
I'm hoping you can give me a hand here. I have a page with four images of doors. You click on a door, a key animates over to "unlock" the door. Then it brings you to a page that shows the contents behind the door. Then there is a click button that brings you back to the original page. My issue is I'd like some way of showing people have already opened the doors when they go back. I have tried a number of ways, but because you are actually brought back to the beginning of the page, everything resets. Has anyone else had this issue and does any one out there have a tip on how I can get this to work?
Thanks so much,
Easiest way in my eyes would be to have a variable that stores whether a door was opened/accessed. For example, create a variable called _OpenedDoors. Once a door is opened/clicked, it adds to the variable a letter corresponding to that door (for example, A for Door 1, B for Door 2, etc.), and then do an on-page load for that hotspot page to show the opened door image if _OpenedDoors contains a specific letter to show that open door.
Let me write out the exact actions to do and put where.
- Create _OpenedDoors variable.
- Add 4 OnPageShow actions, each one with an If/Then that would check to see if a variable contains X (X being, A, B, C, or D). If the variable (_OpenedDoors) contains X, then show opened door image corresponding to that variable (A = 1, B = 2, C = 3, D = 4), otherwise show the door closed image.
- Add an action to the door button that, on mouse click, adds X to the variable (eg. Add A to the _OpenedDoor variable).
- Add an action to the door button that, on mouse click, take them to page that is supposed to open.
Hopefully this makes sense.Andrew R.
Developing content since 2010 using a mixed bag of tools.4
Thank you! That makes so much sense! I did a variation of that for other pages, but it didn't occur to me here with adding the variable to the page to begin with. Then people can open the doors in any order and it will still function correctly. I really appreciate the quick response.
You got it! Glad I was able to be your Engineering Duck! :) Quack Quack.Andrew R.
Developing content since 2010 using a mixed bag of tools.1
- 35.9K All Categories
- 110 ✫ Announcements
- 33.2K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 27 ELB Learning Content
- 27 ELB Learning Content Discussions
- 346 CenarioVR®
- 205 CenarioVR Discussions
- 141 CenarioVR Feature Requests
- 44 Rockstar Learning Platform®
- 41 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 48 ReviewLink®
- 48 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 938 All Things eLearning
- 39 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products