下载 flash swf 时加载图像。超文本标记语言
我有一个很大的闪存文件,可以加载,但下载需要很长时间。它是一个标题,我只是想知道是否可以立即显示图像,然后在下载 Flash 时无缝地重叠它?只是想知道是否有 HTML 可以做到这一点?
谢谢
i have a big flash file that loads in but takes a noticeable amount of time to download. Its a header and i was just wondering if i could have an image instantly appear and then when the flash is downloaded seamlessly overlap it? Just wondering if there was an HTML to do this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,您有两个选择。
- 选项 A 是您已经提到的解决方案。我将在与 swf
position:absolute
相同的 div 内放置一个 img 标签,并让 flash 执行ExternalInterface.call(" hideImage")
加载 swf 时调用 JavaScript,并在 javascript 中使用hideImage
函数删除/隐藏 img 标签。-选项B(这是我会选择的)是在flash内部使用预加载器。在 flash 的第一个位置设置两个单独的关键帧。我使用标签我的第一个“加载”和第二个“主”。在加载过程中,我的操作类似于以下内容:
Flash将在加载后显示“正在加载”帧段,您的swf将不会切换到“main”,直到 swf 的其余部分加载完成。如果您的 swf 正如您所说的那么大,我会推荐某种带有百分比指示器的预加载器。
You have two options for this as far as I can tell.
- Option A is the solution you've mentioned already. I would have an img tag inside the same div as the swf
position:absolute
and have flash do anExternalInterface.call("hideImage")
call to JavaScript when the swf is loaded and have thehideImage
function in javascript remove/hide the img tag.- Option B (which is what I would go with) is to use a preloader inside of flash. Set up two separate keyframes at the first of flash. I usu label my first one "loading" and the second one "main". In loading I have actions similar to the following:
Flash will show the "loading" frame segment once it loads, your swf won't switch to "main" until the rest of the swf is done loading. I'd recommend some sort of preloader with a percentage indicator if you swf is as big as you're saying.