Alexander Kim
Alexander Kim

Reputation: 18401

how to block a link on a flash object with javascript

It is possible to block a link from flash object? (Link is hardcoded inside a flash object).

Upvotes: 1

Views: 335

Answers (3)

loxxy
loxxy

Reputation: 13151

If possible, generate a new swf which embeds the current flash swf & disable its mouse events, using:

mc.mouseEnabled = false;

You can control the new swf by defining an ExternalInterface & calling from javascript, using:

document.getElementById('flash-obj').ExternalMethodInFlash();

Upvotes: 0

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123397

no, the link is managed by flash plugin.

At most you can just overlap the flash object with an element (with a transparent background) so the link is not clickable (but this is not a real solution since it can be circumvented)

Upvotes: 2

alessioalex
alessioalex

Reputation: 63673

You cannot do that, since Flash "lives in it's own world" in the browser. All JavaScript sees is an object, it doesn't know what's in there.

Upvotes: 0

Related Questions