3 Creates the swf file PreLoaderTemplate.swf.
5 Part of the swftools package.
7 Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
9 This file is distributed under the GPL, see file COPYING for details
19 int main (int argc,char ** argv)
26 S32 width = 826, height = 1169;
32 memset(&swf,0x00,sizeof(SWF)); // set global movie parameters
34 swf.fileVersion = 4; // make flash 4 compatible swf
35 swf.frameRate = 0x1900; // about 0x19 frames per second
37 swf.movieSize.xmax = 20*width; // flash units: 1 pixel = 20 units
38 swf.movieSize.ymax = 20*height;
40 swf.firstTag = swf_InsertTag(NULL,ST_SETBACKGROUNDCOLOR);
47 tag = swf_InsertTag(tag,ST_DEFINESPRITE);
48 swf_SetU16(tag, 1); //id
49 swf_SetU16(tag, 0); //frames
50 tag = swf_InsertTag(tag,ST_END);
51 tag = swf_InsertTag(tag,ST_PLACEOBJECT2);
52 swf_ObjectPlace(tag, 1, 1, 0, 0, "loader");
54 tag = swf_InsertTag(tag,ST_SHOWFRAME);
56 a1 = swf_ActionStart(tag);
57 action_PushFloat(12.0);
58 action_PushString("");
60 action_PushFloat(2.0);
67 a2 = swf_ActionStart(tag);
72 tag = swf_InsertTag(tag,ST_DOACTION);
73 swf_ActionSet(tag, a1);
75 tag = swf_InsertTag(tag,ST_SHOWFRAME);
77 tag = swf_InsertTag(tag,ST_DOACTION);
78 swf_ActionSet(tag, a2);
80 tag = swf_InsertTag(tag,ST_REMOVEOBJECT2);
83 tag = swf_InsertTag(tag,ST_DEFINESPRITE);
84 swf_SetU16(tag, 2); //id
85 swf_SetU16(tag, 0); //frames
86 tag = swf_InsertTag(tag,ST_END);
87 tag = swf_InsertTag(tag,ST_PLACEOBJECT2);
88 swf_ObjectPlace(tag, 2, 2, 0, 0, "movie");
90 tag = swf_InsertTag(tag,ST_SHOWFRAME);
92 tag = swf_InsertTag(tag,ST_END);
94 f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
95 if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
98 swf_FreeTags(&swf); // cleanup