1
/* gcc `pkg-config --libs --cflags libming` doaction-before-placeobject.c -o doaction-before-placeobject && ./doaction-before-placeobject
6
/* The file doaction-after-placeobject.swf was created from
7
* doaction-before-placeobject.swf by manually swapping the DoAction and
8
* PlaceObject2 tags in the file with a hex editor
11
main (int argc, char **argv)
19
Ming_useSWFVersion (7);
21
movie = newSWFMovie();
22
SWFMovie_setRate (movie, 1);
23
SWFMovie_setDimension (movie, 200, 150);
25
clip = newSWFMovieClip ();
26
item = SWFMovie_add (movie, (SWFBlock) clip);
27
SWFDisplayItem_setName (item, "m");
28
SWFDisplayItem_addAction (item, compileSWFActionCode (""
29
" trace (\"clipEvent (load)\");"
31
""), SWFACTION_ONLOAD);
32
SWFMovie_add (movie, (SWFBlock) compileSWFActionCode (""
33
"trace (\"Frame 0\");"
36
SWFMovie_save (movie, "doaction-before-placeobject.swf");