Hi Keith,

Always trying to learn!

The [Embed] worked correct here.
I use FlashDevelop with Flash CS3 as compiler and not the flex_sdk_3.

Thank you very much for the additional example.

Kind regards
Cor van Dooren
The Netherlands


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Keith
Reinfeld
Sent: dinsdag 6 juli 2010 18:52
To: 'Flash Coders List'
Subject: RE: [Flashcoders] How to rotate dynamic textfield

Cor, 
 
In case you are still interested here is your (corrected) Test.as class. 
 
package {

        import flash.display.*; 
        import flash.text.*; 
         
        public class Test extends MovieClip { 
                // Cor, you had errors in your [Embed] 
                //$(AppConfig)/ActionScript 3.0/libs/flex_sdk_3/ 
                [Embed(source="C:\\Windows\\Fonts\\tahoma.ttf",
fontName="_myTahoma", fontFamily="myTahoma")] 
                public static var _myTahoma:Class;// Required step. 
                private var _myTahomaFont:Font = new _myTahoma();// Not so
much, fmt.font = "_myTahoma"; would do. 
                
                public function Test() { 
                        var fmt:TextFormat = new TextFormat(); 
                        fmt.font = _myTahomaFont.fontName;//"_myTahoma";// 
                        fmt.size = 16; 
                        fmt.color = 0x990000; 
 
                        var tf:TextField = new TextField(); 
                        tf.embedFonts = true; 
                        tf.defaultTextFormat = fmt; 
                        tf.multiline = true; 
                        tf.width = 200; 
                        tf.autoSize = TextFieldAutoSize.LEFT; 
                        tf.wordWrap = true; 
                        tf.x = 100; 
                        tf.y = 100; 
                        tf.htmlText = "Text to rotated<BR>Line two."; 
                        addChild(tf); 
                        tf.rotation = 300; 
                } 
        } 
} 
 
Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.830 / Virusdatabase: 271.1.1/2984 - datum van uitgifte: 07/05/10
20:36:00

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

Reply via email to