In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

getSizeの検証

Get Adobe Flash player
by paq 06 Apr 2010
    Embed
/**
 * Copyright paq ( http://wonderfl.net/user/paq )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/48Cz
 */

package 
{
	import flash.display.Bitmap;
	import flash.display.MovieClip;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.sampler.getSize;
	import flash.text.TextField;
	
	[SWF(backgroundColor="0xFFFFFF", width=465, height=465, frameRate=1)]
	public class MemoryTest extends Sprite 
	{
		public function MemoryTest():void 
		{
			var tf:TextField = new TextField();
			addChild(tf);
			tf.text = "MovieClip	: " + String(getSize(new MovieClip)) + "\n"
					+ "Sprite		: " + String(getSize(new Sprite)) + "\n"
					+ "Shape		: " + String(getSize(new Shape)) + "\n"
					+ "Bitmap		: " + String(getSize(new Bitmap)) + "\n"
					+ "TextField	: " + String(getSize(new TextField)) + "\n"
		}
		
	}
	
}