Devlogs
Few days ago Adobe released Alchemy. Said to be powerful tool to compile c/c++ code to run on ActionScript Virtual Machine. I wanted to test it...
For first test ive used sffe source code. sffe is open source formula evaluator, that is part of XaoS fractal exploring software. After some modifications, mostly adding or removing includes, code compiled successfully and a swc was produced. To test my new swc library i've used simple ActionScript code
package
{
import flash.display.Sprite;
import mx.utils.ObjectUtil;
import cmodule.sffe.CLibInit;;
public class sffetest extends Sprite
{
public function sffetest()
{
var loader:CLibInit = new CLibInit;
var lib:Object = loader.init();
var c:Object = lib.sffe_alloc("c-c*3",-3,12.12);
var s:String;
for ( s in c )
trace(" - ",s,"=",c[s]);
}
}
}
and compile it with Flex3 SDK compiler - mxmlc. Code compiled successfully and i got new and shiny swf file. Call to sffe_alloc function should produce an object, with result of evaluating given expression.
But...
I still get strange runtime error : "
TypeError: Error #1006: value is not a function.
at cmodule.sffe::FSM_test/work()[47941.achacks.as:33531]
at
at
at sffetest()
".
It seems to be thrown from expression evaluating function, but
its hard to say what is a reason - maybe some pointer arithmetics fails.
No comments as yet. Be first to comment.