1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4  
     5  import org.aswing.geom.Point;
     6  
     7  /**
     8   * @author iiley
     9   */
    10  class org.aswing.utils.MCUtils{
    11  		
    12  	/**
    13  	 * Transform the position in fromMC to toMC and return it.
    14  	 */
    15  	public static function locationTrans(fromMC:MovieClip, toMC:MovieClip, p:Point):Point{
    16  		fromMC.localToGlobal(p);
    17  		toMC.globalToLocal(p);
    18  		return p;
    19  	}
    20  	
    21  	/**
    22  	 * Returns is the MovieClip is exist.
    23  	 */
    24  	public static function isMovieClipExist(mc:MovieClip):Boolean{
    25  		return mc != undefined && mc._totalframes != undefined;
    26  	}
    27  	
    28  	/**
    29  	 * Returns is the MovieClip is exist.
    30  	 */
    31  	public static function isTextFieldExist(tf:TextField):Boolean{
    32  		return tf != undefined && tf._height != undefined;
    33  	}
    34  }
    35