2

I have taken an absolutedly positioned element on the page and have inserted a flash swf in it. The problem is, that the links behind the flash movie does not work. I want the flash movie to disappear and totally unload after it finishes playing.

Note: I have tested the unloadMovie(); Thing but does't help.

themajiks
  • 420
  • 1
  • 8
  • 23

2 Answers2

3

Let's say your flash object is inside a div with the id "mydiv":

<div id="mydiv">
<!--Your flash object goes here -->
</div>

Let's assume that you imported JQuery in your document. Then, as soon as you want to delete the flash video you do:

$("#mydiv").html("");

This will basically empty the content of the div, removing the video. Link to a fiddle that demonstrates the effect: http://jsfiddle.net/xCc5H/2/.

NB: unloadmovie is in actionscript and not javascript

lc2817
  • 3,722
  • 16
  • 40
  • Well, I just found the perfect solution. I can display the duration and then fade it out. The code is, $(".formSentMsg").delay(3200).fadeOut(300); – themajiks Nov 21 '11 at 08:10
  • @themajiks that is just one effect more than what I suggested and you didn't say you wanted an effect ... Please check the fiddle – lc2817 Nov 21 '11 at 08:10
  • Yes @lc2817 Please give me the fiddle link. – themajiks Jan 12 '12 at 11:46
1

You could use the methods which are created for removing the object, ins

var flashvars = {
    name1: "hello",
    name2: "world",
    name3: "foobar"
};
var params = {
    menu: "false"
};
var attributes = {
    id: "testflash",
    name: "test-swf"
};

swfobject.embedSWF("test.swf", "myContent", "300", "120", "10.2.0","expressInstall.swf", flashvars, params, attributes);

swfobject.removeSWF("testflash");


<div id="myContent">
    <h1>Alternative content</h1>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>

https://code.google.com/p/swfobject/wiki/documentation

Frankey
  • 3,679
  • 28
  • 25