Apparat ended up working great for this (I have some legacy files that needed to be modified). I couldn't get Joa's Scala code to work, so I ended up implementing his solution in Java.
- Download binaries.
- Make sure Scala is installed (the libraries are still required, even though the solution is in pure Java).
- Compile and run the code below using the appropriate classpath (pointing to the folder with Apparat binaries as well as your Scala libraries).
javac -classpath ".;apparat/*;C:/path/to/scala/lib/*" SwfEditor.java
java -classpath ".;apparat/*;C:/path/to/scala/lib/*" SwfEditor
import apparat.swf.Swf;
import apparat.abc.Abc;
import apparat.swf.SwfTag;
import scala.collection.Iterator;
import scala.Symbol;
import apparat.swf.DoABC;
class SwfEditor {
public static void main(String[] args){
Swf input = Swf.fromFile("in.swf");
Iterator iter = input.tags().iterator();
while (iter.hasNext()) {
SwfTag tag = iter.next();
if(tag instanceof DoABC) {
DoABC doABCTag = (DoABC) tag;
Abc abc = Abc.fromTag(doABCTag).getOrElse(null);
Symbol[] strings = abc.cpool().strings();
for(int i=0; i