I had the same problem and it was solved using two JS functions:
function reel_pause() { $('#your_reel_id').trigger("stop"); //stoppe le défilement automatique. } function reel_play() { if ($('#your_reel_id').data("backwards")) { //teste le sens de défilement. $('#your_reel_id').trigger('play'); //relance le défilement à la même frame où on l'a arrêté. Attention, il relance dans son sens naturel (droite à gauche). $('
This is important only if you do not want your reel to loop: The if if statement, if you do not speak French, is used to check the direction of the drum playing.
$('#your_reel_id').data("backwards") $('#your_reel_id').data("backwards", true)
The first returns true or false. False-> play from right to left. The second changes the natural direction → from left to right. I did this because when you play the drum, it plays in the natural direction. Even if you stopped him when you played the other way.
html looks like this:
<div id="container" onmouseover="reel_pause()" onmouseout="reel_play()"> <img src="../Images/image.jpg" id="your_reel_id" width="900" height="500" /> </div>
I have it wrapped in a div because I use links inside the drum. If you put the link in, it will be as if you pulled out a reel and it will start playing again. Hope this helps!
I don't mean a JS specialist, so if anyone has a better way to do this, post it!
source share