Thanks Zeh, both of these options make sense. I always forget about onUpdate even though I have used it before.
I'm not that keen on using strokes but if this is likely to improve performance, I will. Will take a look at both. Michael -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zeh Fernando Sent: 17 June 2008 16:53 To: Flash Coders List Subject: Re: [Flashcoders] Tweening a Donut Shape / Ripples / ConcentricCircles If you can use the new line drawing features, and if your container is not resized in any other way, you could create a simple circle with no fill but with a given stroke set to scale on no dimension. That way, scaling the circle container would increase the overall circle size, but the stroke would remain at the same weight. If this is not practical, you can create one additional function that redraws the circle every time like you mentioned. This doesn't need to be done onEnterFrame - it's actually better to either create a getter/setter inside your movieclip (a function that redraws your object based on the scale or some other property) or a function that gets called by the tween every time some variable (like scale or some other property) is changed, by using Tweener's onUpdate parameter. Zeh Michael Trim wrote: > Hi Flashcoders, > > I have coded a donut shape by drawing two concentric circles (one > appears to punch out the other) then tweening (using Tweener) the width > and height of both circles for the same amout of time and by their > widths + the same increase. > > This gives the effect of a circle getting larger but the distance > between the inner radius and outer radius remaining the same (which is > very important to the effect I'm after. > > Stagger a load of these going off and you have a nice two tone ripple > effect, however you can't overlay this over an image or attach an alpha > effect as actually it is a load of solid circles, not an actual donut > shape with a hole in the middle. > > I am aware you can create a donut shape by drawing both circles in the > same fill (really punching the hole in the middle), but when this is > scaled the width between the inner and outer radius scales as well. > > The only way I can think to solve this is to redraw the donut each time > using an EnterFrame event, but this seems wrong and I would prefer to be > using Tweener for nice/easy easing and the like. > > All ideas gratefully received. > > Regards, > > Michael > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders