How to force a numeric entry to lose focus?

Apr 25, 2023

Hi All, 

 

I am having a drag and drop activity, in which I have to show either a correct or incorrect feedback layer once I drop an object on a target. 

The result depends on the values on two or more numeric entry boxes.

Sometimes the user enter a correct answer but neither hit the Submit button, which is inserted just to make the lose focus action, nor make any click outside the last numeric entry box. The user directly drag the object to the target. This causes that the incorrect layer pops up, even if correct answer is inserted, as the variable did not have the chance to store the new value! 

 

Any ideas to solve this problem? 

 

Thank you 

2 Replies
Walt Hamilton

Don't permit the object to be dragged before the variable is set. There are lots of options for doing that:

Put the entry box on one slide, and the drag and drop on the next. You can show the variable on the second slide if they need to see it. The action that changes from one slide to the next will cause the loss of focus.

Show a layer when the timeline starts. Put the entry on the layer. The action of closing the layer will cause the loss of focus.

Make the drag object start in Hidden state. When Submit is clicked, change its state to Normal.

If you want the drag object to show, cover it with a shape that has a fill and the transparency set to 95 - 99%, Have the Submit button hide the shape.