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 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);
}
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 theallowscriptaccess
option set to always.The JavaScript function could be like this:
And the corresponding ActionScript: