|
-
Fixed object size on resizable stage
I have a SWF stage that needs to be resizable, as it loads content dynamically which may have different dimensions. Yet, I need an object (namely a 'Close' button) to keep its absolute size no matter how big or small the stage gets. I also need it to keep its relative position, let's say always at the top right corner of the resized Stage. Is there any way to achieve this?
-
.
Hi,
Try this
Actionscript Code:
Stage.align = "TL";
Stage.scaleMode = "noScale"; //Stage.scaleMode = "exactFit";
button._x = Stage.width - button._width; button._y = Stage.height - Stage.height;
function doResize() { button._x = Stage.width - button._width; button._y = Stage.height - Stage.height; }
Stage.addListener({onResize:doResize});
this does not keep original size button when using "exactFit"; only top right hand corner'
my site/hobby:http://www.fgps.com/keith
Last edited by fruitbeard; 01-02-2012 at 04:29 PM.
-
It seems to be working fine. Thanks a lot!
-
Map Fixing Location issue
Hello Friends,
I have generated a map into .as 2.0. It's working fine.
Now only when I clicks on the positioning controls, the map is moving out of frame/window. can anyone please guide me on same.
Also I have set the proper code for it but still the issue is remain.
Any help would be appreciated.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|