git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed two bugs in font2swf
[swftools.git]
/
src
/
as3compile.c
diff --git
a/src/as3compile.c
b/src/as3compile.c
index
4f0193e
..
89252f5
100644
(file)
--- a/
src/as3compile.c
+++ b/
src/as3compile.c
@@
-38,6
+38,8
@@
static double width = 400;
static double height = 300;
static int flashversion = 9;
static int verbose = 1;
static double height = 300;
static int flashversion = 9;
static int verbose = 1;
+static char local_with_networking = 0;
+static char local_with_filesystem = 0;
static struct options_t options[] = {
{"h", "help"},
static struct options_t options[] = {
{"h", "help"},
@@
-102,6
+104,16
@@
int args_callback_option(char*name,char*val)
as3_add_include_dir(val);
return 1;
}
as3_add_include_dir(val);
return 1;
}
+ else if (!strcmp(name, "N"))
+ {
+ local_with_networking = 1;
+ return 0;
+ }
+ else if (!strcmp(name, "L"))
+ {
+ local_with_filesystem = 1;
+ return 0;
+ }
else {
printf("Unknown option: -%s\n", name);
exit(1);
else {
printf("Unknown option: -%s\n", name);
exit(1);
@@
-218,6
+230,11
@@
int main (int argc,char ** argv)
tag = swf_InsertTag(tag, ST_END);
swf_FreeABC(code);
tag = swf_InsertTag(tag, ST_END);
swf_FreeABC(code);
+
+ if(local_with_filesystem)
+ swf.fileAttributes &= ~FILEATTRIBUTE_USENETWORK;
+ if(local_with_networking)
+ swf.fileAttributes |= FILEATTRIBUTE_USENETWORK;
writeSWF(&swf);
swf_FreeTags(&swf);
writeSWF(&swf);
swf_FreeTags(&swf);