I have used the tween class to make my text backdrop appear with an elastic FX.
I have then loaded text from an XML file into my text box, but the text appears before the elastic FX has finished.
I have kept the AS for both in a single frame,is it possible to get the text to appear after the elastic FX has finished?
AS:
stop();
//tween AS
import mx.transitions.Tween;
import mx.transitions.easing.*;
function doTweens(myClip:MovieClip):Void {
var tw:Tween = new Tween (myClip,"_width",Elastic.easeOut,0,330, 1, true);
var tw:Tween = new Tween (myClip,"_height",Elastic.easeOut,0,500, 1, true);
}
doTweens(txtBox);
//text
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
article = [];
description = [];
main = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
description* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
main* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
firstArticle();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/deejays.xml");
////////////////////////////////////
p=0
function firstArticle() {
if (loaded == filesize) {
head_txt.text = description[0];
main_txt.htmlText = main[0];
}
}