Search code examples
actionscript-3flashactionscriptflash-cs5flash-cs6

Flash Professional Arabic TextAria support


how can I add TextAria with Arabic support i.e.

dir="rtl"
align="right"

Please I need Flash Professional source code, I don't use Flash Builder of Flex systems.

Thank you.


Solution

  • To do what you are looking for, you have to start by embedding your font, for that take a look here, then you can do like this :

    // your embedded font
    var font:Font = new MyFont();
    
    var text_format:TextFormat = new TextFormat();
        text_format.font = font.fontName;
        text_format.align = 'right';
    
    var text_area:TextArea = new TextArea();
        text_area.setStyle('textFormat', text_format);
        text_area.width = 300;
        text_area.height = 200; 
        addChild(text_area);
    

    Hope that can help.