ActionScript 3.0 :: XML Socket Class - TCP Signals Lost

Jan 10, 2011

I am working on a project involving two actionscript clients and a java server. XML messages are sent from the clients to the server (and vice versa) via the XMLSocket class. The problem I am running into is that when messages are sent too quickly to one of the clients the client seems to lose track of them (it will not respond to them at all). The wierd part is when subsequent messages come in, the client will respond to old messages instead. It's as if the XML messages are getting queued up somewhere, but the signal that prompts the program to deal with them gets lost.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Socket Data Getting Lost / Sent Out Of Order?

Jun 8, 2010

Basically what is happening is that my Flash client claims that it is calling functions that don't arrive at the server or they arrive, but the socket data is out of order and therefore is garbled.In particular, there's class I have called RPCSocket that extends the AS3 Socket class so I can serialize data structures before sending them across a socket.At one point, this RPCSocket class calls super.writeBytes and super.Flush. It is the point at which I send all data out of my client. The data is binary data in AMF3 format.[code]Can someone recommend a way for me to store without corruption, conversion, or filtering or translation of any kind *all* of the information sent across this socket? I'd like to write it to a file. I'm guessing that keep a global ByteArray var and storing the info there might work, but I'm wondering how I might get the contents of that ByteArray into a file so I can inspect it.Also, I'm wondering if I might be able to inspect what flash actually sends out on the socket? I have a sneaking suspicion that data I supply to super.writeBytes may be sent out of order or may not actually get sent across the socket. This bug I'm talking about only seems to happen under high-stress situations when I'm sending dozens of messages per second across this one socket.

View 4 Replies

ActionScript 3.0 :: Data Written To Socket Getting Lost?

Jun 8, 2010

asically what is happening is that my Flash client claims that it is calling functions that don't arrive at the server -- or they arrive, but the socket data is out of order and therefore is garbled.  I've stared at the source code for hours and tried a lot of trial-and-error type stuff and added trace statements to see if I can find the problem and I'm not having any luck.
 
In particular, there's class I have called RPCSocket that extends the AS3 Socket class so I can serialize data structures before sending them across a socket.  At one point, this RPCSocket class calls super.writeBytes and super.Flush.  It is the point at which I send all data out of my client. The data is binary data in AMF3 format.

public function executeRPC(serviceName:String, methodName:String, methodParams:Array):void {               if (!this.connected) {                    log.write('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected', Log.HIGH);                    throw new Error('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' +

[code]....

Can someone recommend a way for me to store without corruption, conversion, or filtering or translation of any kind *all* of the information sent across this socket? I'd like to write it to a file.  I'm guessing that keep a global ByteArray var and storing the info there might work, but I'm wondering how I might get the contents of that ByteArray into a file so I can inspect it.
 
Also, I'm wondering if I might be able to inspect what flash actually sends out on the socket?  I have a sneaking suspicion that data I supply to super.writeBytes may be sent out of order or may not actually get sent across the socket.  This bug I'm talking about only seems to happen under high-stress situations when I'm sending dozens of messages per second across this one socket.

View 2 Replies

ActionScript 3.0 :: Binary Socket Connection Interruption / Bytes Lost?

Jan 11, 2011

I am starting with a short introduction: I am currently working on a project, which involves a server application written in .NET (C#) and a flash gui app as client (standalone flash player 10 [code is written in Actionscript 3.0]). The server constantly sends bitmaps to the client (up to 30fps). The connection is established using binary sockets and data ist streamed to avoid socket open/close/reconnection problems.The bitmaps sent to the client are marked with begin- and end-tags. A length field was added as well, to optimise the following parsing process. The client buffers the received data up to the point where an end-tag is found. The client reassambles the bitmaps on the screen by parsing the current buffer. Parsing means looking for begin-tags and length fields and/or end-tags of pictures packages. The resulting bitmap data is copied into a byte array and will loaded into a movieclip using the flash.display.Loader class ( bytePictureLoader. loadBytes( byteArray ); ).[code]While testing, I found out that in some cases the data stream becomes currupted, i.e. data is lost and/or the transmittion is incomplete.
 
A good thing is that this error is reproducable.It seems that as soon as the Flash Application Window is dragged (moved on Windows Desktop) the stream lacks data. The same error occurs, if too much data is sent to the client. The results are performance problems, data loss and other strange effects. The more data is sent on the stream, the more data has to be parsed and the more data gets lost somehow. Sometimes this leads to a memory problem, because Begin- and End-Tags aren't transmitted correctly. In order to fix (counteract) that, I discard data as long as there is no Begin-tag found and the buffer is cleared when the size exceeds 1Mb.It works so far, but the application lacks performance and stability.I.e. If 20 bitmaps per second with 620x390px are sent to the client, the client only receives 16 to 17 bitmaps, if the application does nothing else.If 30 bitmaps per second with 620x390px are sent to the client, the client only receives about 20 to 21 bitmaps.I am guessing that using actuall video streams would be better, then sending one bitmap at a time in a byte stream.Is there a proper example on how to build a client app in flash to receive/parse a binary data stream?Does anyone else has recognized the lost-data problem or the interruption of streams?

View 2 Replies

Flex :: Framework That Uses Signals And Slots

Aug 24, 2009

Is there a framework for Flex that uses the Qt Signal and Slots paradigm?I'm getting tired of these event-mapped frameworks.

View 2 Replies

Actionscript 3 :: Use Robotlegs And Signals Without Flex Ie?

Feb 23, 2012

I'm try to put together a bare bones robotlegs-signals project but all the samples I've seen are flex ie

[Code]....

View 1 Replies

ActionScript 3.0 :: SWFAddress With Signals And RobotLegs?

Mar 3, 2010

I recently started working with RobotLegs and AS3Signals on a project just to get some experience with these new frameworks. I wanted to add deep linking support, so I reached for my trusty friend SWFAddress. I felt bad about adding Event listeners in my nice clean RobotLegs + SignalCommandMap + AS3Signals project, so I modified the SWFAddress.as class that came with the examples to use AS3Signals instead of normal Events.

View 1 Replies

ActionScript 3.0 :: Using Flash.net.Socket In Class Definition?

Apr 5, 2009

I'm writing my first AS3 class and basically I'm trying to take code from an AS3 .fla and incorporate it into the class. I've been getting plenty of errors, but this one seems to be at the crux of the problem:Code:1120: Access of undefined property socket.Here is all the code that is required to cause this error:

PHP Code:
package{ public class ScratchSocket { import flash.events.Event import flash.events.ProgressEventimport

[code]......

View 3 Replies

Flash :: Socket Class Is Not Working On Flex SDK 4.5?

Jun 1, 2011

I am migrating an application from flex sdk 3.4 to flex sdk 4.5.I am using a telnet example of AS3 tutorials as base to construct a generic socket class that implement a specific protocol.The main problem is that the new application with the validated socket class does not fire any event (no error - no connected - no data - nothing). The try catch with the connect method does not throw any error. I checked if the events were successfully connected, but they are not fired never.Update: I used the suggestions to modidy the code. Actually, now I am receiving an error on the security policy.

This is the constructor:
public function GenericSocket(server:String, port:int, output:TextArea) {
// set class variables to the values passed to the constructor.

[code].....

View 1 Replies

Actionscript 3 :: Pass Null As An Argument To Signals?

Aug 29, 2010

I have a signal like this:

public var e_collision:Signal = new Signal(GameObj);

When the object collides with another, I pass the other object as the argument.But if the object collides with a wall, the wall is not a GameObj, I would like to know, can I pass null instead?

View 2 Replies

ActionScript 3.0 :: Flash Chat Application Using XML Socket Class?

Apr 8, 2009

build a chat application in Flash/Flex and Actionscript using XML Socket class.

View 1 Replies

ActionScript 3.0 :: Socket Class: Null-byte Throwing EOF

Oct 22, 2009

Could you please explain how to disable this unnecassery, bogus, and semantically invalid behavior of the network communication classes when it receives a 0 valued byte? (specifically the Socket class.)

View 8 Replies

ActionScript 3.0 :: Stream Video Over Socket Class (or XMLSocket)?

Nov 3, 2009

How to stream video over Socket Class (or XMLSocket) IN as3?

View 1 Replies

ActionScript 2.0 :: Get A Client Socket Class To Work With Events?

Jun 25, 2006

I'm new here, so maybe i'm posting in the wrong channel. Please tell me if it is the case. I'm trying to get a simple client socket class to work with events. I have tried each example found with google with no luck, i just tried the "radio listeners" example from here, which worked fine until i put the broadcaster object within my class.

[Code]...

View 1 Replies

Actionscript 3 :: Robotlegs Signals Dispatch Signal From ItemRenderer?

Nov 29, 2010

I have a mediated view with a DataGroup with a custom ItemRenderer. I want when I click a button in the ItemRenderer to dispatch a signal and handle it in my mediator? How can I do that?

View 1 Replies

ActionScript 3.0 :: Connect To A MySQL Database Directly Through The Socket Class?

Nov 2, 2006

is possible to connect to a mySQL database directly through the socket class?

View 1 Replies

ActionScript 3.0 :: Socket Class Unable To Connect To Internal Loopback?

Feb 16, 2011

I am building an AIR application where I receive UDP messages from Max/MSP using the Socket class. When testing in an internal loopback environment ( messages sent from 127.0.0.1 at port 7400 ) I can see the UDP messages being sent, as in: I can receive the messages I'm broadcasting in Max/MSP by listening to port 7400.However, the AIR app throws IO errors when trying to connect ( via the Socket class, using Socket.connect ) to aforementioned IP and port and I for the life of me can't find out why the app has no access to the internal loopback sending UTP ( if for instance, I start a Apache server at the same IP but at different port, the Socket class connects immediately to that IP - it won't receive data of course, but at least it can establish a connection )I am thinking the problem lies outside of the AS app and is an internal networking issue, I'd like to know if someone has experienced a similar error ( I'm on OS X, btw ) as I don't think it's a security sandbox error ( as the event isn't thrown, and the application type is trusted ).

View 1 Replies

Actionscript 3 :: Socket.readInt() And C# Socket.Send() Different Values Of Int-variable?

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

Flex :: Actionscript 3 - Flex Socket And Erlang Socket Communication

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

Lost .fla And Need To Update .swf?

Jun 5, 2011

I created a FLASH header for a website. My client wants me to remove a small line of text from it, but I no longer have the original .fla file. The text is over a simple gradient background, and I could probably just cover the text with a color rectangle.

View 5 Replies

IDE :: Encrypted Swf And Lost SWF?

Aug 1, 2009

I encrypted my swf by SWF Encrypt and I lost my fla.... :/Now I can't decompile this swf because it is encrypted.is It any possibilty to recover this .fla ? program, method ?

View 1 Replies

Javascript :: JavaScript Socket Vs Flash Socket?

Apr 30, 2010

Steve Jobs just posted this article on why Apple rejects Flash... [URL] I agree that javascript and css can be used to replicate some of Flash's animation, though Flash does all sorts of scaling and tweening that is incredibly powerful, and I'm not sure that there's anything comparable in javascript, if there is, I certainly haven't seen it.

However, my question is about the socket. Flash has an incredibly powerful openSocket class that allows you to connect to a server and have the server and the client talk back and forth to one another. As far as I know there is no equivalent class in Javascript. Am I mistaken? Is there some secret mystery Ajax class that replicates the openSocket? If not, then that feature alone makes Flash an invaluable tool.

View 1 Replies

ActionScript 2.0 :: F8 Targeting Gets Lost

Jan 15, 2009

I've got a dynamic textfield clip which is placed twice on the stage. It also includes a button. Funny thing is, the first trace works (tracing its _y value: 0 for clip 1 and 200 for duplicate clip 2). When I press the down button of both clips however it traces undefined though it's the same line. How does onPress mess up the targetting of both clips? [code]

View 6 Replies

Imported PNG Transparency Lost?

Jul 17, 2009

I created an image in Photoshop that included a gradient layer fading from transparency to a foreground color (in this case, black). I saved this image as a PNG file and imported the file onto my Flash stage. The gradient appears on the image as expected when viewing the stage in the Flash editor, however, when I test the movie, the gradient no longer appears.

View 2 Replies

ActionScript 1/2 :: MX To CS5 Lost Text With CMS

Aug 17, 2010

I am trying to edit a flash file that was done in MX. I only have CS5. When i open the file, save and export there is a slight problem. Once published and uploaded, a dynamic text box which is meant to load text from the CMS appears blank. Is there something which can be lost in translation when saving from MX to CS5?

View 1 Replies

Professional :: Lost My Project (.fla) But Got (.flv)

Aug 4, 2011

My problem is that my old computer *exploded* last week and i was making a project for my dad so I lost my (.fla) file. But, I have an animation of that same project in (.swf) on my USB Key because I've exported it just before my computer crash just to watch what It was looking like. So my question is, is it possible to open my (.swf) in Flash Pro and get all my snippet code back and all my frame back and everything else (like if it was my (.fla) project?)

View 3 Replies

Xml :: Flex Xml Lost On Debug?

Dec 22, 2010

When I start debugging a Flex project, I have a error because some xml aren't find, so i copy manualy all the files from the project (/src) to (/bin-debug).This happen to some xml files no every single file.

View 1 Replies

ActionScript 3.0 :: Xml Import Lost In A Loop?

Nov 23, 2009

how to parse my xml to get it this way. The part im having issues with is in red.

ans[0][0] = Jimmy Carter
ans[0][1] = Thomas Jefferson
ans[0][2] = Barack Obama

[Code].....

View 1 Replies

ActionScript 3.0 :: Variable And Value Lost Scope?

Feb 13, 2010

I'v attached a listener to a movieclip on stage but I can access any "global" varaiables which are out side the listeners function.I lose the scope or something what can i do about it? here is some code.

PHP Code
player.controlbar.muteButton.addEventListener(MouseEvent.CLICK,mute0,false,0,true);
public function mute0(e:MouseEvent):void {

[code].......

View 3 Replies

ActionScript 2.0 :: FLV Loop Lost In Translation?

Dec 20, 2010

I have a flash file which I want to loop, and have used this action on the last frame:

on(load) {
gotoAndPlay(1);
}

Seems to work, but I need to convert the file to FLV and am losing the loop when I do this.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved