Hi all,
Ok, I am sort of new to learning advanced actionscript, so please bear with me. (Plus, I am AWFUL with math to make matters worse).
Anyway, I have a Flash MX 2004 project I am working on. It is based on Pom’s volume control slider tutorial here:
http://www.kirupa.com/developer/mx/slider.htm
So, no problem, I have the slider working, but what I need is for the ‘dragger’ clip to also control another clip at the same time, however, this other clip (we can call it dragger2) is on a different layer underneath the main slider clip at the root, so you never actually click on it, it should just follow the ‘dragger’ clip when it is dragged. The ‘dragger2’ clip MUST be a separate clip (and not just on a different layer as part of the original dragger clip) because there is an object inbetween the ‘slider’ clip and the ‘dragger2’ clip on the main stage.
I hope that made sense. So here is the code I have thus far:
this.ratio=0 ;
dragger.onPress=function(){
this.startDrag(false,0,0,line._width,0);
this.onEnterFrame=function(){
ratio=Math.round(this._x*550/line._width) ;
}
}
dragger.onRelease=dragger.onreleaseOutside=stopDrag;
I have tried using Pom’s other tutorial found here to solve the problem:
http://www.kirupa.com/developer/flash5/menudragger.htm
which has a similar effect, but I need the startDrag to be false so the ‘dragger’ doesn’t snap to the mouse center (which is ugly in my case). Plus, there are some other problems with this example when applied to my situation, but that would be another whole paragraph.
So, basically, I just need to add something that says:
if dragger is being dragged, then drag _root.dragger2 right along with it.
Any ideas? Sorry for the long winded post…
Thanks - NOFUTURE