Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modifying MovieClip._name in actionscript

2 views
Skip to first unread message

Pale

unread,
Dec 18, 2006, 4:04:21 PM12/18/06
to
I have heard mixed reports as to whether _name was a read only
attribute of a MovieClip. From what I can tell, it is modifiable, but
I am having a very difficult time doing it in a particular project I am
working on.

To start out, I did a test. I created a dummy MovieClip and dragged it
to the stage. In the properties field I set the instance name to
"before". In the actionscript of the MovieClip, I wrote...

_name = "after";
trace(_name);

This traces out "after" and everything seems great. I can even access
the MovieClip later on using the new instance name. Now I take this
into a much deeper project to try and use it. I have the following
code...

for( var i in oldPhaseClips ) {
trace(oldPhaseClips[i]._name);
oldPhaseClips[i]._name = "OLD_" + oldPhaseClips[i]._name;
trace(oldPhaseClips[i]._name);
}

Now, the first trace statement outputs the proper instance name. The
second trace statement outputs undefined. Color me confused.

Any help with reaching my desired goal or insight into why this is
happening would be greatly appreciated.

0 new messages