swf file does not update when modified.

firemountain - March 28, 2009 - 08:02
Project:Flash Node
Version:6.x-3.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am using a flashnode and very thankful to the creator of this easy to use mod.

it is the only way i have been able to use the great flash maps at http://ammap.com

i have encountered a problem though . the swf i use is informed by various xml files. i have it all working. but the problem is that when i update an xml file to add something to the swf and save it, nothing happens. only when i move the files to a new folder and change the base accordingly does the change take effect. this is a big issue because i want to be able to alow no site admins the ability to add xml info without having to shift the files around everytime in order for things to show up.

after shifiting the files it works but without it remains as it was before any changes where made to the xml files

i am quite fresh with all this flash stuff so i may be missing something silly, but please advise..

why do you suppose this is happening.

p.s. i am using this on a localhost with mamp right now.

thanks!

-FM

#1

Stuart Greenfield - March 28, 2009 - 09:12

It sounds like maybe the xml file is being cached? That would explain why moving the file around makes it work - it thinks it is a new file, so you get served the new page.

As a test can you try changing the xml, then clear your browser cache, and then try again. swf and xml does have a tendency to be cached by browsers, so make changes don't ripple through straight away.

#2

firemountain - March 29, 2009 - 02:39

cheers!

yes that works, But the bigger question is how stop the xml from being chached. i am kind a of a novice so if this is simple forgive my ignorance.

Thank you!

-Fire mountain

#3

firemountain - March 29, 2009 - 02:40

p.s. this was driving me nuts for hours! you are so awsome for responding- yippie!
- FM

#4

Stuart Greenfield - March 29, 2009 - 09:32

There are a few tricks to preventing caching, but these generally involve adding some dummy parameters at the end of the filename, e.g. time() or something, to make browser think it is new.

I don't have a convenient file to hand to test this with, but in flash node you might be able to create this effect by using PHP as the input format on the node, and then you can use PHP to create a flashvar, e.g.

file=123.xml?<?php print time(); ?>

That appends the time on the filename, making the browser think it's new.

If you're using this with SWF Tools then the ? gets encoded, so I'm not sure if that might cause a problem, but it's worth trying.

 
 

Drupal is a registered trademark of Dries Buytaert.