ActionScript 2.0 :: Communicate Through Sockets In Flash Mx?

Jan 21, 2003

it may be a stupid question what i'm going to ask, but i'll ask anyway ... just had an idea... is there a way i can comunicate through sockets in flash mx?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Any Way To Communicate Through Sockets In MX?

Dec 21, 2007

Is there a way I can communicate through sockets in flash mx? I'm really really interested in this domain..

View 2 Replies

Ruby On Rails :: Application To Communicate Flex Via Sockets?

Apr 10, 2012

I am building a Rails app that would nicely communicate with Flex via sockets. Currently I found only two ways of communication: Simple HttpRequest, RemoteObject. But I need something "multiplayer" style. I need Flex to talk to sockets and Rails app to grab data from those sockets do some job and push something back to a socket so Flex could read it "on the fly".

View 1 Replies

Php :: Php-Flash Communication Over Sockets?

Nov 5, 2009

I am not any kind of network programming pro, but it happened that I have faced necessity to develop socket-server on php (no way for using Java) for flash multiplayer browser-game (standard features like locations, team battles, etc).

The main problem is that TCP is point-to-point protocol and it completely occupies given port.Of course it is possible to create some kind of queue, which will manage connections to the socket, but this solution doesn't seems to be the fittest one.

It seems to me that using interval of "fair" ports (from 2000 to 2200, for example) is more fitting solution, because one request may take a lot of time to execute and players won't be happy to wait in queue.

But how can I implement this "port inteval" strategy?The solutions that I see are:

launcing php-script per every port (he-he, 2 hundreds of launched scripts!);somehow forking the initial process to new processes (2 hundreds of processed? Not nice too), one for every port;additional while-loop, which listens all the ports (looks very bad);using threading or something like that (the problem is that php is single-threaded, as far as I know; pcntl?).But somehow I don't like any of them, or at least don't know how to implement them in the best possible way.

What is the best existing strategy to handle multiple requests from multiple users per time unit without delays, and how to implement this strategy in php? We have our own Debian-server, so it is possible to use any required php extensions.

For example, if we are trying to develop chat application, we need some sort of fixed (I mean persistent) connections for each user. For example, we have 80 users in chat, and then one of them posted a message, which server tries to handle and send to all other connected users, also putting an entry to the history file or something like that.

In this situation polling server for new messages every 10 seconds from each of 80 users is craziness, so the need in persistent connection gets obvious.But I don't know what is the best way to implement something like this, considering that not all requests are handled instanlty.

View 2 Replies

Flash :: Max. 3 Sockets From One Client?

Mar 26, 2011

I was trying to write a stress tester for my own protocol when I stumbled up on this problem.Anytime I create more than 4 connections from one PC Flash denies to receive anymore messages from the server although I'm still able to connect, and write messages.

View 1 Replies

WebSockets Vs Raw TCP Sockets In Flash

May 11, 2011

What WebSockets add to raw TCP connection?Why should I use WebSockets?I'll have only Flash clients, no need to support Javascript clients.

View 1 Replies

Flash - AMF Sockets Out Of Sync When Using ServerSocket In AIR?

Mar 2, 2011

I have two (+) systems on a local network running an AIR application that need to send/receive updated positions and other events between each other. I'm currently using an AIR-based socket server one of the instances. The AMF and strong typing works great. What doesn't, however, is the syncing between clients.

In my example below, clientA is trying to send an AMF packet to clientB. The SOCKET_DATA events fire off as expected on the server, in sync with the mouse, however the data that clientB receives very quickly gets out of sync and events are lost.

It's fine if an occasional event gets dropped, however I need to know the most recent SOCKET_DATA event has the latest data. Instead, it just contains increasingly older data.

Code Snippets:

clientA writeObject: (on MOUSE_MOVE to test large number of events)
protected function stage_mouseMoveHandler ( pEvent : MouseEvent ) : void
{

[code]....

View 1 Replies

ActionScript 2.0 :: Flash Directly Use Sockets?

Oct 29, 2006

As the title says, I would like to know if Flash 8 or any version of flash can access sockets.For instance like winsock does. Using an IP and a port to send packets? I've seen it can connect to databases, but I haven't seen anything with it working with sockets, for instance a P2P chat using only an IP and a port to send an receive messages.

View 1 Replies

Flash :: Professional - Use The Sockets - Setup Server?

Feb 10, 2010

i'm trying to develop a multiplayer game in AS3, but i don't know how to use the sockets, how to set up my server, actually i don't know how to start, i want to build a peer to peer game, which will have a "room" to find players, it will be a cars game, i already have all the rest of the game, i just need to be able to make it multiplayer

View 3 Replies

HTML5 Web Sockets (TCP Connection) With Flash Fallback

Sep 20, 2010

I read about a project that enables the developer to program a HTML5 web sockets application that is compatible with older browsers by automatically falling back to using a flash method.

View 1 Replies

Http - Node.js And Sockets For Browser And Flash?

May 12, 2011

doing a project where the deviceorientation-data from smartphones get transfered to a socketserver, and from there to a flash-application.Now creating a http-server with nodejs wasn't too hard, and connecting from a smartphone via browser and transfering the data with socket.io worked fine.The problem comes with flash, i couldn't manage to connect my flash application to the http-server running socket.io. I figured out when i run a node tcp-server connecting from flash is no problem, but i have no more session management and i can't connect from the browser anymore.

View 1 Replies

C++ :: Recombine Split TCP Packet With Flash Sockets?

May 20, 2011

I have a program in c++ that sends a socket of 23723 bytes to a flash player in one "shot".The flash player sometimes receives two packets of size 17520 and 6203, and other times it receives a single packet of 23723.

EDIT: There does not seem to be a way to obtain the total number of bytes associated with the send data from flash. This would make it very difficult to build a loop to reconstruct the "broken" packet.I thought TCP was supposed to correctly recombine the packets and I am having difficulty recombining them myself.This is my receiving handler in flash:

var socket:Socket = new Socket();
socket.addEventListener(Event.CONNECT, socketConnectHandler);
socket.addEventListener(ProgressEvent.SOCKET_DATA, socketDataReceivedHandler);[code]...

will at times print 23723, and at other times, will print 17520 quickly followed by 6203. The total size are just examples and are subject to change for each send sockets. Also many sockets can be sent or received at the same time, so the split packets can be inter-mixed. In c++ I could determine what the total size of the sent data was, even if I did not receive the whole sent data yet.

View 2 Replies

ActionScript 3.0 :: Connect Flash To A Server Using Sockets Connection?

Oct 5, 2009

how to connect Flash to a server Using Sockets connection using in AS3.

View 16 Replies

ActionScript 3.0 :: Flash Sockets - Output Progress Event

Jan 11, 2011

Has there been any word on when the output progress event is being implemented? At the moment flash sockets are useless at uploading anything other than basic text files or maybe images because we are unable to control the amount of data being sent. The way I see the output working at the moment is when trying to send large files, the input buffer becomes flooded and in the process of trying to transmit so much data at the same time, many packets are lost. I tested this by trying to transfer a 570mb AVI to an ftp server.  By the time it got there the file was only 37mb. The event would allow us to calculate the network speed of the system doing the uploading and the speed of the server doing the downloading so that the buffer size and intervals can be optimized.

View 1 Replies

Flash :: Sockets - XMLSocket Can Receive Data But Not Send

Dec 20, 2010

I am attempting to connect to a python twisted socket server with Flash using XMLSocket. The connect works fine, and so does the receive. However I can't send data to the server. Is there a specific format I should be using? The reason I ask is because I couldn't read any data with the XMLSocket until the data was in the form "something", that is, the data string had to be valid xml followed by the null character. Is there a trick to sending data?

I don't think this a cross site security problem, because if it was, I believe I wouldn't be able to connect or receive. I am able to connect to the server using telnet and a java client without issues. EDIT: I figured it out, the problem was my server needed to have the data sent to it end with"

View 1 Replies

Flash :: Framework To Pass Objects Between Java And AS3 Using Sockets?

Jul 4, 2011

I want to a framework to pass objects between Java and AS3 using sockets. It should be something with good performance (not XML, JSON). I have looked into AMF but all of the tutorials are very complex and not about what I need. I have used java to java serialization but I can't find any tutorial about Java to AS3.

View 4 Replies

ActionScript 3.0 :: Java-Flash Communication With Sockets And AMF Coding?

Oct 17, 2010

I'm bothering with Java-Flash communication. At the beggining, I used XML Socket Class, which was pretty easy to implement and my aplication comunicated very well.However, my program will monitor behavior of many users at the same time, so parsing and sending large xml files could overload Server. Thats why I used Socket class and AMF coding instead. After tough hours of implementing it, whole application seemed to work. Unfortunently, after couple of tests it apeard, that Socket was slower than XML Socket! I have no idea why, because in theory binary messages should be much faster than xml. Could you help me solving this issue? Below I pasted my code for both Java and AS3.

This code sends basic variables from class object and are received the same way (it can sound bit complicated compared to just sending whole object, but for various reasons is the only way).

1. Java client (java server receives data from different sources and sends it to flash):

Code: public void sendMyPosition(MyPositionMessage message, Socket sock) throws IOException
{
synchronized (sock) {[code].....

2. Flash server - new data triggers socketDataHandler which receive it with readReasponse function. First int describes which kind of message was send, although there is only one at the moment. I've deleted some handlers couse they seemd irrelevant this case. Whole AS Class is attached as a file.

Code:
public class CustomSocket extends Socket {
private var currentMessage:int = -1;
private var message:Object = null;[code]................

View 1 Replies

Flash Pro Or Flash Builder To Make Graphical Web Widgets With Sockets?

Oct 6, 2010

I've contacted Adobe sales and tech support, and realized that I need to talk to someone who actually develops with these tools.I want to develop some simple graphical widgets with the ability to reload themselves via an xml-socket a couple of times a second. Which Adobe tool should I buy-- Flash Builder, or Flash Pro?

View 1 Replies

Sockets :: Can Flash App Running In Browser Connect To Localhost To Get Data From Another App?

Dec 21, 2009

it seems that Flash was supposed to run in a sandbox in the browser. But, if Flash can get data from a remote server, can it similarly get data from localhost IP on the same machine? In other words, can I use a Windows app that provides a TCP socket on localhost to feed data into a Flash app?the answer is yes at least for the case of an SWF file hosted in the file system, URL...(turns out the localhost access error can be fixed if you add the SWF app to some security whitelist). Still wondering if this can also be done for SWF apps hosted on the network.

View 1 Replies

ActionScript 3.0 :: Flash Binary Sockets - Error 2048 Returns

Dec 1, 2009

I'm creating a Flash IRC client for a project, and it works fine locally. However, when I place the SWF on a server it returns the #2048 error. I've tried to load in a policy file with no luck.

View 9 Replies

ActionScript 3.0 :: Flash XML Sockets - Get A Simple Socket Server Test To Work?

Jul 11, 2010

I've benn trying to get a simple socket server test to work for days now and it seems I'm not getting very far.Basically I just want to send some data from flash to the php script and have it echo it out, or anything at all like that I've been working from this tutorial http[url]....I have this basic flash class which just sends a string to the server:

Code:
package{
import flash.net.XMLSocket
import flash.display.MovieClip[code]...

The server side php is the attached script (pretty much this http:[url]....So I keep the php running on my server then run the as class, what happens is after a while (presumably the 15 second script limit in as) I get this error:

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: .../networking.swf cannot load data from website.com:9980.at base()

View 1 Replies

Actionscript 3 :: Ignore Large Amount Of Sites With TCP/IP Sockets Policy File For Flash

Apr 20, 2011

I'm using flash sockets to build an embedded chat application. everything works great. I want to allow all the sites who embedded this application to connect to my server, except for some sites.

My problem is that the number of sites that I don't want to connect to my server is a very large one( 4-5k). Currently from what I seen all you can do is tell in your policy file the domains that you allow/not allow.

What I'm looking for is a way for flash player to send me the domain where the flash is embedded and I could return an accept/decline response. I know I can send info about the site where the flash is embedded using actionscript, but this can be very easy simulated.

View 1 Replies

C++ :: Communicate Between It And Flash?

Mar 18, 2011

Is there any way I can have an integration between Flash AS and C++? Let's say I have created a socket using C++ and multi-casting it to several ip addresses.

On one of the IPs I am running a Flash client. Can I receive the Multicast message (sent by MFC/C++ application) through my Flash application.

Or at least can I develop a Flash plugin (menu item) using C++?

View 1 Replies

Get Flash To Communicate With A Database?

Dec 18, 2009

I have written a flash program using AS3 which allows the user to build a picture of a product using a variety of options displayed in checkboxes. Very simply these checkboxes either make a layer visible or invisible in my flash movie and certain choices may change the list of options. This information is currently being supplied by XML. Once the user has built his product, I would like to be able to save his choices in a SQL Server database and also be able to download his options again at a later date and view these choices at the manufacturing plant.

So far I have tried using asp.net to write to the database and have got the information to the asp.net program by using the querystring, however there may be up to 50 options which does make a querystring rather unwieldy. Also I cannot seem to send back information from the asp.net page to my actionscript.Can anyone tell me how to do this or give me an example? I am supposing that I use the response.write function in asp.net but what command in AS3?I looked into the possibility of using a webservice but see that AS3 no longer supports this as all the functionality is in Flex. I have read about Flex but still do not understand whether

View 1 Replies

ActionScript 3.0 :: Communicate With C++ App In Flash?

Aug 3, 2009

How can you communicate with a c++ app in flash?

View 1 Replies

IDE :: Flash Game And Want Two Swf To Communicate With Each Other?

Jul 18, 2009

I am working on a flash game and want two swf to communicate with each other. I tried local connection but dont know why sometimes it doesnot work.

View 1 Replies

Flash - Servering Mulitple Flv Files From Custom Webserver While Keeping The Sockets Open Stops After The 6th Connection

Jun 28, 2010

This is driving me nuts and because it's a combination of various technologies together I have a hard time tracking the problem. I wrote a tiny HTTP server that serves .flv files; these flv files are encoded on the spot. The flv files are encoded with adobe's screencodec (I started with libflv but that was too buggy so I ended up implementing my own flv encoder). For the problem below it doesn't matter which codec I use or if I serve plain flv files instead of on-the-spot generated ones (the problem also occurs if I just send 12 h264 encoded files).

I also have a swf that I coded in as3. The as3 opens 12 connections to my server and requests 12 different flv's and just displays them as 12 different videos on the page. I tested the setup with Firefox and chrome and am using the latest flash client (version 10). The HTTP server is pseudo streaming those files; e.g. it tells the client the file is of mime type video/x-flv, tells the filesize is 2GB and just starts streaming. For sake of completeness here's a header it generates:

[Code]....

View 1 Replies

Flash :: Communicate Application With Server?

Jun 28, 2010

I'm trying to communicate my flash application with my server. Either the problem is my code is working on Flash Professional, but I have prepared all my interface on Flash Builder which uses Flex 4 -SDK. My code does not work on Flex Project.

[Code]...

View 1 Replies

Flash :: Communicate With Object From WebBrowser With C# .Net

Oct 24, 2010

I am trying to make myself a simple metacafe uploader, and I am using the webbrowser to do that. Everything was working great with loggin in, navigating to upload page etc... I used the HtmlElement and setAttribute/Invoke to click and set the text fields:

HtmlElement password = wb.Document.All["sPass"];
assword.SetAttribute("value", this.password);

Now I have a problem. To upload a video to metacafe, you first need to click on a flash button caleld Upload. There, a window appears to select a file, and after you press OK, the upload begins and you can enter the form information. My question is this: How can I enter the video file without seeing a popup window? Knowing that it's flash . Here is how the flash object looks: [URL] Above I copied only the part from the upload page that it's important to me. As you can see, a simple flash file appears. Now I want to simulate the click/enter of file without showing the file window.

View 2 Replies

Javascript :: Facebook Flash App Cannot Communicate

Nov 27, 2010

My index.php file loads the Facebook JavaScript SDK and the FBJS bridge:[code]When I run this file on my server, I can communicate with Facebooks JavaScript SDK either indirectly through ExternalInterface calls, launching various Facebook UI dialogs etc. And I can also use the facebook-actionscript-api to launch the same dialogs directly from ActionScript.When I however use this index file as my Facebook canvas url and load the swf in a Facebook iFrame, the communication crashes the application. I'm not sure how to debug this but I think it might have to do with crossdomain security. Any ideas on debugging and/or solutions are welcome.

View 3 Replies







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