00:00
00:00
View Profile molkman
I like salt.

OPEN FOR COMMISSIONS!


29, Male

Breathing

Jimminy Cricket Funky School

Germany

Joined on 3/12/04

Level:
8
Exp Points:
587 / 710
Exp Rank:
83,840
Vote Power:
5.00 votes
Rank:
Civilian
Global Rank:
83,194
Blams:
8
Saves:
61
B/P Bonus:
0%
Whistle:
Normal
Trophies:
35
Medals:
538
Gear:
7

Actionscript 3 Buttons Problem! Halp!

Posted by molkman - January 20th, 2012


Hello swagettes!

Right now, I'm programming Lucky Tower 2 in Actionscript 3 and it's the first time I use it. Almost everything is working nicely, but I have some significant problems with buttons, for example in the menu or even ingame. The problem is, that every time I click a button, I need to click inside the screen again in order to use the keyboard to navigate the hero. CRAZY LIFE!

It happens when I start the game from the menu and it also happens when I, for example, close the inventory. I always have to click somewhere on the screen again, otherwise the keyboard won't react. Overall there seems to be a new way of how Actionscript deals with buttons (you can now block buttons by placing simple movieclip on top of the button) and I'm quite puzzled by that.

Can anybody help me here? That'd be awesome!


Comments (9)

use actionscript2

Go die in a fire, baguetteface.

I've had that problem - I believe you need to look into the .focus property and set it to null or some such...
-Richie

Cool! I'll try that, thanks.

use actionscript 4

Yeah that happens. How I deal with it is when I close a menu and return to gameplay , it calls this first
stage.focus = stage;

Awesome, that did it!

use javascript

More like wankerscript-

you need a hug! HUG!!

Cyberhugs are the best! Thanks!

That dude seems to have one silly ass problem!

Use C++

Use mah mum. She get yer dun.