static void RemoveExports(string path) { var swf = new SwfMovie(); swf.Load(path, SwfTagDecodeOptions.DonotDecodeTags); for (int i = 0; i < swf.Tags.Count; ++i) { var tag = swf.Tags[i]; if (tag.TagCode == SwfTagCode.ExportAssets) { swf.Tags.RemoveAt(i); --i; } } swf.Save(path + ".noexports.swf"); }
public SwfMovie GetLibrary(string name) { InitLibElems(); if (string.IsNullOrEmpty(name)) { name = LIBRARY_SWF; } var libElem = _libElems[name]; if (libElem == null) { name = name + ".swf"; libElem = _libElems[name]; } if (libElem == null) { throw new ArgumentException(string.Format("Unable to find library {0}", name)); } var lib = _libs[name]; if (lib != null) { return(lib); } var stream = _zip.ExtractEntry(name); if (stream == null) { return(null); } lib = new SwfMovie(); lib.Load(stream, _tagDecodeOptions); lib.Index = _libs.Count; lib.Name = name; lib.Swc = this; lib.SwcElement = libElem; _libs.Add(lib); //CacheScripts(lib); return(lib); }