Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-07-2008, 10:03 PM   #1
tigomark
Registered User
 
Join Date: Oct 2007
Posts: 41
Wink caching with action script

Is there a way to write an action script that will make sure that caching is set to zero.

I handle caching in my php script

Code:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");          // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-cache, must-revalidate");        // HTTP/1.1
however the flash player seems to not respect the caching script and thus the information outputed does not update.
tigomark is offline   Reply With Quote
Old 01-08-2008, 10:07 AM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

ActionScript Code:
var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");            var request:URLRequest = new URLRequest("URL");            request.requestHeaders.push(header);
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 01-08-2008, 04:42 PM   #3
tigomark
Registered User
 
Join Date: Oct 2007
Posts: 41
Default

Ok so I put this code into my function

Code:
   private function resetForm():void{
        
		var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
        var request:URLRequest = new URLRequest("https://mysite.net/interface.php?action=showopen&operation=showassets&format=xml&opstatus=crit");
        request.requestHeaders.push(header);
        	
        tempXML.asset = tempXML.asset;
        }
And there is no change. My onclick event will reset hover over information and any clicked info but the form won't reset and any new iformation will not be displayed. Is there soemthing that I am missing?
tigomark is offline   Reply With Quote
Old 01-08-2008, 05:03 PM   #4
tigomark
Registered User
 
Join Date: Oct 2007
Posts: 41
Default

also this is originally called once the state is changed at

Code:
<mx:XML id="tempXML" source="https://mysite.net/interface.php?action=showopen&amp;operation=showassets&amp;format=xml&amp;opstatus=defect" />
	
	<mx:TileList dataProvider="{tempXML.asset.fleet}" 
		width="344" backgroundColor="#000000" color="#ff0000" fontSize="27" borderColor="#000000" columnWidth="300" rowHeight="50" themeColor="#808080" fontWeight="bold" allowMultipleSelection="true"  id="tilelist1" height="0" y="202" x="178"/>
		<mx:XMLListCollection id="tempXMLList" source="{tempXML.asset}" />
i tried changing statuses from the original url to a different state just to make sure. still no updating
tigomark is offline   Reply With Quote
Old 01-08-2008, 10:09 PM   #5
tigomark
Registered User
 
Join Date: Oct 2007
Posts: 41
Default

Ok this whole thing goes to the fact that I never reset the list in
the first place.

So what I need to do is take the list

Code:
private function resetForm():void{


tempXML.asset = false; //clear it I could also us tempXML.asset =
newXMLListCollection(tempXML.asset); either way it clears it
tempXML.asset = tempXML.asset; //redisplay it



}
This will definatley clear out the old list but now I need a way to
recall the same list from the

Code:
<mx:XML id="tempXML"
source="https://mysite.net/interface.php?action=showopen&amp;operation=showasset\
s&amp;format=xml&amp;opstatus=defect"
/>
and I'm not quite sure how to do this
tigomark is offline   Reply With Quote
Old 05-03-2008, 02:50 AM   #6
MegaManSE
Registered User
 
Join Date: Feb 2008
Location: Mountain View
Posts: 7
Default

Quote:
Originally Posted by tigomark View Post
Is there a way to write an action script that will make sure that caching is set to zero.

I handle caching in my php script

Code:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");          // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-cache, must-revalidate");        // HTTP/1.1
however the flash player seems to not respect the caching script and thus the information outputed does not update.
This site has a comprehensive tutorial on disabling caching in Flash:
http://willperone.net/Code/as3nocache.php
MegaManSE is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
action script general help vic one ActionScript 2.0 3 11-02-2006 11:02 AM
action script for menu ozeeo ActionScript 2.0 0 10-05-2006 08:36 PM
Action Script Text effect Baffling problem picklepug Animation and Effects 0 08-03-2006 09:00 PM
Is it possible in action script? Eikichi Flash 8 General Questions 10 07-05-2006 05:31 PM
is action script more sufficient?? VIBEZBAD ActionScript 2.0 2 04-25-2006 11:45 AM


All times are GMT. The time now is 02:13 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.