Horidream’s Blog

have fun with ActionScript 3.0

先新建一个Flex project,选择Application type为Desktop(runs in Adobe AIR)。next->next,把Main application file的扩展名改为.as,这样便建立了一个ActionScript的AIR项目。
changeFileType
不过先别急,还需要在构造函数中激活一下窗口,使用以下语句:

1
stage.nativeWindow.activate();

以下为测试时使用的Hello World源文件代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package
{
	import flash.display.Sprite;
	import flash.text.TextField;
	[SWF(width=640,height=480)]
	public class HelloWorld extends Sprite
	{
		public function HelloWorld()
		{
			stage.nativeWindow.activate();
			var tf:TextField = new TextField();
			tf.text = "Hello World!!";
			addChild(tf);
		}
	}
}

图像的粒子化

Posted by horidream under 例子【Samples】

通过“链表”来实现粒子似乎是目前最为经济快速的方法了,请看以下这个例子。
picParticles

This movie requires Flash Player 10

VerticalTextTest
TextLayout的API不时还在调整,功能已经强大很多。

This movie requires Flash Player 10