I am loading text in from an external xml file, but when I set it to rotate:
the textbox is blank?
I even tried to put it in a movieclip and rotate it:
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...
ActionScript Code:
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(ProgressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener(Event.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
}