Percentage loading with external file

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loading = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

i am using this. However instead of getting the bytes loaded for the file this code is in. how do you make it get the bytes load of an external file? eg. externam file will be called page.swf

would be be like this?
bytes_loaded = Math.round(this.page.getBytesLoaded());
bytes_total = Math.round(this.page…getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loading = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}