task03

Jay Smith

Please install the Flash Player from Adobe to view this content.
Get Adobe Flash player

All of these graphics were created in Actionscript 3. I had to import flash.geom.Matrix for the gradient.

Here is the code for the gradient in the sky:

// Create gradient variables
var fillType:String = GradientType.RADIAL;
var colors:Array = [0x719F87, 0x00FFFF00];
var alphas:Array = [.7, .15];
var ratios:Array = [0x0, 0xFF];

// Set parameters for gradient matrix
var matr:Matrix = new Matrix();
matr.createGradientBox(500, 210, 0, 0, 0);
var spreadMethod:String = SpreadMethod.REFLECT;

// Specify parameters an instantiate gradient
this.graphics.beginGradientFill(fillType, colors, alphas,
ratios, matr, spreadMethod);

this.graphics.drawRect(0,0,550,290);

Here is the code used for the rings around the sun.

// Create new sprite
var orangeRays:Sprite = new Sprite();

// Create counter to be used for iteration
var counter:uint;

// Define atributes for lines and fills
orangeRays.graphics.lineStyle(1.5, 0xE8D328);
orangeRays.graphics.beginFill(0xE8D328,.6);

// Create multiple rings by using iteration
// Initiate counter at 5 to avoid overlapping with the circle
for(counter= 5; counter<9; counter++)
{
//Sprcify coordinates and area of circle
orangeRays.graphics.drawCircle(258, 90, (counter*5)+60);
orangeRays.graphics.drawCircle(258, 90, (counter*3)+90);
}

// End fill and add sprite to stage
orangeRays.graphics.endFill();
addChild(orangeRays);