Friday, December 9, 2011

Flex + Firefox Display Issue

When I first started to look into Flex development, I ran into a strange situation.  My application runs fine in IE, but when I try the same thing in Firefox, the Flash block just disappeared.  It's not even displaying the the install Flash Player message as if I don't have the plug-in installed.

This issue has puzzled me for months till today.  I finally found out the cause from here.  So to make the swf file display, I'll have to define height for all the elements that will parent the file.  ie:
<html>
    ...
    <body>
        ...
        <div id="parent">
            ...
            <div id="child">
                [swf object]
            </div>
        </div>
        ...
    </body>
    ...
</html>

For this to work in Firefox, I need to define following css style:
html, body, #parent, #child {height:100%}

No comments: