Flash :: Handle Server Response In AS3
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
Similar Posts:
Nov 27, 2009
I'm using SWFUpload on a Rails site to allow for MP3 Uploads direct to Sound Cloud. To avoid having to first upload a large file to my server and push to Sound Cloud, I'm hitting their API directly via SWFUpload, passing necessary OAuth token data.Everything works - EXCEPT - Flash can't handle the HTTP response code that Sound Cloud's API returns (201). This ALWAYS triggers an unhandled IO Error with Flash. Even though SWFUpload allows me to override that in the JS, it breaks any response data (the URI to the uploaded file).
how I could somehow intercept the 201 code so that I can make it a 200 code for flash? I'm at a loss at how I can avoid this IO Error. I've tried try/catch statements around everything and have even recompiled SWFUpload to try new things to no avail.
View 2 Replies
May 29, 2010
[Code]...
I want to read SOAP response in flex,am some what new to FLEX
View 1 Replies
May 6, 2010
I have upgraded from FMS2 > Flash Media Interactive Server 3.5 I added both the seriel number for FMS3 and FMS2 during the installation process. When I logged onto the admin panel there was no licence listed, and a link saying "to upgrade to unlimited connections now, click here".
So, I checked the fms.ini and no seriel was there. I put the seriel number in and restarted the server through the FMSadmin tool. Still, no licence file was showing. I then added the licence file via the admin panel and got a dialogue saying "Seriel Key "blah" Sent To The Server for approval". The seriel key now appears with a valid status of false. And no further progress after that. The documentation states that when you add the seriel key in this manner it should recognise it immediately.
Can anyone suggest what I might have done wrong? I have trebble checked the seriel number, and copied and pasted it to make sure it is exactly right.
View 3 Replies
Dec 17, 2010
I made a server connection with AC3 and C, I need the client(AC3) to be able to send a 3 byte message to the server (C) and have the server return a resopnse. So far everything works except for the fact that the feedback isn't fast enough becuase AC3 just tests for data once and moves on instead of waiting like in C. I'm using a binary socket at the moment but I was wondering if there was any way to wait for new data before moving on
View 2 Replies
May 5, 2011
I'm a new grad, so please be kind. I'm working on validating input in a Flex DataGrid cell that the user can edit. The rows in the DataGrid are backed by an mx.collections.ArrayCollection that includes a [Bindable]Model that I wrote. I want to validate against a custom client-side Validator, if-and-only-if that passes I want to validate the input on the server. If client-side validation fails, I want to display the normal validation error (see image below). If server-side validation fails, I want to use the same sort of UI components to notify the user. The solution should not include any external framework (Cairngorm or PureMVC).
[Code]...
How do Flex programmers validate on the server, immediately after the valid client-side validation passes?
I realize it seems silly to search out this "synchronous" design and I hope someone has an answer to solve my problem with best practices. In my defense, the reason I want to validate on the server immediately following client-side validation is so that I'm using Flex's validation framework. If I get an invalid response from the server, I want to leverage the built-in UI components that Flex has to tell the user something is incorrect about his/her input.
View 3 Replies
Aug 19, 2010
I am trying to serve streaming video over a 10 mb network and using Adobe® Flash® Media Streaming Server 3.5. Here are the specs on the video.
Video:
Codec: On2 VP6
320x240px
frame rate: 30fps
400 kbps (VBR)
keyframe distance: 15
Audio:
Mono channel
96 kbps
How many of these I could serve up concurrently? Or is there a spec somewhere?
View 1 Replies
Sep 15, 2011
What would be the crucial things to optimize when you have hundreds of people connected to your application, with most of them being in a video conference with RTMFP direct_connections, and also some using RTMP connections?
Our app seems to go down under heavy load. - RTMFP stops working (no one can connect to the service with RTMFP NetConnection) and RTMP NetStreams don't work either, however Text Chat works.
Server we use have a connection limit of 500 connections, and 2.5mbps speed limit per connection (a video conference with 4 people uses less than that so it seems fine).
View 3 Replies
Feb 6, 2010
I'm creating a scrollbar gallery from a tutorial on this site. Though I've completed the tutorial, and customised the gallery to my own needs, however I'm trying to make a very small change to it - and no matter what I do, keep running into problems. I'm trying to replace the rectangular handle with my own customised handle - a (20 x 20) 'circular' png image that I've imported into Flash, made a graphic and stored in the library (though I understand it can be imported using actionscript, like the other images in the gallery).
[Code]....
View 7 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
Aug 8, 2011
If I have a Quad-core server and 8 RAM, how many users can it handle while streaming a 48-128Kbps audio-only stream of Mp3 or AAC? I guess there are some users here that are handling similiar cases, and maybe employees with estimates
View 2 Replies
Apr 20, 2011
I'm making a multiplayer flash game where at a 'table' more than two players will be playing. Its turn based. Using zendAMF can the server response be made to wait till the player whose turn it is has made his move, so that it will appear to be real time?
I don't want to use polling since I read that it is not a very good practice. Instead can this method work? Lets say its player A's turn and the other players B,C,D are waiting. Their flash clients send a request to the server to get any updates. Instead of responding immediately can the server wait till player A has made his move and then send its response containing player A's move details to other players B,C,D?
Edit: Added image.Found the name of this method. Its called Long polling. So can Long polling be done with PHP webserver running apache and using a flash client which sends the requests?This is how the other players waiting players B,C,D are expected to be treated.
View 1 Replies
Oct 27, 2010
I am developing an application that takes a variety of bits of info and displays them in pods within a page.
One of the bits of info takes ONE row from a database table and tries (currently) to put it into a datagrid. Now, I know Flex wont allow that, so I have tried all kinds of things to fix it - using the xml directly, trying to get the info into labels casting as an array, using xmlistcollections... so much time on Google but now I am stuck. I'm not precious about getting the info into a datagrid - in fact I'd rather put it into labels or text boxes so I can presents it in a more flexible way.
Looking in the debugger, it seems like I don't even have the data in my variable - I do have it in the event so it is there, but I can't for the life of me get it out...This obviously works fine for multiple rows of data in the array - not the single row. i'm trying to get the info into a var called _SystemStatus.
Overview of Code:I have a mxml but with all the presentation stuff in. I also have two actionscript modules with code in (you may have guessed that I am new to this, so I have found most of this great code on the internet)
The AS bits are sql.as - this basically is a load of functions called by the mxml which contain the sql to send to the database mssql.as - this does all the magic of getting the data from the db, and taking it from the event.
Code below:
CompletionTimes.mxml (note - its got errors in where i have tried things)
Code:
<?xml version="1.0" encoding="utf-8"?>
<PodContentBase
xmlns="dashboard.view.ActionScript.*"
xmlns:mx="adobe web (removed so i can post!"
[code]....
View 0 Replies
Feb 16, 2011
I have been staring at this code for quite a while but can't find what's wrong. When uploaded to the server I get no kind of response. I have a class gameEventDB that through a php reads data from a database.
I get no kind of response not even an error. the 'path' variable is sent from the main class and looks something like
[Code]...
View 0 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
Feb 17, 2009
I have some asynchronous stuff going on in my Flash movie and would like to determine how much time elapses between two events -- e.g., a button click and the response from a socket server.
I'm wondering how to go about this in AS3?
View 6 Replies
Mar 14, 2011
I am trying to connect to the Flash media servers from behind a customer's firewall.From behind this firewall the time taken for a response (its usually success) is around 20-25 seconds.The following is the code I am using to make the connection and listen to the events
var nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
var time1:String = (new Date()).toTimeString();[code]........
The delay between time1 and time2 is always 20-25 seconds. From other firewalls and non firewalled networks its usually 3-4 seconds.What could be the reason for this huge delay for a response in this case. I have noticed that the first response is always a "NetConnection. Connect.Success".We are looking to deploy around 20-30 media servers if we can get this thing to work and appreciate any prompt response in this regard.
View 1 Replies
Nov 11, 2010
I'm making a game that is tightly integrated into a rest service. I want to set variables based on what the server tells me the variable should be.
[Code]....
but then the parseUserRank() method can't directly return the value to userRank, so there would have to be an event dispatched when its available, then update then finally update the variable value....
View 1 Replies
Jul 20, 2011
how can i handle a streaming timeout (client stop stream to the server), i made an application which streaming webcam to my FMS, but how can i detect the client timeout ? Need code server side i think, but what
View 1 Replies
Feb 27, 2012
We use f4vpp to process MP4 files after they are recorded by FMS. A couple of times now we have noticed that the output of f4vpp stops at exactly 2GB.
Have others here seem this same problem? Is this a limitation of f4vpp? Is it a bug or dependent on our system perhaps?In case it matters: we use f4vpp on linux.
View 8 Replies
Jan 22, 2012
I am trying to send a simple HTTP message from Flex to C# server, but it seems that I am getting tow calls, first is the real one and the second is an empty one.
Why is that and how can I handle it?
This is my C# code:
TcpListener listener = new TcpListener(IPAddress.Any, 9400);
listener.Start();
Console.WriteLine("Server started");
[Code].....
I been trying to send a true HTTP response a notice another thing, the second call is coming without waiting for the first call, if I am putting the response thread to short sleep(100 milliseconds in my test) then I am getting the second call before I been able to response for the first one.
View 3 Replies
Dec 14, 2010
- Is there a benefit to hosting FLV files on a Flash Media Server when they are under 2-3 minutes?I've been working on a couple different video projects as of late... some are simple web player with 30 second ads and others are working with longer videos like 2-3 minutes. I currently have an FLV hosting provider running Flash Media Server but with videos so small don't they download for the user as progressive anyway and there is no real benefit whether I am using my FLV host or my traditional web host?
i also use a separate video hosting company to handle my mobile videos mainly because I am a bit naive on how that works as well. I had a project with straight links to play video on mobile phones (with three different version served up based on OS). But it seems like most of those were progressive downloads as well.
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
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
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
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
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
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
Jun 4, 2004
I've looked around for a solution to create a table in flash, but they all seem to require an external file. And if they don't require an external file they don't have the ability for hyperlinking. My flash site talks to my server and my server sends back the results in xml to flash. Some fields will have hyperlinks using the value of that field to an html application.
View 5 Replies
Apr 18, 2009
I've been getting an 'undefined' response and no email sent upon sending. It USED to work but then I added a few fields and broke it somehow. I copied everything perfectly, and know my text field var's are named correctly, so the fault lies somewhere here.
'submit' button actionscript:
[code]....
View 2 Replies