I am trying to create a slider that will move a series of images in a movie clip based on the location of the slider. The problem I have is that when you click and drag the scroller it will move the images once but after that the images will not move. I am guessing that the problem is with my code. I want to move the _x of the images movie clip based on the _x of the slider. Here is the code I am using which is placed in frame one of the “timelineSlider” MC:
[color=blue]//Initial variables
barLngth = getProperty(this.sliderLine, _width);
left_x = getProperty(this.draggerBtn, _x);
right_x = left_x + barLngth;
imgBase_x = getProperty(this._parent.timelineImages, _x);
imgWdth = getProperty(this._parent.timelineImages, _width);[/color]
[color=blue]draggerBtn.onPress=function(){
this.startDrag(true,0,0,sliderLine._width,0);
this._parent.onEnterFrame=function(){
setProperty(_parent.timelineImages, _x , imgBase_x - (((getProperty(draggerBtn, _x)-left_x)/bar_Lngth)* imgWdth));
}
}
draggerBtn.onRelease=draggerBtn.onReleaseOutside=stopDrag;[/color]
If it will help I can send the the original .FLA file by email as it is too large (225kb) to post on the forum. Just send me a message and let me know.
Thanks in advance for your help,