Hi George,
yeah the width property will only take an integer so you must use the
percentProperty to set a percent.
So something like this would be fine~

public function changeWidth():void
{
             mainPanel.percentWidth = 100;
}



On 10/28/07, George Georgiou <[EMAIL PROTECTED]> wrote:
>
>   Hi there,
>
> This is a very simple but I can't get it work. I have a panel and I want
> to change it's with to 100% by means of ActionScript. Here's what I do:
>
>  public function changeWidth():void {
>              mainPanel.width = 100%;
> }
>
> where mainPanel if of course the ID of my panel.
>
> I get an error like:  semicolon is unexpected. I have tried using
> mainPanel.width="100%"; but this does not work also because .width is of
> type integer.
>
> Any ideas on how to achieve this?
>
> thanks,
> George
>
>
>  
>

Reply via email to