⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 registerclass-previous.c

📁 Swfdec still is development software, but has also followed a rigid no-crashes-allowed policy. I b
💻 C
字号:
/* gcc `pkg-config --libs --cflags libming` registerclass-previous.c -o registerclass-previous && ./registerclass-previous */#include <ming.h>intmain (int argc, char **argv){  SWFMovie movie;  SWFMovieClip clip;  SWFDisplayItem item;  if (Ming_init ())    return 1;  Ming_useSWFVersion (7);  movie = newSWFMovie();  SWFMovie_setRate (movie, 1);  SWFMovie_setDimension (movie, 200, 150);  clip = newSWFMovieClip ();  SWFMovie_addExport (movie, (SWFBlock) clip, "export");  item = SWFMovie_add (movie, (SWFBlock) clip);  SWFDisplayItem_setName (item, "m");  SWFMovie_add (movie, (SWFBlock) compileSWFActionCode (""      "trace (\"Check that registerClass does not influence previously created instances\");"      "fun = function () {"      "  trace (this + \": Constructor\");"      "};"      "fun.prototype = new Object ();"      "fun.prototype.foo = function () {"      "  trace (\"foo called on \" + this);"      "};"      "Object.registerClass (\"export\", fun);"      "m.foo ();"      ""));  SWFMovie_nextFrame (movie);  item = SWFMovie_add (movie, (SWFBlock) clip);  SWFDisplayItem_setName (item, "m2");  SWFMovie_add (movie, (SWFBlock) compileSWFActionCode (""      "m.foo ();"      "m2.foo ();"      "stop ();"      ""));  SWFMovie_save (movie, "registerclass-previous.swf");  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -