Syndicate content

xml

flash & caching

Anybody thats done any development work in Flash knows how frustrating caching can be. With the introduction of external XML data this frustration only grows. So here's a technique that I use quite often to workaround this native behavior without creating a thousand incremental file names.

Using PHP, Javascript or the like, simply add a random number to the url string where you call your swf. Here's a couple examples..

PHP
fla/secParent.swf?noCache=<?php echo rand(0, 10000); ?>


crossdomain.xml policy files

I hadn't even heard of this until tailing some apache logs turned up several dropped requests for a file called crossdomain.xml. With the advent of Flash Version 7, Macromedia introduced policy files that govern which domains a Flash movie is allowed to access data from.