1 #include <mingpp.h> 2 #include <cstdlib> 3 4 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( "1234567890", NULL); 18 19 SWFTextField *textfield = new SWFTextField(); 20 textfield->setFont( font); 21 textfield->setColor( 0xff, 0, 0, 0xff); 22 textfield->setHeight(20); 23 textfield->addString( "1234567890"); 24 25 m->add(text); 26 SWFDisplayItem* i = m->add(textfield); 27 i->moveTo(100, 120); 28 29 m->nextFrame(); // end of frame 1 30 31 m->save("test04.swf"); 32 } 33 catch(SWFException &e) 34 { 35 std::cerr << "SWFException: " << e.what() << std::endl << std::endl; 36 return EXIT_FAILURE; 37 } 38 return 0; 39 } 40