ActionScript 3 Layout & Constraints - Video Demo
Around the middle of December I decided to see if I could improve my ActionScript 3 life a little by creating a very basic layout and constraints framework. I thought it would be the perfect project to help speed up my overall development times.
Starting off, I didn’t plan the framework at all, I just kept coding until I got to the end result which, is usually the way things work for me. And after the couple of tinkering around down days, I ended up with a decorator pattern that I could apply to any existing DisplayObject.
This means that you don’t have to apply this framework to the whole application. The stage can stay as a Sprite; your existing components will still display where you told them to display. This framework can be added to any existing project without the need to upgrading anything and without the fear breaking anything which, I think is the best thing about it.
Unfortunately, I shall not be releasing the framework today. I feel that I can still improve upon it and clean the API a little. But I am attaching a video “walk through” of the API and a link to the code I use in the video.
Disclaimers:
- This is my first ever video! - be nice
- It’s unedited and done in a single take .. eeek!
- I tell a tiny lie close to the end about an offset being a pixel value when it was in-fact it’s a percentage .. doh!
- The Quicktime movie isn’t hinted for streaming .. sorry
Link to Video (for if you can’t see the embed)
If you have any feedback or questions please feel free to leave a comment.
Also, if you are living in the Bay Area .. please remember that the first San Flashcisco user group meeting is on Thursday (Jan 17th 08). For more information, please visit SanFlashcisco.com




[…] View Original Post […]