AS2 textWidth property
I am using a TextField in Flash CS2, because I need to know the width of the actual text for positioning purposes. However from 开发者_如何学Pythonsome odd reason it doesn't always work when the browser is Google Chrome.
Did anyone came across this issue?
I seem to remember something like that from the AS2 times. Try waiting one frame before you measure the text, e.g. by setting a flag called redrawNextFrame
to true, and in the onEnterFrame
callback, if the flag is set, do your layout redraw (including text measurement) there, and unset the flag.
The problem seems to be with a particular version of the Adobe Flash Player. I updated it and fix the issue.
精彩评论