# FLV seeking not synchronous with mouse move

**URL:** <https://forum.kirupa.com/t/flv-seeking-not-synchronous-with-mouse-move/248987>\
**Category:** flash\
**Created:** [January 14, 2008, 11:58am UTC](https://forum.kirupa.com/t/flv-seeking-not-synchronous-with-mouse-move/248987 "2008-01-14T11:58:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asscripter](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@asscripter](https://forum.kirupa.com/u/asscripter)\
**Post date:** [January 14, 2008, 11:58am UTC](https://forum.kirupa.com/t/flv-seeking-not-synchronous-with-mouse-move/248987/1 "2008-01-14T11:58:28Z")

</div>

Hi i’m making a simple flv player where i’m creating the seekbar to show the video playback progress.

While i drag the dragger (small rectangle to show video progress) the video frames do not update fast enough with the dragger.

```auto
mc_VideoSeekbar.mc_Drager.onPress = function() {
    this.startDrag(false, 0, 0, 250, 0);
    this.onEnterFrame = function() {
        var base = this._parent.mc_Track._width-this._width;
        var perc:Number = Math.round(this._x*100/base);
        this._parent._parent.mc_FLVPlayback.seek(perc/100*iTotalDuration);
    };
};
mc_VideoSeekbar.mc_Drager.onRelease = mc_VideoSeekbar.mc_Drager.onReleaseOutside=function () {
    this.stopDrag();
    delete this.onEnterFrame;
};

```

mc\_FLVPlayback is the flash’s FLVPlayback component.

Pls suggest how can i optimise the code to show realtime video seeking?
