User Name
Password
AppleNova Forums » Programmer's Nook »

ActionScript help


Register Members List Calendar Search FAQ Posting Guidelines
ActionScript help
Thread Tools
BenP
Senior Member
 
Join Date: Jun 2005
 
2007-11-20, 20:48

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
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
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


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 11:09.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova