I'm working on a game that has multiple Layouts and I'm having a problem.
The first Layout is a menu where you can choose your name, etc..
The second one is where the gane begins and you control an object with the 8 directions behavior.
The problem is that if I clikc the button that takes you to the second layout, it works perfectly, but if I choose a name, etc... and then click this button, although it takes em to the next layout the object I'm suposed to control doesnt respond, and at every press of a key the system makes a "error" sound, like the one that plays when you press to many keys at the same time.
I hope you guys can understand this, english isnt my mother tongue.
Here is a .cap where I replicated the problem Im having in my project.
(The "Sprite Button" plugin is needed to open the .cap)
1-click the text box to edit your name.
2-Type your name.
3-click the OK button to save your name.
4-click the GO button to go to the next layout.
5-Bug should appear.
1-Click the Go button without clicking anything else before.
2-Game should work perfectly.
The only way around this problem I found was to minimize the game window in the same event where it changes layout, and then restore the game window in the "Start of Layout" event in the next Layout. The problem whit this is that I cant use transitions between Layouts.
Pls Help me to fix this!!
The "focus off" action is what's giving the trouble. A better way to remove focus is to give something else focus or destroy the object.
Ok, thanks I'll try that.
Develop games in your browser. Powerful, performant & highly capable.
Thanks Rojo!!! Now it works perfectly!!! <img src="smileys/smiley4.gif" border="0" align="middle" />