If your content is bigger than the average screen size, using a flash scrollbar for the entire document is really slow and not user-friendly, so its better to enlarge flash to fit the content and scroll the entire page with the browser’s scroll bar.
Put the flash object in a div:
... <SCRIPT LANGUAGE="JavaScript"> <!-- function newSize(width,height) { if(document.all && !document.getElementById) { document.all['myflash'].style.pixelWidth = width; document.all['myflash'].style.pixelHeight = height; }else{ document.getElementById('myflash').style.width = width; document.getElementById('myflash').style.height = height; } } //--> </script> </head> <body> <div id="myflash" style="position:relative; width:100%; height:100%; z-index:1; min-width:1000px;"> <object> ... </object> </div>
and in the movie do:
[as]
getURL(“javascript:newSize(‘1000px’, ‘100%’)”);
[/as]
Other info here
Pingback: Madarco DevBlog » Blog Archive » Scroll browser window inside Flash
This was pretty helpful stuff, thanks!
Hi,
I tried your code and it works fine in a mozilla firefox browser, but not with IE7. Is there some part of this code that IE7 doesn’t like?
I don’t know, it seems to work to me, but if you find some problem let me know