How to Make the BROWSER SCROLL MOUSE WHEEL work in a Full Flash Site

Question:

hello,, I have a full flash website and the browser scroll bar does not work when i use the mouse wheel.
* it works fine when the scroll bar is pulled up/down manually, BUT NOT when i use the mouse wheel over the content.  (internet explorer & firefox)

I understand that this has something to do with the INDEX… i am using a slightly different index from the default INDEX created by flash CS3.

The flash site size is 900 x 1000.

The index I am using is below… does anybody know what I might have to add or modify to allow mouse wheel to work?

Code Snippet:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta name=”keywords” content=”">
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title></title>
<script type=”text/javascript” src=”swfobject/swfobject.js”></script>
<script type=”text/javascript” src=”swfaddress/swfaddress.js”></script>
<style media=”all” type=”text/css”>
body {text-align:center; margin:0px; padding:0px; background:#ffffff;}
</style>
</head>
<body>
<script type=”text/javascript”>
function resetScroller() {
window.scrollTo(0,0);
}
</script>
<div id=”flashcontent”></div>
<script type=”text/javascript”>
var so = new SWFObject(“website.swf”, “site”, “100%”, “1100″, “8″, “#ffffff”);
so.addParam(“scale”, “noscale”);
so.write(“flashcontent”);
</script>
</body>
</html>

Solution:

I believe that you are talking about the mouse wheel being unable to scroll when the flash content is focused. If so, this is because the focus is actually on the flash content and not on the page, so you won’t be able to scroll unless you stop focusing on the flash content.

So if you want to scroll with flash focused, you need flash to call the browser to scroll when it detects a scroll. To do this, see http://blog.madarco.net/36/scroll-browser-window-inside-flash/

If your published SWF version is higher or equal to 8, I suggest you to use ExternalInterface instead of GetURL. You can easily port this code to AS3 if you want as well.

I’m not sure why you said the problem is with the index but I think that’s not the issue but this is the issue. The Flash content has the focus so all scrolling or keypresses are sent to the flash player instead of the browser, so your browser don’t detect anything and you don’t scroll, so you need to do what I told you above.

digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...