Hello, I’m trying to imitate the spining preloader that fades as it rotates and I can’t remember how to name each of the lines that are created with this code so I can later add the script to modifiy their independent alpha as it turns.
I don’t know wether I need to create another function or what to do…
var numLines:Number = 12;
var extRadAsterisc:Number = 20;
var intRadAsterisc:Number = 10;
var centreX:Number = 110;
var centreY:Number = 110;
createEmptyMovieClip(“asterisc”, 1);
asterisc._x = centreX;
asterisc._y = centreY;
asterisc.lineStyle(3, 0x000000, 100, false, “none”, “round”);
for (i=0; i<numLines; i++) {
angleAsterisc = i30;
radAngleAsterisc = angleAsteriscMath.PI/180;
xCoord1 = Math.cos(radAngleAsterisc)*extRadAsterisc;
yCoord1 = Math.sin(radAngleAsterisc)*extRadAsterisc;
xCoord2 = Math.cos(radAngleAsterisc)*intRadAsterisc;
yCoord2 = Math.sin(radAngleAsterisc)*intRadAsterisc;
asterisc.moveTo(xCoord1, yCoord1);
asterisc.lineTo(xCoord2, yCoord2);
}