Bloo Apple
Home Games and Movies

Games and Movies

Games and Movies Games and Movies
Latest Game
Pokemon Match
Coming Soon...
Droppin Beats 4
Paper Mario Maze
Want Action?
Join me on my next project to be part of something awesome
 
 
 
 
 
 

Basic Properties


Changing a MovieClip size, alpha, visibility, or placement is quite easy in flash. I will proved in an example in the code below, but first you need to make a Movie Clip and give it an instance name of myMovieClip and place it on the stage. You can test this by placing the code inside a flash actionscript document's frame.

fairyMoved

myMovieClip.x = 75;
myMovieClip.y = 400;
myMovieClip.alpha = .50;
myMovieClip.scaleY = 2;
//these lines of code are done by percentages of 0.1 to 1, or you can change it to double the side etc... by increasing to to 2 myMovieClip.scaleX = .5;
//these lines of code are done by percentages of 0.1 to 1, or you can change it to double the side etc... by increasing to to 2 myMovieClip.visible = true;

The Breakdown. You can add properties to your Movie Clip or any variable by adding a dot action, and placing the propery after the dot. You can also edit them inside any kind of funtion, such as a for function or a if statement. I will provide an example
var myFunction:function();
myFunction(){
while(true){
myMovieClip.alpha--;
}
}

Site Created July 17, 2009