亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? moonsphere.as

?? Programming_ActionScript3.0_samples實例 SpinningMoon
?? AS
字號:
?package com.example.programmingas3.moon
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.BitmapDataChannel;
	import flash.display.Loader;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.TimerEvent;
	import flash.filters.BitmapFilterQuality;
	import flash.filters.DisplacementMapFilter;
	import flash.filters.GlowFilter;
	import flash.geom.Point;   
	import flash.geom.Rectangle;
	import flash.net.URLRequest;
	import flash.utils.Timer;
	
	public class MoonSphere extends Sprite 
	{
		// The Bitmap containing the moon map that's actually displayed on the screen.
		private var sphere:Bitmap;
		
		// The moon map "source" -- pixels from this map are copied onto sphere
		// to create the animated motion of the moon.
		private var textureMap:BitmapData;
		
		// The radius of the moon.
		private var radius:int;
		
		// The current x position on textureMap from which the pixels are copied onto sphere.
		private var sourceX:int = 0;
		
		// MoonSphere constructor
		// Starts loading the moon image.
		public function MoonSphere() 
		{
			var imageLoader:Loader = new Loader();
			imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoadComplete);
			imageLoader.load(new URLRequest("moonMap.png"));
		}
		
		// Movement (a'la rotation) routine
		private function rotateMoon(event:TimerEvent):void
		{
			sourceX += 1;
			if (sourceX >= textureMap.width / 2)
			{
				sourceX = 0;
			}
			
			sphere.bitmapData.copyPixels(textureMap,
												  new Rectangle(sourceX, 0, sphere.width, sphere.height),
												  new Point(0, 0));
			
			event.updateAfterEvent();
		}
		
		// Creates the displacement map image that's used to create the fisheye lens effect
		private function createFisheyeMap(radius:int):BitmapData
		{
			var diameter:int = 2 * radius;
			
			var result:BitmapData = new BitmapData(diameter,
																diameter,
																false,
																0x808080);
			
			// Loop through the pixels in the image one by one
			for (var i:int = 0; i < diameter; i++)
			{
				for (var j:int = 0; j < diameter; j++)
				{
					// Calculate the x and y distances of this pixel from
					// the center of the circle (as a percentage of the radius).
					var pctX:Number = (i - radius) / radius;
					var pctY:Number = (j - radius) / radius;
					
					// Calculate the linear distance of this pixel from
					// the center of the circle (as a percentage of the radius).
					var pctDistance:Number = Math.sqrt(pctX * pctX + pctY * pctY);
					
					// If the current pixel is inside the circle,
					// set its color.
					if (pctDistance < 1)
					{
						// Calculate the appropriate color depending on the
						// distance of this pixel from the center of the circle.
						var red:int;
						var green:int;
						var blue:int;
						var rgb:uint;
						red = 128 * (1 + 0.75 * pctX * pctX * pctX / (1 - pctY * pctY));
						green = 0;
						blue = 0;
						rgb = (red << 16 | green << 8 | blue);
						// Set the pixel to the calculated color.
						result.setPixel(i, j, rgb);
					}
				}
			}
			return result;
		}
		
		// Called when the moon map image finishes loading.
		// Sets up the on-screen elements (moon image with fisheye filter and its mask);
		// starts the Timer that creates the animation effect.
		private function imageLoadComplete(event:Event):void
		{
			textureMap = event.target.content.bitmapData;
			radius = textureMap.height / 2;
			
			sphere = new Bitmap();
			sphere.bitmapData = new BitmapData(textureMap.width / 2, textureMap.height);
			sphere.bitmapData.copyPixels(textureMap,
												  new Rectangle(0, 0, sphere.width, sphere.height),
												  new Point(0, 0));

			// Create the BitmapData instance that's used as the displacement map image
			// to create the fisheye lens effect.
			var fisheyeLens:BitmapData = createFisheyeMap(radius);
			
			// Create the fisheye filter
			var displaceFilter:DisplacementMapFilter;
			displaceFilter = new DisplacementMapFilter(fisheyeLens,
																	 new Point(radius, 0), 
																	 BitmapDataChannel.RED,
																	 BitmapDataChannel.BLUE,
																	 radius, 0);
			
			// Apply the filter
			sphere.filters = [displaceFilter];

			this.addChild(sphere);        
	
			// Create and apply the image mask
			var moonMask:Shape = new Shape();
			moonMask.graphics.beginFill(0);
			moonMask.graphics.drawCircle(radius * 2, radius, radius);
			this.addChild(moonMask);
			this.mask = moonMask;
			
			// Set up the timer to start the animation that 'spins' the moon
			var rotationTimer:Timer = new Timer(15);
			rotationTimer.addEventListener(TimerEvent.TIMER, rotateMoon);
			rotationTimer.start();
			
			// add a slight atmospheric glow effect
			this.filters = [new GlowFilter(0xC2C2C2, .75, 20, 20, 2, BitmapFilterQuality.HIGH, true)];
			
			dispatchEvent(event);
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费xxxxxxxx| 日韩精品专区在线| 亚洲国产精品影院| 久久久国产精品午夜一区ai换脸| 欧美专区在线观看一区| 免费成人在线网站| 同产精品九九九| 一区二区三区欧美在线观看| 亚洲国产高清在线| 国产精品欧美一级免费| 久久综合色天天久久综合图片| 成人在线一区二区三区| 美女看a上一区| 毛片基地黄久久久久久天堂| 图片区小说区区亚洲影院| 亚洲精品国产无套在线观| 亚洲天堂网中文字| 亚洲日本中文字幕区| 精品国产一区二区三区av性色| 日韩一区二区三区电影在线观看 | 亚洲一卡二卡三卡四卡无卡久久 | 亚洲综合另类小说| 一区二区三区四区视频精品免费 | 日韩电影免费在线看| 丝袜美腿亚洲一区| 免费看日韩精品| 男男gaygay亚洲| 久久99精品国产| 三级影片在线观看欧美日韩一区二区| 国产喷白浆一区二区三区| 中文字幕乱码久久午夜不卡| 中文久久乱码一区二区| 一区二区三区波多野结衣在线观看 | 亚洲.国产.中文慕字在线| 亚洲 欧美综合在线网络| 日av在线不卡| 国产成人自拍网| 欧美在线一二三四区| 精品视频1区2区| 亚洲成人777| 蜜臀久久99精品久久久久宅男| 国内精品免费**视频| 紧缚奴在线一区二区三区| 懂色av一区二区在线播放| 99re6这里只有精品视频在线观看| 一本大道久久a久久综合| 欧美一区二区三区白人| 日韩免费视频线观看| 国产夜色精品一区二区av| 亚洲精品成人精品456| 秋霞电影一区二区| 不卡一二三区首页| 日本女优在线视频一区二区| 国产精品 欧美精品| 色综合婷婷久久| 国产传媒久久文化传媒| 成人午夜视频在线| 日韩欧美久久一区| 一区二区在线看| 国产精品亚洲午夜一区二区三区 | 麻豆国产一区二区| 99精品国产热久久91蜜凸| 日韩欧美在线一区二区三区| 亚洲欧美综合网| 日本不卡不码高清免费观看| 成人午夜免费电影| 欧美岛国在线观看| 亚洲综合成人网| 高清国产午夜精品久久久久久| 欧美日韩色综合| ㊣最新国产の精品bt伙计久久| 激情伊人五月天久久综合| www.欧美精品一二区| 欧美不卡一二三| 欧美tickling网站挠脚心| 亚洲一区中文日韩| 99这里只有久久精品视频| 欧美伦理影视网| 亚洲成人综合视频| 国产91在线观看| 国产肉丝袜一区二区| 久久成人精品无人区| 91麻豆精品国产综合久久久久久| 国产精品另类一区| 精彩视频一区二区| 欧美成人乱码一区二区三区| 亚洲成人自拍网| 欧美四级电影在线观看| 久久精品在这里| 国产精品88888| 久久人人爽人人爽| 精品午夜一区二区三区在线观看| www.成人网.com| 亚洲欧洲精品天堂一级 | 精品久久久网站| 久久国产人妖系列| 日韩一级完整毛片| 六月丁香婷婷久久| 精品国产一区二区三区久久久蜜月| 蜜桃91丨九色丨蝌蚪91桃色| 69精品人人人人| 美女视频一区在线观看| 精品久久国产老人久久综合| 九色综合国产一区二区三区| 亚洲精品一区二区三区99| 国内精品不卡在线| 国产精品电影一区二区三区| 91首页免费视频| 捆绑调教美女网站视频一区| 日本韩国欧美国产| 三级成人在线视频| 久久久久亚洲综合| 欧洲一区在线电影| 国模一区二区三区白浆| 亚洲欧美日韩在线| 日韩一区二区电影| 在线视频欧美区| 国产一区美女在线| 亚洲国产中文字幕| 国产精品你懂的在线欣赏| 在线观看91av| 色妞www精品视频| 久草精品在线观看| 水野朝阳av一区二区三区| 国产精品色一区二区三区| 日韩欧美亚洲国产另类| 色综合久久天天综合网| 国产精品综合在线视频| 日日夜夜免费精品| 亚洲人精品午夜| 久久精品视频一区二区| 日韩欧美第一区| 欧美日韩中文字幕一区二区| 顶级嫩模精品视频在线看| 另类人妖一区二区av| 亚洲成av人**亚洲成av**| 亚洲少妇中出一区| 国产亚洲午夜高清国产拍精品| 91精品国产色综合久久| 欧美视频在线观看一区二区| 高清国产一区二区| 国产精品一二三| 国产精品一区二区视频| 激情av综合网| 韩国视频一区二区| 久久99精品久久久久久久久久久久| 手机精品视频在线观看| 午夜久久电影网| 亚洲国产三级在线| 日韩国产欧美三级| 男女男精品视频| 美女任你摸久久| 韩国视频一区二区| 成人综合激情网| 成人黄色电影在线| 97se亚洲国产综合自在线不卡| 福利一区福利二区| 91丝袜呻吟高潮美腿白嫩在线观看| av电影天堂一区二区在线| 成人动漫精品一区二区| 91色婷婷久久久久合中文| 91国产丝袜在线播放| 欧美日韩亚洲综合一区二区三区| 欧美巨大另类极品videosbest | 国产精品系列在线| 欧美精品一区二区三区蜜桃| 久久久亚洲欧洲日产国码αv| 久久综合色鬼综合色| 中文字幕一区二区三区蜜月| 亚洲视频小说图片| 日韩中文字幕1| 国产乱子伦一区二区三区国色天香| 国产九色sp调教91| 波多野结衣中文一区| 色狠狠一区二区三区香蕉| 欧美高清精品3d| 国产亚洲综合av| 一区二区三区免费观看| 男女性色大片免费观看一区二区| 国产一区二区在线电影| 99久久99久久精品国产片果冻| 欧美色手机在线观看| 亚洲精品在线三区| 亚洲色图欧美在线| 久久99精品视频| 色婷婷av一区二区| 久久综合九色综合欧美就去吻| 亚洲欧美日韩一区| 麻豆专区一区二区三区四区五区| 国产精品911| 4hu四虎永久在线影院成人| 国产日韩影视精品| 午夜国产精品一区| 粉嫩一区二区三区性色av| 欧美美女一区二区| 中文字幕一区二| 国产一区欧美日韩| 日韩一区二区三区观看| 有码一区二区三区| 懂色一区二区三区免费观看|