hello ,
i am new to this group and i need help with my application in flex 3
i am using embedded fonts by loading swf's for perticular fonts at run
time,when i apply a font for the whole textField it works fine but
when i try to apply different fonts for different lines of text i m
unable load second font swf and getting error "this font is not
defined"
here is my code,where i m using wordArray as lines of text and
font_file as a name of swf for the embedded font, i m reading these
data from xml file:

private function loadText (event:Event) : void
                {
                        for (var i : int = 0 ; i < wordArray.length ; i++){
                                var x1 :  Number = 
(Number(wordArray[i].x))/4.1666;
                                var y1 : Number = 
(Number(wordArray[i].y))/4.1666;

                                var textField : TextField = new TextField();
                                textField.addEventListener(MouseEvent.CLICK ,
onTextFieldSelection);
                                textField.text = wordArray[i].value.toString();

                                textField.wordWrap = false;
                                textField.multiline = false;
                                var _textFormatter : TextFormat = new 
TextFormat();
                                var str:String = new String();
                                var 
str:String=wordArray[i].font_file.toString();
                                var Square:Class =
event.target.applicationDomain.getDefinition(str) as Class;
                                var mySquare:Font = new Square() as  Font;
                                Font.registerFont(Square);
                                _textFormatter.font=mySquare.fontName;
                                textField.embedFonts = true;

}


please help me with this....



Thanks

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to