You just have to subclass Event, and then call super("myCustomType")
in your constructor.

HTH,
Ben

--- In flexcoders@yahoogroups.com, "marloscarmo2004" <[EMAIL PROTECTED]> wrote:
>
> I need create a personalized event in my class in AS3. In AS2 I use
> the dispatchEvent comand.
> 
> this.dispatchEvent( { type : "onResult", target : this,  data :
> result_arr } );
> 
> How do I do in AS3? See my code below.
> 
> package as3.db
> {
>       import flash.net.NetConnection;
>     import flash.net.ObjectEncoding;
>     import flash.net.Responder;
>     
>       public class AMFConnection
>       {
>               public var gateway : NetConnection;
>               
>               public function AMFConnection() {
>                       gateway = new NetConnection();
>                       gateway.objectEncoding = flash.net.ObjectEncoding.AMF0;
>                       gateway.connect(
>
"http://branco:8080/projetos/5clicks/extranet/source/flex/bin/amfphp/gateway.php";);
>               }
>               
>               public function callMethod( nameMethod : String, params : Array 
> ) :
> void {
>                       gateway.call( "extranet.callMethod", new Responder( 
> onResult,
> onFault ), nameMethod, params );
>               }
>               
>               public function onResult( result : String ) : void {
>               }
>               
>               public function onFault( result : String ) : void {
>               }
>       }
> }
>


Reply via email to