# Preloading flashvars

**URL:** <https://forum.kirupa.com/t/preloading-flashvars/160897>\
**Category:** Uncategorized\
**Created:** [August 30, 2005, 2:50pm UTC](https://forum.kirupa.com/t/preloading-flashvars/160897 "2005-08-30T14:50:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Henry](https://forum.kirupa.com/u/Henry)\
**Post date:** [August 30, 2005, 2:50pm UTC](https://forum.kirupa.com/t/preloading-flashvars/160897/1 "2005-08-30T14:50:50Z")

</div>

Hey all,

I am in the process of building a site for an Architect…

[Jamie Fobert Architects](http://217.199.182.231/~jamiefob/)

(projects)

I am useing transitions between the projects and am loading details/text and images externally through flashvars, php and a mySQL database.

Within my transitions I have a a preloader on the forst 2 frames the code is as follows (taken from a Voetsjoeba tutorial):

midframe = [21];  
bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadText = Math.round(getPercent\*100)+"%";  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}

This works pretty well if the content is within the .swf, but when it is loaded externally it doesnt preload it at all.

Does anyone know how I can adapt/improve this preloader? or somehow ensure that all the content being loaded externally is loaded before the transition plays?

As ever any assistance much appreciated.

thanks  
Henry
