views:

123

answers:

1

In AS3 flash - I have a textField with a CSS in it that looks like this:

body {
   fontSize: 10%;
}

When it runs, the font is small. When I click the full screen button, I expected the font to increase proportionally because I set it for 10%. However, this is not working, the font stays at the same size as when not in full screen. I have debugged the onResize event and I can see the style fontSize=10pct when I log it out.

Am I misunderstanding the meaning of % here? I was hoping it would increase the fontSize automatically when going to full screen mode, but that does not appear to be the case.

Is there something else I should be doing?

A: 

flash ignores the percentage part of your css declaration and just sets it to 10.

heres a quote from the docs:

font-size: Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

link: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs%5FParts&file=00000908.html


The only thing you can do is set the font-size manually in your "onResize" event handler.

greg
I had read that, but I was hoping since they interpret the % to pct that the doc was incomplete or out of date.
dar