so far:
/****************\
* Volley #1
* Author: Ahmed
* Date: 7/15
\****************/
StageDim = {width:Stage.width, height:Stage.height}; // Stage Dimensions (renamed by sen 7/15)
container = []; // contains circles created by createCircle
createCircle = function(i){
clip = _root.createEmptyMovieClip("mc"+i, i); // create an empty clip to contain the circle
clip.lineStyle(10+Math.random()*60, Math.random()*0x0000FF,10+Math.random()*50); // define random linestyle
clip.lineTo(.15,.45); // draw circle (a very fat line)
clip._x = Math.random()*StageDim.width; // position circle based on Stage Dimensions
clip._y = Math.random()*StageDim.height;
container.push(clip); // add circle clip to container
}
for(i=0; i<15; i++) createCircle(i); // create 15 circles
/****************\
* Volley #2
* Author: Senocular
* Date: 7/15
\****************/
// create a clip at depth 100 as an "object layer" with more managable
// depths using ObjectLayer.depth++ to prevent overlapping
// in ObjectLayer create a spaceShip clip and define an outline for it
this.createEmptyMovieClip("ObjectLayer", 100).createEmptyMovieClip("spaceShip", ObjectLayer.depth++).outline = [[91,19],[31,-35],[-26,-20],[-76,-45],[-98,-43],[-60,-13],[-77,-4],[-76,9],[-58,15],[-31,15],[-53,47],[-20,43],[34,2],[75,20],[91,19]];
// drawOutlines: draws lines defined by points in an array in a movieclip
// allows optional lineStyle and fillStyle parameters
MovieClip.prototype.drawOutlines = function(points, lStyle, fStyle){
if (lStyle != undefined) this.lineStyle.apply(this, lStyle); // apply linestyle if passed
if (fStyle != undefined) this.beginFill.apply(this, fStyle); // apply fillstyle if passed
for (var i=0; i<points.length; i++){ // cycle through all the points in the array
if (i) this.lineTo(points*[0],points*[1]); // use a line if not the first point
else this.moveTo(points*[0],points*[1]);} // otherwise, move to the point if the first
if (fStyle != undefined) this.endFill(); // end the fill if passed
};
// defines 'ship' in this timeline and draws its outlines with specified line and fill
(ship = ObjectLayer.spaceShip).drawOutlines(ObjectLayer.spaceShip.outline, [2,0,100], [0xbfbfbf,100]);