building lua alchemy

37 views
Skip to first unread message

Zlatko Sofic

unread,
Apr 17, 2014, 10:26:44 AM4/17/14
to lua-alc...@googlegroups.com
I need to modify couple of things in lua alchemy so I need to rebuild it. I follow this https://code.google.com/p/lua-alchemy/wiki/BuildingLuaAlchemy 


I tried with  Crossbridge https://github.com/adobe-flash/crossbridge but I am getting errors. Is there somewhere a version of adobe alchemy that was used to build lua alchemy 3.2 that I can download? Can lua alchemy be built with latest Crossbridge / FlasCC?

Thanks

Alexander Gladysh

unread,
Apr 17, 2014, 2:57:24 PM4/17/14
to Lua Alchemy Developers
Hi,

Crossbridge is *not* supported. And, alas, will not unless someone will sponsor the port. We're moved to JS ports of Lua.

Adobe no longer supports old Alchemy. I guess that you have to dig out the old release from somewhere...

Best,
Alexander.


--

---
You received this message because you are subscribed to the Google Groups "lua-alchemy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-alchemy-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zlatko Sofic

unread,
Apr 18, 2014, 4:29:56 AM4/18/14
to lua-alc...@googlegroups.com
Thanks for the reply!

One more question: Is it possible to convert as3 function to lua function? Tried with as3.tolua() but it doesn't work... 

I am trying to to something like this

lua cdoe :

flashButton:AddEventListener(MouseEvent.CLICK, function(e)
   --mouse handler function in lua
end
)

as3 code:

public function AddEventListener(self:*, type:String, luaf:*):void 
{
addEventListener(type, function(e:MouseEvent) {
luaf(e);
});
}

so basically I am passing lua function to as3 and call that function from as3 on mouse event. The problem is that the lua function is somehow converted to as3 function (or to userdata) when passed back to lua and that is causing exception in 
push_as3_to_lua_stack_if_convertible()
in 
bridge_as3_lua.c

I tries also passing the lua function back to lua and call it from there

as3 code:

public function AddEventListener(self:*, type:String, luaf:*):void 
{
mouseEnabled = true;
addEventListener(type, function(e:MouseEvent3D) {
luaState.callGlobal("executeFunction", luaf, e)
});
}


lua code:

function executeFunction(luaf, e)
local f = as3.tolua(luaf)
f(e)
end

but I get the same result. Function is still userdata after as3.tolua()

Thanks,
Zlatko

Alexander Gladysh

unread,
Apr 21, 2014, 5:32:21 AM4/21/14
to Lua Alchemy Developers
A quick reply (sorry, I'm in a deep crunch). Have you seen this?

https://github.com/lua-alchemy/lua-alchemy/blob/master/test/FluintLuaAlchemyTests/src/wrapperSuite/tests/TestCallbacks.as

If this doesn't help, I'll try to give it a look later.

Best,
Alexander.

Zlatko Sofic

unread,
Apr 22, 2014, 6:17:09 AM4/22/14
to lua-alc...@googlegroups.com
Great, thanks! I will check that 

Zlatko Sofic

unread,
May 16, 2014, 6:32:22 AM5/16/14
to lua-alc...@googlegroups.com
I found that each call lua <--> as3 is throwing errors and drastically slows down everything

Exception: TypeError
global/AS3_InstanceOf
MethodInfo-1141
cmodule.lua_wrapper::FSM_push_as3_to_lua_stack_if_convertible/work
...
...


I want to remove that error throwing but couldn't find the version of adobe alchemy that was used to build lua alchemy 
Can you please check if you have somewhere the old adobe alchemy? 

Thanks

Alexander Gladysh

unread,
May 25, 2014, 10:14:27 AM5/25/14
to Lua Alchemy Developers
Hi,

Sorry, but I'm far away from my old laptop, and I can't find the old
alchemy in my backups :-(

Best,
Alexander.
Reply all
Reply to author
Forward
0 new messages