Another flash 8 feature: scale9Grid
By now, this feature is probably already well covered by many sites on the net. But here's a short demo:
1. create a rounded corner rect with radius of 16
2. create a mc out of it and name it "d" (my favourite variable name, test string, etc etc)
3. type the following code:
import flash.geom.Rectangle;
d.scale9Grid = new Rectangle(16, 16, d._width - 32, d._height - 32);
d._width = 900;d._height = 50;
That's it.. what's different from the rest of the other demo is, there is very little you need to know to set one up 'cause the 3rd and 4th param are assumed to be the height and width of the rect.
Pretty cool eh..
0 Comments:
Post a Comment
<< Home