惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - 1901

试用Github Pages iOS设备内存及分辨率 测试显示GitHub的Gist 使用GTMBase64编码解码字符串 颜色转换工具 先随便记一下 iOS中获取程序相关的一些目录路径 mac字典词库增加方法 关于flash加载flash时的缩放和位置问题 给力壁纸 for mac 【转载】巧用宏定义来简写C,C++代码 Objective-C中的NSObject对象经常使用到的方法 Objective-C属性介绍 应用程序本地化-国家代码介绍(ISO 3166-1) iPhone开发资料 sourceMate2 我在MACOS下常用的软件 【转载】分享一些FLASH开发时用到的工具~ 关于ActionScript3中的事件类强制转换失败的问题
Google的Logo记现代舞先驱玛莎·葛兰姆117周年诞辰-Flash版
1901 · 2011-05-12 · via 博客园 - 1901

Google的这个logo看着感觉很不错,google官方是用CSS+Javascript实现的,后来看博客园的很多朋友也照着实现了(其中一个),于是我用AS3实现了一个flash版的。 其实我觉得牛的不是这个技术,而是这个动画的动作设计很棒。

package
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	[SWF(backgroundColor=0xffffff, width="420", height="160", frameRate="16")]
	public class google_logo_20110511 extends Sprite
	{
		private var animationInfo:Array = [
			[307,48,88,89,0,0],
			[307,48,89,89,88,0],
			[307,48,91,89,177,0],
			[305,49,93,89,268,0],
			[305,50,93,88,361,0],
			[305,50,93,88,454,0],
			[306,52,92,86,547,0],
			[305,53,93,84,639,0],
			[305,54,94,83,732,0],
			[306,54,93,83,826,0],
			[307,54,92,83,919,0],
			[307,54,92,83,1011,0],
			[308,54,90,83,1103,0],
			[308,54,90,83,1193,0],
			[306,53,91,84,1283,0],
			[306,53,91,84,1374,0],
			[308,53,90,84,1465,0],
			[308,53,90,84,1555,0],
			[305,53,92,84,1645,0],
			[305,52,92,85,1737,0],
			[306,52,91,85,1829,0],
			[308,51,88,87,1920,0],
			[308,50,88,88,0,89],
			[308,49,88,88,88,89],
			[307,49,89,88,176,89],
			[307,50,89,87,265,89],
			[308,51,89,86,354,89],
			[307,54,90,83,443,89],
			[307,57,90,80,533,89],
			[306,58,92,79,623,89],
			[306,58,92,79,715,89],
			[305,60,92,77,807,89],
			[302,61,95,76,899,89],
			[302,63,95,74,994,89],
			[302,51,96,86,1089,89],
			[302,66,98,71,1185,89],
			[304,67,96,69,1283,89],
			[301,63,96,74,1379,89],
			[301,58,93,79,1475,89],
			[291,52,94,85,1568,89],
			[288,50,71,88,1662,89],
			[285,43,76,95,1733,89],
			[285,37,70,101,1809,89],
			[281,29,55,109,1879,89],
			[278,20,58,119,1934,89],
			[278,20,55,119,1992,89],
			[277,12,121,127,0,208],
			[271,2,122,138,121,208],
			[267,1,126,139,243,208],
			[264,0,136,140,369,208],
			[260,0,141,140,505,208],
			[255,0,148,140,646,208],
			[252,0,151,140,794,208],
			[249,2,121,138,945,208],
			[247,3,123,137,1066,208],
			[246,3,123,137,1189,208],
			[246,2,124,137,1312,208],
			[258,2,112,137,1436,208],
			[263,2,106,137,1548,208],
			[263,2,106,137,1654,208],
			[262,2,103,137,1760,208],
			[260,2,104,136,1863,208],
			[260,2,104,137,1967,208],
			[268,2,98,137,0,348],
			[267,2,99,137,98,348],
			[266,2,97,137,197,348],
			[266,3,96,136,294,348],
			[264,3,99,136,390,348],
			[263,3,100,136,489,348],
			[261,3,100,136,589,348],
			[259,2,138,137,689,348],
			[254,2,126,137,827,348],
			[247,2,101,136,953,348],
			[240,2,108,136,1054,348],
			[238,1,110,137,1162,348],
			[230,1,118,138,1272,348],
			[220,15,128,124,1390,348],
			[211,18,137,121,1518,348],
			[205,43,102,96,1655,348],
			[202,45,104,93,1757,348],
			[200,38,97,101,1861,348],
			[198,38,104,101,1958,348],
			[197,39,107,100,0,486],
			[197,39,112,100,107,486],
			[213,39,94,110,219,486],
			[212,40,95,111,313,486],
			[211,41,97,111,408,486],
			[209,42,99,112,505,486],
			[209,43,98,112,604,486],
			[213,43,87,112,702,486],
			[213,42,83,113,789,486],
			[211,40,86,109,872,486],
			[211,38,86,103,958,486],
			[211,37,88,112,1044,486],
			[211,20,186,131,1132,486],
			[213,27,167,122,1318,486],
			[212,44,87,105,1485,486],
			[210,44,88,98,1572,486],
			[195,44,106,98,1660,486],
			[189,44,110,98,1766,486],
			[182,46,117,99,1876,486],
			[173,44,118,96,1993,486],
			[161,43,130,99,0,617],
			[154,42,137,97,130,617],
			[153,42,137,97,267,617],
			[153,42,137,97,404,617],
			[152,41,137,98,541,617],
			[151,41,137,97,678,617],
			[149,41,145,97,815,617],
			[148,25,144,114,960,617],
			[148,13,144,126,1104,617],
			[141,12,153,127,1248,617],
			[115,11,173,128,1401,617],
			[108,7,180,133,1574,617],
			[108,4,180,136,1754,617],
			[108,3,176,137,1934,617],
			[108,1,161,139,0,754],
			[105,1,235,138,161,754],
			[103,1,295,148,396,754],
			[103,0,277,149,691,754],
			[108,0,234,137,968,754],
			[101,0,232,137,1202,754],
			[99,0,135,139,1434,754],
			[95,0,244,139,1569,754],
			[81,0,152,139,1813,754],
			[69,0,164,139,1965,754],
			[66,0,169,139,0,903],
			[65,0,170,139,169,903],
			[63,0,168,138,339,903],
			[61,0,159,138,507,903],
			[35,0,304,139,666,903],
			[19,0,189,140,970,903],
			[18,11,138,129,1159,903],
			[18,11,137,129,1297,903],
			[18,11,137,128,1434,903],
			[18,6,135,133,1571,903],
			[7,4,146,136,1706,903],
			[6,4,147,136,1852,903],
			[3,4,150,136,1999,903],
			[3,5,150,135,0,1043],
			[3,8,150,132,150,1043],
			[4,6,394,145,300,1043],
			[12,6,388,145,694,1043],
			[11,8,389,144,1082,1043],
			[11,8,387,144,1471,1043],
			[11,8,387,143,1858,1043],
			[10,8,113,131,0,1188],
			[11,8,111,131,113,1188],
			[10,9,112,130,224,1188],
			[12,9,116,130,336,1188],
			[12,9,111,130,452,1188],
			[12,9,111,130,563,1188],
			[12,9,110,131,674,1188],
			[12,34,113,106,784,1188],
			[13,35,110,104,897,1188]
		];
		
		[Embed(source="google_logo.png")]
		private var logo:Class;
		private var mcs:Array		= [];
		private var playIndex:int	= 0;
		
		public function google_logo_20110511()
		{
			this.stage.scaleMode = StageScaleMode.NO_SCALE;
			
			var logoBitmap:Bitmap = new logo();
			
			for each(var info:Array in animationInfo)
			{
				var bitmap:Bitmap = getBitmapFromBitmapData(logoBitmap.bitmapData, 
					info[4],
					info[5],
					info[2],
					info[3]);
				
				var mc:MovieClip = new MovieClip();
				mc.addChild(bitmap);
				mc.x = info[0];
				mc.y = info[1];
				
				mcs.push(mc);
			}
			
			this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
		}

		private function onEnterFrame(event:Event):void
		{
			if(playIndex < mcs.length)
			{
				var mc:MovieClip = mcs[playIndex] as MovieClip;
				addChild(mc);
				playIndex++;
			}
			else
			{
				this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
			}
		}
		
		private function getBitmapFromBitmapData(bitmapData:BitmapData, x:int, y:int, width:int, height:int):Bitmap
		{
			var bitmap:Bitmap = new Bitmap();
			bitmap.bitmapData = new BitmapData(width, height);
			
			bitmap.bitmapData.copyPixels(bitmapData, 
				new Rectangle(x, y, width, height),
				new Point(0, 0));
				
			return bitmap;
		}
	}
}