如何检测如果Flash影片是在页面加载浏览器中查看? [英] How to detect if Flash movie is visible in browser upon page load?
问题描述
有没有使用ActionScript检测的方式,如果Flash影片实际上是可见的,当它在页面加载就可以了。我需要确定的第一个可见的页面上的SWF加载或它的折以下,因此用户需要向下滚动才能看到它。
Is there a way using ActionScript to detect if the Flash movie is actually visible when the page loads with it on it. I need to determine if the SWF loads on the first visible page or it's below the fold, so the user needs to scroll down to see it.
谢谢!
推荐答案
我不认为有任何内置的方法来处理这个Flash中,我不相信舞台上有任何意识的地位就下岗出HTML。我的猜测是,你将不得不使用这样的事情在Javascript http://www.quirksmode.org /js/findpos.html 的配对ExternalInterface的Flex中/闪光和一些JavaScript,反过来查找SPAN DIV或位置进行通信的任何容器为您的EMBED / OBJECT标记
I don't believe there's any built in way to handle this within Flash I don't believe the Stage has any awareness of it's position with regard to the laid out HTML. My guess is you'll have to use something like this in Javascript http://www.quirksmode.org/js/findpos.html paired with ExternalInterface in Flex/Flash to communicate with some JavaScript that in turn looks for the position of the SPAN DIV or whatever the container is for your EMBED/OBJECT tags.
这篇关于如何检测如果Flash影片是在页面加载浏览器中查看?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!