最終更新:2015-08-31 (月) 16:36:04 (3151d)  

Alchemy
Top / Alchemy

ペイントツール

C++のFlashのやつ

Alchemy is a research project that allows users to compile C and C++ code that is targeted to run on the open source ActionScript Virtual Machine (AVM2). The purpose of this preview is to assess the level of community interest in reusing existing C and C++ libraries in Web applications that run on Adobe® Flash® Player and Adobe AIR®.

Alchemy Toolkit

コマンド

  • alc-on
  • alc-off
  • gcc hoge.c -swc -o hoeg.swc // -swc オプションを付けることで、SWF から使える *.SWCファイルになる

サンプルのコンパイル(Cygwin)

$ cd /cygdrive/c/develop/alchemy-cygwin/samples/stringecho/
$ gcc stringecho.c -Wall -swc -o stringecho.swc

型とか

typedef struct _AS3_Val *AS3_Val;

関数とか

AS3_Val AS3_Object(const char *tt, ...);

/* AS3 value creation */
AS3_Val AS3_String(const char *str);
AS3_Val AS3_StringN(const char *str, int len);
AS3_Val AS3_Int(int n);
AS3_Val AS3_Ptr(void *p);
AS3_Val AS3_Number(double n);
AS3_Val AS3_True();
AS3_Val AS3_False();
AS3_Val AS3_Null();
/* undefined is guaranteed to be (AS3_Val)NULL
   (null is NOT!) and does not need to be acquired
   or released though acquire and releasing are valid
   no-ops 
*/
AS3_Val AS3_Undefined();
AS3_Val AS3_Function(void *data, AS3_ThunkProc proc);
  • AS3_Release
  • AS3_LibInit?

ドキュメント

解説

メモ

  • 前提のライブラリ

関連

参考