Triggers not working as expected on Question Form

Nov 03, 2021

I have a question form with a text entry with an animation that I want to happen when the text entry is wrong. It's a game of "I went to the market and bought a ____" where the user has to remember each item. If they get it wrong, a snake appears and they have to click the button to continue. If they don't click it in time, the snake gets them and they're eliminated. Not sure I can simulate all of this but here's where I am so far.

I start with the snake [picture 3] and hands [picture 4]button hidden as their initial state, however this is not what's happening.

When the user enters a value in the text entry that's incorrect, it should show the two images and animate one of them. Here's the triggers:

Change the state of picture 3 to Normal 
When text entry loses focus
If text entry /= hat

Change the state of picture 4 to Normal
When text entry loses focus
If text entry /= hat

Move picture 3 along motion path
When text entry loses focus
If text entry /= hat

Can someone please help me figure out why 1) the initial state is being ignored and 2) why the animation happens regardless of the value you enter into the text box?

Thanks,

Natasha

 

9 Replies
Walt Hamilton

Attached is a video of what happened when I previewed the slide. Almost everything seemed to work as expected. Of course, the triggers aren't in place yet for Picture 4, but the animations work as you described they should.

However, I do see some problems. One of them is this trigger:

 

Sl creates it by default whenever you create a motion path. In this case it does what you want, so it isn't much of a problem, except that you also have one you created. It's probably best to only use one of those two.

The bigger problem is what the learner does after entering their text. When I recorded the video, I entered the text, then pressed tab, so everything worked. When I entered text, and clicked Submit (my intuitive reaction), the interaction function takes over, and causes problems. It attempts to jump to the next slide before changing the states of pictures 3 and 4. On a positive note, if I am previewing only that slide, and there is no place to jump, the animations work as expected.

My advice would be to remove the freeform interaction, since you are not using it. Nearly everything you want you have already created without it, and the rest would be easy.

Barbrah Nanyunja

Thanks for looking at this.

I don't see an attached video, which would help me understand what you're saying.

I understand what you mean about the 2 triggers for animating Picture 3, so I have hidden the automatically created one. What I want is for the snake and hands button to only appear and animate if the user enters an incorrect answer, not "hat." So that's why I tried to use the conditional in this trigger, but that doesn't seem to be working. Instead, it animates the snake when the timeline starts regardless of the value in the text box. 

Move Picture 3 along Line Motion Path 1
When text entry loses focus
If text entry /= hat

Also the Initial State of both the snake and hands is not hidden as defined in States, so that's a mystery to me.

 As for removing the freeform interaction, I have another scene in which I use it to give feedback, which I rather like, so I want this one to be similar. 

I guess I'm not familiar with using the Tab key to enter a text value vs. Return key or Submit, which I assume are equivalent, but maybe not.

Thanks for your help!

Walt Hamilton

Sorry. I've attached the video now. When I type hat, and leave the text entry box (you can tell, because the cursor leaves) nothing happens, but when I buy a cow, the snake shows up.

Text values are entered when the entry box loses focus, which can happen if the learner presses Tab, Return, or clicks anywhere outside the entry box. They are all equivalent.

Barbrah Nanyunja

Thanks again. What's strange is that when I preview this slide, the snake animates right away. I've tried deleting the extra trigger you mentioned above and I get the same results. I've also tried removing the freeform slide and same result. I don't understand how you are getting the result I'm looking for but I'm not! Can you help me understand what's different? Here's my screen recording: https://www.loom.com/share/1c930deb78b94345bd1c59366d49a108