tag:blogger.com,1999:blog-8847948271397805362.post8273162595363793277..comments2022-04-01T09:08:34.216-07:00Comments on Amy's Flex Diary: Implementing IEventDispatcherAmy Bhttp://www.blogger.com/profile/10902594300072091444noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-8847948271397805362.post-91395136622395325062011-05-10T16:52:50.827-07:002011-05-10T16:52:50.827-07:00Maybe http://flexdiary.blogspot.com/2007/08/dispat...Maybe http://flexdiary.blogspot.com/2007/08/dispatching-events.html will help. If not, maybe http://cookbooks.adobe.com/post_Building_custom_events_we_can_verify_specific_oper-17609.html.Amy Bhttps://www.blogger.com/profile/10902594300072091444noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-80772087067046672522011-05-10T09:05:59.666-07:002011-05-10T09:05:59.666-07:00Like harley, I'm trying to dispatch a custom e...Like harley, I'm trying to dispatch a custom event from another class that already implements IEventDispatcher - in this case a MovieClip.<br />Until I read this blog post, I kept getting an error of '1024: Overriding a function that is not marked for override' and didn't realize that MovieClip already implemented EventDispatcher.<br />I'm having trouble bridging the gap RBlinzlerhttps://www.blogger.com/profile/17119462610436368020noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-56039512858643744502009-05-23T08:18:59.507-07:002009-05-23T08:18:59.507-07:00Thank you! Reminds me of the decorator design patt...Thank you! Reminds me of the decorator design pattern - useful when you don't want to use up your single inheritance with EventDispatcher ;-)Martin Harriganhttps://www.blogger.com/profile/01610696350600503266noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-68985523658435860412008-11-20T11:10:00.000-08:002008-11-20T11:10:00.000-08:00rats... i see it, on page 33. oh...I'm starting to...rats... i see it, on page 33. oh...I'm starting to get it.. thanks. that's a great recommendation.<BR/>not so easy to explain either.. this is a great book.. I am so glad I have it. <BR/><BR/>Thanks again for starting this post, it really helped.<BR/><BR/>I'll keep a link on this.CheckMate808https://www.blogger.com/profile/13557076693110308918noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-66818274221633536302008-11-20T10:07:00.000-08:002008-11-20T10:07:00.000-08:00If you're using any class that inherits any class ...If you're using any class that inherits any class that either <B>is</B> an EventDispatcher or <B>has</B> an EventDispatcher (in which case it will implement IEventDispatcher or inherit from a class that implements IEventDispatcher.<BR/><BR/>To understand why you have to "fill in" the blank methods of an Interface, you need to understand what an Interface is. If the link that I posted in my last Amy Bhttps://www.blogger.com/profile/10902594300072091444noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-14703470767383034642008-11-20T09:14:00.000-08:002008-11-20T09:14:00.000-08:00thank you for helping me understand this and also ...thank you for helping me understand this and also for showing how to implement IEventDispatcher.<BR/><BR/>so for a class that extends a sprite.. there isn't a need to "implement" IEventDispatcher since it already inherits EventDispatcher which is defined by the interface of IEventDispatcher. Because, the sprite by design, has registered the functions in the "stub" code i posted already.. no need CheckMate808https://www.blogger.com/profile/13557076693110308918noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-59359629338073114042008-11-20T05:34:00.000-08:002008-11-20T05:34:00.000-08:00In the first example, the configureListeners funct...In the first example, the configureListeners function is being used internally by URLLoaderExample to add listeners <B>to its internal URLLoader</B>, which is already an event dispatcher (note the argument definition calls for an IEventDispatcher as an argument). Note that <A HREF="http://livedocs.adobe.com/flex/3/langref/flash/display/Sprite.html" REL="nofollow">Sprite also already extends Amy Bhttps://www.blogger.com/profile/10902594300072091444noreply@blogger.comtag:blogger.com,1999:blog-8847948271397805362.post-19255087130384224252008-11-19T20:23:00.000-08:002008-11-19T20:23:00.000-08:00Hi: I am actually trying to just load an xml from ...Hi: <BR/>I am actually trying to just load an xml from a url and working with flex builder 3... and pretty much a beginner.. but stumbled on to the adobe example.. URLLoaderExample.as<BR/><BR/>this extends sprite... and .. the code is:<BR/>**********************start<BR/><I><BR/> package {<BR/> import flash.display.Sprite;<BR/> import flash.events.*;<BR/> import flash.net.*;<BR/><BR/>CheckMate808https://www.blogger.com/profile/13557076693110308918noreply@blogger.com