I used this method on a larger project a year ago, where text was to be loaded into cartoony speech bubbles, kind of a dynamic combic book thing so the client could alter the script post deployment if they wanted to. For some reason, textHeight won't read correctly in some instances, though textWidth worked fine. Mind you this was flashplayer 7 standalone, but still.

- Andreas

Karthik wrote:

I'm just typing this off the cuff:

//if you have a multiline textfield named test_txt on the stage
//and want to align it vertically to the center of the stage
test_txt.autoSize = true;
//Always set the text via AS rather than use the variable field
test_txt.text = "abcd \n efgh \n ijkl";
test_txt._y = (Stage.height - test_txt._height)/2;
test_txt._x = (Stage.width  - test_txt._width)/2;

//Stage is a built in class..

Hope that helps :)
-K

On 19/11/05, Paul Steven <[EMAIL PROTECTED]> wrote:
Karthik, thanks for the reply

Can you elaborate on how to do this please

Thanks

Paul
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to