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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? analogclockface.as

?? Programming_ActionScript3.0_samples實(shí)例 SimpleClock
?? AS
字號:
?package com.example.programmingas3.clock
{
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.text.StaticText;
    import flash.events.*;
    import flash.text.TextField;
    import flash.text.TextFormat;
	
	/**
	 * Displays a round clock face with an hour hand, a minute hand, and a second hand.
	 */
    public class AnalogClockFace extends Sprite
    {
 		/**
		 * The desired width of this component, as opposed to the .width
		 * property which represents tha actual width.
		 */
		public var w:uint = 200;
		
		/**
		 * The desired height of this component, as opposed to the .height
		 * property which represents tha actual height.
		 */
		public var h:uint = 200;
		
	   	/**
    	 * The radius from the center of the clock to the 
    	 * outer edge of the circular face outline.
    	 */
        public var radius:uint;
        
        /**
         * The coordinates of the center of the face.
         */
        public var centerX:int;
        public var centerY:int;
        
        /**
         * The three hands of the clock.
         */
        public var hourHand:Shape;
        public var minuteHand:Shape;
        public var secondHand:Shape;
        
        /**
         * The colors of the background and each hand.
         * These could be set using parameters or 
         * styles in the future.
         */ 
        public var bgColor:uint = 0xEEEEFF;
        public var hourHandColor:uint = 0x003366;
        public var minuteHandColor:uint = 0x000099;
        public var secondHandColor:uint = 0xCC0033;
        
        /**
         * Stores a snapshot of the current time, so it
         * doesn't change while in the middle of drawing the
         * three hands.
         */
        public var currentTime:Date;
        
        /**
         * Contructs a new clock face. The width and
         * height will be equal.
         */  
        public function AnalogClockFace(w:uint) 
        {
			this.w = w;
			this.h = w;
			
			// Rounds to the nearest pixel
			this.radius = Math.round(this.w / 2);
			
			// The face is always square now, so the
			// distance to the center is the same
			// horizontally and vertically
			this.centerX = this.radius;
			this.centerY = this.radius;
        }
        
        /**
         * Creates the outline, hour labels, and clock hands.
         */ 
        public function init():void 
        {
        	// draws the circular clock outline
        	drawBorder();
        	
        	// draws the hour numbers
        	drawLabels();

        	// creates the three clock hands
        	createHands();
        }
        
        /**
        * Draws a circular border.
        */
        public function drawBorder():void
        {
        	graphics.lineStyle(0.5, 0x999999);
        	graphics.beginFill(bgColor);
        	graphics.drawCircle(centerX, centerY, radius);
        	graphics.endFill();
        }
  
  		/**
  		 * Puts numeric labels at the hour points.
  		 */
        public function drawLabels():void
        {
        	for (var i:Number = 1; i <= 12; i++)
        	{
        		// Creates a new TextField showing the hour number
        		var label:TextField = new TextField();
        		label.text = i.toString();
        		
        		// Places hour labels around the clock face.
        		// The sin() and cos() functions both operate on angles in radians.
        		var angleInRadians:Number = i * 30 * (Math.PI/180)
        		
        		// Place the label using the sin() and cos() functions to get the x,y coordinates.
        		// The multiplier value of 0.9 puts the labels inside the outline of the clock face.
        		// The integer value at the end of the equation adjusts the label position,
        		// since the x,y coordinate is in the upper left corner.
        		label.x = centerX + (0.9 * radius * Math.sin( angleInRadians )) - 5;
        		label.y = centerY - (0.9 * radius * Math.cos( angleInRadians )) - 9;
        		
        		// Formats the label text.
        		var tf:TextFormat = new TextFormat();
        		tf.font = "Arial";
        		tf.bold = "true";
        		tf.size = 12;
        		label.setTextFormat(tf);
        		
        		// Adds the label to the clock face display list.
	        	addChild(label);
        	}
        }
        
        /**
        * Creates hour, minute, and second hands using the 2D drawing API.
        */
        public function createHands():void
        {
        	// Uses a Shape since it's the simplest component that supports
        	// the 2D drawing API.
        	var hourHandShape:Shape = new Shape();
        	drawHand(hourHandShape, Math.round(radius * 0.5), hourHandColor, 3.0);
        	this.hourHand = Shape(addChild(hourHandShape));
        	this.hourHand.x = centerX;
        	this.hourHand.y = centerY;
        	
          	var minuteHandShape:Shape = new Shape();
        	drawHand(minuteHandShape, Math.round(radius * 0.8), minuteHandColor, 2.0);
        	this.minuteHand = Shape(addChild(minuteHandShape));
         	this.minuteHand.x = centerX;
        	this.minuteHand.y = centerY;
 
         	var secondHandShape:Shape = new Shape();
        	drawHand(secondHandShape, Math.round(radius * 0.9), secondHandColor, 0.5);
        	this.secondHand = Shape(addChild(secondHandShape));
        	this.secondHand.x = centerX;
        	this.secondHand.y = centerY;
        }
        
        /**
        * Draws a clock hand with a given size, color, and thickness.
        */
        public function drawHand(hand:Shape, distance:uint, color:uint, thickness:Number):void
        {
        	hand.graphics.lineStyle(thickness, color);
        	hand.graphics.moveTo(0, distance);
        	hand.graphics.lineTo(0, 0);
        }
        
       /**
        * Called by the parent container when the display is being drawn.
        */
        public function draw():void
        {
        	// Stores the current date and time in an instance variable
        	currentTime = new Date();
        	showTime(currentTime);
        }
        
        /**
         * Displays the given Date/Time in that good old analog clock style.
         */
        public function showTime(time:Date):void 
        {
        	// Gets the time values
	        var seconds:uint = time.getSeconds();
	        var minutes:uint = time.getMinutes();
	        var hours:uint = time.getHours();
	        
	        // Multiplies by 6 to get degrees
	        this.secondHand.rotation = 180 + (seconds * 6);
	        this.minuteHand.rotation = 180 + (minutes * 6);
	        
	        // Multiplies by 30 to get basic degrees, and then
	        // adds up to 29.5 degrees (59 * 0.5) to account 
	        // for the minutes
	        this.hourHand.rotation = 180 + (hours * 30) + (minutes * 0.5);
		}
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99国产精品一区| 国产日韩精品久久久| 国产精品护士白丝一区av| 在线观看网站黄不卡| 欧洲视频一区二区| 99热99精品| 99久久精品免费| aaa亚洲精品一二三区| 免费观看日韩av| 日韩综合一区二区| 免费高清成人在线| 丝袜亚洲另类欧美| 久久成人精品无人区| 91视频国产观看| 精品一区二区免费看| 蜜桃久久久久久久| 久久精工是国产品牌吗| 99免费精品在线观看| 九九九精品视频| 国产一区美女在线| 99久久综合国产精品| 色哟哟一区二区| 日韩片之四级片| 中文字幕一区二区三区在线播放| 一区二区三区四区高清精品免费观看 | 久久99国内精品| 精品在线免费视频| 97se亚洲国产综合自在线不卡| 97se亚洲国产综合自在线 | 欧美日韩国产高清一区二区三区| 7777精品伊人久久久大香线蕉的 | 日本免费在线视频不卡一不卡二| 奇米精品一区二区三区在线观看一| 成人性生交大片免费看在线播放| 91亚洲午夜精品久久久久久| 日韩美女视频在线| 亚洲一区二区三区中文字幕| 天天影视涩香欲综合网| 成人av在线资源网站| 欧美一区二区视频在线观看| 亚洲愉拍自拍另类高清精品| 激情六月婷婷久久| 精品国产露脸精彩对白| 国产一区二区久久| 久久先锋影音av鲁色资源网| 激情六月婷婷综合| 国产欧美一区二区在线| 五月天婷婷综合| 欧美丰满美乳xxx高潮www| 午夜视频在线观看一区二区三区| 国产成人久久精品77777最新版本| 91麻豆精品国产91久久久使用方法 | 在线精品国精品国产尤物884a| 欧美日韩免费在线视频| 中文在线免费一区三区高中清不卡| 精品一区二区三区久久久| 欧美军同video69gay| 一区二区高清在线| 日韩亚洲欧美在线| 成人午夜电影久久影院| 亚洲一二三四在线观看| 欧美刺激脚交jootjob| a亚洲天堂av| 日韩—二三区免费观看av| 久久久亚洲精品石原莉奈| aaa欧美大片| 一区二区三区四区激情| 在线成人免费观看| 91美女在线看| 国产精品综合网| 奇米在线7777在线精品| 亚洲精品五月天| 国产色产综合产在线视频| 欧美狂野另类xxxxoooo| 99国产麻豆精品| 国产成人精品午夜视频免费| 久久久久高清精品| 精品对白一区国产伦| 欧美一级二级三级乱码| 91精品国产欧美一区二区18| 色狠狠综合天天综合综合| 成人av电影免费在线播放| 国产制服丝袜一区| 亚洲成人av福利| 中文字幕成人av| 26uuu精品一区二区在线观看| 欧美色视频在线| 欧美性欧美巨大黑白大战| 欧美性猛交xxxx黑人交| 国产精品69久久久久水密桃| 亚洲已满18点击进入久久| 一区二区三区精品在线| 国产欧美日韩麻豆91| 中文字幕一区二区三| 亚洲欧美日韩成人高清在线一区| 国产精品传媒入口麻豆| 亚洲精品免费播放| 亚洲一区在线观看视频| 亚洲成在人线免费| 国产91在线观看| 欧美日韩中文精品| 欧美精品一区二区三区四区| 亚洲欧美一区二区久久| 久久精品99国产精品日本| 蜜臀a∨国产成人精品| 国产成人综合亚洲网站| 欧美性猛交一区二区三区精品| 欧美一区二区三区免费视频| 久久久精品免费网站| 亚洲一卡二卡三卡四卡五卡| 六月丁香综合在线视频| voyeur盗摄精品| www久久精品| 日本女优在线视频一区二区| 在线视频你懂得一区二区三区| 欧美一级一级性生活免费录像| 久久综合成人精品亚洲另类欧美| 亚洲3atv精品一区二区三区| 91日韩在线专区| 中文字幕不卡三区| 国产成人在线色| 国产日韩综合av| 精品一二线国产| 日韩写真欧美这视频| 亚洲色欲色欲www| 成人精品gif动图一区| 91精品国产综合久久香蕉麻豆| 亚洲精品在线观看网站| 欧美一区永久视频免费观看| 亚洲成在线观看| 在线观看www91| 三级久久三级久久| 精品久久人人做人人爰| 麻豆视频观看网址久久| 国产欧美一二三区| 91一区二区在线| ...av二区三区久久精品| 色乱码一区二区三区88| 视频在线观看国产精品| 7777精品伊人久久久大香线蕉超级流畅 | 日本在线播放一区二区三区| 欧美日韩极品在线观看一区| 亚洲午夜电影在线观看| 欧美在线视频你懂得| 秋霞影院一区二区| 国产亚洲精品免费| 日韩一卡二卡三卡四卡| 激情综合网最新| 亚洲蜜臀av乱码久久精品蜜桃| 日韩亚洲欧美一区| 欧美浪妇xxxx高跟鞋交| 国产精品99久久久久久久女警 | 性做久久久久久| 中文字幕一区二区三区在线不卡 | 97aⅴ精品视频一二三区| 亚洲精品中文在线观看| 久久精品一区二区三区av| 欧美日韩高清在线播放| 99精品黄色片免费大全| 久久99最新地址| 久久精品国产在热久久| 亚洲国产一区二区三区青草影视| 欧美国产日韩精品免费观看| 精品裸体舞一区二区三区| 9久草视频在线视频精品| 国产最新精品精品你懂的| 亚洲免费观看在线视频| 国产欧美精品在线观看| 亚洲天堂福利av| 亚洲免费观看高清完整版在线观看| 久久蜜臀精品av| 国产色综合久久| 一区二区不卡在线播放| 中文字幕在线视频一区| 亚洲欧美另类久久久精品2019| 一区免费观看视频| 一级日本不卡的影视| 亚洲一区二区视频| 日韩国产精品久久久| 国产一区二区三区免费| 国产成人精品网址| 在线影院国内精品| 色94色欧美sute亚洲线路一ni| 欧美日韩精品一区二区三区蜜桃| 4438x亚洲最大成人网| 欧美v日韩v国产v| 亚洲欧美日韩一区| 国模大尺度一区二区三区| 国产成人精品亚洲日本在线桃色| 日本韩国欧美在线| 久久这里只有精品首页| 亚洲精品视频免费看| 国产精品66部| 正在播放一区二区| 亚洲人成网站色在线观看| 精品一区二区精品| 日韩欧美中文字幕公布| 亚洲国产日韩一级| 国产一区二区三区日韩| 欧美一区二区成人|