开发者

simple preloader question for AS2 site

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!


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.


What i would do is add a keyframe on the timeline after the site and drag the entire library there, this would cause everything to preload after the preloader. Make sure you unclick export to first frame on all elements.

Another note: Your website, being flash, will not be indexed by search engines. Some as2 is read by penguin/panda but most is not. A lot is lost with a flash website that is SEO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜