hello… im trying to use the following code to load variables from a text file (and later a php file). The code is meant to put a movie clip called mcLoading to show that the text is on the way, and then fade the text in and show it on the stage. The whole code block is inside the constructor of a class.
thanks in advance for your help
// Set up event Listener and load content into clip
//var myMCL = new MovieClipLoader();
var myMCL:LoadVars = new LoadVars();
myMCL.load("../txt/" + activeContentWindow + ".txt");
myMCL.onLoadStart = function (targetMC) {
// Set Preloader Clip
_root.attachMovie("mcLoading", "mcLoading", _root.getNextHighestDepth(), {_x:thisObj.prpLoadingXPosition, _y:thisObj.prpLoadingYPosition, _alpha:0});
new Tween(_root.mcLoading, "_alpha", Regular.easeInOut, 0, 100, 20, false);
trace("started loading text");
}
myMCL.onLoadProgress = function (targetMC, loadedBytes, totalBytes) {
trace(targetMC + " is loading.");
}
myMCL.onLoadComplete = function (targetMC) {
// Remove preloader clip and place content
var loadingDone = new Tween(_root.mcLoading, "_alpha", Regular.easeInOut, 100, 0, 20, false);
loadingDone.onMotionFinished = function() {
removeMovieClip(_root.mcLoading);
trace(myMCL.body);
}
}