开发者

Preloader in as3 using preloader sample provided in cs5

I am working on a project in which i want to add preloader and for that i have used the sample preloader provided in cs5 (in sample files). i have moved(from another fla) all my code to second frame and all library content to current fla's library.

Now the problem is that the size of first frame is now 182kb (the size of library content) which is only 8kb when i have not added my librar开发者_StackOverflow中文版y content in current fla's library. And due to this when i test the movie the first frame(preloader) is not shown up until the 182 kb is loaded and immediately after that second frame is shown up.

here my question is how can i load library contents in second frame ? i am having a large number of library content which is expected to increase in future.

here are two snapshot: the library:

Preloader in as3 using preloader sample provided in cs5

testing the movie:

Preloader in as3 using preloader sample provided in cs5

you can see in second snapshot the size of first frame is 182kb.

Please provide a good solution for this problem.

Thanks !


Assets which have not linkage load until the frame they first appear, so if you move all your assets to the second (or later) frame, you could have code in the first frame that executes before all the other assets (in frame two or later) finish loading.


You could create your preloader in another fla. This new fla's only job would be to load/preload your main fla, so your preloader's fla size would be very small.

In such case, you wouldn't have to move your library content to the second frame of your main fla, quite the opposite actually.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜