> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of erixtekila
> Sent: Thursday, June 08, 2006 11:34 AM
> To: Open Source Flash Mailing List
> Subject: Re: [osflash] Eclipse ANT build - clear browser cache
>
>
> > To avoid the caching of the internal loaded SWFs (XMLs
> probably too)
> > you
> > have to use the same method as for your main movie. Add the
> > random-string to
> > every loaded swf, xml.
> >
> I also use this technique internally for both dev and production
> releases.
> I launch all with from ant to the borwser.
> That way tyou get consistent behavior.
>
> Best.
Me too. Let me explain my technique:
I have a config.xml which contains a buildNumber.
When having e.g. PHP on the serverside I use PHP to read out the buildNumber
which is added to the embedded swf. The effect is that when you increment
the buildNumber in the config.xml the new swf is fetched from the server.
This buildNumber is also used to load additional external stuff like jpg,
swf, xml etc.
Doing this with SWFObject it look like this:
<body>
<div id="flashcontent">
<strong>You need to upgrade your Flash Player</strong>
<a href="http://adobe.com/go/getflashplayer">Download Flash
Player 8 here.</a>
If you are sure you have Flash Player 8 installed click <a
href="index.php?detectflash=false">here</a>.
</div>
<script type="text/javascript">
// <![CDATA[
<?php
$dom = new DOMDocument();
$dom->load("config.xml");
$bnNode = $dom->getElementsByTagName("buildNumber");
$bn = $bnNode->item(0)->nodeValue;
?>
var fo = new FlashObject("index.swf?buildNumber=<?php print
$bn; ?>", "movie", "100%", 500, "8", "#FFFFFF");
// use rand() for testing locally to avoid incrementing
everytime you test
// var fo = new FlashObject("index.swf?buildNumber=<?php
print rand(); ?>", "movie", "100%", 500, "8", "#FFFFFF");
fo.write("flashcontent");
// ]]>
</script>
</body>
Cheers,
Sönke
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org