JS and Actionscript

杀马特。学长 韩版系。学妹 提交于 2019-12-11 04:39:48

问题


I have build a custom flash player which is embeded in web page using html and javascript extjs framework in the background.

The player is embeded into extjs draggable window into the web page. I know that I can send/recieve variables and trigger events from/to flash player and javascript in the web page.

When I drag the window with the player in it if i drag it fast, cursor goes over the player and the dragging stops. This is because dragging event from javascript stops at the moment when I hover over the flash canvas.

So my question is, is there a way to prevent this from happening? Is there a way to tell js to continue dragging the window even if the mouse is over the flash canvas?

thanks


回答1:


You can add the "wmode" param tag nested in the object tag. Set the value of "wmode" to "transparent".

<object ...>
    <param name="wmode" value="transparent">
</object>

Or if you are using JavasScript to create the flash using swfobject or similar

swfobject.embedSWF('theFile.swf',
            "main-pars-flash_0",
            "480",
            "518",
            "9.0.0",
            "",
            {}, //flashvars 
            {wmode: 'transparent'},  //params
            {} //attributes);

more info :http://helpx.adobe.com/flash/kb/transparent-background-swf-file.html



来源:https://stackoverflow.com/questions/11776717/js-and-actionscript

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