Senior Member
Join Date: Jun 2005
|
OK, in Flash 8 - I've got a slider bar that is basically a rectangle that slides along a line. I'd like for the rectangle to stretch to fill the line as it's dragged, much like a volume bar. It doesn't have to be the dragged bar; I'm trying to use another rectangle at the beginning of the bar right now. Here's what I have so far:
(slider definition) Code:
<snip>
this.pos=0;
dragger.onPress=function(){
this.startDrag(true,0,0,line._width,0);
this.onEnterFrame=function(){
pos=dragger._x;
}
}
dragger.onRelease=dragger.onreleaseOutside=stopDrag; (Scene 1)Code:
this.onEnterFrame=function(){
myGreenChart._width=myGreenMix.pos;
} (myGreenChart is a rectangle I'm trying to resize to fill the bar; myGreenMix is the slider instance)myGreenChart resizes but it doesn't change width at the same rate as I drag the slider bar (dragger). Any ideas why? Sorry if this post is unintelligible; I'm really feeling my way along here. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Actionscript: Menu with Rollovers | drewprops | Programmer's Nook | 1 | 2007-03-10 00:35 |