Forum Discussion
What are variables and how (and why) should I use them?
- JudyNolletSuper Hero
Walt, I think that's such a helpful analogy!
I learned about variables in the days of HyperCard. (Yup. HyperCard. I guess that proves I'm in the "older" category—like your wife is and you aren't. 😉 ) As I recall, the analogy I heard back then was that a variable is like a bucket for carrying info. But I think the post-it-note concept is better.
Of course, what you can enter is based on the "style" (type) of the "note" (variable): text, numbers, or T/F.
- Hmm. Perhaps a better analogy for the T/F variable is that it's like a sign hung on the dishwasher. One side says "Clean," and the other says "Dirty." The sign can only show one of those messages. And it could definitely cause problems if someone forgets to change it at the right time...
For others who find this discussion thread, I'll add this: It’s worth the effort to learn about variables and trigger conditions, because they provide the real power in Storyline. Here’s the User Guide info:
- WaltHamiltonSuper Hero
Judy, that's a good point. And flipping Dirty/Clean sign is like using the toggle command for a T/F variable. It changes it to whatever it isn't.
Not that old, I created a lot of things in HyperCard :)
- BWoodsFormer Staff
I love those analogies, Walt. They make variables so easy to understand—especially for those of us who have bossy cats that like to lie about never having been fed ever!
And Judy, either none of us in this thread are old or ALL of us are old, because I used HyperCard back in the day too. - JudyNolletSuper Hero
Walt & Bianca: Both HyperCard users! Wow.
And did you ever use it to control a videodisc? (Remember those?)
BTW, I referenced HyperCard in a recent feature request. I want Storyline to let me insert text before or after the existing text in a variable. For example, to build a list. Like I could easily do in HyperCard...
- JoeFrancisCommunity Member
I didn't use HyperCard to control a VideoDisc Player, but I DID use MacroMind Director 2.0 on a Mac IIfx controlling an ARTI frame-controller to lay 2D and 3D animations onto 3/4" tape, one frame at a time. Fabulous use of many a weekend. 😑 I got REALLY GOOD with the Lingo scripting language.
I know of at least 2 people who used Macromedia Authorware to develop and deliver computer-controlled courses with the content stored on VideoDisc. When one of them retired her organization's last course, she presented me with one of their obsolete VideoDiscs 😀
- JudyNolletSuper Hero
👍
- BWoodsFormer Staff
Oooh! I only used HyperCard with some of my friends to create little exploration games. I definitely didn't do anything like this.
And glad to hear you submitted that feature request. That would be useful functionality.
- semitechCommunity Member
Variables in programming are named storage locations that hold data. They facilitate dynamic data handling, improve code readability, enable value reuse, aid debugging, and support mathematical/logical operations. Use them to store and manage data, respond to user input, and make your code more flexible and readable.
- WaltHamiltonSuper Hero
"are named storage locations" does not mean "what variables are called", it means that variables are storage locations that have actual names. You can give a variable any name you want (within the legal parameters of the language), but best practice demands that the name is descriptive and congruent with the names of similarly used variables.
- MarcusTateCommunity Member
Thanks for taking the time to share the solution....Your help is greatly appreciated!
- TrambolinsanCommunity Member
I only used HyperCard with some of my friends to create little exploration games.
- ShahzaibMuhammaCommunity Member
It's great to see such a rich discussion about variables! They're like post-it notes carrying information between different parts of a project, just like the note left by Walt's wife communicates what happened while he was away. Variables are crucial for allowing slides to communicate with each other, making interactive experiences possible. Thanks for sharing your insights, everyone!