使用 cs5 中提供的预加载器示例在 as3 中进行预加载
我正在开发一个项目,我想在其中添加预加载器,为此我使用了 cs5 中提供的示例预加载器(在示例文件中)。我已将(从另一个 fla)所有代码移至第二帧,并将所有库内容移至当前 fla 的库。
现在的问题是第一帧的大小现在是182kb(库内容的大小) 当我没有在当前 fla 的库中添加我的库内容时,它只有 8kb。 因此,当我测试电影时,直到加载 182 kb 并在第二帧显示后立即才显示第一帧(预加载器)。
我的问题是如何在第二帧中加载库内容? 我有大量的图书馆内容,预计未来会增加。
这是两个快照: 库:
测试影片:
您可以在第二张快照中看到第一帧的大小为 182kb。
请针对这个问题提供一个好的解决方案。
谢谢 !
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 library 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:
testing the movie:
you can see in second snapshot the size of first frame is 182kb.
Please provide a good solution for this problem.
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有链接加载的资源直到它们第一次出现的帧为止,因此,如果将所有资源移动到第二个(或更高版本)帧,则可以在第一个框架中包含在所有其他资源(在第二帧或更高版本中)之前执行的代码) 完成加载。
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.
您可以在另一个fla中创建预加载器。这个新 fla 的唯一工作是加载/预加载您的主 fla,因此预加载器的 fla 大小将非常小。
在这种情况下,您不必将库内容移动到主fla的第二帧,实际上恰恰相反。
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.