Forum Discussion
Best way to handle a large amount of vocabulary items
Hello,
I am creating a vocabulary-learning game in Articulate Storyline. I want to add access to a screen (we call it the "brain") which essentially shows a button for every vocabulary term that has been unlocked so far. I.e. if the user has learned 3 vocab terms, the brain will show 3 buttons that show the definition on a new layer when clicked. Same if the user has learned 10, or 20 terms.
In theory I'd like the user to be able to pick and choose which vocabulary terms to add to the brain, so the order of buttons couldn't just be hard-coded.
I've had a few ideas on how to go about this, but they're all quite clunky:
-A true/false variable for each vocabulary term, each associated with a button that changes from "Hidden" to "Normal" when the value is true
-Storing a big list of vocab, comma-separated, in one string variable, then using JavaScript to create a Button object for each term on the fly (though this is where I'm stuck- I'm quite familiar with JavaScript but I don't know if Storyline has any methods to create objects on the screen like this)
-The number of vocab terms learned could be a simple Number variable, and then I could unhide a specific number of buttons, but this would require a fixed order of terms learned
Are there any simpler ways to go about this?
- Emily_TacomaCommunity Member
Hey- I love your idea. Did you build it?
- WaltHamiltonSuper Hero
Check the sample here: https://community.articulate.com/discussions/articulate-storyline/sorting-and-organizing-lists
It will show how to create objects on the fly with JS. For what you are doing, I would create the buttons with a reference, and a Hover or Selected state with a second reference. Put the term in the Normal state, and the definition in the Selected.