Flex 3, stop running the old version of my SWF!
by Ruben
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.
Comments (also one trackback, click to show)
Trackbacks:
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
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
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.
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!
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.
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
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.
Same problem here. I really doubt about the CACHE function of flexbuilder. It worked so weird!
Thanks linux flex builder was doing this to me and it wouldnt compile the latest flex swf until i removed the project and reimported it.
Thanks again for the help
Do you happen to know how to recreate the .html and .swf file?
Hey Jason, what exactly do you mean?
Encountered this error as well soon after commiting into a SVN repository… it sucks
First of all …
can i get an AMEN !?!
This is one of THE most obnoxiously frustrating problems i have ever run into with flash/flex development to date. I mean I add a trace statement and not only does it not show up, but the previous one i added disappears too??? bizzare…
But it is a truly wild zoo of caching, copying, updating, and compiling.
Sometimes FF (or in shannon’s case IE) is the problem, sometimes it can be svn, sometimes flex…
what to do??? for me, this time UNCHECKING the copy non-embedded assets option in the compiler tab worked (and altering my alt script to copy the asset files directly to the live debugging directory instead of relying on flex to do it properly)
good luck guys… please post if you come up with any brilliant single click clean, build, launch and debug solutions
lucky you!! my flex doesn’t build my swf anymore and I’m here trying to find why…
This issue is reported on the flex bug tracker. You can see it here and vote for the issue (it has very low priority). I added a comment with reference to this blog.
http://bugs.adobe.com/jira/browse/FB-11958