flash使用lua

lua语法示例:
判断
local a=3
local b=4
if a<b then
...
elseif a>b then
...
else

循环
for i=0,10,1
do
...
end

local i=0;
while i<10
do
i=i+1
...
end

http://code.google.com/p/lua-alchemy/ -->lua官方文档。

as3比较常用的函数
lua.setGlobal("lua中的变量",as中的变量) --》这样在lua中就可以用AS的东东了
lua.toString("lua代码") -->返回array. -->array里有结果


lua中常用函数
print("abc")
as3.class.flash.display.Sprite;
as3.class.flash.dispaly.MovieClip;
...

原文地址:https://www.cnblogs.com/mattins/p/2680606.html