Re: [Flashcoders] How to call class method from a movieclip?

2008-02-01 Thread Irene Johansson
to:[EMAIL PROTECTED] On Behalf Of Steven > Sacks > Sent: Wednesday, January 30, 2008 11:04 AM > To: Flash Coders List > Subject: Re: [Flashcoders] How to call class method from a movieclip? > > Jesse Graupmann wrote: > > function callMom () > > { > > trace( &quo

RE: [Flashcoders] How to call class method from a movieclip?

2008-01-31 Thread Jesse Graupmann
Funny! Your mom said the same thing to me last night... ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks Sent: Wednesday, January 30, 2008 11:04 AM To: Flash Coders List Subject: Re: [Flashcoders] How to call class method from a

RE: [Flashcoders] How to call class method from a movieclip?

2008-01-31 Thread Karina Steffens
> To: Flash Coders List > Subject: Re: [Flashcoders] How to call class method from a movieclip? > > Thank you for your reply. > by doing this: > public class myClass extends Sprite{ > > public function myClass() { > var contentMCs:MovieClip; = new contentMC(t

Re: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Steven Sacks
Jesse Graupmann wrote: > function callMom () > { >trace( "YOU NEVER CALL" ); > } While we appreciate your code sample, Jesse, and we're all supportive of you, Flashcoders isn't a surrogate for your group therapy sessions. ;) Steven Sacks Flash Maestro Los Angeles, CA -- blog: http://www.s

RE: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Jesse Graupmann
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, January 30, 2008 8:00 AM To: Flash Coders List Subject: RE: [Flashcoders] How to call class method from a movieclip? what is contentMC() ? Looks like it doesn't take any arguments.

RE: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Merrill, Jason
-- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Irene Johansson >>Sent: Wednesday, January 30, 2008 10:54 AM >>To: Flash Coders List >>Subject: Re: [Flashcoders] How to call class method from a movieclip? >> >>Thank you for your

Re: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Irene Johansson
Thank you for your reply. by doing this: public class myClass extends Sprite{ public function myClass() { var contentMCs:MovieClip; = new contentMC(this); } public function myMethod(){ } } I get this error msg: 1137: Incorrect number of arguments. Expected no more than 0. since contentMC is a M

Re: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Kenneth Kawamoto
Looks to me your Class "MyClass" should be the Document class. If you set it as Document class, you can attach your MovieClip like this, because the root timeline is MyClass itself: var contentMCs:MovieClip = new ContentMC(); addChild(contentMCs); Then from your MovieClip, you can call MyClass

Re: [Flashcoders] How to call class method from a movieclip?

2008-01-30 Thread Andy Herrman
If you want your contentMC class to be able to call methods on your myClass then you should probably pass the myClass instance to the contentMC. Basically, add a parameter to contentMC's constructor of type myClass, and pass a reference to 'this' when you create it. Something like this: public cl