Flash® 8 - Scale9 Example
Flash® 8 supports a new feature for scaling MovieClips called Scale9. The feature is a property that enables customized scaling of any MovieClip asset. Below is an SWF example of Scale9 working, you will need the Flash® 8 beta player to see this.
By default the file below has Scale9 disabled. Simply click anywhere to switch the scales MovieClip to use Scale9. This feature is especially useful for component creation as you can create skins with a single MovieClip rather than 9 separate peices.
Press any Key to switch the MovieClip Scaled.
On any MovieClip you can set the scale9Grid property to a flash.geom.Rectangle instance. The Rectangle defined the inner square to be scaled. Using this defined Rectangle object, the player slices up the MovieClip into 9 parts and scales it appropriately.
Here is the code setting the scale9Grid property:
mc.scale9Grid = new flash.geom.Rectangle(10, 10, 10, 10);
This example will be included within Flash® by Example when Flash® 8 ships with full source and documentation.
Move to come,
Ted ;)
1 Comments:
that's great! just thinking about asking macromedia a thing like that! i love flash
Post a Comment
<< Home