Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Instances Question

Status
Not open for further replies.

RandalGroves

Programmer
Joined
Apr 17, 2002
Messages
7
Location
GB
Is there a command that tells you the name of the current instance of a movie clip you are playing? I need to be able to know which of six intances I am currently running.

If not is there a longer way of doing it with actionscripting.

Thanks for the help.
 
Well this code on the onClipEvent(load) action will output the name of this instance:

onClipEvent (load) {
trace(this);
_level0.current = this;
trace(_level0.current);
}

How you might use this, well that's another story!

Regards,
new.gif
 
There is also the "name" property of a clip. Accessed by:

this._name

Which return the clip's instance name as a string. It's handy for renaming instances on the fly...

oldClip._name="newClip";
newClip.gotoAndStop(3);
Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top