A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: mulitple custom events question

  1. #1
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588

    mulitple custom events question

    I'm using the following code to create events my question is how do i create multiple events? I need each event to contain a diffrent data parameter.

    PHP Code:
    package NetConnections.Call
        
    // Import class 
        
    import flash.events.Event
        
    // EventType 
        
    public class NumUserEvent extends Event 
            
    // Properties 
              
    public var num0:*; 
              
    // Constructor 
              
               
              
              
    public function NumUserEvent(type:Stringbubbles:Boolean falsecancelable:Boolean false, ... a:*) { 
                   
                   
    super(typebubblescancelable); 
                   
    num0 a
                  
               } 
               
            
    // Override clone 
            
    override public function clone():Event
                return new 
    NumUserEvent(typebubblescancelablenum0); 
            }; 
            
        } 

    ~calmchess~

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    PHP Code:
    import NetConnections.Call.NumUserEvent;

    //  ...

    dispatchEvent( new NumUserEvent('customEvent'falsefalse, {a:1}) );
    dispatchEvent( new NumUserEvent('customEvent'falsefalse, {b:2}) ); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center