Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-02-01 Thread Helmut Granda
You are correct, that is the part that I was overlooking. For some odd reason I was feeling like I couldn't dispatch that information from within the component. Thanks... On 1/31/08, Steven Sacks [EMAIL PROTECTED] wrote: Now that I look at it, it's more an architecture issue than a custom

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-02-01 Thread Helmut Granda
Interesting approach.. Thanks Jer On 1/31/08, Jer Brand [EMAIL PROTECTED] wrote: There are probably a hundred other ways to do this, but an easy one (off the top of my head) would be to make your holder variable a custom element that extends sprite, but has it's own variables, like: class

[Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Helmut Granda
I am having a little bit of issue wrapping my head about this easy task. I think my brain is fried. I have created a dropdown component... now when the user selects an element from the dropdown i can listen for the MOUSE_UP and call a method, that method dispatches a custom event. Now I am

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Jer Brand
There are probably a hundred other ways to do this, but an easy one (off the top of my head) would be to make your holder variable a custom element that extends sprite, but has it's own variables, like: class HolderClass extends Sprite { private var _myParam:String public function

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Steven Sacks
You make a custom event class that extends Event, and you pass the params that Event is expecting first. http://3lbmonkeybrain.blogspot.com/2008/01/how-to-extend-event-once-and-for-all.html ___ Flashcoders mailing list

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Helmut Granda
Thanks, I know how to extend the Event class to create your custom events, what I am having an issue with was capturing an event that hasnt been declared yet :) On 1/31/08, Steven Sacks [EMAIL PROTECTED] wrote: You make a custom event class that extends Event, and you pass the params that

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Steven Sacks
Now that I look at it, it's more an architecture issue than a custom event issue. Your drop down component should listen to the items inside it for when they are selected, and your drop down component should fire a change event when it changes. item.addEventListener(SELECT, onItemSelect);