Flex 3, stop running the old version of my SWF!
UPDATE: Turns out it wasn’t so much Flex causing this ruckus, but rather Subversion:
rubenswieringa.com/blog/svn-misplaces-my-flex-project-files
I might’ve also have called this post “How many more times will I have to re-import my projects into Flex Builder 3!?”, this sucks..
Today I decided to work on a project of mine, so I pulled in the latest version from my Subversion-repository and opened up Flex Builder 3.
I started making some additions in classes etc. and eventually I ran the project. To my confusion the SWF I saw didn’t reflect any of the changes I’d made, so I made some bigger changes and still nothing changed in the generated SWF.
Long story short, Flex just kept showing me the SWF of an older version of the project. Nothing I did helped; I cleaned the project, refreshed it, renamed it.
Eventually I worked around this issue by deleting the project (not the files) from Flex Builder and creating a new one (same location and same main project-file).
Although I fixed this thing for now, my (fairly big) concern now is mainly about how many more times I will have to re-import my projects into Flex Builder 3..
My guess is that this has something to do with the compiler-cache and incremental compilation, but either way, I’d really appreciate it if the Flex Builder development-team would fix this.
Any suggestions are more than welcome. ![]()
June 4th, 2008 | Quote
I had the same problem (removed trace statements still showing up in debugger console) and found that my browser was caching the old swf. I installed IE Developer Toolbar (which has a button to really clear your cache) So in my case this was IE problem.
June 3rd, 2008 | Quote
Hey Jeff,
Yes it’s deadweird indeed, I made a follow-up post however and got a comment by someone who had found a solution/workaround that works very well:
http://www.rubenswieringa.com/blog/svn-misplaces-my-flex-project-files#comment-23630
May 20th, 2008 | Quote
I’ve experienced this also and it really threw me off too. I’m not absolutely certain that my solution will work for you, but when I turned off Project > Build Automatically this seemed to help. The html-template files were also a problem for me at one point and getting rid of the swf that was in it helped too.
March 16th, 2008 | Quote
Hey Clayton,
Thanks for that info, I hope it’ll not be necessary, but next time Flex starts ‘compiling’ SWF-files from old versions of my classes I’ll give your way a go. Thanks man!
March 16th, 2008 | Quote
I experienced a similar issue recently:
- worked on a project for 2 days couldn’t wrap it up
- committed to SVN to have my co-worker do some things
- I come back after a day and notice what you are describing
- during editing it never showed any errors but when I ‘compiled’ it, it would show the old version — did you ever get any errors?
What I eventually found:
- in the html-template directory there were two files that should *not* have been in there. They were: ProjectName.html and ProjectName.swf
- so, every time it would ‘compile’ a new version it would overwrite the ProjectName.(html|swf) files in bin-debug or bin-release.
- I don’t know how my co-worker/me put those files in that directory (didn’t bother to check the SVN log). Anyway, after deleting those files it fixed it.
I have experienced a similarly retarded problem in Flash CS3 too but haven’t quite figured out a workaround.
March 15th, 2008 | Quote
No I don’t think that’s the problem, in the run-configuration I’ve changed the settings for this project so that when I run the application it’ll open the SWF, and not the HTML-file. So browser-cache shouldn’t have anything to do with it.. Thanks for the insight though
March 15th, 2008 | Quote
Ruben,
This is occurring since there’s a cached copy of the generated swf in question in your browser. You should check if you’re using any sort of future expiration for files defined in your development web server config (i.e. ExpiresActive for apache). Disabling that should take care of any issues you’re experiencing.
Best,
Ryan