UI Game Layout

45 views
Skip to first unread message

Haluk Demir

unread,
Sep 12, 2012, 5:42:31 AM9/12/12
to aswing-...@googlegroups.com
Hello Friends;

Working half-a-day at the end understand howto use AsWing lib.
Now i try to integrate some button and menus on my game stage.

I call all items with unique object into my createGui() function. Everything seems fine.

I have a few problems for now :

1-
I can put the menu top and bottom with given x - y positions. But when resizing browser or swf file bottom menu is losing.
I think i can listen stage width height and dynamicly re-position my menus.
Before that i want to ask you, is it possible to fix it easyl?

2-
How can i set Opaque level of JFrame / JWindow etc.?


Thanks.

ProG4mr

unread,
Sep 12, 2012, 8:56:21 AM9/12/12
to aswing-...@googlegroups.com, Haluk Demir
Hi,

you can use this snippet for problem 1:

stage.addEventListener(Event.RESIZE, evtResizeWindow);

private function evtResizeWindow(e:Event):Void
{
WINDOW.setSizeWH(Lib.current.stage.stageWidth, Lib.current.stage.stageHeight);
}

For the second, you can look at the "setBackground()" or "alpha (to alpha the entire component), 
is not hard if you search the api documentation.

Hope it helps.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
Reply all
Reply to author
Forward
0 new messages