I want to create 1 variable for the Graphic’s instead of the current script wit 4. I’ve been using an array with loop but t no avail…Here is the working version:
var buttons:Sprite = new Sprite();
var gr4:Graphics = buttons.graphics;
var gr5:Graphics = buttons.graphics;
var gr6:Graphics = buttons.graphics;
var gr7:Graphics = buttons.graphics;
var gr8:Graphics = buttons.graphics;
gr4.beginFill(0xFE9900, .7);
gr4.drawEllipse(0, 0, 41, 21);
gr5.beginFill(0xCC6566, .7);
gr5.drawEllipse(0, 30, 41, 21);
gr6.beginFill(0xCB99CC, .7);
gr6.drawEllipse(0, 60, 41, 21);
gr7.beginFill(0xCB99CC, .7);
gr7.drawEllipse(0, 90, 41, 21);
gr8.beginFill(0xCB99CC, .7);
gr8.drawEllipse(0, 120, 41, 21);
buttons.x = 161;
buttons.y = 133;
addChild(buttons);