I used AS3 to create a rounded edges box, and when the window resize i wanted to keep the ellipse height and width of the edges. How can I do that?
Creating the box
private function detectStage(e:Event=null):void {
roundRect.graphics.beginFill(0xFFFFFF,1);
roundRect.graphics.drawRoundRect(boxX,boxY,boxWidth,boxHeight,10,10);
//drawRoundRect ( x , y , width , height , ellipse width , ellipse height )
roundRect.graphics.endFill();
addChild(roundRect);
}
This 1 the box doesnt change
createBoxx.roundRect.graphics.drawRoundRect(createBoxx.boxX,createBoxx.boxY,sContent.width,sContent.height,10,10);
This makes the overall size strech
widthTween=new Tween(sBox,"width",Elastic.easeOut,sBox.width,boxWidth,2,true);
heightTween=new Tween(sBox,"height",Elastic.easeOut,sBox.height,boxHeight,2,true);