How to load animated gif before Flash load

雨燕双飞 提交于 2019-12-25 02:16:29

问题


I cannot get animated gif to display before flash movie loads. I am using this script but does not seem to work. I do not want to use a flash loader.

<script type="text/javascript">
var image = new Image();
image.src = 'http://www.hmaimages.com/MN/flash_loader/loading.gif';

</script>

Any help be much appreciated.


回答1:


You don't need javascript for this.

Simply wrap and flash file in a div and give it a background image:

div {background:url(loading.gif) no-repeat center center;}



来源:https://stackoverflow.com/questions/8449399/how-to-load-animated-gif-before-flash-load

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!