views:

52

answers:

1

I was asked to add a preloader to a rather messily constructed AS2 website. I'm using the preloader-in-the-first-frame approach--there are tons of references to _root throughout the site so I can't load the main site externally as another swf. My approach just involved creating a new frame at the beginning of the timeline, bumping all the existing content to the right one frame, and adding to the first frame one of the millions of throwaway preloaders available on the web.

The problem I'm having is that for whatever reason, 99% of the site weight is being exported in the first frame (as reported by "Generate Size Report..."), despite the fact that a) there's nothing on the stage but the preloader in frame 1 and b) I've got my actionscript classes exporting on frame 2. There are very few library items with linkage, and all that are linked are set to export in frame 2. Obviously, the preloader isn't working as desired, because it doesn't show up until everything's already been loaded.

What am I missing here?

Thanks!

A: 

This is because all your art assets are being loaded in the first frame.

The normal way of solving this is to shift the start of the main site to frame three, dump one copy of all of your library stuff on frame 2, and uncheck "Export in first frame" for everything in the library.

That said, I don't know why you think you can't load it as an external .swf - in a child swf, _root maps to the root of the child, rather than anything in the container.

Anon.