1 #include <mingpp.h> 2 #include <cstdlib> 3 4 main()5main(){ 6 try { 7 SWFMovie* m = new SWFMovie(); 8 9 m->setFrames(2); 10 11 // SWF_SETBACKGROUNDCOLOR 12 m->setBackground(0xff, 0xff, 0xff); 13 14 // SWF_SHOWFRAME 15 m->nextFrame(); // end of frame 1 16 17 // SWF_DOACTION 18 m->add(new SWFAction("var a = 1;\ 19 ") ); 20 21 // SWF_SHOWFRAME 22 m->nextFrame(); // end of frame 2 23 24 // SWF_END 25 26 m->save("test02.swf"); 27 } 28 catch(SWFException &e) 29 { 30 std::cerr << "SWFException: " << e.what() << std::endl << std::endl; 31 return EXIT_FAILURE; 32 } 33 return 0; 34 } 35