Preload external swf

Hi - quick question. Is there any reason why the code below would stop working if it is used in an externally loaded swf? Something to do with the “_root” maybe… but I’m not sure how to go forward.

Any hints?
Many thanks.


bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent100;
_root.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}