Industry links | Danish game productions | Contact | Latest threads |
Google Translate |

| Main forum | Site Content | Jobs | Showcase | Development | Offtopic |


| Event Calender |

Username:   Password:   Log me on automatically each visit  





Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Flash + Flex
PostPosted: 17 Jul 2010, 22:11 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
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

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 18 Jul 2010, 00:11 
Offline
Level 52 - Counterstrike terrorist

Joined: 12 Mar 2008, 15:18
Posts: 525
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


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 18 Jul 2010, 00:19 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
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.


Hi Zacker,

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

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 18 Jul 2010, 10:23 
Offline
Level 22 - Imp

Joined: 10 Mar 2008, 00:11
Posts: 227
Location: London, UK
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.

_________________
Gorm - International Hobo and Samurai Programmer
MULE Returns
Twitter


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 18 Jul 2010, 19:39 
Offline
Level 8 - Summoner

Joined: 02 May 2008, 13:44
Posts: 86
Location: København
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.


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 18 Jul 2010, 19:42 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
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.


Hi Christen,

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

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 11 Aug 2010, 11:52 
Offline
Level 0 - Null

Joined: 11 Aug 2010, 11:42
Posts: 1
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!


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 11 Aug 2010, 11:54 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
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!


Hi Nixudos,

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

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 26 Sep 2010, 23:36 
Offline
Level 0 - Null

Joined: 26 Sep 2010, 23:12
Posts: 1
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):
Code:
"yourswf.swf?"+OnTheFlyGeneratedRandomValue


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 :)


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 27 Sep 2010, 08:50 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
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):
Code:
"yourswf.swf?"+OnTheFlyGeneratedRandomValue


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 :)


Hi,

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

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 01 Nov 2010, 11:24 
Offline
Level 0 - Null

Joined: 09 Mar 2010, 12:50
Posts: 8
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.


Top
 Profile  
 
 Post subject: Re: Flash + Flex
PostPosted: 01 Nov 2010, 11:25 
Offline
Level 7 - Spellcaster
User avatar

Joined: 13 Mar 2008, 17:57
Posts: 72
Location: Odense C
Hi,

I am using a flash debugger :)

doesn't solve the problem.

regards,
Peter

_________________
kind regards,
Peter Wraae Marino

http://www.osghelp.com - support site for OpenSceneGraph


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.