I don't think having the class extend MovieClip is the right way to do this.
I'd just create a class and pass it an array of linkage names in which to
attach. Try this:
class Ellipse
{
function Ellipse(attachTo:MovieClip, linkageArray:Array)
{
var N:Number = linkageArray.length;
var A:Number = 150;
var B:Number = 50;
var X:Number = 200;
var Y:Number = 150;
var GR:Number = Math.PI / 180;
var ref:MovieClip;
for (var i:Number = 0; i < N; i++) {
ref = attachTo.attachMovie(linkageArray[i], linkageArray[i], i);
ref.alpha = 0+i*(360/N);
ref.onEnterFrame = function() {
this.alpha += (_root._xmouse - X) / 100;
this._x = X + A * Math.cos(this.alpha * GR);
this._y = this._xscale = this._yscale = Y + B * Math.sin(this.alpha *
GR);
this.swapDepths(this._y);
};
}
}
}
Then in Flash pass the constructor an attach to clip, and an array with
linkage names.
var e:Ellipse = new Ellipse(this,
["sym_1","sym_2","sym_3","sym_4","sym_5","sym_6","sym_7"]);
PS - this way you can use a variable number of clips also - you don't need
to use seven.
HTH
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
_______________________________________________
[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