Skip to main content
dalcde
Inspiring
July 22, 2009
Question

Flash instance name problem

  • July 22, 2009
  • 1 reply
  • 642 views

I made a game which has a MovieClip. Inside the MovieClip ( I will call it the outside MC ), there is another MovieClip with the instance name "inside". I want to put a code the outside MC, that changes the _x of the inside MC. What code should I use? I used:

this.inside._x = 200;

but it didn't work.

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
July 22, 2009

It's not clear where you are trying to place the code.  If what you showed failed, then you are possibly trying to assign that value from the timeline that outside occupies, in which case you would need to use outside.inside._x = 200;

Be sure you have assigned the instance names via the properties panel

dalcde
dalcdeAuthor
Inspiring
July 22, 2009

But is it possible to know the instance name by using actionscript?

Ned Murphy
Legend
July 23, 2009

I'm not sure what you're asking.  Instance names are things you assign, although Flash will generate its own for objects if you don't.  You can trace the _name property of an object to find out what it is.