Working on a fix for doString reentrance.
Meanwhile I re-read what you say about loadstring(), and I'm confused.
Unless you have explicitly done something with global environment
table _G in your state (like sandboxed it), loadstring() should be
there. Please try this in the demo:
http://lua-alchemy.googlecode.com/svn/trunk/demo/index.html
as3.enable_sugar_autoconversion()
-- Use your own AS3 object instead
local label = as3.class.mx.controls.Label.new()
label.text = "return 42" -- assuming this is done somewhere in AS3 code
local fn = assert(loadstring(label.text, "@myCode"))
assert(fn() == 42)
as3.makeprinter(output)("OK")
If that works, try running it in your code (omit last line with OK —
it is only there so you'll better see in demo that everything works).
HTH,
Alexander.