小能豆

Flash CS4 refuses to let go

javascript

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?


阅读 247

收藏
2023-12-28

共1个答案

小能豆

It sounds like you’re dealing with a lingering issue related to Flash’s compilation cache. To try to resolve this, you might want to take the following steps:

  1. Clean the Project:
  2. In Flash Professional, try using the “Clean” option to remove temporary files and compiled assets. This can often be found under the “File” menu.
  3. If you are using Flash Builder, you can try cleaning the project by right-clicking on the project in the Project Explorer and selecting “Clean.”
  4. Manually Remove Bin and Obj Directories:
  5. Sometimes, issues can be related to the output directories where Flash stores compiled files. Manually delete the bin and obj directories associated with your project. These directories are typically where compiled SWF files and other temporary files are stored.
  6. Check for Hidden Compiler Settings:
  7. Flash may be holding onto compiler settings from a previous configuration. Ensure that there are no hidden compiler settings or custom build configurations causing the old class references to persist.
  8. Restart Flash:
  9. Close and restart Flash Professional or Flash Builder. Sometimes, a simple restart can clear out cached data.
  10. Review Classpath Settings:
  11. Double-check your project’s classpath settings to make sure they correctly point to the new locations of your classes.
  12. Update Flash:
  13. Ensure that you are using the latest version of Flash Professional or Flash Builder. Updates may include bug fixes related to compilation issues.
  14. Check for IDE-Specific Cache:
  15. Flash IDEs may keep additional caches specific to the IDE. Check the IDE’s settings or preferences for any options related to caching and try clearing those caches.
  16. Re-import the Project:
  17. If possible, try re-importing the project into a new workspace or location. This may help to create a fresh set of configurations.

Remember to back up your project before taking any drastic measures, and always be cautious when manually deleting files or directories. If the issue persists, it might be worth exploring community forums or seeking assistance from Adobe support.

2023-12-28