PDA

View Full Version : what does this mean?


rfl
03-07-2002, 10:08 PM
i was reading the instances tutorial and found this code:
on (release) {
/:name = _name;
/:target = _target;
}
i understand that this is to write the names of the mice, but exactly how does it works?
what means this:
"/:"?
thanks

pixelwit
03-07-2002, 10:33 PM
"/:" means the _root (main) timeline. It is Flash4 syntax.

What that code does is save 2 variables to the _root timeline. It fills these variables with properties of the current timeline (the MovieClip your button is on). In other words, it writes the _name and _target of the current timeline to the _root timeline saving them as the variables "name" and "target".

Hope it helps,

-PiXELWiT
http://www.pixelwit.com

rfl
03-07-2002, 10:54 PM
got the idea, thanks
just one more q:
how would one write that same code in flash 5 syntax?

pixelwit
03-07-2002, 11:04 PM
_root.name = _name;
_root.target = _target;

rfl
03-07-2002, 11:08 PM
easier
thanks for helping!