I have some code I used in a project todo a similiar idea.. this should get
you started.. puts the clips around a perfect circle.. you'll have to play
with it a bit.
var clipPosition:Number = 0;
function setPosition(p_clip:MovieClip):Void {
clipPosition += 60;
var r:Number = clipPosition*Math.PI/180;
var d:Number = 80;
if (r/Math.PI*180>760) {
r += 180;
d += 155;
clipPosition -= 41;
} else if (r/Math.PI*180>360) {
d += 80;
clipPosition -= 30;
}
p_clip._x = Math.cos(R)*d;
p_clip._y = Math.sin(R)*d;
}
for (var i = 0; i<20; i++) {
var clip = this.attachMovie("clip", "clip_"+i, i);
setPosition(clip);
}
Cheers,
Ryan
On 3/16/06, Merrill, Jason <[EMAIL PROTECTED]> wrote:
>
> Would anyone have a function, class, formula, idea whatever that would
> allow me to calculate X and Y values to place an "n" number of movie
> clips evenly spaced around an ellipse/oval shape? The number of clips
> can vary based on external data. The ellipse would also have to be
> calculated I suppose, but not actually drawn - the representation of it
> would be a separate graphic.
>
> I found the algebraic formula for an ellipse on a Cartesian plane to be:
>
> Ax2 + Bxy + Cy2 + Dx + Ey + F = 0
>
> But no idea how to make a translation to my problem.
>
> Thanks!
>
> Jason Merrill | E-Learning Solutions | icfconsulting.com
>
>
>
> NOTICE:
> This message is for the designated recipient only and may contain
> privileged or confidential information. If you have received it in error,
> please notify the sender immediately and delete the original. Any other use
> of this e-mail by you is prohibited.
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com