Thursday, January 24, 2008

Another day lost due to Internet Explorer 7. Thanks IE.

I've had to find this solution twice, and both times it has cost me dearly - so I am posting here for as much my benefit as anyone else's.

Scenario: Calling a JavaScript function from within Flash using ExernalInterface when Flash is in a form.
Problem: IE7 throws an error when we call ExternalInterface. The error says "player is not defined" - "player" is the id I use for my flash object.
Reason: Apparently, IE can't find an object by ID within the DOM if that object is within a form.
Solution: At the end of the javascript that I use to write out the flash tags, I put this line of code:
player = document.getElementById('player');

Here is a better explanation and the solution (see the comment by IsaacTheIceMan from 19 Oct 2007)

Labels: , , , , , , , ,

0 Comments:

Post a Comment

<< Home