PDA

View Full Version : Referencing nested clips in an attachMovie clip from it's linked class



prisma
January 13th, 2006, 06:44 PM
Hi!

I'm having a problem referencing nested MovieClips and TextFields that lie in a _root.attachMovie MovieClip that is linked to a custom Class.

I'm trying to reference the nested MC's and TF's from that Class (i.e. this.someMovieClip), but it says that there is no Property with the name 'someMovieClip'.

When referencing actual properties of this, i.e. the ._x or ._y or something, it works fine.

Any ideas?

Thanks.

Mirandir
January 13th, 2006, 06:48 PM
Not 100% sure if it works but try to add the nested movieclip as a property with a MovieClip datatype in your class.



class yourClass extends MovieClip
{
var someMovieClip:MovieClip;
...

}


/Mirandir

prisma
January 13th, 2006, 07:08 PM
Worked great! Thanks for that. :hr: