ActionScript 3.0 :: URLRequest Caches Response?
Oct 23, 2007
I'm writing URLRequests to the server (to return XML). The code works fine. I'm able to retrieve and use the XML. The problem is that (at least in the development environment) the Flash player caches the response. The result is that subsequent requests of the same URL don't hit the server. This is a problem as I'm developing the server side scripts and they're not perfect the first time :-). Is there a way to: 1. clear the cache, or 2. tell Flash not to cache results?
View 5 Replies
Similar Posts:
Jun 9, 2011
We have a game built in Actionscript 3, but for some users when they load the game it's loading the cached version of their saved game (JSON string) instead of getting the latest one from the server. We've implemented a random string at the end of the request URL, and I've also added headers for pragma and cache-control to the request. I'm not sure if adding those headers will make a difference though.
View 2 Replies
Mar 13, 2012
Below code is used to read a file in the disk and upload as 1MB chunks to a php server via adobe AIR application.It iterates the do/while loop till the end of the file and uploading part is handled by function getConnection. The servers returns an XML as the response.With the eventListnters currently it goes to fuction onRequestComplete when it recieves the response. Because of that issue current code exits the loop when it receives the response from the server.Is there any way that I can get the responce of the request send by the function getConnection when it calling inside function startUpload ? also hw can I define the request timeout for this single requests?
private function startUpload():void {
var localFilePath:String =localFilesToUpload[currentUploadedVideoIndex].file.nativePath;
var filePathArray = localFilePath.split("/");[code]......
View 1 Replies
Feb 6, 2010
I am trying to connect my flex app to a CFC I have which calls a method. It's to test a login control, and when i put the correct credentials in, it comes back with the error: "SOAP Response cannot be decoded. Raw response: ".
[Code]...
View 1 Replies
Aug 12, 2009
In my movie i have a link button with following, simple, function creating a link:
[Code]...
lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.
View 9 Replies
Jan 22, 2011
for each load i create another URLLoader instance seems it's FlashPlayer flashplayer_10_sa_debug.exe caches once loaded page i check the page i reload with browser - it returns the updated version and after this check FlashPlayer still returns old i need to restart application to receive an updated version
View 2 Replies
Jun 22, 2010
I have this Fla which contains a symbol that is linkaged to a certain class that is in my project. That class inherites a base class named CMovieClip which resides in one of the libraries that is in the class path (and inherites from MovieClip).Of some reason, every change that I do in the base class doesn't seem to influence the resulting linkaged class, much as if this library is cached somewhere that I can't feagure out.I tried to create the same conditions in a separate Fla but it does not repeat the issue.I tried to duplicate the symbol but the issue isn't solved that way.
View 4 Replies
Aug 2, 2010
When I click on the next button that loads a another swf the background from the previous swf flicks on the screen.click on the attached link URL..[code]I would like the "current_ plan.swf" to load so that the over lays (no so much on the views but more in the LIVING MASTER.We are creating this for both touchscreen and web(the link is the working touchscreen version hence the files being large).[code]
View 7 Replies
Apr 17, 2010
I have code that was written in Actionscript 3.0 that sends a request for information to a php file which sends a XML response back.
Now I'm trying to adapt an old program using Actionscript 2.0 to send a similar request to the same php file and I'm unable to get access to the XML string :
I opened up the debugger and I see my XML data on the names column under the this pointer, in the locals tab. My data is there but is inaccessible to me. Something has definitely gone wrong
Here's the code to begin the request
Code:
{
reply_lv = new LoadVars();
send_lv = new LoadVars();
// load these vars
[Code].....
I tried to fill in IsLoggedInCallback with a bunch of code to extract the XML but it was all garbage and I felt it wouldn't be much help if I left that code there.
View 2 Replies
Feb 20, 2010
I have a flash image slider with a button below each image. When i press that button, the user is redirected to a new page where i add that image product to my cart.
The problem is that after doing the adding, i want to redirect the user back to the initial page.
[Code]...
View 1 Replies
Apr 28, 2010
I need to make any request to this url and get Http Rewspons header (like this one:HTTP/1.0 200 OKContent-type: video/x-flvCache-Control: no-cacheI do not need reponse body at all. After I get header need to emmidiatly close connection to that url (so stop to obtain data from it)
View 1 Replies
Jan 19, 2011
i have this response from a socket server:
[DataEvent type="data" bubbles=false
cancelable=false eventPhase=2
data="Segunda vez"]
How can i parse this info?, for example if i want the data value.
View 1 Replies
Dec 19, 2010
I'm doing a form for a website but flash is not getting the response that is suppose to from the php file. When i go to the php file with
Code:
navegateToURL
the browser shows the the correct values, which means that is getting the info from the as3 class correctly. The problem is getting the response back to let the user know that everything is done.
View 7 Replies
May 28, 2010
I'm having trouble with a sendAndLoad-script:
Actionscript Code:
listener.onComplete = function(file:FileReference):Void{filename = file.name;var sender_lv:LoadVars = new LoadVars();sender_lv.filename = filename;var reciever_lv:LoadVars = new LoadVars();reciever_lv.onLoad =
[Code]......
It uploads a text file to my server (I'm running the .swf file locally) and it works. But I need to load the contents of the file into my program, and when I do the special norwegian characters "� � �" turns into jibberish. So I wrote a script to change the encoding, but when I send the filename to the .php file, I don't get a response.
View 1 Replies
May 25, 2010
I have built a simple contact form that sends t an email address via a php script. This works fine, (message detalis are sent as URLVariables, which are the data property of a URL Request whose method is set to POST). The PHP script returns a boolean value to confirm that the details have been successfully forwarded to the mail server:
[Code]...
View 1 Replies
Feb 16, 2011
I need to create a function which checks for the existance of a word within an answer... and if the answer contains the'keyword' then it is deemed as correct..For example, if my keyword is 'dalton' I would like to accept any answer which contains 'dalton', for example :the four daltons, Daltons Weekly, the dalton, whatever else dalton might say..
View 2 Replies
Dec 2, 2009
I have built a simple flex application (using BlazeDS) which displays "Person" details by invoking a java service using flex remoting. So, my Person class looks something like this:
class Person {
public int age;
public String name;
}
As a java developer, here is my understanding: When I run the front flex app in my webapp, an RPC call is executed and BlazeDS does the hard work of invoking the right method, obtaining the result as an object, converting the object to AMF format (serialization). And, then the web/app server sends back this response to the requesting app over http. The flex app now does the task of deserializing the object received in AMF format and somehow make use of it.
Here is my question: I would like to modify the response before it reaches the Flex application by modifying the attributes of the person object. I have a Filter in place to do this. However, I am not sure as to how I would deserialize the AMF stream, modfiy the object, serialize the object back into the stream / reconstruct the stream somehow.
Is there a way to doing this? Where should I start? If the question was too confusing, here is a shorter version: How do I modify the response stream of content type AMF-X, before it reaches a flex app using a java filter?
View 3 Replies
Dec 22, 2009
I'm writing a google gdata API client in Flash/AS2 (sadly, moving to AS3 is not an option at this time). Logging in via ClientLogin works fine but subquent requests will return a 302 redirect that includes a gsessionid I am supposed to include with future requests to avoid the 302s.
Flash/AS2, AFAIK, does not allow me to actually query an http error response body in any way, so there's no way for me to actually see this gsessionid after the 302 is returned. Is there a gdata api call which will return me a valid gsessionid inside an HTTP 200 response if I already have a valid GoogleLogin auth token, or is this not possible without a man-in-the-middle proxy?
View 1 Replies
Mar 9, 2010
I have an asp page that loads a response " user=exists " everytime I try to update a database record (when of course the record already exists!) How can I handle this response with AS3 in Flash?
View 1 Replies
Sep 23, 2011
I feel like I must be doing this wrong. I've got a function that is supposed to construct a query based on an API's description of available fields. Here's what I've got:
var query_fields = getQueryFieldsFor(sobject_name); Need query fields for the next statement, which actually does the query
public function getQueryFieldsFor(sObject:String):String{
//helper function to get queryfields for given sobject
var queryFields:String = '';
[Code]...
I know this doesn't work, and I think I understand why. However, I keep running into this type of issue and I believe I'm just thinking about it/designing it wrong. So what's a better pattern here?
View 1 Replies
Jun 21, 2009
I m using URLLoader to send a post request. The server returns HTTP code 404 in case the parameters are wrong, and puts the error message in the response body.Get resoinse body when URLLoader gets 404
The problem is that if the response has code 404, the IOError listener is called and I can't see the body of the response.
Is there a way to tell the URLLoader to ignore HTTP codes and always call the Completed listener?
Or maybe there is a way to get the response body in the IOError listener throw the IOErrorEvent? I couldn't find such a way.
View 2 Replies
Aug 3, 2010
I'm using the twilio API [URL] and AS3 to make a post to the server. The server responds with an xml, which you can see on the link above.
How can I access the individual blocks of the response? I currently get all the xml with the 'sendCompleteHandler' function.
The code:
ActionScript Code:
private function dial () : void
{
send_variables = new URLVariables();
[Code].....
View 0 Replies
May 2, 2011
I have a multiple choice quiz that needs to have a sound played with each response. So if the user selects the correct response, they get the ding sound. If the user selects the incorrect answer they get a buzzer sound.
[Code]...
View 1 Replies
May 13, 2011
I have created a Mahjong solitaire game in which 144 tiles are laid out on the stage, variably stacked up to four levels. You find two matching tiles that have free sides and have no tile sitting on top of them, click them both, and they are removed. Object is to remove all of them.
My problem is that I'm getting about a one second lag when I click the second of two matching tiles. I'm pretty certain that the bottleneck is in the functions that get called when any tile is clicked, that determine if it's free on one side and above. I have never "stepped through" or otherwise debugged before. Is there a way for me to step through my code and get some indication of what the specific problem is?
View 1 Replies
May 11, 2009
I have this really weird problem. I'm making several calls to different php files (located on another server with crossdomain.xml changed so that it is allowed) and need to receive some response back in flash and work with the data received.The first call is done by the following code:
ActionScript Code:var urlRequest:URLRequest = new URLRequest("http://otherserver.com/assign.php");
var loader2:URLLoader = new URLLoader();
[code].....
View 2 Replies
Feb 11, 2010
I'm running app in air. When I'm trying to print the print manager window show up, i choose printer and click 'ok' and nothing happens. Printer icon showup for few seconds but have no print tasks. Of course it's not becouse of the printer managar (it works fine when printing from e.g. word).My code looks like this:
[Code]....
View 1 Replies
Nov 10, 2006
I am a Flash novice using the Flash Quiz template and trying to create multiple conditional incorrect feedback responses for each question. Currectly the array only has one asset dedicated to providing feedback for an incorrect response. Is there a quick and easy way to add two more conditional incorrect feedback responses?
View 1 Replies
Aug 17, 2007
Ok, so I got this flash guest book that sends the name/message to the .asp script. The .asp script puts the name/message nicely into a .txt file. How do I use the response from the .asp to trigger something in my actionscript?
View 2 Replies
Mar 30, 2011
Ok, first of all I'm new to all of this as I'm just doing some parttime work. I'm trying to make a drag and drop game where the images (imported and made into movie clips with instance names "peg1 - peg7") are to be dragged onto targets (images, made into movie clips with instance names "targetpeg1-targetpet7").[code]
View 3 Replies
Dec 16, 2009
I am trying to figure out the encoding of the below post response text. I thought it was amf, but not I am not sure. Please help me identify the encoding type and if you may, show me how to decode the response.
[Code]...
View 1 Replies