Sunday, April 17, 2011

code for programmatic collage - week #3

package
{
import flash.display.MovieClip;

public class Main extends MovieClip //class signature
{

public function Main() //function signature
{
// constructor code
var go1 = "Which world?";
var go2 = "It's all relative, isn't it?";

trace("Hello World"); //prints "Hello World" to Output
trace(go1); //prints var go1 to Output
trace(go2); //prints var go2 to Output
// Herein ends the printing part of this...

var ourThing:MovieClip;
//declaration - the colon says,"It MUST be a MovieClip"
var ourThing1:MovieClip;
//declaration - the colon says,"It MUST be a MovieClip"
var ourThing2:MovieClip;
//declaration - the colon says,"It MUST be a MovieClip"
var ourThing3:MovieClip;
//declaration - the colon says,"It MUST be a MovieClip"
var ourThing4:MovieClip;
//declaration - the colon says, "It MUST be a MovieClip"

ourThing = new Duster; // instantiation
// the 'linkage' name of one of my library 'MovieClips'
ourThing1 = new Boots_HeavyDuty1; // instantiation
ourThing2 = new BlueHashMarks; //instantiation
ourThing3 = new TwentyTwoCartridge; //instantiation
ourThing4 = new TwentyTwoCartridge; //instantiation

addChild(ourThing); //add to stage
addChild(ourThing1); //add to stage
addChild(ourThing2); //add to stage
addChild(ourThing3); //add to stage
addChild(ourThing4); //add to stage

ourThing.x = 350;
//this moves symbol/MovieClip further to the right
ourThing.y = stage.stageHeight/2;
//this moves symbol/MovieClip down from the top

ourThing.alpha = .5;
//this reduces the opacity of the lines

ourThing.scaleX = .5;
//this reduces the 'width' of the symbol/MovieClip

ourThing.rotation = 45;
//this gives the symbol/MovieClip a 45degree rotation to the right

ourThing1.x = 250;
//this moves symbol/MovieClip further to the right
ourThing1.y = 100;
//this moves symbol/MovieClip down from the top

ourThing2.scaleX = .85;
//this reduces the width of the symbol/MovieClip

ourThing3.x = 375;
//this moves symbol/MovieClip further to the right
ourThing3.y = 240;
//this moves symbol/MovieClip down from the top
ourThing3.rotation = 325;
//this gives the symbol/MovieClip a 325degree rotation to the right
ourThing3.scaleX = .80;
//this reduces the width of the symbol/MovieClip
ourThing3.scaleY = .80;
//this reduces the width of the symbol/MovieClip

ourThing4.x = 365;
//this moves symbol/MovieClip further to the right
ourThing4.y = 260;
//this moves symbol/MovieClip down from the top
ourThing4.rotation = 35;
//this gives the symbol/MovieClip a 35degree rotation to the right
ourThing4.scaleX = .60;
//this reduces the width of the symbol/MovieClip
ourThing4.scaleY = .60;
//this reduces the width of the symbol/MovieClip


} // Function Main

} // Class Main

}

This code worked when I copied; hopefully the attempt to make it all fit legibly in the somewhat narrow 'new blog post window space' did not mess things up.

No comments:

Post a Comment