by Dale, Noponies Blog
The NpFlexLayout Class is designed to simplify aligning DisplayObjects to stage dimensions and responding to changes in stage dimensions at run time by a user or between different users.
This supersedes a simpler implementation of this approach, called “ActionScript 3 Liquid Layout Manager”, which I’ll leave on the site.
As opposed to the LayoutManager class, the NpFlexLayout class is an actual layout manager, taking care of instantiating, destroying and passing on requests to instances of an internal class called NpFLexLayoutItem which wraps each displayObject passed to the NpFlexLayout Class.
Class Features
- Position objects (x,y) on the stage as a proportion of the stages dimensions
- offSet each displayObject (x,y) from where it would be by an absolute pixel value
- set objects to stretch to fit either stage width / height or a proportion of stage dimensions
- per object minX & minY settings where reflowing, resizing will cease
- use either the clips registration point, or its visual center (width/height)
- pause, resume displayObjects responding to resize events
- update individual class properties at runtime
- tween objects properties at runtime (uses internal simple tween method)
- set tween easing
- add, remove displayObjects from class
View Example
Here is an example; http://www.noponies.com/dev/as3_flexlayout/
Source Files
Here are the relevant source file; http://www.blog.noponies.com/wp-content/uploads/npflexlayout.zip
2 comments:
Error 404 - Not Found
Try to get downloads directly from http://www.blog.noponies.com/archives/109
Post a Comment