# Levels, Huge movies and Sliders

**URL:** https://forum.kirupa.com/t/levels-huge-movies-and-sliders/210034
**Category:** flash
**Created:** [December 14, 2006, 9:34am UTC](https://forum.kirupa.com/t/levels-huge-movies-and-sliders/210034 "2006-12-14T09:34:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![manikk](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/manikk/32/3083_2.png) [@manikk](https://forum.kirupa.com/u/manikk)
#### Post date: [December 14, 2006, 9:34am UTC](https://forum.kirupa.com/t/levels-huge-movies-and-sliders/210034/1 "2006-12-14T09:34:38Z")

</div>

I had constructed a movie slider, which controls a movie called in levels. Its works perfect when I have a movie of 700 frames. But, when i increased the frames…to 10000, the slider strucks and while dragging backwards the movie strucks at the frame 20 and dont goto 19 to 1 frames. I dont know why this thing occur. Can some body please guide me?

Here is the code…

\_global.moveFactor=0;  
mcBar.useHandCursor=false;  
mcDragger.useHandCursor=false;  
var initPos:Object=new Object();  
initPos.x=mcDragger.\_x;  
initPos.y=mcDragger.\_y;  
moveFactor =(1/\_level3.\_root.\_totalframes)\*(mcBar.\_width-mcDragger.\_width);

function h() {  
mcDragger.\_x += moveFactor;  
if (mcDragger.\_x\>=mcBar.\_width) {  
mcDragger.\_x = mcBar.\_width;  
}  
}  
actionTrigger.onEnterFrame = function() {  
h();  
};  
mcDragger.onPress = function() {  
this.startDrag(true, 0, 0, mcBar.\_width, 0);  
this.onEnterFrame = function() {  
ti = Math.round((this.\_x/mcBar.\_width)\*\_level3.\_root.\_totalframes);  
\_level3.\_root.gotoAndStop(ti);  
delete actionTrigger.onEnterFrame;  
};  
};  
mcDragger.onRelease = mcDragger.onReleaseOutside=function () {  
this.stopDrag();  
delete this.onEnterFrame;  
\_level3.\_root.play();  
actionTrigger.onEnterFrame=function()  
{  
h();  
}  
if (\_level3.\_root.\_currentframe\>=\_level3.\_root.\_totalframes) {  
\_level3.\_root.stop();  
} else {  
\_level3.\_root.play();  
}  
};  
mcBar.onPress = function() {  
var pt = new Object();  
pt.x = \_root.\_xmouse;  
pt.y = \_root.\_ymouse;  
this.globalToLocal(pt);

mcDragger.\_x = pt.x;  
t = Math.round(((mcDragger.\_x-mcDragger.\_width)/mcBar.\_width)\*\_level3.\_root.\_totalframes);  
delete actionTrigger.onEnterFrame;  
\_level3.\_root.gotoAndStop(t);

\_level3.\_root.play()  
actionTrigger.onEnterFrame=function()  
{  
h();  
}  
};

btnPause.onRelease = function() {  
\_level3.\_root.stop();  
delete actionTrigger.onEnterFrame;  
};  
btnPlay.onRelease = function() {  
if(mcDragger.\_x \>= mcBar.\_width)  
{  
mcDragger.\_x=initPos.x;  
\_level3.\_root.play();  
actionTrigger.onEnterFrame = function() {  
h();  
}  
}  
else {  
\_level3.\_root.play();  
actionTrigger.onEnterFrame = function() {  
h();  
}  
};  
};
