Flash + Flex
Flash + Flex
Hi users,
I have the for last 14 days been trying to teach myself flash + flex.. everything is going well (and pretty easy)... but
I have major problems with the browser caching the swf making it hard for me to do changes and see the result.
I have surf the entire internet and I can see this is a common problem, but funny enough nobody has a valid solution for it. Does anyone know how to solve this problem.
regards,
Peter
I have the for last 14 days been trying to teach myself flash + flex.. everything is going well (and pretty easy)... but
I have major problems with the browser caching the swf making it hard for me to do changes and see the result.
I have surf the entire internet and I can see this is a common problem, but funny enough nobody has a valid solution for it. Does anyone know how to solve this problem.
regards,
Peter
Re: Flash + Flex
It's been a while since my Flash days, but I do indeed remember that issue. If I remember correctly I think the forced refresh (ctrl+f5) did help, you can try that.
Michael 'Zacker' Schmidt
Portfolio | LinkedIn | Twitter
Pirates of New Horizons | Exit Strategy Entertainment
Portfolio | LinkedIn | Twitter
Pirates of New Horizons | Exit Strategy Entertainment
Re: Flash + Flex
Hi Zacker,Zacker wrote:It's been a while since my Flash days, but I do indeed remember that issue. If I remember correctly I think the forced refresh (ctrl+f5) did help, you can try that.
yea.. I have tried that too.. without luck :(
the only thing that really works is going into the "options" and clearing the cache... but this kinda' sux because it clears cache for everything... but it works 100%
regards,
Peter
Re: Flash + Flex
I am not sure if you are only using Action Script 3 (ie only the flex parts). If so, in the past, I have just used FlashDevelop to code my stuff in, and it starts up an external .swf viewer so no need to use a browser and it also gets rid of the reload problem.
I only needed to start the browser, when tampering with the html page hosting the flash file.
I only needed to start the browser, when tampering with the html page hosting the flash file.
Re: Flash + Flex
What Gorm said
Or..
If you are using a browser use firefox. Use ctrl+delete and enter then you clear the cash. You can also choose what in cash you want to clear. So you only clear downloaded files, not passwords cookies asf. Another option is to put something after the flash file you are loading. IE. something.swf?randaomstuff=12312 which should force your browser to get a new version.
Or..
If you are using a browser use firefox. Use ctrl+delete and enter then you clear the cash. You can also choose what in cash you want to clear. So you only clear downloaded files, not passwords cookies asf. Another option is to put something after the flash file you are loading. IE. something.swf?randaomstuff=12312 which should force your browser to get a new version.
Re: Flash + Flex
Hi Christen,Christen wrote:What Gorm said
Or..
If you are using a browser use firefox. Use ctrl+delete and enter then you clear the cash. You can also choose what in cash you want to clear. So you only clear downloaded files, not passwords cookies asf. Another option is to put something after the flash file you are loading. IE. something.swf?randaomstuff=12312 which should force your browser to get a new version.
I've tried the adding a random generated parameter in... Flex uses an index.template.html file... it doesn't work. but to be fair I don't see the url parameters in the console when it loads the swf.. so I really don't know if it is processing the index.template.html file correctly... other areas in the index.template.html are generated correctly (I'm sending flashVars) and they come just fine
Peter
Re: Flash + Flex
You usually need to clear your cache to be sure you get the latest swf. I made it a habit always to clear and the close and reopen the browser when testing Flex projects. Might be overkill but then I know for sure it is the right swf I'm testing.
Sometimes it might not be the browser that is the issue, but that the swf weren't able to compile because of errors. To verify if that is the case you can manually delete the swf in the "bin-debug" folder and see if Flex can build a fresh one.
Best of luck!
Sometimes it might not be the browser that is the issue, but that the swf weren't able to compile because of errors. To verify if that is the case you can manually delete the swf in the "bin-debug" folder and see if Flex can build a fresh one.
Best of luck!
Re: Flash + Flex
Hi Nixudos,nixudos wrote:You usually need to clear your cache to be sure you get the latest swf. I made it a habit always to clear and the close and reopen the browser when testing Flex projects. Might be overkill but then I know for sure it is the right swf I'm testing.
Sometimes it might not be the browser that is the issue, but that the swf weren't able to compile because of errors. To verify if that is the case you can manually delete the swf in the "bin-debug" folder and see if Flex can build a fresh one.
Best of luck!
it is the browser.. the browser is doing what a browser should do (just a pain when developing). Clearing the cache every time is a pain.. and it also clears the cache for everything not just the swf file, so it's a very bad work-around.
I still haven't found a solution that is acceptable yet...
regards,
Peter
Re: Flash + Flex
Yeah it is the browser cache - you can solve it by making the browser "think" it is a new file everytime it loads by appending a random value when you load the swf.
You want to end up with something like this:
"yourswf.swf?4385656783"
That means you need to load with something like this (from within flash):
This can be done in your preloader and might also work directly in your html file...
The latter will require php (or somthing like that) and look somthing like this:
"yourswf.swf?value="+<?php <?php echo mt_rand(); ?>
Does that makes sence? (...or somthing
You want to end up with something like this:
"yourswf.swf?4385656783"
That means you need to load with something like this (from within flash):
Code: Select all
"yourswf.swf?"+OnTheFlyGeneratedRandomValue
The latter will require php (or somthing like that) and look somthing like this:
"yourswf.swf?value="+<?php <?php echo mt_rand(); ?>
Does that makes sence? (...or somthing
Re: Flash + Flex
Hi,ofktoubro wrote:Yeah it is the browser cache - you can solve it by making the browser "think" it is a new file everytime it loads by appending a random value when you load the swf.
You want to end up with something like this:
"yourswf.swf?4385656783"
That means you need to load with something like this (from within flash):This can be done in your preloader and might also work directly in your html file...Code: Select all
"yourswf.swf?"+OnTheFlyGeneratedRandomValue
The latter will require php (or somthing like that) and look somthing like this:
"yourswf.swf?value="+<?php <?php echo mt_rand(); ?>
Does that makes sence? (...or somthing
yea I understand what you doing.. and I have tried that method.. still doesn't work.
it seems the cache systems are much smarter.
regards,
Peter
Re: Flash + Flex
I'm confused. Is it that you want to debug/test your code and do it in the browser? or is it a "final" that you put online or something?
Regardless, if you are debugging you should use a flash debugger http://www.adobe.com/support/flashplayer/downloads.html
"Download the Windows Flash Player 9 Projector content debugger" and set windows to open swf files with that exe.
When you finally embed it into a html page, then you can do the ctrl+reload to make a hard reload of the swf file.
Regardless, if you are debugging you should use a flash debugger http://www.adobe.com/support/flashplayer/downloads.html
"Download the Windows Flash Player 9 Projector content debugger" and set windows to open swf files with that exe.
When you finally embed it into a html page, then you can do the ctrl+reload to make a hard reload of the swf file.
Nicki Thomas Hansen
Senior Developer @ Kiloo
Senior Developer @ Kiloo
Re: Flash + Flex
Hi,
I am using a flash debugger
doesn't solve the problem.
regards,
Peter
I am using a flash debugger
doesn't solve the problem.
regards,
Peter