Windows/MFC
SWFLIB - a free Flash authoring library
aucd29
2013. 10. 2. 18:09
Link : http://www.codeproject.com/audio/SWFLIB.asp
#include "SWFMovie.h"
SIZE_F movieSize = {400, 400};
int frameRate = 12;
CSWFMovie swfMovie;
// Open new .SWF file
swfMovie.OpenSWFFile("Sample.swf", movieSize, frameRate);
// Define a simple shape
USHORT nID = 1;
USHORT depth = 1;
RECT_F shapeRect = {0, 0, 200, 200};
CSWFShape shape(nID, shapeRect, depth);
int lineWidth = 2;
SWF_RGBA lineColor = {255, 0, 0, 255};
shape.AddLineStyle(lineWidth, lineColor);
SWF_RGBA fillColor = {0, 0, 255, 255};
shape.AddSolidFillStyle(fillColor);
shape.AddLineSegment(100, 0);
shape.AddLineSegment(0, 100);
shape.AddLineSegment(-100, 0);
shape.AddLineSegment(0, -100);
swfMovie.AddShape(&shape, shape.m_Depth, true);
swfMovie.ShowFrame();
// Close .SWF file
swfMovie.CloseSWFFile();
#include "SWFMovie.h"
SIZE_F movieSize = {400, 400};
int frameRate = 12;
CSWFMovie swfMovie;
// Open new .SWF file
swfMovie.OpenSWFFile("Sample.swf", movieSize, frameRate);
// Define a simple shape
USHORT nID = 1;
USHORT depth = 1;
RECT_F shapeRect = {0, 0, 200, 200};
CSWFShape shape(nID, shapeRect, depth);
int lineWidth = 2;
SWF_RGBA lineColor = {255, 0, 0, 255};
shape.AddLineStyle(lineWidth, lineColor);
SWF_RGBA fillColor = {0, 0, 255, 255};
shape.AddSolidFillStyle(fillColor);
shape.AddLineSegment(100, 0);
shape.AddLineSegment(0, 100);
shape.AddLineSegment(-100, 0);
shape.AddLineSegment(0, -100);
swfMovie.AddShape(&shape, shape.m_Depth, true);
swfMovie.ShowFrame();
// Close .SWF file
swfMovie.CloseSWFFile();