Preloader causes my SWF to run dog slow
ok, doing wrong, , admittedly new as3 , way cs5 has default preloader bit confusing me well.
i have 2 files -- 1 preloader as3:
var l:loader = new loader();
l.contentloaderinfo.addeventlistener(progressevent.progress, loop);
l.contentloaderinfo.addeventlistener(event.complete, done);
l.load(new urlrequest("part2.swf"));
function loop(e:progressevent):void
{
var perc:number = e.bytesloaded / e.bytestotal;
percent.text = math.ceil(perc*100).tostring()+"%";
}
function done(e:event):void
{
removechild(percent); // removechildat(0) make more sense way
percent = null;
addchild(l);
}
then have swf main content called "part2.swf".
when "publish" part2.fla, go actionscript settings , select preloader method preloader swf , on line below select name of file points 1 above contains script.
even when simulate download test on movie compiles dog. don't understand. if use "default preloader" in cs5 ... annoying little dots no progress bar or display text (who designed that?) ... seems run fine.
i've tried putting frame preloader in frame understand "preferred" method call external loader file. i'd external preloader work.
any tips on i'm doing wrong? or have simple preloader can use in place?
deep bow of thinking me.
that preloader method runtime shared libraries , doesn't apply situation.
More discussions in ActionScript 3
adobe
Comments
Post a Comment