Monday, May 2, 2011

WireParam As3

Thought on constrainable object structure:

You can have bound functions, but you cannot have bound properties.
That said, constraints should operate through bound functions
such as getX and setX.

This will enable "WireParameters" in flash like wireparameters in max.

Stacking Order / Draw Order Explained. AS3

Original Thread Link:
http://board.flashkit.com/board/showthread.php?t=771640

Post By:neznein9
Whenever you use addChild, the object is put on the top of the display list (highest z-index). You can use a couple different methods to manually set the index - also, remember that you have to use an index thats in bounds, you can only set an index to 100 if there are 100 other things on stage.

addChildAt(mc, 0); <= this will add to the back

addChildAt(mc, 10); <= this will add to layer 10 and bump anything already there

setChildIndex(mc, 20); <= this moves mc to index 20, bumping anything else

setChildIndex(mc, this.numChildren - 1); <= bring mc to the top

swapChildren(mc, mc2); <= switches the two

swapChildrenAt(0, 10); <= switches whatever is at 0 with whatever is at 10