PDA

View Full Version : getProperty tute. . .ARGH!!!


jchisw
10-23-2001, 07:08 AM
Whilst using the getPropert tute as shown here :

http://www.actionscripts.org/tutorials/beginner/get_property/index2.shtml

I had problems as to exactly what goes where "target" is. . .
If anyone would like to expand on the explanation given It would be appreciated.

:confused: [G]eronimo :confused:

zoomfreddy
10-23-2001, 08:12 AM
just put the name of your movie clip...

the name of your movie clip can be wathever you like, the sintax "_target refers to the movie clip were the code resides.

example:
Let's say your movie clip's name is "ball"

so:


with this you can reuse the code, without worry about mc names

on (release) {
_root.xpos = getProperty(_target, _x);
_root.ypos = getProperty(_target, _y);
}

or

here you use the mc name

on (release) {
_root.xpos = getProperty(../ball, _x);
_root.ypos = getProperty(../ball, _y);
}

or in a flash5 sintyax

here you use the mc name

on (release) {
_root.xpos = _root.ball. _x;
_root.ypos = _root.ball. _y;
}

or

with this you can reuse the code, without worry about mc names

on (release) {
_root.xpos = this. _x;
_root.ypos = this. _y;
}





:cool: hope this help you!

Jesse
10-23-2001, 09:22 AM
it's the instance name, see the instance tute.