Itemrenderer Dispatch Custom Event

后端 未结 1 1456
执念已碎
执念已碎 2021-02-10 09:18

I\'m trying to dispatch a custom event from a custom ItemRenderer

This is my custom event

package events
{
    import customClass.Produc         


        
相关标签:
1条回答
  • 2021-02-10 09:35

    Sounds like your event isn't bubbling.

    Add the bubbles argument (which by default, is false) in your Custom event constructor:

    public function CopyProductEvent(type:String, picked:Product, bubbles:Boolean = true)
            {
                super(type,bubbles);
                this.picked = picked;
            }
    

    A nice explanation on Event bubbling in AS3 can be found here: Event Bubbling in AS3

    0 讨论(0)
提交回复
热议问题