Sending variables with an event – AS3

See this thread:
http://stackoverflow.com/questions/792451/want-to-send-parameters-with-custom-dispatch-event

Incase they remove it,

public class YourEvent extends Event
{
    public static const SOMETHING_HAPPENED: String = "somethingHappend";

    public var data: Object;

    public function YourEvent(type:String, date: Object, bubbles:Boolean=false, cancelable:Boolean=false)
    {
        
        data = this.data;
super(type, bubbles, cancelable);
    }

    override public function clone():Event
    {
        return new YourEvent (type, data, bubbles, cancelable);
    }

}
Tech Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑