In addition I have been looking in the adobe docs and have augmented
the script (to no avail)
private function resetForm():void{
var loader:URLLoader = new URLLoader();
configureListeners(loader);
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);
try{
tempXML.asset = tempXML.asset;
}catch (error:Error){
trace ("Service unavailble try back in a moment");
}
}
private function
configureListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(Event.COMPLETE, completeHandler);
dispatcher.addEventListener(Event.OPEN, openHandler);
dispatcher.addEventListener(ProgressEvent.PROGRESS,
progressHandler);
dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
securityErrorHandler);
dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS,
httpStatusHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR,
ioErrorHandler);
}
private function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
trace("completeHandler: " + loader.data);
}
private function openHandler(event:Event):void {
trace("openHandler: " + event);
}
private function progressHandler(event:ProgressEvent):void {
trace("progressHandler loaded:" + event.bytesLoaded + "
total: " + event.bytesTotal);
}
private function
securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
}
private function httpStatusHandler(event:HTTPStatusEvent):void {
trace("httpStatusHandler: " + event);
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}
]]>
</mx:Script>
--- In [email protected], "markcavins" <[EMAIL PROTECTED]> wrote:
>
> This is how I am currently getting the service
>
> 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;
> }
> but this is refreshing the layout and any clicked information on the
> onclick event but the information is not updating.
>
>
>
> Here is the services as well
>
> <mx:HTTPService id="login_user" result="checkLogin(event)"
> showBusyCursor="true" method="GET"
> url="https://mysite.net/interface.php" >
> <mx:request xmlns="">
> <customer>
> {customer.text}
> </customer>
> <username>
> {username.text}
> </username>
> <password>
> {password.text}
> </password>
> </mx:request>
> </mx:HTTPService>
>
> --- In [email protected], "mitek17" <mitek17@> wrote:
> >
> > Hi Mark,
> >
> > In your PHP code remove all header control commands and just use the
> > following:
> >
> > header('Pragma: bogus');
> > header('Cache-control: bogus');
> >
> > IE has problem understanding Cache-control header, so you should just
> > override it with something irrelevant.
> >
> > PS And don't use Expires header - from my experience it does not work
> > as well.
> >
> > Cheers!
> >
> >
> > --- In [email protected], "markcavins" <markcavins@> wrote:
> > >
> > > Hello,
> > >
> > >
> > > I am having problems getting my flex application to refresh data
once
> > > it has been updated on the server side and believe it is a caching
> > issue.
> > >
> > > In my PHP I set the caching to no cache
> > >
> > > 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
> > >
> > > but the flash player doesn't seem to respect it.
> > >
> > > I have written a function in as that I believe I would have to
add the
> > > caching into
> > >
> > > private function resetForm():void{
> > >
> > >
> > >
> > > tempXML.asset = tempXML.asset;
> > > }
> > >
> > >
> > > however I'm still a noob and not sure how to get it going.
> > >
> > > Any help would be great.
> > >
> >
>