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 assigning the name of each one of the elements of the drop down so
that I can pass that along to the method that dispatches the custom event,
but I also want to add an extra parameter but I dont seem to be able to
figure out how since I am creating all the elements at the same time that
adding the MOUSE_UP listeners...


something like

var holder:Sprite = new Sprite;
holder.name = "theName";
...morecode

holder.addEventListener(MouseEvent.MOUSE_UP, myEvent);


private function myEvent(e:MouseEvent) {
trace(e.target.name);
// How about being able to pass an extra parameter?
//From here I am able to dispatch a custom event like so:
dispatchEvent(new DropDownEvent (SELECTED, e.target.name));
//but I need to pass an extra item like so
dispatchEvent(new DropDownEvent (SELECTED, e.target.name, secondParam));
}

TIA
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to