Home > Articles > Graphics & Web Design > Dreamweaver & Flash

  • Print
  • + Share This
This chapter is from the book

Properties

A property is a piece of an object. Most objects are simply collections of properties. Examples of some movie clip properties are:

  • how wide it is (_width)

  • where it is on the stage (_x and _y)

  • what frame is currently being played (_currentframe)

  • how transparent it is (_alpha)

  • its name (_name)

  • whether it's visible or not (_visible)

Most properties can be read and altered. For example, let's see how wide a movie clip called clue is:

clueWidth = _root.clue._width;

If we don't like the value of clueWidth, we can change the width of clue like this:

_root.clue._width = 110;

or

_root.clue._width = _root.clue._width – 40;

All movie clip properties start with an underscore (_). That's just how Flash is. As we continue through the book, almost every example will involve lots of properties, so if you're not clear on the concept yet, you will be soon.

  • + Share This
  • 🔖 Save To Your Account