I think you want something like this:

var parentCanvas:Canvas = new Canvas();
parentCanvas.percentWidth =100;
parentCanvas.percentHeight = 100;

var childCanvas:Canvas = new Canvas();
childCanvas.percentWidth = 100;
childCanvas.percentHeight = 100;

var childText:Text = new Text();
childText.percentWidth = 100;


Let the childCanvas be 100% of the height of it's parent.  The parent container 
will know to 
leave enough room for childText.  I'm not explaining this very well, but the 
above code 
should do what you're looking for.

--- In flexcoders@yahoogroups.com, - - <sailorse...@...> wrote:
> Hi Sunil, this is what I'm trying to replicate in actionscript:
> <mx:Canvasid="parentCanvas" width="100%" height="100%">    
<mx:Canvasid="childCanvas" width="{parentCanvas.width}" 
> In MXML this layout is DYNAMIC, meaning if I resize my window, all my 
> components are 
also resized... 
> How can I replicate this in actionscript?
> Thank you.
> -David

Reply via email to