60 likes | 71 Views
Learn about MovieClips in Flash, their properties, how to duplicate and animate them, and how to attach them from the library. Explore the coordinate system and how to use MovieClips as buttons. Use separate layers for MovieClips and learn how to change their properties with buttons.
E N D
Introduction to Flash ActionScript MovieClips & Properties
Ex MovieClips • Central part of all graphical flash programming MovieClips: • Got properties • Could be duplicated, animated & attached from library etc. • Every movieClip has it’s own timeline • MovieClip inside another (dot notation): first_mc.second_mc • A movieClip could be used as a button • Use a separate layer for MovieClips • Use suffix: myMovieClip_mc
Movie clip coordinates • Each movie clip has a coordinate system in which the origin (0, 0) is located in the registration point. For the main timeline this is the top left corner Main timeline MovieClip on stage
Create a MovieClip • A Static movieClip 1. Insert new symbol 2. Name the symbol (movieClip) 3. Draw/make the graphics 4. Open/check the library 5. Drag the symbol from library to main stage 6. Name it on main stage (myMovieClip_mc) • Dynamic movieClips for (i = 1; i < 6; i++){ duplicateMovieClip("movie_mc", "new_“ + i, i); this["new_“ + i]._x = this["new_“ + i]._width * i; }
Properties • Properties for MovieClips: _x, _y, _xscale, _yscale, _visible, _alpha, _rotation etc
Properties & Input • Change the properties of a movieClip by pressing a button //button/function for movieClip x-position xPos_btn.onPress = function(){ _root.rabbit_mc._x = xPos; //get the xPos from input }