Nearly everything in Flash has properties: frames, symbols, layers, instances, scenes, even the movie itself. But only some properties can be set with programming when the movie is playing (movie clip properties for example), others need to be preset in the authoring environment.
Properties are simply attributes that can be set or defined in one way or another to achieve a specific effect.
There will also be times when you don't want to change a property, you simply want to know what it is.
Flash programming now uses object-oriented type programming. Javascript is an object-oriented programming language. What this means is simply that it is based around objects which exist in the virtual environment that have specific properties, such as color, size, position, etc. which can be controlled with programming. In Flash, objects are nothing new. Movie Clips behave as objects. They have their own identities and properties that can be controlled through programming.
The Flash Properties which can be set or retrieved with
Get Properties & Set Properties or with dot syntax by just referring to the
object._property.
ex.
mc._rotation = 45;
This is equivalent to the following code, which uses the setProperty() function:
setProperty("mc", _rotation, 45);
Some properties, called read-only properties, have values that you can read but not set. The following are read-only properties: _currentframe, _droptarget, _framesloaded, _parent, _target, _totalframes, _url, _xmouse, and _ymouse.
You can write statements to set any property that is not read-only.
The following statement sets the _alpha property of the movie clip instance
wheel:
wheel._alpha = 50;
In addition, you can write statements that get the value of a movie clip property.
For example, the following statement gets the value of the _xmouse property
on the current level's Timeline and sets the _x property of the customCursor
instance to that value:
onClipEvent(enterFrame){
customCursor._x = _root._xmouse;
}
This is equivalent to the following code, which uses the getProperty() function:
onClipEvent(enterFrame){
customCursor._x = getProperty(_root, _xmouse);
}
All the Movie Clip Properties
MovieClip._alpha
The transparency value of a movie clip instance.
MovieClip._currentframe
The frame number in which the playhead is currently located.
MovieClip._droptarget
The absolute path in slash syntax notation of the movie clip instance on which
a draggable movie clip was dropped.
MovieClip.enabled
Indicates whether a button movie clip is enabled.
MovieClip.focusEnabled
Enables a movie clip to receive focus.
MovieClip._focusrect
Indicates whether a focused movie clip has a yellow rectangle around it.
MovieClip._framesloaded
The number of frames that have been loaded from a streaming SWF file.
MovieClip._height
The height of a movie clip instance, in pixels.
MovieClip.hitArea
Designates another movie clip to serve as the hit area for a button movie clip.
MovieClip._highquality
Sets the rendering quality of a SWF file.
MovieClip.menu
Associates a ContextMenu object with a movie clip.
MovieClip._name
The instance name of a movie clip instance.
MovieClip._parent
A reference to the movie clip that encloses the movie clip.
MovieClip._rotation
The degree of rotation of a movie clip instance.
MovieClip._soundbuftime
The number of seconds before a sound starts to stream.
MovieClip.tabChildren
Indicates whether the children of a movie clip are included in automatic tab
ordering.
MovieClip.tabEnabled
Indicates whether a movie clip is included in tab ordering.
MovieClip.tabIndex
Indicates the tab order of an object.
MovieClip._target
The target path of a movie clip instance.
MovieClip._totalframes
The total number of frames in a movie clip instance.
MovieClip.trackAsMenu
Indicates whether other buttons can receive mouse release events.
MovieClip._url
The URL of the SWF file from which a movie clip was downloaded.
MovieClip.useHandCursor
Determines whether the hand is displayed when a user rolls over a button movie
clip.
MovieClip._visible
A Boolean value that determines whether a movie clip instance is hidden or
visible.
MovieClip._width
The width of a movie clip instance, in pixels.
MovieClip._x
The x coordinate of a movie clip instance
MovieClip._xmouse
The x coordinate of the mouse pointer within a movie clip instance.
MovieClip._xscale
The value specifying the percentage for horizontally scaling a movie clip.
MovieClip._y
The y coordinate of a movie clip instance.
MovieClip._ymouse
The y coordinate of the mouse pointer within a movie clip instance.
MovieClip._yscale
The value specifying the percentage for vertically scaling a movie clip.
download the properties tutorial (file
name: 7property.fla)
right click on the file (control-click for Mac) and select to download to your
drive.