package de.dtele.net.events {
  
  import flash.events.Event;
  
  /**
   * Notification for MediaRequest events
   * 
   * @author Mathias Brodala
   */
  public class MediaRequestEvent extends Event {
    
    /* Constants */
    /**
     * The MediaRequestEvent.STARTED constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>started</code> event.
     * 
     * @eventType started
     */
    public static const STARTED:String = "started";
    /**
     * The MediaRequestEvent.DONE constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>done</code> event.
     * 
     * @eventType done
     */
    public static const DONE:String = "done";
    /**
     * The MediaRequestProgressEvent.PROGRESS constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>progress</code> event.
     * 
     * @eventType progress
     */
    public static const PROGRESS:String = "progress";
    /**
     * The MediaRequestEvent.CANCELLED constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>cancelled</code> event.
     * 
     * @eventType cancelled
     */
    public static const CANCELLED:String = "cancelled";
    
    /* Properties */
    private var _progress:Number = 0;
    /**
     * The new progress of a request
     */
    public function get progress():Number {
      return _progress;
    }
    
    /* Methods */
    public function MediaRequestEvent(type:String, progress:Number=0, bubbles:Boolean=false, cancelable:Boolean=false) {
      
      super(type, bubbles, cancelable);
      this._progress = 0;
    }
  }
}