简体   繁体   English

Javascript。 如何在swf之前显示动画?

[英]Javascript. How to show a animation before swf?

I'm showing SWF files by swfObject plugin. 我正在通过swfObject插件显示SWF文件。

I want to show a div with a animation, for 3 seconds, and only than, after the animation finished(3 seconds after the div is load), show the swf. 我想显示一个带有动画的div,持续3秒钟,然后仅在动画完成后(加载div后3秒钟)显示swf。

How should I do that ? 我该怎么办? Sorry for the foolishness. 对不起,我很愚蠢。

Example to the site: http://only4gamer.com/games/game/Retro-Assault 该网站的示例: http : //only4gamer.com/games/game/Retro-Assault

If you have jQuery installed, this could be done fairly simply. 如果您安装了jQuery,则可以非常简单地完成。

function animationComplete(){
   //Do Stuff
}
$("div").animate({width : 200, height: 500}, 3000, animationComplete)
  • This represents the animation you wish to run: {width : 200, height: 500} 这代表您要运行的动画:{宽度:200,高度:500}
  • This is three thousand milliseconds (3 seconds): 3000 这是三千毫秒(3秒):3000
  • This is the function to run after the animation is complete: animationComplete 这是动画完成后要运行的函数:animationComplete

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM