00:00
00:00
molkman
I like salt.

Age 34, Male

Breathing

Jimminy Cricket Funky School

Germany

Joined on 3/12/04

Level:
8
Exp Points:
593 / 710
Exp Rank:
> 100,000
Vote Power:
5.01 votes
Rank:
Civilian
Global Rank:
84,245
Blams:
8
Saves:
62
B/P Bonus:
0%
Whistle:
Normal
Trophies:
50
Medals:
539
Supporter:
5y 11m 30d
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

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!

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.