|
Mouse Wheel Support
Several Cool Focus applets support mouse-wheel scrolling in Internet Explorer 6 and higher. However, they can't provide this support natively, and need some help from your movie. Follow these steps to add support for the mouse-wheel:
- Add the following attribute to the HTML <object> tag that loads your movie:
onmousewheel="onWheel();return false"
- Add the following script block to the page containing your movie:
<script language="JavaScript">
<!--
function onWheel(){
if (document.MyMovie) document.MyMovie.SetVariable("mousewheel",event.wheelDelta);}
//-->
</script>
Change MyMovie to the 'ID' of your movie's <object> tag on the web page.
- In your Flash movie's first level, add this variable:
mousewheel=-1;
- In your Flash movie, add an onClipEvent or create a timer which monitors the value of the 'mousewheel' variable:
if (mousewheel > -1)
{
var m = mousewheel;
mousewheel = -1;
_level0.elevator.wheel=m;
}
Change _level0.elevator to the name of the applet object. (In each applet that supports wheel scrolling, the variable to target is named 'wheel'.)
- Note that ideally you should also use a hitTest to determine whether the mouse is actually over the applet when the value of 'mousewheel' changes.
|