Yes I've noticed that too, same thing here.

http://labs.blitzagency.com/?p=315


BLITZ | Patrick Matte - 310-551-0200 x214
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Mark
Sent: Monday, June 04, 2007 7:34 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] scrollwheel bug in AS3?

I am migrating code from AS2 to AS3 and came across some unexpected
browser behavior -- both the SWF and the surrounding web page are
scrolling at the same time.


The following examples are both running in 9,0,28,0 (IE 7 and Firefox
2).

In AS2 (compiled to either v7 or v9), the surrounding web page does
NOT scroll while the embedded SWF has focus and captures wheel events.

var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function (delta) {
     myMovieClip._x += delta;
}
Mouse.addListener(mouseListener);


In AS3 (compiled to v9), both the surrounding web page and the
embedded SWF scroll at the same time (while the SWF has focus).

myMovieClip.addEventListener(MouseEvent.MOUSE_WHEEL, handleMouseWheel);

private function handleMouseWheel(evt:MouseEvent):void {
     myMovieClip.x += evt.delta;
}


I am trying to prevent the web page from scrolling while the SWF has
focus and receives MOUSE_WHEEL events.  I have tried stopPropagation
() and stopImmediatePropagation() to no avail.

The behavior is the same whether I render the SWF object/embed code
via JavaScript or directly in the HTML.

Thoughts?

Thanks,
Adam


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to