PDA

View Full Version : loading swf into blank mc


shrek
01-11-2002, 12:14 AM
Here is the problem:
I have a main movie that I am loading external .swf files into with preloaders in the external .swf's. I am loading these swf's into a empty movie clip in the main movie.
my preloader isnt working correctly on the external swfs and I think it is because of the way I am targeting the
getbytesloaded. here is the code...I am not sure about the
_level0 part.

bytesLoaded=_level0.getBytesLoaded();
totalbytes=_level0.getBytesTotal();
percentLoaded=Math.round(bytesLoaded/totalbytes)*100);
bar._xscale=percentLoaded;

is the _level0 referring to the main swf that I am loading into?

Thanks for the help.

Todd

Billy T
01-11-2002, 02:28 AM
Originally posted by shrek

is the _level0 referring to the main swf that I am loading into?


yes it is.

code should be something like

bytesLoaded=_level0.empMC.getBytesLoaded();
totalbytes=_level0.empMC.getBytesTotal();

empMC is the instance name of the empty clip you are loading the external movies into

cheers

shrek
01-11-2002, 02:49 AM
Thanks Billy T, so you are saying I should have the preloader built in to the main movie and not in the external swf?

Billy T
01-11-2002, 02:57 AM
no you can leave them in the external movie - you just need to have the right target when you check how much is loaded.