mingshape.swf
Submitted by bwy on Wed, 05.11.2008 - 21:00
#include <ming.h>
int main(int argc, char** argv)
{
SWFMovie movie;
SWFShape shape;
SWFDisplayItem it;
int red, green, blue, alpha, thickness, x, y, width, height;
Ming_init();
movie = newSWFMovieWithVersion(7);
SWFMovie_setDimension(movie, 300, 200);
SWFMovie_setRate (movie, 1.0);
shape = newSWFShape();
thickness = 5;
red = 0x66;
green = 0x00;
blue = 0x66;
alpha = 0xff;
SWFShape_setLine(shape, thickness, red, green, blue, alpha);
x = 20;
y = 30;
width = 20;
height = 20;
SWFShape_movePenTo(shape, x, y);
SWFShape_drawLineTo(shape, x, y + height);
SWFShape_drawLineTo(shape, x + width, y + height);
SWFShape_drawLineTo(shape, x + width, y);
SWFShape_drawLineTo(shape, x, y);
it = SWFMovie_add(movie, shape);
SWFMovie_nextFrame(movie);
SWFDisplayItem_moveTo(it, 40, 50);
SWFMovie_nextFrame(movie);
SWFDisplayItem_scale(it, 1.5, 0.75);
SWFMovie_nextFrame(movie);
red = 0x45;
blue = 0x33;
green = 0x80;
alpha = 0x88;
SWFDisplayItem_addColor(it, red, blue, green, alpha);
SWFMovie_nextFrame(movie);
SWFDisplayItem_skewX(it, 1.4);
SWFMovie_nextFrame(movie);
SWFDisplayItem_multColor(it, 1, 2, 3, 1);
SWFMovie_nextFrame(movie);
SWFDisplayItem_skewYTo(it, 0.8);
SWFMovie_nextFrame(movie);
SWFMovie_save(movie, "mingshape.swf");
return 0;
}