I made a rounded rectangle in as3 and would like to expand it on click. This is the code I use:
var lesBg:Sprite = new Sprite();
with (lesBg.graphics) {
lineStyle(3, 0x61b157);
beginFill(0xececec);
drawRoundRect(0,0,190,52*les.duur, 10,10);
endFill();
}
currentPanel.addChild(lesBg);
When I click on it I would like it to expand to twice its size. I’m doing this with TweenLite but when I expand it I get ugly pixelated images and the borders expand too.
Tweenlite.to(lesBg, 1,{width: 380});
Is it possible to expand the image so it stays clean and the borders stay intact?
You need a 9-slice option for you movieclip.
You can find more about it here: http://www.sephiroth.it/tutorials/flashPHP/scale9/