1 #include <mingpp.h>
2 #include <cstdlib>
3
4
main()5 int main()
6 {
7 int i;
8 try {
9 SWFMovie *m = new SWFMovie(8);
10
11 SWFMorph *morph = new SWFMorph();
12
13 SWFShape *shape1 = morph->getShape1();
14 SWFShape *shape2 = morph->getShape2();
15
16 shape1->setLineStyle(4, 25, 0, 0, 128);
17 shape1->movePenTo(5, 5);
18 shape1->drawLineTo(50, 30);
19
20 shape2->setLineStyle(4, 25, 0, 0, 128);
21 shape2->movePenTo(5, 5);
22 shape2->drawLineTo(50, 130);
23
24 SWFDisplayItem *item = m->add(morph);
25 for(i = 0; i < 10; i++)
26 {
27 item->setRatio(0.1 * i);
28 m->nextFrame();
29 }
30 m->save("test01.swf");
31 }
32 catch(SWFException &e)
33 {
34 std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
35 return EXIT_FAILURE;
36 }
37 return 0;
38 }
39