PDA

View Full Version : Bizzar? My text wont rotate?


chrisopia
10-26-2009, 10:47 AM
I am loading text in from an external xml file, but when I set it to rotate:

desc_txt.rotation = 5;

the textbox is blank?

I even tried to put it in a movieclip and rotate it:

desc.rotation = 5;
in case you weren't allowed to rotate text boxes for some reason? but still an empty text box?

And when I manually rotate the text box, without using actionscript... I still get an empty textbox!

I know it's rotation of any method because I get text again when I undo the rotation?

Am I doing anything wrong? Or can't you rotate external text for some reason?

Oh, P.S I import it first, then rotate it...

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("images.xml"));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseBooks(xmlData);
}
function ParseBooks(imgInput:XML):void {
var P:int = 0;
var IMG = imgInput.pic.image.text()[P];
var TXT = imgInput.pic.caption.text()[P];
var imageLoader:Loader;
function loadImage(url:String):void {
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(Pro gressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, imageLoaded);
}
loadImage(IMG);
desc.desc_txt.text = TXT;
function imageLoaded(e:Event):void {
mc.addChild(imageLoader);
}
// this is usually where I would place the rotation code
}

ASWC
10-26-2009, 10:55 AM
You can't rotate or apply basic effects (like fading for example) to text displayed without embedded fonts.

chrisopia
10-26-2009, 04:09 PM
Aaah!!! Thankyou!! Such an easy fix!