web design template

Page: 1 2

Properties in Action Script


x: Using this property x position of any object in a movie file can be determined.

Syntax:

Object name. _x

where object name is the target name and _x is the property.

Example:

x = (plane ._x) + 10;

Similarly, y position is determined by using "_y property".



Using this property, the width and the height values of an object can be determined.

_xscale: Width and _yscale: height.

This property also depends on the instance name of the movie clip.

Syntax:

(object/target name, _xscale)

Where target name is the instance name of movie clip.

_x scale is the property of the movie (the width of the movie similarly for determining the height of an object or a movie clip, the _y scale is used.

Syntax:

(object name, _y scale)

This property is used to make an object visible. The visibility value is an Boolean value. It can takes up true/false values.

If visibility = true, then the object is visible otherwise the object is invisible.

Syntax:

(target name, visibility, (true/false));

Example:

(plane, visibility, true);

target name - instance name of the movie clip

Visibility - is the property
True/false is the Boolean value for the property.

Using rotate command, any object can be rotated by specifying the angles as values. The value can be any number. If it has been provided in degrees (i.e., 180, 270, 360, etc), the desired result can be obtained. Other numbers can also be specified but rotation made will be perturbed.

Syntax:

(target name, rotation, value);

target name is the instance name of movie clip.

Rotation is the property of the movie clip.
Value is any number specified to rotation (degree)

Example:

Set property (plane, _rotation, 270);


Using this command, the transparency can be controlled. The value of alpha ranges from 0 to 100. If the value is zero, then the object becomes invisible and if the value is 100, then the object becomes visible.

The default value is 100 (i.e. object will be always visible)

Syntax:

(target name, _alpha, (0-100))

Example:

set property ("plane", _alpha, 45);

plane is the instance name of movie.

_alpha is the property of movie clip.
45 is the value for the property.

Example:

Set property (plane, _rotation, 270);


EXAMPLE FOR THE ABOVE DISCUSSED PROPERTIES

flash website templates
flash website templates

Regards,

Manoj Kotak.
The author is Director of Image Online Pvt. Ltd. developer of
Layout Galaxy web site design templates for photoshop and Flash.

All accompanying logos, brands and product names are trademarks of their respective companies.

Blood for humans comes only from humans : Donate Blood
http://www.donate-blood.org   E-mail - om@donate-blood.org



web design template
© Image Online  2001-2003