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

Reply via email to