是的,如果真的很重要,而且你想花时间,可以通过改变里面的swf和目录来修改swc中的包。
这是一个使用SWFWire Decompiler的示例 AIR 项目:
public class SWFWireCompiler extends Sprite
{
public function SWCEditor()
{
stage.nativeWindow.activate();
var bytes:ByteArray = getBytes('library.swf');
var swfReader:SWFReader = new SWF10Reader();
var readResult:SWFReadResult = swfReader.read(new SWFByteArray(bytes));
readResult.swf.header.signature = SWFHeader.UNCOMPRESSED_SIGNATURE;
for each(var tag:SWFTag in readResult.swf.tags)
{
var abcTag:DoABCTag = tag as DoABCTag;
if(abcTag)
{
for each(var string:StringToken in abcTag.abcFile.cpool.strings)
{
if(string.utf8 == 'de.polygonal.ds')
{
string.utf8 = 'de.polygonal.ds.old';
}
}
}
}
var swfWriter:SWFWriter = new SWF10Writer();
var writeResult:SWFWriteResult = swfWriter.write(readResult.swf);
writeBytes('C:\\output.swf', writeResult.bytes);
}
private function getBytes(file:String):ByteArray
{
var bytes:ByteArray = new ByteArray();
var stream:FileStream = new FileStream();
stream.open(File.applicationDirectory.resolvePath(file), FileMode.READ);
stream.readBytes(bytes);
stream.close();
return bytes;
}
private function writeBytes(filename:String, bytes:ByteArray):void
{
var file:File = new File(filename);
var fs:FileStream = new FileStream();
fs.open(file, FileMode.WRITE);
fs.writeBytes(bytes);
fs.close();
}
}
然后,您必须在 catalog.xml 中进行查找/替换,然后重新打包它。