Classes are unaware of the timeline they are imported into. So you need
to pass a reference. Also, wouldn't make sense to me to do an extends
on MovieClip if you are going to refer to another clip altogether. So
instead of that, pass a reference to the timeline through your
constructor function:
class Linker {
function Linker(target_mc:MovieClip) {
trace(target_mc.theClip);
}
}
var myLinker:Linker = new Linker(this)
however, (and I don't know what your class will be for) if you DO want
to extend MovieClip, then set that class as the class in the movie
clip's linkage properties in the library.
Jason Merrill
Bank of America
Learning & Organization Effectiveness - Technology Solutions
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael
>>Sent: Friday, August 11, 2006 9:47 AM
>>To: Flashcoders mailing list
>>Subject: [Flashcoders] Can't access mc
>>
>>Hi list...
>>
>>I'm trying to access a mc within a mc in my class as follows:
>>
>>class linker extends MovieClip {
>> function linker() {
>> trace(theClip);
>> }
>>}
>>
>>The linker clip is on the stage, and there's a mc within it called
>>theClip. I get the error "There is no property with the name
>>'theClip'." What am I missing to access it?
>>
>>Thanks,
>>- MM
>>
>>_______________________________________________
>>[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
_______________________________________________
[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