Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rotating dynamic text box in actionscript

Status
Not open for further replies.

draigGoch

Programmer
Feb 10, 2005
166
0
0
GB
I have created a dynamic textbox using actionscript, and am trying to rotate it:

_root.axis.createTextField("labelY", -1, -1, -16, 10, 20);
_root.axis.labelY.embedFonts = true;
_root.axis.labelY.text = labelY;
_root.axis.labelY.setTextFormat(labelYFormat);
_root.axis.labelY._rotation = 90;

When i run this, the text disappears, and when I remove the rotation line it still does not appear. I'm sure it has something to do with the embedFonts method, because when I remove this line along with the rotation line, it displys. IO'm pulling my hair out here!!!

A computer always does what you tell it to, but rarely does what you want it to.....
 
_root.axis.createTextField("labelY", -1, -1, -16, 10, 20);
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "bill2"
_root.axis.labelY.embedFonts = true
_root.axis.labelY.text = labelY;
_root.axis.labelY.setTextFormat(my_fmt)
_root.axis.labelY._rotation = 90;

where bill2 is the linkage name for the font in the library
 
I have the same problem. With your explanation the Textfield rotates but the text still disapears.
The example in the helpfile of FLASH has the same problem. In the proppertyinspector I called the var text and the Instance name labelY.
 
_root.axis.labelY.text = "something";

shows up just fine with code above after you increase the width of the textbox to around 100

10 will probably allow for 1 letter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top