Actionscript 3 Padding Component – Applying the Decorator Pattern

May 4, 2009

PaddingDecorator is an Actionscript 3 component (extends UIComponent) that uses the Decorator Design Pattern to add padding to DisplayObjects.

Padding Decorator - Class Diagram

You can download the component here.


import org.mi.layout.decorators.PaddingDecorator;

var mc:MovieClip = new MovieClip();

var padding:PaddingDecorator = new PaddingDecorator();
padding.left = 10;
padding.right = 20;
padding.bottom = 30; = 50;

padding.component = mc;


CompositePost WordPress Plugin

February 9, 2009

This is a rewrite of a plugin I wrote some time ago.

It let’s you write posts and pages composed of other posts and pages.



Write anywhere on a post:

[composite option=”value”]

You can specify one or more options. The options are the same used in the get_posts() function (see


Show all posts from category Projects and include post with ID = 1:

[composite category_name=”Projects” include=”1″]


CompositePost create a loop using a template located in the plugin’s folder (usually /wordpress/wp-content/plugins/composite_post). The default template is /wordpress/wp-content/plugins/compositepost/default.php. You can have as many templates as you want, just specify wich one to use, like this:

[composite category_name=”Projects” template=”my_template”]

CompositePost will look for the file at /wordpress/wp-content/plugins/compositepost/my_template.php


Download the plugin

Versions and Bug Fixes

0.3 – Fixed: missing post’s original content, not showing up.

0.2 – Fixed: for the <!–more–> quicktag.

0.1 – First version .

About LayoutManager and Updating the Display List

February 2, 2009

DUH! Hehe. Thanks for the comments and for clearing this one for me. That’s so obvious I don’t know how I missed it. Event.ADDED, Event.REMOVED and the event propagation mechanism takes care of this problem. Closing this one up.

Read the rest of this entry »

LayoutManager Download

February 2, 2009

Beta version of LayoutManager can be downloaded from:

Layout Manager

February 2, 2009

Ever since Flex came out people have been after similar functionality for Flash. There aren’t many options out there, but a few worth mentioning are and After studying these (great) diferent approaches, I decided to give it a try and build my own version, similarities not a coincidence.

LayoutManager and LayoutElement

LayoutElement extends a DisplayObject’s size and positioning properties. Both size and position can be specified in pixels or percentage of a container. LayoutManager manages LayoutElements and updates them as necessary.

LayoutManager Demo


LayoutContainer extends Flash’s UIComponent and works much like ScrollPane, except it’s content can be added/removed directly just like any other DisplayObjectContainer.

Layout Containers

Layouts Containers, such as Canvas, HBox and VBox, extends from the LayoutContainer class and add LayoutManager and LayoutElement functionality.

HBox Demo


February 2, 2009

Amplify is a Content Management System (CMS) written with Simplify PHP.

Download available soon.

Simplify PHP

February 2, 2009

Simplify PHP is a Rapid Application Development Framework written in PHP 5.

For some years I have used and studied other popular frameworks such as CakePHP, Symfony and Rails. I have taken the best practices out of them and compiled them into a framework that I feel best suites my needs. I have used Simplify on many of my projects and it’s proven to be a good tool for web applications development.

If anyone else decides to give it a try, I hope it works for you and am looking forward to your opinion and contribution 🙂

Download available soon.