You can use Apparat for this kind of task. It allows you to alter ActionScript 3 bytecode in SWF and SWC files.
I would prefer the Scala source branch for your task. Basically the code would look like this:
val swf = Swf from "in.swf"
for(tag <- swf.tags) {
(Abc fromTag tag) match {
case Some(abc) => {
val strings = abc.cpool.strings
for(i <- 1 until strings.length) {
if(strings(i) == 'search) {
strings(i) = 'replacement
}
}
abc write tag
}
case None =>
}
swf write "out.swf"