开发者

automatically Close flash player after playing

开发者 https://www.devze.com 2023-02-10 15:27 出处:网络
I need to close a flash player which is overlayed over another portion. When the video is over, the \'div\' i created (overlayed to display video)must vanish showing the开发者_StackOverflow社区 orgina

I need to close a flash player which is overlayed over another portion. When the video is over, the 'div' i created (overlayed to display video)must vanish showing the开发者_StackOverflow社区 orginal content. tried everything.


You can use a javascript function to remove the opened <div> from the DOM tree.

For this use the Externalinterface.call method. You just need to create a javascript function and embed the flash object with the allowscriptaccess option set to always.

The JavaScript function could be like this:

function removeDiv( divID ) {
    var div = document.getElementById(divID);
    div.parentNode.removeChild(div);
}

And the corresponding ActionScript:

ExternalInterface.call("removeDiv", "theIdOfTheDiv");
0

精彩评论

暂无评论...
验证码 换一张
取 消