PDA

View Full Version : [FIXED] Bug with scene control in Firefox



manhng21
24 Jul 2012, 2:08 AM
Hi,
currently I have a html banner with 5 slides, each slide is a scene. The banner auto loop 5 slides and I also have 2 arrows to manual control (go next, go back). Each scene wait 5s before jump to next scene.
Everything work well as expected in chrome but in Firefox (14.0.1) ,when I click to arrow then the banner not work correct, slide appeared and disappeared so fast even the animation of that banner still not end.
Can you guys please check it ?

arnebech
24 Jul 2012, 8:17 AM
Would you mind sharing your project, so I can take a look at it? If you want to keep it private you could send me a PM.

manhng21
24 Jul 2012, 8:28 AM
sent to you already, tks!

arnebech
24 Jul 2012, 9:08 AM
Thanks for sharing. Nice looking project!

So I found the issue you are running into. As far as I can tell it is a bug in Firefox. We'll try to get a workaround into Animator at some point. In the meantime, you'll have to edit the exported JS file and make a small change to it.

You'll have to replace


this.olElement.addEventListener(eventName, function() {
me.onAnimationEnd();
},false);


with



this.olElement.addEventListener(eventName, function(event) {
var valid = false;
var parent = event.target;
while (parent = parent.parentNode) {
if (parent === me.scenes[me.currentSceneID].element) {
valid = true;
break;
}
}
if (valid) {
me.onAnimationEnd();
}
},false);

manhng21
24 Jul 2012, 9:17 AM
Thank arnebech,
it's really helpful.