Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force IE to check for new swfs?

Status
Not open for further replies.

fizzak

MIS
Feb 6, 2003
331
US
I have this issue, im sure its common. IE7 does not check for updated swf's of sites it's already visited. How can I stop this problem without having clients manipulate IE settings?

Thanks
 
External swfs loaded into main via links on the main. Google says theres a whole issue on this with little or no resolve with few complicated AS scripts. Thanks if you have any ideas or directions.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- BEGIN INSERT --><META HTTP-EQUIV="Expires" CONTENT="Mon, 04 Dec 2008 21:29:02 GMT"><!-- END INSERT --> 
<title>My site</title>
<style type="text/css">
<!--
body {
	background-image: url(back3.gif);
	background-repeat: repeat;
	position: relative;
	width: 760px;
	margin-right: auto;
	margin-left: auto;
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>

<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="770" height="615" id="FlashID" accesskey="b" title="Patrick Graphics">
  <param name="movie" value="myswf.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="6.0.65.0" />
  <param name="allowScriptAccess" value="always" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
  <param name="expressinstall" value="../Scripts/expressInstall.swf" />
  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="myswf.swf" width="770" height="615">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="6.0.65.0" />
    <param name="expressinstall" value="../Scripts/expressInstall.swf" />
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <p><a href="[URL unfurl="true"]http://www.adobe.com/go/getflashplayer"><img[/URL] src="[URL unfurl="true"]http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"[/URL] alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
<!-- BEGIN INSERT --><HEAD><META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"></HEAD><!-- END INSERT --> 
</html>
 
The loader code

Code:
onClipEvent (load) {
    var loading:Number;
    var total:Number;
    var percent:Number = 0;
    var per:Number;
    var percentage:String;
}

onClipEvent (enterFrame) {
	loading = _parent.getBytesLoaded();
	total = _parent.getBytesTotal();
	percent -= (percent-((loading/total)*100))*.10;
	per = int(percent);
	percentage = per+"%";
	LoadBar._width = per;
	if (percent>99) {
		_parent.gotoAndPlay(2);
	}
}
 
I am having this same problem with a project that I am working with. I'm wondering is this a dead thread? No resolution at this time or?

This does have an impact on what I'm doing as we have a complete flash site going up but what I'm seeing is that updates to the swf file are now showing up on our local clients. I'm pretty concerned that we're going to have huge issues with this site not updating properly if I can find a work around for the swf file not updating.

Hope someone has an answer or we may be scrubbing a ton of work for a straight html site.

Thanks,
Chris

I always makes things much harder than they should be... that way later I can slap myself in the forhead after spending hours and hours on two lines of code and say to myself &quot;DUH!&quot;
 
I am having this same problem with a project that I am working with. I'm wondering is this a dead thread? No resolution at this time or?

It looks like there is no efficient solution to this. There was one resolution I happened upon searching google. Sombody offered up some complex AS that wiped the swf cache from the clients computer. But it was too much work for me. I guess it's back to HTML.
 
You cannot clear or empty someone's cache.
And there is a solution to this.
It's simply to add a random number to the end of your movie's name, so that the browser is forced to request a new file from the server, rather than use a previously cached file if one exist.

Regards. CLICK HERE TO DONATE.

VISIT MY FORUM
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top