ActionScript 3.0 :: Receiving Socket Messages?
May 25, 2010
I am currently working on a project that involves using sockets. I am using Flash CS5 and AIR2.0. I am also using another program that will be acting as the socket server (Esperient Creator).I have successfully SENT socket commands from my AIR app to the server.What I need to do is RECEIVE socket commands within my AIR app from the server program. I read somewhere that this was a new feature for AIR 2.0. If anyone has any insight on how to get this to work.
View 1 Replies
Similar Posts:
May 18, 2010
I have problem with xml socket client in flash. It's cant receive messages from socket server wich is wrote on C#, But server receives the messages from client. Here is a code of AS3.
[Code]...
View 2 Replies
Jul 20, 2011
I'm trying to make a barebones, simple flash client communicate ANYTHING to a server over a regular socket. I setup the listeners:
socket = new Socket();
socket.addEventListener(Event.CLOSE, closed);
socket.addEventListener (DataEvent.DATA, onSocketData);
[code]...
And then I connect. On the server side I have a simple policy server on port 843.And then the real socket server that the flash client is connecting to.The flash client connects to the policy server and gets the policy. The flash client then connects to the actual socket server. I know this because I can both see it when snooping the network traffic and the fact that the Event.CONNECT fires off. From snooping the network traffic I can see the flash client send data TO the server when it:
socket.writeUTFBytes( "TEST CLIENT
");
From the server app I can see the data the client sent. The server then returns a little data. I can see this data going from the server to the client in the network traffic snooper. However, the client NEVER sees the data. It never fires off DataEvent.DATA or ProgressEvent.PROGRESS or ProgressEvent.SOCKET_DATA. There are no errors and the connection remains open for as long as I want it... but the flash client never seems to see the data... no matter how much I send.
Over and over I read online that the data sent to the flash socket needs to be terminated with a � zero byte. I can verify it is in the network traffic snoop.if I try to read any data from the flash app via something like readUTFBytes it always returns nothing found.
View 2 Replies
Jul 20, 2011
I'm trying to make a barebones, simple flash client communicate ANYTHING to a server over a regular socket. I setup the listeners:
socket = new Socket(); socket.addEventListener(Event.CLOSE, closed); socket.addEventListener (DataEvent.DATA, onSocketData); socket.addEventListener(Event.CONNECT, connected); socket.addEventListener(
[code].....
View 1 Replies
Nov 19, 2011
When I send number (int)52 s.Send(BitConverter.GetBytes((int)872415232));, flash show me trace(socket.readInt()); 872415232 If i send 872415232, flash show 52.Why? And how it fix?
View 1 Replies
Jun 29, 2011
I'm creating a client-server game. My client is a flex based game, and my server is erlang server. At the beginning, when I test directly my flex client in flash player, I can establish a connection easily to my erlang server through socket connection. And both can exchange data with no problem. The problem rise when I deploy my flex app at Apache http server, and running it using a browser by calling [URL] my flex socket sends message requesting for a crossdomain policy to my erlang server. So I create an xml message that represent a crossdomain policy, and send it back to my flex app as a response for that request.
Yet still I can't establish any permanent socket connection between my flex client and my erlang server. I know this because I add listener on my flex socket that will modify its internal state to CONNECTED, if a connection between client-server has established.
View 2 Replies
Jan 18, 2009
i have uploaded everything. and yet i cannot send new messages. i tpye the message in and hit send and it disappears. also i keep hearing about some permission 777 thing what is that. how do i change it to it? example. [URL]
View 1 Replies
Dec 14, 2009
I'm working on a game in flash right now, written in actionscript 2, where bottles fall from above at random speeds, and the object is to shoot the bottles as they fall, and every time you hit a bottle a different message appears on the screen for a brief period of time before disappearing. So far I'm able to make the bottles fall and I'm able to shoot and break them, but I don't know how to work it so a different message appears each time you shoot a bottle. I'm attaching the file of what I have so far.
Attachments: Bottles!!!!!!.fla.zip (45.0 K)
View 1 Replies
Mar 31, 2011
I'd like to capture the feedback I receive in the Output panel when testing something in the Flash IDE, and display it in a TextArea included in my movie when it is compiled and running in a live environment. Is there any way I can make this happen?
View 4 Replies
Nov 29, 2009
Is it possible to deserialize the AmfPhp messages while remoting? They are in binary, and assuming that amfphp understands what they are I should be able to decode what it s.
View 1 Replies
Aug 5, 2010
Is there a way to log debug messages with Actionscript 3 like log4j? i want to log user interactions in a Flash app(all the events and the user inputs).
View 2 Replies
Jan 28, 2011
I'm wondering if JavaScript can post JSON messages to Flash? and if so can you please provide an example or a link to one?
View 2 Replies
Aug 14, 2011
I have a system where clients connect via http streaming channels and use Producer and Consumer classes to dispatch and receive messages. I need to test the latency of messages in a way that adequately simulates real-world usage when the server is under load. I have 3 ideas for how this may be accomplished. Has anyone tried and succeeded or failed with these methods?
View 1 Replies
Jun 18, 2003
I am writing an XMLSocket Flash program and basically on startup, i call a funcion initialize, which connects the socket to the server and sends a message. Now I need to to wait for several startup messages from the server before I can continue. I need this to time out if they are not received.
View 2 Replies
Mar 9, 2009
something I seem to be seeing a lot more these days are error messages from flash.. often on quite major websites - and now that I am using AS3 they are also starting to appear in mine! (still at the testing phase though)
Often the site continues to run fine in spite of the error, but its a real bad look to end users, clients etc. Is there any way just to turn error reporting off in the flash player or in a published swf?
I know it would be better to fix the errors but some of them are really dumb. Like the one that is plaguing me at the moment - I have some objects that check the "relatedObject" property on rollout. Sometimes they are quite near the edge of the stage.. if you click and then roll right out of the browser window it says:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at nxx_fla::main_1/clip_rollout()
View 12 Replies
Nov 9, 2004
set up a way for users to send him SMS messages to his phone from a from on his website. I figured rather than bugging him about how he did it, I'd post here. So, how is this achieved?
View 2 Replies
Mar 23, 2005
I have a textfield which i would like to load external messages to every 5 second, for this i have come up with a surtain code, but it doesn't work...
[Code]...
View 8 Replies
Aug 3, 2009
I keep getting error messages and don't know why? I am trying to listen for cue point. Also, do I really need to have the NET_STATUS listener attached to both the NetConnection and NetStream?
var myVideo:Video = new Video();
addChild(myVideo);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
[Code] .....
View 1 Replies
Dec 27, 2009
I'm trying to create a Flex based internet application with an EJB layer in the server. This layer provides the XML used by the flex application. It uses the Cairngorm architecture.Currently, on an error I call the handler function defined in all the command files. How can I centralize this?My idea is to create a XML file that contains all the error messages and the types of error message eg:- Warning, Error etc. In the error handler, I will call the error handling function and pass a unique id which in turn will display the error message defined in the xml config file. Do I need to load this XML file in the Model layer of the application itself and store them as say global variables?
View 3 Replies
Apr 28, 2011
I am trying to load a game but it doesn't. There is no messgae in firebug so does that mean you only get certain error messages not all? Obviously in the flash .Is there a better debugging tool for online swfs like monster...
View 7 Replies
Jun 21, 2009
I'm working on a flex 3 application which will initially support only one language (which is not English) but may need to support English and other languages later. So I'm using the standard localization technique, with resource bundles. Now, somewhere I use the validators like EmailValidator which have some error messages displayed, these are in english and come with the flex sdk. How do I localize those messages?
View 1 Replies
Oct 20, 2009
I am completely new to the whole FlashDevelop/Flash/etc toolchain, but wanted to do some experimenting. I installed FlashDevelop and Flex SDK on my laptop, and thinks worked out just fine, except for one thing: the compiler messages are localized! Messages like "gebruik van een niet-gedefinieerde eigenschap" (Dutch.. sort of) are limiting my productivity. I don't recognize them because they look nothing like what I'm used to in any other programming environment, as a proper sentence they make even less sense than English error messages, and I certainly can't google them properly. Now I've already seen there are a couple of xml files and java/mxmlc/fcsh/etc configs I can tweak, but nothing so far helped.
[Code]...
View 3 Replies
Jan 10, 2010
I am using Google AppEngine, in conjunction with PyAMF to provide RemoteObject support. In my Flex code I make several RemoteObject method calls at once which tends to batch the AMF Messages into a single HTTP request. Most of the time this is fine but AppEngine applies some strict per request limits (in this case I am hitting a DeadlineExceededError - max 30 seconds). A number of service methods are expected to take upwards of 10 seconds and if these are batched by the RemoteObject into 1 HTTP you see where this is going. Now you could say refactor your service calls and that is also going on but not really the question being asked here. Is there a way to prevent Flex RemoteObject from batching AMF requests for situations like this? I have done a fair amount of Googling on the subject and come up with bupkis. It seems to me that I would need to implement a custom version of mx.messaging.channels.AMFChannel or something of that nature, which seems waay too hardcore for a feature like this
View 3 Replies
Jul 19, 2010
I am loading a flash file via swfobject. As the file is large, I want to show a "please wait while loading" message while the flash is loading.
How can I do it with swfobject.
View 1 Replies
Jul 9, 2011
I followed the following article to deal with ViewExpiredException -
It does what it is supposed to do. But I wanted to have some FacesMessage displayed on view if the user was redirected to it due to ViewExpiredException. So, I added a FacesMessage before redirection using NH.handlenaviage(). But it didn't work, and the reason was that the FacesMessage survived only one Request Processing Cycle.
At first my solution was to save the message in the session and retrieve it before Restore View phase of next cycle.
Even though it worked, I started looking for some standard solution and the first thing that I came across was the following article -
Persist and pass FacesMessages over multiple page redirects
But it didn't work. I think it's because the PhaseListeners are executed before ExceptionHandlers. So, in this case it was useless.[code]...
View 1 Replies
Sep 1, 2011
i'm looking for a possibility to log messages in my flex 4.5 Project. This should cover errormessages in remoteClasses, errorHandler or messages typing by hand. After reading a lot of webpages, the solution from parslay looks good. i want to switch to this framework anyway. the benefit is the possibility to configure the logging behavior at runtime. but i don't understand the documentation. perhaps because I'm brandnew in parsley. Also google has no fitting result.
[Code]...
View 1 Replies
Oct 14, 2011
I've configured Flash Debug player to log trace messages from my Flex application to the flashlog.txt file.I can see trace() messages from my own code, thats ok.
However, would also like to see also trace messages from Fle SDK. I use Flex SDK ver. 4.1, and, for example, I would like to have trace message trace("app initialize app"); which is placed in function initialize() in mx/core/Application.as file in the SDK.
What I need to do? Should I recompile SDK somehow or is there a compiler switch to enable this? I'm a beginner in Flex, so I'm sorry if this question sounds silly.
View 1 Replies
Oct 26, 2011
In a packaged AIR app, I need to add a file called debug to C:Program Files (x86)The AppMETA-INFAIRdebug for the software to function 'correctly' - I think it is a database error but I can not find anyway to solve it at the moment.Is it possible to add this debug flag, but to suppress/hide any modal error boxes that may appear from another possible yet unknown bug?
View 1 Replies
Mar 5, 2012
I have a Flex/BlazeDS webapp (pseudo content management system) with a Java backend running on 2 Weblogic 10.3 servers for load balancing and HA purposes.Basically, I'm using AMF polling to update my app such that when a user opens a document from the search results, the corresponding row will display a locked icon across all user displays that currently have that document on the screen.
The problem I have is that if a user connected to Server A opens up document X, the locked icon will only appear on the screens of other users connected to Server A. The displays of users connected to Server B will not be updated. Is there any established paradigm or best practice to ensure that the locked update will propagate across all servers?
View 2 Replies
Aug 6, 2010
I have designed a form with a mail form these are the codes that I am using with my php file but its not sending the message. My same php file is working fine with the static html site. Here is the flash code on first frame:
function submit() {
if (contact_name.text == "" || contact_company.text == "" || contact_phonenumber.text == "" || contact_besttime.text == "" || contact_findus.text == "" || contact_learningmore.text == "" || contact_sellermandate.text == "" || contact_buyermandate.text == "" || contact_abuyer.text == ""){
message_status.text = "Please fill up all text fields.";
[Code] .....
View 1 Replies