You must defined the variable first in your class before using it.
class Holder extends MovieClip {
private var mc1:MovieClip;
function Holder() {
mc1._x = 50;
}
}
that way you won't get any compiler errors
Alain
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ntasky
Sent: 29 janvier 2007 14:32
To: Flashcoders mailing list
Subject: [Flashcoders] access movieclip trough a class
i have a movieClip "holder" that contains other child movieClips (mc1, mc2,
mc3...) created in the flash interface.
>From the librairie i linked themovieClip "holder" to this Class.
class Holder extends MovieClip{
//constructor
function Holder(){
mc1._x=50
}
}
But it says mc1 is undefined.Well, it is undefined in the class but it is in
the movieClip which is linked to.
I was just wondering if i can access the movie clips created in the
interface trought the linked class and how.
don't know if i was clear.... :)
thx
N.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.14/657 - Release Date: 2007-01-29
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com