FMX growing circle

Hi people!..this message is not really aimed to an ActionScript answer…more like just tweening probably…:
how do you make a line grow into a circle (trying to animate a mask to do that is a pain in the neck).
Has anyone done this, or knows an easy way to do it?
thanks!:esmirk:

I want to use that in an animation for a preloader so a tweening is the easiest…but how to animate mask ??

You can just do a shape tween from a line to a circle or a motion tween with the circle starting as a free transformed very small thing.

meant was to make a circle grow from beginning to end (clockwise)…I guess I didn’t explain myself very well…sorry about that.
See www.podlab.com/JAFFE/www3

go to portfolio/interiors and select one of the 8 choices to see what I mean

It might not be the best way, I’m not a math guy, but it does the job quite well. :stuck_out_tongue:
[AS]this.createEmptyMovieClip(“circle”, 0);
circle._x = Stage.width/2;
circle._y = Stage.height/2;
circle.radius = 20;
circle._rotation = 270;
circle.onEnterFrame = function() {
var t, l, p, i;
l = this._parent.getBytesLoaded();
t = this._parent.getBytesTotal();
p = Math.floor(100l/t);
this.clear();
this.lineStyle(1, 0x000000, 100);
this.moveTo(this.radius, 0);
for (i=0; i<p
(Math.PI2)/100; i += (Math.PI2)/100) {
this.lineTo(Math.cos(i)*this.radius, Math.sin(i)*this.radius);
}
if (l>0 && l == t) {
this._parent.play();
}
};
this.stop();[/AS]

oh heh you posted while i was makin an fla… anyway ill post mine too… hope it helps… i commented the code (i did it on the enter frame for an empty mc i manually put on the stage though… im not too good with the frame functions and stuff)

oh and looking at the other code i realized that if you want the circle to start drawing from the top select the empty mc and rotate it 270 degrees ( i think that might work)

Originally posted by Scootman
oh heh you posted while i was makin an fla…

Come on… it took you 5 hours to make that FLA!? :stuck_out_tongue:

I haven’t tried kax’s script yet but thanks to both…I guess you can make it dependent to any object you want to load just changing the path of that object (the one we would get the Bytes Loaded from) :stuck_out_tongue:

you could always use my path class

Originally posted by lostinbeta
**Wow, that is excellent Sen.

**** your skills…lol.**

That would be my answer, senocular. :stuck_out_tongue: :wink:

I missed that one :wink:

oh heh kax i must have just not seen it before i made the fla… lol it took me about 10-15 minutes :slight_smile: