I was just thinking… is there a way to look at each variable passed into the paramaters of a function. For example, taken the given code.
package
{
import flash.display.MovieClip;
import flash.display.Shape;
public class Dot extends MovieClip
{
color:uint;
dotSize:uint;
doughnutSize:uint;
doughnutHoleSize:uint;
public function Dot(color:uint = 0xF15C25, dotSize:uint = 5, doughnutSize:uint = 30, doughnutHoleSize:uint = 40)
{
this.color = color;
this.dotSize = dotSize;
this.doughnutSize = doughnutSize;
this.doughnutHoleSize = doughnutHoleSize;
}
}
}
So in this instance it would loop through color, dotSize, doughnutSize, and doughnutHoleSize and set the paramaters of the class to be the same value.
Example for each loop:
for (var key:String in object){
trace(key + ": " + object[key]); // object[key] is value
}
So, is this possible?