tags:

views:

226

answers:

1

Hi!

I have a Web page in ASP.NET MVC (C#) and jQuery where I have a swf file that reads its content from a xml file. And to render this swf, I've already tried jQuery Flash plugin, jQuer Media and swfobject.

And in this same page, there is an input text where I write a text and this text will be loaded to the swf via ajax. The text will be saved to the xml file and on ajax "success" option, I empty the div where swf is rendered and load in to that again with the swf but with the text changed.

On the first time, The text is changed. But when I try to change from the 2nd time, the text in swf doesn't change at all. The swf reloads but the text doesn't change. And if I look inside the xml file, it's updated with the text I inserted to, no matter how many times I'm trying to insert the text.

I think that is a cache problem. I don't know. I've tried to empty the div where the flash is rendered... alread tried to remove the div and insert again... but nothing seems to work.

I've already did a meta content=no-cache, but it didn't work it too.

Does anyone know how can this be solved?

thanks!!

A: 

When you load the XML file into flash, put a random querystring at the end of the filename, so it ends up like my_XML.xml?r=123456

Although it seems like a slightly convoluted way to refresh data in the swf - it there a reason you can't pass it directly with javascript?

Andrew
it didn't work!
AndreMiranda
Oh. it really seems like that should have worked. Not sure I can offer much else except to say again that destroying and recreating the swf movie seems an odd tactic, and would look at refreshing the data, or at least triggering an XML reload through javascript -> flash.
Andrew