# \_xmouse timeline controll, problem in HTML

**URL:** <https://forum.kirupa.com/t/-xmouse-timeline-controll-problem-in-html/225739>\
**Category:** flash\
**Created:** [May 15, 2007, 9:49am UTC](https://forum.kirupa.com/t/-xmouse-timeline-controll-problem-in-html/225739 "2007-05-15T09:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erebore](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@erebore](https://forum.kirupa.com/u/erebore)\
**Post date:** [May 15, 2007, 9:49am UTC](https://forum.kirupa.com/t/-xmouse-timeline-controll-problem-in-html/225739/1 "2007-05-15T09:49:59Z")

</div>

Hello!

I have been struggling with this problem for a week now and I seriously need your help.

I have set the \_xmouse value to controll the speed of an Interval in order to move the timline forward or backwards. Everything works perfectly in flash, however, when i publish in HTML the mouse needs constant movement in order to get a good flow.

The strangest thing is that when the mouse is in constant movement OUTSIDE the flash I get a good flow on the timeline.

Also the first 4 first seconds of preview is in good flow.

This is the flash: [http://www.informatik.umu.se/~dmph0605/psyk/](http://www.informatik.umu.se/%7Edmph0605/psyk/)  
Try moving the mouse outside of the flash.

Please help!  
Thanks!

CODE:

```auto
stop()
_x=400
onLoad = function(){
    gotoAndPlay(180);
}
/////////////////////////////////////////////////////////

spolaframot = function(){
    //trace(_xmouse);
        if (_global.mouseover == true){
            stop();
            trace(_global.mouseover)
            
        }else if(checks._xmouse > 0){
                nextFrame();
                }else if (checks._xmouse < 0){
                prevFrame();    
        } 
}
///////////////////////////////////////////////////////////

onEnterFrame = function(){
    
    count = ( (-(checks._xmouse/10)*(-1)+30) );
        //trace(cp2)
    count2 = (-(checks._xmouse/10))+30;

    if(_xmouse < 0){
        cp2 = count;
    }else{
        cp2 = count2;
    }
    
    clearInterval(hastighet);
    hastighet = setInterval(spolaframot,cp2);
    //trace(cp2);
    
}

```
