2006-7-13 22:23
逍遥云
【原创】haxe编译flash
haxe是什么?在这儿我还是卖个关子,请客位看客去[url]http://www.haxe.org/[/url]
haxe api
[url]http://www.pallove.net/chm/haxeAPI/[/url]
看一看吧,这个应该比mtasc好用很多。后附上haxe-1.03
Test.hx
[quote]import flash.MovieClip;
import flash.Stage;
import flash.Color;
import flash.Lib;
class Test {
static function main() {
Stage.scaleMode="noScale";
var arr:Array<Int>=[70,60,50];
var root:MovieClip=Lib._root;
var mc :MovieClip = root.createEmptyMovieClip("mc",1);
var mc2 :MovieClip = root.createEmptyMovieClip("mc2",2);
mc2.loadMovie("http://www.baidu.com/img/logo-yy.gif");
mc._x=Stage.width;
mc._y=Stage.height;
mc.beginFill(0xFF0000);
mc.moveTo(50,50);
mc.lineTo(100,arr[Math.floor(Math.random()*arr.length)]);
mc.lineTo(100,100);
mc.lineTo(50,100);
mc.endFill();
mc.onEnterFrame=function(){
mc._rotation+=10;
new Color(mc).setRGB(Math.floor(Math.random()*0xffffff));
}
}
}[/quote]
Complie.hxml
[quote]-swf haxeSWF.swf
-main Test
-swf-header 400:500:20:f[/quote]
随意写了个例子,各位将就看,呵呵,比较丑
[ 本帖由 逍遥云 最后编辑于 2006-7-14 13:23 ]