1 #include <mingpp.h> 2 #include <cstdlib> 3 4 // static char *test = "test01"; 5 main()6int main() 7 { 8 SWFMovie *m; 9 SWFShape *shape; 10 SWFButton *b; 11 SWFDisplayItem *item; 12 SWFBlur *blur; 13 SWFFilter *f; 14 15 try { 16 Ming_init(); 17 m = new SWFMovie(7); 18 shape = new SWFShape(); 19 20 shape->setLine(4, 25, 0, 0, 128); 21 shape->movePenTo(5, 5); 22 shape->drawLineTo( 0, 10); 23 24 blur = new SWFBlur(5,5,2); 25 f = SWFFilter::BlurFilter(blur); 26 27 b = new SWFButton(); 28 b->addShape(shape, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN); 29 item = m->add(b); 30 31 item->addFilter(f); 32 m->save("test01.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