Open GoogleCodeExporter opened 9 years ago
Adobe Alchemy's flyield() is ether broken or badly documented -- it does not
work as
expected. The problem is reproduceable without Lua Alchemy, in plain C. (See
also
as3/filegetcontents.lua for Lua Alchemy-only implementation of your code.)
We're working on devising a the workaround for this problem.
If you need to pause Lua script, you may do this without Lua Alchemy help: put
your
Lua code inside a Lua coroutine. Pause would be a call to coroutine.yield().
Resume
that coroutine on AS3 timer events. If you wish a sample code, please ask in Lua
Alchemy mailing list, I'll help you there.
http://groups.google.com/group/lua-alchemy-dev
Original comment by aglad...@gmail.com
on 14 Feb 2009 at 6:38
By default it only yields for one millisecond. However, ACHACKS_TMPS=1 lets
one see
how it is compiling the statement. Maybe something like this could help?
__asm__("mstate.esp += 8; state ++; throw new AlchemyYield(1000);"); // yield
for one
second
Original comment by fuzzy...@gmail.com
on 19 Mar 2009 at 3:27
It seems that flyield works only if method it is called in is declared as
AS3_FunctionAsync.
Original comment by aglad...@gmail.com
on 21 Feb 2010 at 9:43
...Or maybe we should yield in a loop.
Original comment by aglad...@gmail.com
on 15 Apr 2011 at 2:41
Yes, we should yield in a loop, and yes, flyield would work only if it is
called from async function.
So, welcome doStringAsync(callback, code)
Original comment by aglad...@gmail.com
on 19 Apr 2011 at 12:13
Original issue reported on code.google.com by
sh0rtw...@gmail.com
on 13 Feb 2009 at 11:23