What I am trying to do seems simple enough, however, I think I am missing something I have tried 3 different ways of loading this 168k swf with linkage properties active on the movie clips within the library.
The checked boxes are:
Export for Actionscript
Export in First Frame
Even with Export in First Frame unchecked it still fails to preload.
I want to note that the move does work, I just want this movie to be preloaded.
1)
level0 timeline frame 1:
[code]
stop();
loadMovieNum("lib.swf", 1)
[/code]
level1 timeline:
frame 2:
[code]
trace('loading');
[/code]
frame 5
[code]
if (this.getBytesTotal() == this.getBytesLoaded() )
{
_level0.play()
this.gotoAndStop(6);
}else
{
this.gotoAndPlay(1)
}
[/code]
so testing at the 56k modem speed, I should be seeing 'loading' come up in th e output window a few times when doing a publish preview, but I don't. 'loading' is traced to the output window AFTER lib.swf is fully loaded.
2)
level0 timeline frame 1:
[code]
var listener:Object = new Object();
listener.onLoadInit = function()
{
trace('Initialized');
}
listener.onLoadProgress = function()
{
trace('loading');
}
this.createEmptyMovieClip(
"images", this.getNextHighestDepth()
);
var tmpLoader:MovieClipLoader = new MovieClipLoader();
tmpLoader.addListener(list
ener);
tmpLoader.loadClip("lib.sw
f","images
");
[/code]
In the above case, 'Initialized' is traced to the output window AFTER lib.swf is fully loaded.
I also get the same response with sample #2 if I don't create an empty movieClip to load lib.swf into and just use level1 instead.
I have also tried this with the same results, namely once lib.swf is fully loaded THEN the trace actions run.
3)
[code]
this.createEmptyMovieClip(
"LibraryLo
ader", 1);
var mc = LibraryLoader.createEmptyM
ovieClip("
loader", 1);
mc._alpha = 0;
mc.loadMovie("sharedLibrar
y.swf");
LibraryLoader.onEnterFrame
= function()
{
var car = this.loader.getBytesLoaded
();
var tot = this.loader.getBytesTotal(
);
var perc = Math.round((car / tot) * 100);
if(car == tot && car > 4){
this.removeMovieClip();
// shared library loaded
}
trace(perc)
};
[/code]
I am using Flash MX 2004, Flash Player 7, Actionscript 2.0.
Any thoughts / suggestions / comments?
Thanks!
Adam