So is the function being called at all? If you put an alert call within your functions, does IE6 call them?
Also, have so had a look at the swffit library (http://swffit.millermedeiros.com/ ) ? This could save you time / effort in writing your own. Aran -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Johan Sent: Wednesday, 18 March 2009 8:56 PM To: SWFObject Subject: Full browser SWF does not resize when changing container height in IE6 Hi, I have a full browser flash website. Some of te pages contain a lot of text, so I want to use the browser scrollbars to scroll content. I made two extra functions to do this: setViewPortHeight and resetDefaultViewport. >From my flash file I call these function when changing pages: ExternalInterface.call("setViewPortHeight", newViewPortHeight); This works great in Internet Explorer and Firefox. But nog in Internet Explorer 6. You can see a working example at http://www.econergie.be/v2/ What can be the reason? <script type="text/javascript"> var nHeight = 775; function setViewPortHeight(newHeight){ nHeight = newHeight; document.getElementById("container").style.height = newHeight + "px"; resetDefaultViewport(); } function resetDefaultViewport(){ var el = document.getElementById("container"); var size = getViewportSize(); el.style.width = size[0] < 950 ? "950px" : "100%"; el.style.height = size[1] < nHeight ? nHeight + "px" : "100%"; } function getViewportSize() { var size = [0, 0]; if (typeof window.innerWidth != "undefined") { size = [window.innerWidth, window.innerHeight]; } else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) { size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; } else { size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; } return size; } function createFullBrowserFlash() { swfobject.createCSS("html", "height:100%;overflow-y: scroll;"); swfobject.createCSS("body", "height:100%;"); swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:950px; min-height:" + nHeight + "px;"); window.onresize = function() { var el = document.getElementById("container"); var size = getViewportSize(); el.style.width = size[0] < 950 ? "950px" : "100%"; el.style.height = size[1] < nHeight ? nHeight + "px" : "100%"; }; window.onresize(); } ..... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
