|
|
| |
Dear
Friend,
Hello, & welcome back to FIREWIRE,
your friendly guide to the exciting world of web-design
& web-solutions! In the previous newsletter of Flash
5 Tutorial Series we had discussed about FS Command, Stop
all Sounds, Tell Target, If Frame is Loaded. Now lets
Continue with Set Variable, Set Property, Get Property,
XY Position, XY Scale, Visibility, Rotation & Alpha.
|
 |
Using set variable, any value can be set to a variable.
The name of the variable is declared and a value is assigned
to it.
Syntax:
set variable = value;
Example:
x = 2;
where
x is the variable name & 2 is the value of the variable.

|
 |
|
Using
this command, the property of the movie clip can
be changed while playing the movie.

The
instance name of a movie clip is needed while
making changes to the property of it. The set
property has three arguments.
Syntax:
set property (target, property, value);
|
|
target
takes the name of the movie clips.
|
|
|
Property
can be _xscale, _yscale, _x, _y, _alpha, _visibility
etc. |
|
|
Value
takes any user-entered value. |
Example:
On
(press)
{
set property ("plane", _xscale, 100);
}
where
|
|
target
is instance name of movieclip.
|
|
|
Property
is the _xscale. |
|
|
Value
is 100. |
The
Movie clip will expand in width by 100 of its
original width.
|
|
 |
|
Using
this action the value for the movie clip can be
returned.

Syntax:
Get property (target, property);
|
|
target
is the instance name of movie clip.
|
|
|
Property
is the property of movie clip (_x, _y, _xscale
etc) |
Example:
On
(press)
{
galaxy = get property ("plane", _x)
+10;
set property ("plane", _x, galaxy);
}
The
x position of plane movie clip will be increased
by ten (whenever the button is pressed) and stored
in x variable. Now the set property will set the
x value to the movie clip.
In
the above discussed example, We have
galaxy = get property(); in which we have involvement
of Set Variable and Get property commands.
The next line explain us the Set Property command.
|
|
|
|
|
|