Solved

Caching issue with flash

Posted on 2011-03-21
4
276 Views
Last Modified: 2012-05-11
We have a flash slideshow file that loads links and images from an XML file.  We need the flash file itself to cache like normal behavior, however it seems to be caching the XML file as well.  This file changes regularly, and this is causing a problem.  How can we change this, either through the ActionScript or through the XML file header so that it doesn't cache the XML?

I wish I could offer the sample code that handles the XML request, but I can't get to it at the moment.  I'm going to assume it's a simple XML.load expression and not an XML socket.
0
Comment
Question by:jamesbcox1980
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 250 total points
ID: 35178919
add a random number to the xml url path while calling from flash, like this:

var r:Number = Math.Random();
new URLRequest( "http://womedomain.com/xml/sample.xml?r="+r);

Warm Regards
Deepanjan Das
0
 
LVL 19

Assisted Solution

by:quizengine
quizengine earned 250 total points
ID: 35178925
0
 
LVL 4

Author Comment

by:jamesbcox1980
ID: 35178944
Thanks, we will try adding the "?nocache=" and the date/time.  It appears to the safest way, however improbable it might be that we will get the same random number twice.  I'll try tomorrow and let you know how it works.
0
 
LVL 4

Author Closing Comment

by:jamesbcox1980
ID: 35200465
Thanks, both answers work equally.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now