pixelpusher84
05-07-2005, 03:50 PM
Hi,
I am trying to preload sections of my site, apears to be working great except the percentage (pText) refuses to display and none of my traces are working, any ideas?
empty = _root.main_mc.createEmptyMovieClip("container", "100")
empty._x = -250;
empty._y = -280;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.main_mc.container._alpha = 0;
pText._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
// maskmove
_root.main_mc.container._alpha = 100;
pText._visible = false;
trace(targetMC+" finished");
};
var myLoad = _root.main_mc.container.loadMovie("news.swf");
if i change the 1st and last lines to:
var empty = this.createEmptyMovieClip("container", "100");
and
my_mc.loadClip("news.swf", "container");
its works fine, but i want to add the container to _root.main_mc
any ideas?
cheers,
G
I am trying to preload sections of my site, apears to be working great except the percentage (pText) refuses to display and none of my traces are working, any ideas?
empty = _root.main_mc.createEmptyMovieClip("container", "100")
empty._x = -250;
empty._y = -280;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.main_mc.container._alpha = 0;
pText._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
// maskmove
_root.main_mc.container._alpha = 100;
pText._visible = false;
trace(targetMC+" finished");
};
var myLoad = _root.main_mc.container.loadMovie("news.swf");
if i change the 1st and last lines to:
var empty = this.createEmptyMovieClip("container", "100");
and
my_mc.loadClip("news.swf", "container");
its works fine, but i want to add the container to _root.main_mc
any ideas?
cheers,
G