Creating a Counter

nstephenson4471
Community Member Posts: 7
Comments
-
Actually creating a counter can be simple..
What you need:
A textfield to show the count.
A variable to hold the countvalues.
Action(s) to trigger the countup .
Blockers to prevent from hovering multiple times.
Thats basically it for a simple one. Offcourse you can make it much more complex by using Javascript. Actually due to this question i dove into a SVG based counter i made in Lectora 16 way back to recreate it for Lectora Online. Thats much complexer to get done, but is a nice challenge for me :-) -
I just made a step-by-step sample of a simple counter.
https://community.trivantis.com/shared-content/simple-counter/
Including a Lectora Online package to go along.
Online you will notice the sample keeps the value of the count when going from page to page.
In fact you need to reset the countervalue to 0 when going to a next page to prevent it from going over 10...
On the last page there is a reset button...that one does the trick and that page is exactly as you need it.
The rest is self-explanatory..
Kind regards,
Math -
In fact the fix for your counter was easy. The blocker and hotspot of your refrigerator/freezer differed in size. Thus never blocking it completely. I usually make sure i can see blockers and hotspots when setting things up. On the first page of the package i did it that way. Changing color and transparancy of your shapes for hotspots and blockers immediately showed the issue at hand. So fixing now was easy. I added a second page inwhich i set it back to transparant again...
2 other things i noticed in your title.. The background image of the kitchen was scaled in size, and actually stretched vertically. That last part i didnot change, but i exported the background again using TinyJPG/PNG as i describe here...
https://community.trivantis.com/shared-content/image-compression-in-and-for-lectora/
That lowered the size of your image from 1,092 Kb to 110 Kb.
That improves speed for your title big. Always make sure to compress images before using them in Lectora.
The other thing i noticed that except for the text, you dont get any visual indication of what you found. I added that to the second page of this sample for 2 elements, the pots and pans and the frig. This way you get a better visual clue of your findings...
Adding a package with the 2 pages and a PSD with the setup as used for the pots and pans.
Kind regards,
Math -
Categories
- 35.8K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products