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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change instance name

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
0
0
US
I am using Macromedia Flash 8 Pro.. I was wondering if there was a way to update the instance name of a clip on the stage using AS 2.0?

ie. I have userClip3_mc and want to change it to userClip4_mc
 
Code:
trace("userClip3_mc: " + this["userClip3_mc"]);
trace("userClip4_mc: " + this["userClip4_mc"]);
		
trace("-- Name Change --");
this["userClip3_mc"]._name = "userClip4_mc";
		
trace("userClip3_mc: " + this["userClip3_mc"]);
trace("userClip4_mc: " + this["userClip4_mc"]);

Output:
[tt]
userClip3_mc: _level0.userClip3_mc
userClip4_mc: undefined
-- Name Change --
userClip3_mc: undefined
userClip4_mc: _level0.userClip4_mc
[/tt]

Kenneth Kawamoto
 
Thanks so much! I'll give this code a try later today.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top