PDA

View Full Version : text anomally



spyderfx
August 22nd, 2008, 02:34 PM
i am trying to make a navigation bar for a web class with text that is created from an XML doc. right now the bar is vertical, but I am trying to rotate it to make it horizontal. For some reason when this happens, the text disappears, even if the rotation is 1 degree. Does anyone know why this would happen? Here is the code:


//returns list of jpgs from xml and makes a movie clip for each picture
ter = _root.myImages_mc["mx"+j].createEmptyMovieClip("movc"+j,_root.myImages_mc["mx"+j].getNextHighestDepth());
//where to start creating
ter._y = 0;
//create a text field for each jpg
tex = ter.createTextField("tt"+j,_root.getNextHighestDepth(),30,((_root.image_he ight)-30),140,40);
//formats text
var txtFormat:TextFormat;
//text properties
tex.wordWrap = true;
tex.multiline = true;
//where to find text in xml
txval = _root.myImages[j].attributes.title;
tex.text = unescape(txval);
tex.textColor = 0xFFFFFF;
txtFormat = tex.getTextFormat();
txtFormat.size = 20;
tex.setTextFormat(txtFormat);

GrndMasterFlash
August 22nd, 2008, 02:39 PM
http://orangutangy.blogspot.com/2008/03/rotate-dynamic-textfield-in.html

yeah, dynamic text doesn't like to rotate you have to embed it first in the library

fallow this article and your gold ;)

spyderfx
August 22nd, 2008, 02:47 PM
thanks!

jwopitz
August 22nd, 2008, 03:42 PM
you might also check out "taking a snap shot" of the text when it is not rotated and then using a bitmap for the rotation. I am just speaking out of my *** but I think some of the Flex charting label renderers employ this technique. Might help you to avoid embedding the fonts.

GrndMasterFlash
August 22nd, 2008, 04:14 PM
jwopitz is correct you can take a bitmap snap shot and then do anything you want to the text, the only downside is the snap shoot doesn't always come out as clean as real text, but a hand trick if you say.... wanted to fade in and out dynamic text
:}