Go to Next/Previous Image in XML Photogallery using MouseWheel?

Hi,

I have made a Photogallery in Flash, which displays one image at a time using the tutorial on this website. Now I want the user to be able to cycle through the images using the Mouse Wheel (scroll up = display previous image, scroll down = next image).

Heres what Ive got so far:


Mouse.addListener(mouseListener);
var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(delta) {
    if (delta > 0) {
            nextImage();
    } else {
            previousImage();
       }
}

Which does not seem to work - could someone please help me out with the correct code!

Thanks, Ben :slight_smile: