adentum
adentum

Reputation: 1012

How do I disable an swf object using javascript? e.g swfObject.disabled = true;

I want to basically do something like this

<div id="mySwfParent">
   <swfObject></swfObject>
</div>

Then later on some event I do this

document.getElementById('mySwfParent').disabled = true;

But this has no effect on the swfObject, it still responds to mouse events.

How do I disable an swf object using javascript or prevent it from responding to mouse events?

Upvotes: 1

Views: 692

Answers (1)

maxedison
maxedison

Reputation: 17573

I would recommend placing a transparent div over the entire area of the swf, effectively blocking the swf from mouse interaction. Be aware that you'll need to play around with the wmode parameter of the swf. Try setting it to both opaque and transparent.

Upvotes: 1

Related Questions