0

我有 2 个 div,一个 div 有 swf 对象,其他有表格数据。两者都在同一页面上。我想切换它们,如果视频显示表 div 是隐藏的,如果表然后视频 div 将隐藏。

这工作正常,但是当切换到表格 div 视频时,从头开始。我想暂停现有视频。

所以请让我知道如何在不重新启动的情况下暂停它。

4

1 回答 1

0

If you are hiding the div with CSS (display:none;) the SWF file will start rendering as if you are opening the page for the first time or reloading it. First try to use (visibility:hidden;) but you will have to set the position to absolute because this way will preserve div's space on the page.

If this didn't help there is a bridge between javascript in the page and SWF files where you can ask for where the video is playing now before you hide the div, store this on the page, then when you restore the div you can tell SWF to seek to the stored time.

check this as a sample for javascript/AS3 interactions: http://circlecube.com/2010/12/actionscript-as3-javascript-call-flash-to-and-from-javascript/

于 2012-06-06T07:57:05.703 回答