Skip navigation
Currently Being Moderated

problem in rotating dynamic text field

Mar 29, 2010 7:53 AM

Hi All,

 

In an application, i am creating dynamic text Field and then try to rotate it by using _rotation method but it become invisible. Please answer if anyone know anything about it.

 
Replies
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 29, 2010 8:25 AM   in reply to amitKumarKanda

    you need to embed the font.


     
    |
    Mark as:
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 30, 2010 6:41 AM   in reply to amitKumarKanda

    if you don't see your text, you're not embedding the font.

     

    when you use actionscript to embed a font, you need to have the font in your library with a linkage id, create a textformat instance and assign its font property and finally assign the textformat to your textfield.  for example


    _root.createTextField("txt",_root.getNextHighestDepth(),50,50,50,50);
    _root.txt.embedFonts=true;
    _root.txt.text="hello";
    _root.txt._rotation=20;

    var tfor:TextFormat=new TextFormat();

    tfor.font="yourfontslinkageid";  // <- linkage id of font in your library

     

    _root.txt.setTextFormat(tfor);

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 2, 2010 6:35 AM   in reply to amitKumarKanda

    I'm having the same problem, but now understand why this happens.

     

    As a test if you create a dynamic text box and place a var inside - it works.

     

    Then if you manually rotate the text field it can't see the text anymore. Or when you dynamicaly rotate etc.

     

    A fix will be to place the text field inside a movieclip, then rotate the movieclip with the text field inside.

     
    |
    Mark as:
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 2, 2010 6:37 AM   in reply to djaynickyt

    that's no fix.   you need to embed the font.  that's the fix.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 1:08 AM   in reply to kglad

    Sorry, your right.

     

    Embed the font, it works fine now.

     
    |
    Mark as:
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 4, 2010 6:30 AM   in reply to djaynickyt

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points