Categories
caching flash flash-cs4

Flash CS4 refuses to let go

2776

I have a Flash project, and it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready – I thought it was time. The new Jenine was better in every way – she had lost some code bloat, she had decoupled herself from a few vestigial class relationships, and she had finally come home to the namespace that she had always secretly known in her heart was the one she truly belonged to. She was among her own kind.

Unfortunately, Flash would have none of that. Perhaps it had formed an attachment. Perhaps it didn’t want Jenine to be decoupled. Either way, it clung to the old, perfect version of Jenine in its memory. It refused to move on. It ignored her (function) calls. It tried to forget her new, public interfaces. Instead, every instance of Jenine that it constructed was always a copy of the old version, down to its classpath:

var jenineInstance:Jenine = new Jenine();
trace( getQualifiedClassName(jenineInstance));
// Should print: com.newnamespace.subspace::Jenine
// Prints: com.oldnamespace.subspace::Jenine
// Ah, young love!

We fought. I’m not proud of some of the things I said or did. In the end, in a towering fit of rage, I deleted all references of Jenine completely. She was utterly, completely erased from the system. My cursor fell upon the “Empty Trash” menu option like the cold lid of a casket.

I don’t think Flash ever recovered. To this day it still clings to the memory of Jenine. Her old, imperfect definitions still float through my project like abandoned ghosts. Whenever I force Flash to compile, it still lovingly inserts her into my movie, nestling her definition in amongst the other, living classes, like a small shrine. I wonder if they can see her.

Flash and I don’t really talk anymore. I write my code, it compiles it. There’s a new girl in town named Summer who looks almost identical to Jenine, as if someone had just copied her source-code wholesale into a new class, but Flash hasn’t shown any interest. Most days it just mopes around and writes bad poetry in my comments when it thinks I’m not looking.

I hope no one else has had a similar experience, that this is just a singular, painful ripple in the horrifying dark lagoon that is the Flash code-base. Does anyone have any idea how to erase whatever cache the compiler is using?

0

    706

    Flash still has the ASO file, which is the compiled byte code for your classes. On Windows, you can see the ASO files here:

    C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\en\Configuration\Classes\aso
    

    On a Mac, the directory structure is similar in /Users/username/Library/Application Support/


    You can remove those files by hand, or in Flash you can select Control->Delete ASO files to remove them.

    3

    • 34

      Copied from below: This and the other, very similar answer are exactly what I was looking for, but unfortunately don’t seem to solve the problem. I’m going to chalk this one up to Adobe bug fun tiem. I’m going to mark it as solved, however.

      – Ender

      Feb 3, 2010 at 19:23

    • 296

      PS: I’ve clicked the menu item over and over. I’ve plunged deep into the file structure in a quest to finally expunge the files that contain the last echoes of Jenine. They aren’t there. When I ask about them, Flash just mumbles something incoherent and stares off into space. I think I can start to hear something over the mad hammering of my mouse button. Jenine is laughing.

      – Ender

      Feb 3, 2010 at 19:25

    • 23

      @Ender, do you experience the same problem if you freshly compile the code on a new box. Like a fresh checkout of the code onto a new computer? This should tell you whether or not it is a problem with the code or things lingering on your filesystem*.

      Jun 3, 2011 at 19:42

    198

    Try deleting your ASO files.

    ASO files are cached compiled versions of your class files. Although the IDE is a lot better at letting go of old caches when changes are made, sometimes you have to manually delete them. To delete ASO files: Control>Delete ASO Files.

    This is also the cause of the “I-am-not-seeing-my-changes-so-let-me-add-a-trace-now-everything-works” bug that was introduced in CS3.

    0

      163

      What if you compile it using another machine? A fresh installed one would be lovely. I hope your machine is not jealous.