﻿package 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.BitmapDataChannel;
	import flash.display.Sprite;
	import flash.display.BlendMode;
	import flash.events.Event;
	import flash.geom.Point;

	[SWF(width='600', height='76', backgroundColor='#ffffff', frameRate='120')]
	public class tab extends Sprite 
	{
		
		//[Embed(source="hyonsoo.jpg")]
        //private var sourceImage : Class;
		
		private var bmp:BitmapData;
		private var arr:Vector.<Point>=new Vector.<Point>();
		private var px1:Number=0;
		
		public function tab():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			var namecard:soo = new soo();
			addChild(namecard);
			
			bmp = new BitmapData(60, 76, false, 0);
			var bm:Bitmap = new Bitmap(bmp);
			addChild(bm);
			bm.scaleX = 10;
			bm.blendMode = BlendMode.SUBTRACT;
			
			addEventListener(Event.ENTER_FRAME, _render);
		}
		
		private function _render(e:Event):void {
			bmp.perlinNoise(60, 76, 3, 6456, true, false, 6 , false, [new Point(px1 += 0.3, 0), new Point( -px1 / 2, 0), new Point(0, 0)]);
		}
		
		private function newPoint(e:Event=null):void {
			arr.push(new Point(Math.random() * 800, Math.random() * 800));
		}
		
	}
	
}
