Preloader

I made a simple preloader using getBytesLoaded() and getBytesTotal(), situated in the first scene of the .fla.

A lot of the content(photos and .swf clips) in the second scene is added at runtime so in the library I had to set their linkage properties to"Export for ActionScript" and “Export in the 1st frame”.

The problem is that when I test the whole thing, the preloader doesn’t work properly. When the preloader appears on stage, it’s already way above 50% downloaded. It acts as if the lines of actionscript in the first frame of the first scene don’t get executed until a lot of the content (set to be exported for action script in the first frame) gets downloaded.

How can I fix that?