|
-
i've been quite lazy, sorry.
i found a great little class here, by Julian Kussman:
http://juliankussman.com/blog/2009/0...-layout-class/
and added that to it:
Code:
// match stage dimensions;
$disp.width = _stage.stageWidth;
$disp.height = _stage.stageHeight;
if (_registeredObjects[$disp].fitStageHeight == true && _registeredObjects[$disp].fitStageWidth == true)
break;
// adjust proportionally to fill stage width or height;
if (_registeredObjects[$disp].fitStageHeight == true)
$disp.scaleX = $disp.scaleY
if (_registeredObjects[$disp].fitStageWidth == true)
$disp.scaleY = $disp.scaleX
else
( $disp.scaleX > $disp.scaleY ) ? $disp.scaleY = $disp.scaleX : $disp.scaleX = $disp.scaleY;
i want to implement also minWidth and minHeight and change the way the arguments are passed to be something more friendly like a tween call where i can pass args in no specfic order…and like "minWidth = false" instead of just true or false. maybe ...rest argument. hum..
ideas are welcome!
Last edited by ziriguidum; 04-08-2010 at 11:49 PM.
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
|