Resetting the variable
Apr 26, 2016
By
Pierre Sosa
I'm following up with this conversation, because I'm in a similar pickle.
I have created a numeric entry variable. When the user leaves the layer, I want the variable to reset to zero.
To leave the layer, the user has to click outside of the displayed box.
In the trigger wizard, I adjust the numeric entry variable so that it is assigned to equal "0" when the user clicks outside of the displayed box (closing the layer; same conditions as above).
If I type in a value, click outside the displayed box (thus closing the layer), then open the layer again, the typed value remains.
Is there something else I should be doing?
11 Replies
Without seeing your .story I can't say for certain, but have you checked the order of your triggers? You want to be sure you are resetting the variable BEFORE you leave the layer.
What Sharon says makes sense. You want to reset the variable to 0 when the user clicks outside of the entry box, and then hide the layer also when the user clicks outside of the entry box. As insurance, you could also set the variable to 0 upon the layer's timeline starting.
Please forward the .storyfile and I will also take a look. It sounds like something similar that I had to deal with, but I want to make sure.
Hi Pierre! Looks like you have lots of interested peers wanting to assist. I'm following along as well in case I can assist when you share your .story file. If Sharon/David were able to explain it enough to assist, just let us know as well and good luck with your project.
This is frequent mistake that I make. I add triggers but get confused when it comes to making sure the order of the action is what I actually want at that time.
Happens to everyone I'm sure Helena :) That's when I start talking to myself. Here's a tutorial on trigger order if anyone finds it helpful.
Thank you
Whoa! I didn't know I had control over trigger order, per se. I'm going to play around and see what I come up with. (P.S. - sorry about the late reply, I'm jumping between multiple projects.)
OH my gosh! That totally fixed it! I moved the trigger adj=0 above the close layer trigger, and it worked! Ah! Thanks so much! *confetti*
I'm about to work on a super complicated build with mathematic values flipping between slides. Knowing, now, that trigger order is important will undoubtedly save me time I didn't know I was about to waste. Thanks!
Yay! Glad you got the assistance that you needed here Pierre :) Thanks for popping back in to share.
This discussion is closed. You can start a new discussion or contact Articulate Support.