Editing old and long abandoned Flash SWF code.
TL;DR. I need a lazyweb recipe or help for swf->decompile->edit->recompile->swf

Today's trip down the computing rabbit hole is all about Flash and old code. I was a user of a bit of clever code called Tuneglue that allowed you to wander round and visualise the links between music artists. You put in one artist, hit expand and it would query last.fm for similar artists and then build a rubber band mesh of the links. It was a great way of exploring musical artist space. The people who wrote it disappeared, leaving a ghost web site behind[1]. The people who hosted it[2] were bought by EMI who then killed the web server. We found the page on the internet archive[3] and amazingly the Flash code still worked. So I grabbed a copy and put it on my website[4]. All went well till about 10 days ago. Then last.fm[5] went live with their beta and killed the V1 of their API used by the flash code[7]. The example data[8] and V1 is really not that different from V2[9].

So I thought, maybe I can decompile the flash .swf file, make a few changes to support v2 or the last.fm API and then recompile it. I found an online site that will decompile swf[10] Deep in the code, the call to last.fm and the xml parsing looks pretty simple.
  Xml.load(("http://ws.audioscrobbler.com/1.0/artist/" + UrlEncode(this.Artist)) + "/similar.xml");
  while (E < EMIArtists.length) {
    EMIArray.push(Xml.childNodes[0].childNodes[E].childNodes[0].childNodes[0].nodeValue);
    etc

This doesn't look hard. There's only half a dozen lines that need changing to support last.fm API v2 and I think I can puzzle out the syntax and make it work. So then I started looking for tools to do the swf->decompile->recompile->swf round trip.

And that's when I fell down the rabbit hole into other decompilers[11], IDEs, numerous support environments (Java! Ugh!), confusion about what language I was looking at, missing project files, huge downloads that wouldn't install, install files that the anti-virus took 10 minutes to decide were ok, support forums populated by idiots, trial versions of software, abandoned open source projects, and so on and so on. Right now, I've just given up in disgust.

So, dearest Lazyweb. Is there anyone out there who's ever successfully done swf->decompile->recompile->swf and can provide a recipe? Or even better is there another music obsessive who wants to take a stab at doing it?

Always assuming that last.fm don't just resurrect the API V1. They're looking hugely incompetent at the moment so I'm not holding out a lot of hope. 

http://voidstar.com/tuneglue/

[1]http://www.onyro.com/
[2]http://audiomap.tuneglue.net
[3]https://web.archive.org/web/20140328020033/http://audiomap.tuneglue.net/
[4]http://voidstar.com/tuneglue/
[5]http://www.last.fm/
[6]https://getsatisfaction.com/lastfm/topics/will-v1-0-of-the-api-come-back-online
[7]https://web.archive.org/web/20060911141306/http://www.audioscrobbler.net/data/webservices/#Artist Data
[8]https://web.archive.org/web/20061231223630/http://ws.audioscrobbler.com/1.0/artist/Metallica/similar.xml
[9]http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=metallica&api_key=d50ed5584be64a1564a5d1a12e3fef7f
[10]http://www.showmycode.com/
[11]https://www.free-decompiler.com/flash/
[from: Google+ Posts]


[ << Is there an RSS/Atom feed for Google Photos? And preferably one that's as easy to use and consume as... ] [ Some last.fm data >> ]
[ 24-Aug-15 2:57pm ]