Yes, sorry I should have mentioned that too - (about getting rid of extending the MovieClip).
I assumed you were purposely extending the MovieClip, but I should have helped more and told you to get rid of that portion, and just make a plain vanilla class file. It would have made all the other stuff you were putting in there, much more pertinent - since you would no longer have any functionality inherited from another class, you would have to build all the Event Broadcasting in manually.. For the Delegate question, the reason for that, is if you have a MovieClip or "whatever it is" deeply nested within the movie, and you start dispatching Events, sometimes Flash gets confused as to where to send the events. That's what they refer to as "Scope". As you can already see, with the _level0, etc. you can have lots of levels in a Movie - it keeps things organized, and creates kind of a stacking order - and it even affects things visually - like something visually appearing beneath something else, if it resides on a lower level. The Delegate stuff, ensures that the Event you are broadcasting, actually gets to the Object that's supposed to be receiving it - and not somewhere else. That was a really great thing, when they came out with it a couple years ago. I am pretty rusty right now with writing code, etc. but at the time it really fixed a lot of problems with scope. With AS3, I guess that's all fixed - so you can dispatch events to your hearts content, and Flash takes care of the rest, without having to use the Delegate stuff. I am just a mediocre coder, so I am sure lots of other people will help with answering this question for you. Hope this help a little bit, and good luck :) Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: Wednesday, April 12, 2006 7:57 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Need help understanding EventDispatcher you add and use delegate to solve scoping issues. On 4/12/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > ok sorry, you are extending movieclip. i thought for soem reason you > were not. there is no reason for you to be extending movieclip, so > don't > > once you have gotten rid of the inheritance then it should work. the > reason the onPress function works is due to the fact that you are > extending movieclip, and then you assign a different refrence for that function. > > anyway i hope you understand what i am tryimg to say > > -- j:pn http://www.lennel.org _______________________________________________ [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

