[thelist] ActionScript: Finding out a clip's name
Nick Boyce
nick at triplezero.com.au
Tue Aug 28 03:27:21 CDT 2001
Erik,
Thanks again for your help.
:: > You don't have to set it, just use the property _name.
Yes, this is the sort of thing I have been looking for. _name and _target
are going to be very useful for me.
The following script was very helpful, but I have some questions.
:: > on (press) {
:: > this.swapDepths(_parent.current_level);
:: > }
If I have a lot of duplicated movie clips, all with different layers, how do
I find out which one is on top in order to do a swapdepth with is? They all
have a variable current_level set which is showing in a field so that I know
it is working, but it will still now swap depths as required.
The duplicating script:
for (i=1; i<20; i++) {
var mc;
duplicateMovieClip (clip, "clip"+i, i);
mc = _root["clip"+i];
mc._x = random(300);
mc._y = random(500);
mc.linkdesc = _root["linkdesc_"+i];
mc.linkname = _root["linkname_"+i];
mc.current_level = i;
mc.memberusername = _root["memberusername_"+i];
}
stop ();
The drag script:
on (press) {
{
this.swapDepths(parent._level15);
startDrag("");
}
}
on (release) {
stopDrag ();
}
Ideas?
Nick
----------------------------------------------------------------
triple zero digital | upstairs at 200 the parade, norwood 5067
(08) 8332 0545 | www.triplezero.com.au | nick at triplezero.com.au
More information about the thelist
mailing list