How do I make this flash file autplay?

。_饼干妹妹 提交于 2019-12-24 09:47:53

问题


Check out this flash file loaded here: http://www.gameprehacks.com/ad.html

or view code below

<object type="application/x-shockwave-flash" width="336" height="280" 
data="http://buxle.com/buxle-starsbanner.swf" >
<param name="play" value="true" />
<param name="movie" value="http://buxle.com/buxle-starsbanner.swf" />
<param name="wmode" value="direct" />
<param name="pluginspage" value="http://www.adobe.com/go/getflashplayer" />
<embed type="application/x-shockwave-flash" src="http://buxle.com/buxle-starsbanner.swf" width="336" height="280" wmode="direct" play="true" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>

It works in Internet Explorer as it should, but in Chrome, the file has a play button. I need this to autoplay in Chrome. How can I achieve this?

Any help is greatly appreciated.

Thank you


回答1:


Chrome does not auto-play Flash-based adverts. It has been like this for a long time.
See this article from 2015 announcing the plan for Google's browser.

Anyway to avoid the "Play" icon :

  • Have both the SWF file and also the HTML file together in same location.
  • or... Set a high width and height to avoid appearing like a banner/advert.

Also try to use (secure) https:// links whenever possible if your site is also on HTTPS server.

Try this version of your code using increased width/height and also HTTPS-based URL. This worked for me (but you can try with HTTP links) :

<object type="application/x-shockwave-flash" width="480" height="400" 
data="https://buxle.com/buxle-starsbanner.swf" >
<param name="play" value="true" />
<param name="movie" value="https://buxle.com/buxle-starsbanner.swf" />
<param name="wmode" value="direct" />
<param name="pluginspage" value="https://www.adobe.com/go/getflashplayer" />
<embed type="application/x-shockwave-flash" src="https://buxle.com/buxle-starsbanner.swf" width="336" height="280" wmode="direct" play="true" pluginspage="https://www.adobe.com/go/getflashplayer" />
</object>


来源:https://stackoverflow.com/questions/44751192/how-do-i-make-this-flash-file-autplay

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