|
||||||||||||||||||||||||||||||||||||||||||
. . . . . |
Creating MovieClips in Flash MX
This tutorial will show you the basics of creating and using Movieclips in Flash MX. Most of the information
will also be applicable to Flash MX2004.
Flash Tutorials in Video Format -
Watch them now at LearnFlash.com MovieClips and Actionscript
Movieclips have many properties that can be used to program our movieclips. Here are a few of them that
are most commonly used.
Well lets start using Actionscript. Note. This code is Actionscript 1.0. Flash MX2004 uses Actionscript 2.0. Have a look
in the
Actionscript 2.0 section of this website for more details. _root.bird._x = 200; _root.bird._y = 150;
"_root." means the main flash timeline. I always use it to save confusion .
_root.onLoad = function(){
// position the clip
_root.bird._x = 150;
_root.bird._y = 200;
// change transparency & rotate
_root.bird._alpha = 50;
_root.bird._rotation = 45;
}
The onLoad function is called when the frame is first loaded. It initialises or sets the initial values for any properties.
_root.onLoad = function(){
_root.bird._x = 0;
_root.bird._y = 200;
}
_root.onEnterFrame = function(){
// move right 1 pixel per frame
_root.bird._x += 2;
// change alpha
_root.bird._alpha -= 1;
// rotate
_root.bird._rotation += 2;
}
Try the rest of the movieclip properties (height, width, X scale etc ) and experiment with them to see how they work. Experiment with the changing values of all the properties and change signs from "+" to "-" and vice-versa.
Recommended Book Resources
More flash MX tutorials |
|
||||||||||||||||||||||||||||||||||||||||
|
| Home | Flash MX | Actionscript 2.0 | Flash 3D | Flash 8 | Flash Database | Flash Mobile | Flash CS3 | Java For Kids | Video Course | General Video | Photoshop | Web Design | Digital Photography | Forum | Games | free backgrounds | Resume | Flash Animations | Streaming Video | Students Work | Links | Contact me | sitemap | reviews | store | advertisers | . . |
||||||||||||||||||||||||||||||||||||||||||