Resizing div with js from flash makes flash appear to freeze in chrome?

三世轮回 提交于 2019-12-25 13:07:16

问题


I have flash resizing it's container div by using external interface to call the javascript:

function expandbottomNav() {
        document.getElementById('bottomNav').style.height = '400px';
    }
function shrinkbottomNav() {
        document.getElementById('bottomNav').style.height = '31px';
    }

Now this appears to work fine in every browser except chrome. For some reason after the div is shrunk back down to size, the flash player looks like it's frozen. It's actually not frozen because if you resize the window the flash player starts playing again and you can see it had made progress since it appeared frozen. This only happens in chrome. Does anyone have any idea why something like this might happen?

The site so you can check it out yourself(yes I know it's a broken mess in IE, but I'm kind of ignoring that for now):

removed<

I'm at a loss as to why this is happening. I've tried different window modes but that doesn't help. The problem is when it resizes the div back down because if I comment that line out the flash never appears to freeze. But I need to be able to resize the div...


回答1:


welcome ;)

it isn't frozen, the string is moving at normal speed but is rendered only when i move mouse cursor over it. did you try setting object height to certain amount of pixels each time the div is resized? and did you try scale='exactfit'?




回答2:


I'm not sure of this but I remember that the "freeze" issue in Flash - in some browsers - was related to the return statement of the external JS functions.

Try to add something like return true; in your JS functions.

Ciao!



来源:https://stackoverflow.com/questions/4844516/resizing-div-with-js-from-flash-makes-flash-appear-to-freeze-in-chrome

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