1 #include <mingpp.h>
2 #include <cstdlib>
3 
4 
main()5 int main()
6 {
7 	try {
8 
9 		SWFMovie* m = new SWFMovie();
10 		SWFFont *font = new SWFFont(MEDIADIR "/font01.fdb");
11 
12 		SWFText *text = new SWFText(1);
13 		text->setFont( font);
14 		text->setColor( 0, 0, 0xff, 0xff);
15 		text->setHeight(20);
16 		text->moveTo(100, 100);
17 		text->addString( "Static Text", NULL);
18 
19 		SWFTextField *textfield = new SWFTextField();
20 		textfield->setFont( font);
21 		textfield->setFlags(SWFTEXTFIELD_NOEDIT);
22 		textfield->setColor( 0xff, 0, 0, 0xff);
23 		textfield->setHeight(20);
24 		textfield->addString( "Readonly Textfield");
25 
26 		m->add(text);
27 		SWFDisplayItem* i = m->add(textfield);
28 		i->moveTo(100, 120);
29 
30 		m->nextFrame(); // end of frame 1
31 
32 		m->save("test05.swf");
33 	}
34 	catch(SWFException &e)
35 	{
36 		std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
37 		return EXIT_FAILURE;
38 	}
39 	return 0;
40 }
41