Tôi đang tạo thư viện. Dưới đây là ví dụMuốn gửi thông số với sự kiện công văn tùy chỉnh
[Event (name="eventAction", type="something")]
public function create_new_customer(phone_number:String):void
{
-------------;
----;
------------;
rpc.addEventListener(Event.COMPLETE, onCreate_returns);
}
private function onCreate_returns(evt:Event):void
{
var ob:Object = evt.target.getResponse();
dispatchEvent(new something("eventAction"));
}
Tôi có người nghe đến sự kiện này ở phía ứng dụng. Vì vậy, khi tôi gửi sự kiện theo cách thủ công, tôi muốn "ob" được gửi dưới dạng tham số. Làm thế nào để làm nó?
cảm ơn ... sẽ hữu ích hơn nếu tôi có một ví dụ đơn giản vì tôi mới làm như vậy! – kp11