Losing Focus when using the Mouse and Keyboard

Hi all,

I have an issue when trying to make a car move on a layer for a game I am making. I want to be able to use the mouse for my custom GUI to activate the Next, Previous, Menu and Closed Captioning buttons. I then want to activate the screen area that the user will be interacting with and allow for keyboard triggers; this is how I move the car around (Up, Down, Left, and Right). The mouse and keyboard are used back and forth to select the game board and/or move the car.

Does anybody have any insight to how I could get the two to seamlessly work together? Thank you!

8 Replies
Alyssa Gomez

Hey Brian, thanks for your post! I'm wondering if you wouldn't mind sharing a sample of your file here, so folks in the community can have a better idea of your set-up and what you're looking to achieve. 

And you're right--"control loses focus" means an action occurring outside of a text entry or data entry box. For example, say your learner types a word into a fill-in-the-blank question, then they click something outside of the text entry box. As soon as they click outside, the variable is set.

Brian E.W. McNulty

Attached is the story file to get a better idea of what I am talking about. I didn't try to set any triggers on the layer that the car moves to instigate the keyboard when the mouse has focus at this point. Here is where I am hoping I can have light shed on. Thank you for looking and helping!

Leslie McKerchie

Hello Brian - Just taking a quick glance at your file, the first thing I notice is that you have the trigger object set to an actual object, and it would be best if this was set on the slide. This would assist with the 'focus' issue you are experiencing. That does mean, however, that you will need to set some additional variable conditions perhaps so that actions do not overlap.

I took a hammer at 1RD and 2RD as an example. Hopefully that gets you started :)

Brian E.W. McNulty

Hi Leslie, thank you for the response. I downloaded the file and did not see a .story file to review or an html file. So you are saying to trigger the car it should be on the slide and not the actual object. It seems counterintuitive to the way I have been coding and designing for the past 3 years. I am not saying it is wrong, I am just surprised that is how it would work. Thanks.