{"X", "width"},
{"Y", "height"},
{"r", "rate"},
+{"M", "mainclass"},
{"l", "library"},
{"I", "include"},
{"N", "local-with-network"},
return 0;
}
else if(!strcmp(name, "D")) {
+ if(!strstr(val, "::")) {
+ fprintf(stderr, "Error: compile definition must contain \"::\"\n");
+ exit(1);
+ }
as3_set_define(val);
return 1;
}
printf("-X , --width Set target SWF width\n");
printf("-Y , --height Set target SWF width\n");
printf("-r , --rate Set target SWF framerate\n");
+ printf("-M , --mainclass Set the name of the main class (extending flash.display.MovieClip or .Sprite)\n");
printf("-l , --library <file> Include library file <file>. <file> can be an .abc or .swf file.\n");
printf("-I , --include <dir> Add additional include dir <dir>.\n");
printf("-N , --local-with-network Make output file \"local with networking\"\n");
} else {
as3_add_include_dir(currentdir);
}
- registry_init();
int t;
processargs(argc, argv);
//as3_warning("output name not given, writing to %s", outputname);
}
- as3_parse_file(filename);
+ if(!strcmp(filename, ".")) {
+ as3_parse_directory(".");
+ } else {
+ as3_parse_file(filename);
+ }
+
void*code = as3_getcode();
SWF swf;
tag = swf_InsertTag(tag, ST_SYMBOLCLASS);
swf_SetU16(tag, 1);
swf_SetU16(tag, 0);
- swf_SetString(tag, as3_getglobalclass());
+ swf_SetString(tag, mainclass);
} else {
as3_warning("no global public MovieClip subclass");
}