Thursday, January 13, 2011

Week 1 Demo 2

Make a star with a stroke
When you convert it to a symbol you have to select both the fill and the stroke.

name all the instances: star01_mc, star02_mc, star03_mc

// all properties use the period . syntax

star03_mc.x = 400;   //this repositions star03_mc over 400 pixels
star03_mc.y = 322;

//it moves absolutely from the upper left hand corner, it is not based on where it started on the stage.

star02_mc.alpha = .5;  //transparency; uses decimals as percentages

star03_mc.rotation = 180;
//you can use a number greater than 360, it just keeps going. A negative number makes it go counter clockwise.

star03_mc.scaleX=.2; //1.2 would scale it up 120%
star03_mc.scaleY=.2;  //have to scale both x and y to be proportional

//or you can combine it like this:
star02_mc.scaleX = star02_mc.scaleY =1.2; //

//not there - invisible
star01_mc.visible = false;
// it is not there, as opposed to alpha 0 where it is still there be not visible. The object is technically still on the stage but would not be click-able if it were a button for example.

Homework : 
Read Chapters 1 and 2

No comments:

Post a Comment