For a while I have been attempting to write this “function” that would open a set of doors on this site when the mc has loaded. On _levelx when a mc loads and the getTotalBytes ==100% (I am using a text field that will display “100%”when completed loading) which will evoke the doors to open. And this will be called for every mc that is loaded into this level. If the mc has not loaded (and the total bytes do != 100% the lights a loading stuff will continue to play until mc has loaded. I would have loaded the mc but it is in like 15-20 separate mc to decrease the load time and, I think, better functionality. You may view the site to get a better understanding of what I am trying to do
http://www.profilespc.com/glassnpowder/
If you click on “shop” and then click on “snowboards” you will see it work, but it is not the way I want it to. I am using this for a work around
//
bLoaded = _parent.getBytesLoaded();
bTotal = _parent.getBytesTotal();
factor = Math.ceil(bLoaded / bTotal * 100);
if (factor < fcomp)
{
_level15.stop(1);
percentloaded = factor + "% LOADED";
}
else
{
_level15.play("open");
} // end if
//
It takes a second or two to load and I have not implemented any preloads yet.
I have reviewed many books and tutorials but they don’t seem to go into detail what I am trying to accomplish or more than likely I am just not getting it. I am extremely frustrated by now. If something close to this has been asked and answered I apologize. I searched this site. If I have over looked a explanation or tutorial please refer me to it. Here are some peripheral questions:
Am I going about this the best way?
Is there a better way?
How would I have the doors close and then load the next mc when the user has pressed a button to load a new mc?
Thank you for any assistance you can lend. Peace