Hello,
i use this code for a scrolling effect animation in my first scene load. but when i need to desactivate in another scene with
window.removeEventListener(“mousewheel”, scrollScene);
window.removeEventListener(“DOMMouseScroll”, scrollScene);
it doesn’t work.
thank you and sorry for my english
remove_event2.zip (27.1 KB)
if (window.addEventListener) {
window.addEventListener("mousewheel", scrollScene, false);
window.addEventListener("DOMMouseScroll", scrollScene, false);
}
function scrollScene(e){
var upORdown = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));
if(upORdown === 1){
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionReverse);
reverse = 1;
//alert (reverse + ‘arriere wheel’)
//hypeDocument.showPreviousScene(hypeDocument.kSceneTransitionPushTopToBottom, 2.1)
}else{
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward);
reverse = 0;
//alert (reverse + ‘avant wheel’)
//hypeDocument.showNextScene(hypeDocument.kSceneTransitionPushBottomToTop, 2.1)
}
}