Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
no you can use the same event, but then the handleing function need not be named the same as the eventname. i think thast what you want to acheive but am not certain i am 100% clear on that On 3/22/06, Manuel Saint-Victor <[EMAIL PROTECTED]> wrote: > > So would I want to use different events for my own housekeeping to avoid > colliding with them using those events? > > > > On 3/22/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > > > oh i understand > > what you are doing is this: > > > > this.addEventListener("onScreenFaded ", this) > > > > private function onScreenFaded (evtObj:Object):Void > > { > > > > } > > so if your user does this instance.onScreenFaded = function your code > > breaks. > > > > i would say don't use this in the event listener if this is the case, > > rather > > use a delegate. > > > > > > On 3/22/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > > > > > are you reffering to a hook? > > > like this? > > > create a function that is named like > > > public function thisHappens():Void > > > { > > > > > > } > > > and then the user of the component would go > > > instance.thisHappens = function() > > > { > > > ///some code > > > > > > } > > > > > > On 3/22/06, Manuel Saint-Victor <[EMAIL PROTECTED]> wrote: > > > > > > > > I tried that- but if they write non addEventListener() type of > > > > statements to > > > > catch our events it seems to override the dispatched event. > > > > > > > > On 3/22/06, John Giotta <[EMAIL PROTECTED] > wrote: > > > > > > > > > > Use EventDispatcher. > > > > > ___ > > > > > Flashcoders@chattyfig.figleaf.com > > > > > 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 > > > > > > > > > ___ > > > > Flashcoders@chattyfig.figleaf.com > > > > 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 > > > > > > > > > > > > > > > > -- > > > j:pn > > > http://www.lennel.org > > > > > > > > > > > -- > > j:pn > > http://www.lennel.org > > ___ > > Flashcoders@chattyfig.figleaf.com > > 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 > > > ___ > Flashcoders@chattyfig.figleaf.com > 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 > -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
So would I want to use different events for my own housekeeping to avoid colliding with them using those events? On 3/22/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > oh i understand > what you are doing is this: > > this.addEventListener("onScreenFaded ", this) > > private function onScreenFaded (evtObj:Object):Void > { > > } > so if your user does this instance.onScreenFaded = function your code > breaks. > > i would say don't use this in the event listener if this is the case, > rather > use a delegate. > > > On 3/22/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > > > are you reffering to a hook? > > like this? > > create a function that is named like > > public function thisHappens():Void > > { > > > > } > > and then the user of the component would go > > instance.thisHappens = function() > > { > > ///some code > > > > } > > > > On 3/22/06, Manuel Saint-Victor <[EMAIL PROTECTED]> wrote: > > > > > > I tried that- but if they write non addEventListener() type of > > > statements to > > > catch our events it seems to override the dispatched event. > > > > > > On 3/22/06, John Giotta <[EMAIL PROTECTED] > wrote: > > > > > > > > Use EventDispatcher. > > > > ___ > > > > Flashcoders@chattyfig.figleaf.com > > > > 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 > > > > > > > ___ > > > Flashcoders@chattyfig.figleaf.com > > > 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 > > > > > > > > > > > -- > > j:pn > > http://www.lennel.org > > > > > > -- > j:pn > http://www.lennel.org > ___ > Flashcoders@chattyfig.figleaf.com > 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 > ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
oh i understand what you are doing is this: this.addEventListener("onScreenFaded ", this) private function onScreenFaded (evtObj:Object):Void { } so if your user does this instance.onScreenFaded = function your code breaks. i would say don't use this in the event listener if this is the case, rather use a delegate. On 3/22/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > are you reffering to a hook? > like this? > create a function that is named like > public function thisHappens():Void > { > > } > and then the user of the component would go > instance.thisHappens = function() > { > ///some code > > } > > On 3/22/06, Manuel Saint-Victor <[EMAIL PROTECTED]> wrote: > > > > I tried that- but if they write non addEventListener() type of > > statements to > > catch our events it seems to override the dispatched event. > > > > On 3/22/06, John Giotta <[EMAIL PROTECTED] > wrote: > > > > > > Use EventDispatcher. > > > ___ > > > Flashcoders@chattyfig.figleaf.com > > > 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 > > > > > ___ > > Flashcoders@chattyfig.figleaf.com > > 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 > > > > > > -- > j:pn > http://www.lennel.org > -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
are you reffering to a hook? like this? create a function that is named like public function thisHappens():Void { } and then the user of the component would go instance.thisHappens = function() { ///some code } On 3/22/06, Manuel Saint-Victor <[EMAIL PROTECTED]> wrote: > > I tried that- but if they write non addEventListener() type of statements > to > catch our events it seems to override the dispatched event. > > On 3/22/06, John Giotta <[EMAIL PROTECTED]> wrote: > > > > Use EventDispatcher. > > ___ > > Flashcoders@chattyfig.figleaf.com > > 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 > > > ___ > Flashcoders@chattyfig.figleaf.com > 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 > -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
I tried that- but if they write non addEventListener() type of statements to catch our events it seems to override the dispatched event. On 3/22/06, John Giotta <[EMAIL PROTECTED]> wrote: > > Use EventDispatcher. > ___ > Flashcoders@chattyfig.figleaf.com > 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 > ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
Use EventDispatcher. ___ Flashcoders@chattyfig.figleaf.com 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
[Flashcoders] Reccomended practices for overiding events dispatched with onEvent handlers
What is the reccomended way to handle using events that a user might also want to handle. Some of my components have an event like Screen.onScreenFaded that we expose to outside users. Does this mean that I should not use these events for my own component code in case a user just writes Screen.onScreenFaded=function (){ /// //whatever} that my code won't fall apart. I was looking into possibly using double dispatched events like an internal event _onScreenFaded for my own use but this seems liek a waste of resources. Any suggestions or guidance about the current practice? Thanks, Mani ___ Flashcoders@chattyfig.figleaf.com 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