Flex, IFrame and SWFObject
I know that there are quite a few associate problems with IFrames and Flex. Unfortunately it was a must for one application I was working on. My problem arose when I re-wrapped my swf up using SWFObject. As you can see from my post I had some good help but it overrode the logic laid out by flex-iframe by hardcoding in the CSS for the iframe in the html. But as Aran quite rightly pointed out, it was down to the method in the iframe to position it correctly. After some trial and error I found the blighter that was causing the issue with IFrames in Flex whilst using SWFObject in particular.
In the main html the main culprit is this, ensure the below DOCTYPE:
1
|
|
In the IFrame.as change the FUNCTION_MOVEIFRAME string to the below to ensure correct positioning if your altering the position of the main html content or nested object i.e. html, body { height:100%; text-align: center;}:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
I am yet to test on all browsers!