遮罩跟随鼠标移动,通过载入的图片指定遮罩

package
{
	import ascb.drawing.Pen;
	
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.net.URLRequest;

	public class zhezao extends Sprite
	{
		public function zhezao()
		{
			super();
			var loader:Loader = new Loader( );
			loader.load(new URLRequest("http://www.rightactionscript.com/samplefiles/image2.jpg"));
			addChild(loader);
			var mas遮罩跟随鼠标移动。通过载入的图片指定遮罩kSprite:Sprite = new Sprite( );
			maskSprite.graphics.lineStyle( );
			maskSprite.graphics.beginFill(0xFFFFFF);
			maskSprite.graphics.drawCircle(0, 0, 100);
			maskSprite.graphics.endFill( );
			loader.mask = maskSprite;
			addChild(maskSprite);
			maskSprite.startDrag(true);
			
			
		}		
		
		
	}
}

 

你可能感兴趣的:(.net,Flash)