1 #include <mingpp.h>
2 #include <cstdlib>
3
4 // static char *test = "test03";
5
main()6 int main()
7 {
8 SWFMovie *m;
9 SWFShape *shape;
10 SWFButton *b;
11 SWFDisplayItem *item;
12 SWFBlur *blur;
13 SWFFilter *f;
14 SWFColor c;
15
16 try {
17 Ming_init();
18 m = new SWFMovie(7);
19 shape = new SWFShape();
20
21 shape->setLine(4, 25, 0, 0, 128);
22 shape->movePenTo(5, 5);
23 shape->drawLineTo( 0, 10);
24
25 blur = new SWFBlur(5,5,2);
26 c.red = 0;
27 c.green = 0;
28 c.blue = 0;
29 c.alpha = 0xff;
30
31 f = SWFFilter::GlowFilter(c, blur, 1.0, FILTER_MODE_INNER | FILTER_MODE_KO);
32
33 b = new SWFButton();
34 b->addShape(shape, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN);
35 item = m->add(b);
36
37 item->addFilter(f);
38 m->save("test03.swf");
39 }
40 catch(SWFException &e)
41 {
42 std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
43 return EXIT_FAILURE;
44 }
45 return 0;
46 }
47