Asv3's Blog

September 12, 2009

MovieClip Properties

Filed under: flash — Tags: , , , , — asv3 @ 5:02 pm

In flash we can create 3 types of symbols.

1. MovieClip

2. Button

3. Graphic

Whenever we create a Symbol that Symbol will get added to the Library. Symbol in a Library is like master copy, we can drag Symbol from Library to create instance of the Symbol on stage. Here one thing we should remember is changes in library effect all instances on stag, where are changes to instances doesn’t. We can identify every instance of symbol with unique name called “Instance Name”.

MovieClip is the most used symbol in flash, in Flash almost every thing is a MovieClip. MovieClip is basically nothing but a container, similar to div in HTML, the only difference is it has it’s own time line. By that I mean, you can create n number of nesting MovieClips. Using property inspector we can assign an instance name for a MovieClip.

Flash doesn’t through error if you name two instances by same name, by default it assumes that name to the latest instance.

Button is used to define any click-able area. A Button is special kind of MovieClip, it has predefined 4 states.  Up, Over, Down, Hit.

Graphic is used to group shapes that doesn’t require it’s own time line.

Below are common properties of MovieClips which we can control using Actionscript.

  • x
  • y
  • width
  • height
  • scaleX
  • scaleY
  • rotation
  • alpha (transparency)

x, y take any negative or non negative integer, scaleX, scaleY, alpha take values between 0 and 1. width and height integers >= 0;

Blog at WordPress.com.