Question
Play backwards when scrolling up
Hello guys,
I was wondering if it is possible to make the animation play backwards when I scroll up.
As you see the last part of the code doesn't make any sense.
If anyone knows how to make the animation play backwards when wheelDelta>=0 it would really help me out.
Thanks in advance
var f=this;
stage.enableMouseOver();
stage.addEventListener("mouseover", h);
function h() {
document.getElementById('canvas').addEventListener('mousewheel', k);
}
function k(e) {
if (e.wheelDelta < 0) {
if (f.pock.currentFrame == 145) {
f.pock.gotoAndStop(145);
} else {
f.pock.play();
}
}
if (e.wheelDelta >= 0) {
if (f.pock.currentFrame == 0) {
f.pock.gotoAndStop(0);
} else {
f.pock.playReverse();
}
}
}
