1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <errno.h>
4 #include <libming.h>
5
main()6 int main()
7 {
8 SWFMovie m = newSWFMovie();
9 SWFTextField text = newSWFTextField();
10
11 SWFFont font = newSWFFont_fromFile(MEDIADIR "/test.ttf");
12 if(font == NULL)
13 {
14 perror(MEDIADIR "/test.tff");
15 exit(EXIT_FAILURE);
16 }
17
18 SWFTextField_setFont(text, font);
19 SWFTextField_setColor(text, 0, 0, 0, 0xff);
20 SWFTextField_setHeight(text, 20);
21 SWFTextField_setFlags(text, SWFTEXTFIELD_NOEDIT);
22 SWFTextField_addString(text, "The quick brown fox jumps over the lazy dog. 1234567890");
23
24 SWFMovie_add(m, text);
25 SWFMovie_nextFrame(m);
26 SWFMovie_save(m, "test01.swf");
27
28 return 0;
29 }
30
31