Franky-D
Franky-D

Reputation: 450

Accessing Flash functions through jQuery

I use the following jQuery code to access functions in my SWF (FP 10.1 SWF embedded via SWFObject):

$('#FlashApp')[0].someFunc();

This works fine in every browser.. except for Internet Explorer (surprise!). Surely, the point of jQuery is to make this code work across all browsers? I'd really rather not write extra code to check for IE.

How can I talk to my SWF in a browser independent way?

Upvotes: 1

Views: 635

Answers (3)

Franky-D
Franky-D

Reputation: 450

It turns out that the issue was due to IE not being able to talk to an invisible SWF.

Upvotes: 1

Eugene
Eugene

Reputation: 2216

you need External Interface

http://blog.flexexamples.com/category/externalinterface/

Upvotes: 0

Matt Huggins
Matt Huggins

Reputation: 83299

Dousn't sound like a jQuery problem. Try the following in IE to see if you get the same results:

document.getElementById('FlashApp').someFunc();

Upvotes: 1

Related Questions