Not sure how to lable this - variables maybe??

Jun 01, 2013

I have a slide with a pictture (Pix 1) that has a hotspot.  When the learner clicks anywhere on the picture outside the HS an error message appears.  When the learner clicks on the HS a new picture (Pix 2) replaces Pix 1 (exact same size and location) and the error message disappears.  This is easy enough.

What I'm trying to figure out is how to stop the error message from popping up after Pix 2 is showing.

I don't know how to disable a HS or if that is possible.  I think a variable can do what I want, but I don't know how to do that.  Can someone help me?


17 Replies
Rebecca Fleisch Cordeiro


I see that Michael already answered, but since I took a stab I thought I might as well post. My approach is slightly different again and you never know.

Alan, if you need to have a hotspot on the picture, this won't work for you. But if you're not "married" to that (and you want to eliminate an extra object on the slide - and of course that needs to work with everything else going on) ... here's what I did.

You said that "picture (Pix 2) replaces Pix 1 (exact same size and location"

So, instead of using a hotspot, I placed P2 over P1 and set P2's initial state to hidden.

I added a visited state to P1.

I added a trigger to P1 to change the state of P2 to normal when user clicks P1 (since P1 is directly underneath and the same size there's no need to make it hidden)

I inserted a hotspot behind everything and set a trigger to show the oops layer when the learner clicks here IF P1s state has not been visited.

I think that does what you want with the aforementioned caveat that if you need a hostpot on the picture...well, never mind, I guess!

Alan Landers

Rebecca, Mike,  thank you for your ideas.  I tried them and either didn't understand them or couldn't make them work.

Here's what I'm trying to do.  I have a background pix with a hotspot (the tower base).  Instructions are to click on the tower base, if the learner clicks on the base a "congrats' message appears. (no prob)  But if the learner clicks outside the HS on the tower base an error message appears (with the arrow).  (no prob)  Here's the prob: when the learner clicks outside the HS a second time the error message should disappear.  So the area outside the tower base is like an on/off switch for the error message.  Click first time- error message shows.  Click second time error message disappears.  I can't figure it out. I think it has to do with states and variables, but it's beyond me.  Your help is appreciated.

Rebecca Fleisch Cordeiro

Hi again Alan,

So, I think I'm closer. Now that I know you have a background picture and a particular spot that needs clicked, I see that you do need a hotspot (or on). Also, apologies for adding a layer before. My mind must have been wandering. I could have set that up without a layer.

Anyway, this is very quick and dirty. I took a screenshot of your picture and inserted it on a slide as "the background" kind of stretching it in the process.

I'm not entirely clear on what you want, because the first time you mentioned 2 identical pictures and this time you mentioned a congrats message and an error message. I went with the latter.

Instead of a hotspot for the tower base, I used a transparent shape (I left the outline there so you could see it, but you'd change that to no outline). This is because unlike hotspots, shapes can have states. And I added a visited state to that shape.

There is still a hotspot to cover the rest of the picture.

I created 2 messages: one is a yeah you did it and one is an oops click the base. Both messages, the OK button that goes with them (to close them) and the arrow for the oops message, start out as hidden.

If the Learner repeatedly clicks the wrong part of the picture, the error message appears (although since the arrow's there they ought to "get it" after the first wrong try!).

Once the Learner clicks the tower base, AND if they THEN click anywhere on the picture, the error message no longer appears.

This is because there's a condition to only show the the oops message if the tower base hasn't been visited.

You'll see the other triggers in the triggers panel. Please shout out with any questions.

Also, if you attach that slide it could be easier to figure out what's going on!

Alan Landers

Sorry Rebecca, I can't show the original (privacy issues).

Your solution is quite elegant.  However, I cannot use an "OK" button.  I tried that and the client (whom I think is testing me ) wants me to do it without one. 

I'll try to explain it differently:  I have an image with an invisible rectangle that has triggers associate with it.

1. If the learner clicks outside the rectangle >  a jpg (message and arrow) appears showing where the rectangle is.  The original state of the jpg is hidden.

2. If the learner clicks anywhere outside the rectangle a second time > the jpg disappears.  So the area outside the rectangle is like an on/off switch.

3. If the learner clicks on the rectangle > the program continues.

I can do all the rest, I just can't figure out how to make the area outside the invisible rectangle an on/off switch that shows the arrow and message where the rectangle is located.

Thank you for all your time and help.

Rebecca Fleisch Cordeiro

Hi Guys,

Alan, icky feeling that the client is testing you. Sorry my solution didn't work. I guess it was how I interpreted your post " Instructions are to click on the tower base, if the learner clicks on the base a "congrats' message appears.'..."But if the learner clicks outside the HS on the tower base an error message appears (with the arrow)"

Tim's solution simply brings you to a need slide when Learners click correctly. Hope that works for you. Sounds like a good one to me!

Alan Landers

Rebecca, Tim,  This is going to work.  Thank you both.  Tim, where can I learn more about toggle variables?  Actually, what or where is a good resource that provides an indepth explanation of variables in SL.  The tutorials are more "how to", that you can copy and perhaps apply elsewhere, but don't explain the "whys".  I'd like to get a better understanding of how they work rather than how to.  Does that make sense?

Anyway, thank you both.  With Tim's solution I should be able to pass the "test".  Thank you 

eLearning Development


I am glad this will work for you.

Not sure on a variable resource. I learned by trial and error and questions on the forums and now feel fairly confident with them.

I read about toggle variables in a post and couldn't find them either. 

In the trigger wizard there is an option to adjust variable.  The operator for a toggle switch for that variable is in the operator drop down called "=NOT Assignment"  Sorry I don't know the reason for that title but if you set up a true false variable and us this operator it will toggle back and forth on each click from true to false.  You can then use that to turn something on/off with conditions on a trigger.


Rebecca Fleisch Cordeiro

Hey Guys,

Alan, the toggle variable is really cool and Tim you made great use of it here. But, also, an FYI that you can achieve the same thing here using states instead of variables. Again, you need to use transparent shapes instead of hot spots so you can achieve this. For some reason, I find these more flexible than hotspots.

So, on the attached there are 2 transparent rectangles: one for the tower and one replacing the large rectangular hotspot. If you look in the triggers panel you'll see how it works. Same number of triggers, no variables needed.

I've left a red border around the "big" transparent rectangle just so you can see it, but of course it would be removed.

The name of the file is now VERY long...just in case your using it for tracking purposes I didn't want to remove any characters

click+correct+hostpot_correct_incorrect+message_no+layers states not variables.story

eLearning Development

Very nice Rebecca;

I remember someone once saying that states are better for action on a single slide and variables are better to carry action over from slide to slide.  Your solution does a better job of doing the same thing as mine as the action remains on a single slide.

It is interesting how you can do the same thing in different ways.  And we keep improving with every project we do and share.



Rebecca Fleisch Cordeiro

Hey Tim,

Tx for taking the time to look. After I posted I saw that you and Alan had already engaged in a side conversation (I guess I should have looked at the thread first but my brain was stuck inside the story) and I thought Oh, no! I hope this doesn't look rude.

But, yes, the reason I posted is that there has been the suggestion that states are good on one slide and variables across slides. And, I also wanted to demonstrate the flexibility of transparent shapes, which I've come to like a LOT after seeing various posts where they solved problems that hotspots couldn't overcome. As you say, we improve as we share. And the variables solution also does the trick for sure.

Have a good day and resta' the week. And thanks for all the sharing you do. I've learned a lot from you.

Alan Landers

Hi Rebecca, Tim,

I truly appreciate all the help from both of you.  It makes me feel really good about the program and the people who use it.

I finally figured out how to get the entire project done on a single slide with no layers.  I could have done it with layers, but the personal challenge and learning for me was one slide, no layers.  I used both transparent shapes and variables that Tim taught me.  I'm finding the transparent shapes are better for some things than others.  I'm also using less and less hotspots and using states for accomplishing a lot of what I'd like to do.  You two are pretty cool for helping an old guy find his way around a whole new block.  Thank you.

This discussion is closed. You can start a new discussion or contact Articulate Support.