Php :: Flex Sockets Not Sending Data On Windows?

Sep 17, 2010

I am building a really simple Chat server/client using PHP and Flex. I have followed many tutorials and have a working server in PHP and a working client in Flex, except that if I use the client on Windows I can't send any messages.When I send a message on my Mac it goes through to the server and gets sent to all the clients, including any Windows client I may have connected. The message will actually display on Windows clients as well, it's only when I try sending from Windows that it doesn't work.

I've tried adding a crossdomain.xml file served by a PHP script listening on the correct port, but none of the clients ever seem to ask for it, and if the client works on Mac I assumed it should work on Windows. By the way I'm exporting the project as an AIR file (dunno if that makes a difference).I can't find anything regarding this so I'm wondering if I'm being stupid somewhere or whether I need to takes some special measures for Windows clients?I have pasted my client code below.

import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;[code]......

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Sockets Not Closing Data Connection On Windows

Nov 10, 2009

I've written a basic FTP client to allow me to upload files through the browser without using the FileReference.upload() func (because it's damn slow). I've got all the socket logic worked out and it works for one upload. When the upload is completed, the FTP data socket is closed by the socket.close() func which triggers a response from the command socket and starts the whole process over again. This logic works perfectly on my Mac in both Safari and FF.

I can upload files and cancel uploads and it all works as I want. When I test it on Windows (IE 8, FF 3.5, Safari 4 on WinXP and Win7) it is busted. I've tracked down the problem to the fact that on Windows, the socket.close() function is not causing the server to close the connection. I don't know if this is because it's not sending a proper command or what... but that's where it's at.

View 4 Replies

ActionScript 2.0 :: Starting With XML Sockets - Sending And / Or Receiving Data

Jul 18, 2004

I've begun playing with Flash and XML Socket Servers and I thought I started taking to it easy, I was able to connect and disconnect to a socket server I wrote and Unity but I seem to be having problems sending and/or recieveing data. I wrote a small amount of code to try it out:

[Code]...

It seems to be connecting fine but when I click and I try my send,

View 2 Replies

C++ :: Transmit Data From C++ To Flex / Air Faster Than Sockets?

Feb 1, 2012

I have a C++ application which sends images to a Flex/Air front-end via TCP sockets. All this data transfer occur in the same host, so the socket connects to a localhost server. The problem is that the Flex/Air takes a really long time to read the entire image from the socket. The server sends the image quite fast, but the Flex/Air reads this image in tiny parts. The whole image has about 300MB and the Flex/AIR reads only about 1KB each iteration. So the flex keeps calling the socket data callback, which is causing the application to slowdown.

Is there any synchronous sockets to use with flex, or some kind of socket which can read the entire data all at once? If sockets aren't the best choice, is there any other faster options? My socket class looks like this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Sockets - Flash Application And Windows Application Works For String Buffer But Not For Object?

May 6, 2011

I want adobe sockets to send "customized" class object to a server socket(WinSock2). I used socket.writeObject(myClassObj). Actually My flash application and windows application works for string buffer but not for object.

Code:
//Flash
var buffer:String = "God Bless Us";
socket.writeUTFBytes(buffer);

// WinSock2
iResult = recv(ClientSock, recvbuf, recvbuflen, 0);

Is there anything I must do before writeObject() is used.?

View 3 Replies

Flash :: Java - "Unrecognized Windows Sockets Error: 0: JVM_Bind" When Trying To Debug In Builder 4.5 For PHP

Sep 27, 2011

Im trying to debug an app, not server related yet, with the new version of the FB, the one that comes with Zend in it. Thing is, everytime I try to debug, the message error is the same: "Unrecognized Windows Sockets error: 0: JVM_Bind"

View 2 Replies

Javascript :: Sending Flex Data To SQL As The Browser Closes (on Window.onbeforeunload)?

Nov 3, 2011

I have a ColdFusion function which sends analytics called from a Flex sendPageAnalytics() function to a SQL database when the user navigates - this works perfectly.What I am trying to do is have the Flex application send a bunch of analytics when the user closes their browser, therefore providing information about the last navigation.

I have used an ExternalInterface callback and listener for window.onbeforeunload and a trace statement tells me that this is working fine.My problem is that when all bundled together, I get as far as tracing out that the sendPageAnalytics() function has been called, but I do not get a sendPageAnalyticsFaultHandler() trace or a sendPageAnalyticsResultHandler() trace, which I do on every other sendPageAnalytics() call.

View 1 Replies

Javascript :: Sending A Array Not Working In Safari For Windows

Jan 28, 2011

I am sending over a JavaScript Array to ActionScript. The JavaScript code is as follows:

[Code]....

When I run this on Safari for Windows, arrayInput is null. However, this method works fine in Safari for Mac, IE, FF, Chrome, and the variable holds the actual array.

View 1 Replies

ActionScript 3.0 :: Binary Sockets Ignors Data Sometimes?

Dec 16, 2009

Sometimes flash-socket ignors data which is being sent by server. I dunna know exactly if it's server-side problem(data actually aint being sent) or flash.How does flash handle numerous of data packages comming from server ? I know that flash perform all actions in single thread, but what happen when flash recive a lot of packages at same time ? Does flash serialize incomming packages and then call ProgressEvent.SOCKET_DATA for each package or just ignore those packages which cant be handled runtime ?

View 5 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

ActionScript 3.0 :: Data Limit To Sockets - Events Stop Firing

Apr 1, 2009

I have a pretty elaborate class that extends Socket and performs some serialization and data protocol stuff. It works pretty well when I send small messages. However, when I send anything over about 132KB at once, the SOCKET_DATA progress events stop firing -- or at least the function I've got listening for them does. My class is called RPCSocket and I assign the socketDataHandler function like this in my constructor:
addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);

My socketDataHandler function (with lots of comments) is attached. Is there some limit to how much data can be sent over a socket at once? Is there something wrong with my code? Here's the trace output:
Code:
socketdatahandler
bytesAvail:4380
buffer length:0
reading bytes into buffer for concat
buffer length after concat:4380
buffer state:0
[Code] .....

View 6 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

Sockets :: Write A Client In Order To Send Data To The Server?

Jun 19, 2011

I have written an ActionScript 3 class that is a Server Socket and accepts connections.I want to write a client in order to send data to the server. The client will be a mobile browser. I think that i will use javascript. Is it possible to connect to the server from mobile environment?

View 1 Replies

Windows :: PDF Displaying Correctly In Flex Mx:HTML Control In Windows / Reader X

Oct 28, 2011

I'm having an issue with the PDF displaying outside the viewable area of the mx:HTML control in Flex. When the application starts up - the mx:HTML is set to a certain size, but can be enlarged if the application is maximized. These are the following conditions to replicate it: Issue only happens in Windows (Windows 7, not on Mac) Issue only happens with Reader X installed (not with previous versions) Issue only happens when running the built app, does not happen in debug / development mode from FlashBuilder

[Code]...

View 1 Replies

Windows :: Flex - MXMLC Throws A Java.lang.NullExceptionPointer When Compiling In Windows (not In Mac Nor Ubuntu)

Feb 23, 2011

I'm running ant to compile a Flex application, and the build keeps failing when running it on a windows command line. Other people in my team can successfully run the very same build under mac and linux. This is the error shown in the command prompt:

[Code]...

All tokens are set in corresponding build.properties and filter .properties files (and, as I said before, it compiles perfectly under mac and linux). The windows version is 7 Ultimate, FLEX_HOME is set as an environment variable to the Flex SDK 3.5 (the 3.5.0.12683 build that comes with Adobe Flash Builder Burrito). ${compiler.fork} is set to false, to avoid an issue with the SDK and the source files being in different logic drives.

View 1 Replies

Windows :: Flex - FileReference: Loading A Windows-locked File?

Mar 8, 2010

I'm using Flex in Flash Player 10 on Windows, using FileReference to load a file into memory, as below.My issue is that when a file is locked by Windows, my FileReference is not giving me any feedback that the file is inaccessible--it simply never dispatches any events after my calling load().Does anyone have insight into how to tell that Flash Player is unable to open the file?

var fileReference:FileReference = new FileReference();
private function onClick():void {
fileReference = new FileReference();
fileReference.addEventListener(Event.SELECT, onSelect);

[code]....

View 1 Replies

Windows :: Flex - Adobe Air - Lauch Windows Virtual Keyboard Osk.exe

Nov 25, 2011

From an Adobe Air application, I need a function to launch the Windows Virtual Keyboard (c:windowssystem32osk.exe). I tried the Native Process, but it didn't work when telling it to execute cmd.exe /C osk.exe. How should I launch the keyboard application from an Adobe Air application?

View 1 Replies

Windows :: Flex - Air - Alwaysontop - Does Not Work In MAC But Works In Windows

Aug 29, 2009

i setup alwaysOnTop="true" in mx:WindowedApplication alwaysOnTop="true" tag. but this does not work in MAC but works in windows.

View 1 Replies

Windows :: Embed Windows Media Player In Flex?

Aug 24, 2010

I have a mp4 file which is to be used in an application. Currently i am in the stage of figuring out the technology to be used for this job. I am familiar with flex and am hoping that i be able to use it for the application. But i can not figure out a way to play the file in flex. I have been able to play the file only in windows media player and that required the installation of three codecs : Mp4Audio.ax, Mp4Video.ax, Mp4Src.ax.

As i see it, it will be very convenient if i could embed a windows media player plugin in flex or i could specify the audio and video codecs in the flash player

View 1 Replies

Windows :: Create A Windows Projector .exe From Flex Application Using A Mac

Feb 6, 2012

I have a flex application (.swf) and want to create a projector file. When I choose File-> create projector I get the .app file because I work on a Mac. I know I can create both projector formats for windows and mac using the export feature in Flash Professional. But this is not an option since it's Flex.Is there any other way rather than switching to windows to create the file?

View 1 Replies

Data Integration :: Sending Data In Flash To External Text File

Apr 9, 2007

I will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file. I understand I need some sort of script to do that, but is this something I can run just on my machine? (I'll probably make the data into xml format).

View 1 Replies

Flash :: Data Integration - Sending Data For Saba Publisher

Apr 10, 2007

I have an interactive Flash simulation that I have imported into SABA Publisher. I need for the Flash file to communicate with SABA, basically returning that the user has successfully completed the simulation. SABA is supposed to be able to receive data from Flash.

View 2 Replies

Flex :: Make A Flash Browser App That Could Receive Data From Browser Plugin Or Other Windows App?

Dec 18, 2009

in other words, suppose I want to send data, like text, programmatically from a Windows app (such as a browser plugin) to a Flash app running in the browser. Well, conceptually, an example of this might be a Flash instant messenger with a textbox and button "Send"; so let's say I want to be able to programmatically paste the text and press Send or otherwise activate it. That's NOT what I am trying to do here in reality (i.e., no,I am not trying to spam other people's chat rooms or anything)but just an illustration of a similar situation.I can include in it whatever widget or hack that may be necessary.The reason why this problem is arising for me is that AFAIK the SDK that is providing me the data I want cannot be directly accessed from Flash, so I need a way to pipe the data from a regular app into Flash. can I have the Flash app interact with other apps through localhost IP? Or are there draconian restrictions on which server Flash in browser can and cannot interact?

View 1 Replies

Windows :: Start Air/flex Application With Windows?

Sep 21, 2009

I want to provides an option in my air/flex application. A user can check an option and the application starts when windows starts.I don't find with google how to do this, someone knows do that ?

View 1 Replies

Windows :: Windows Authentication In Flex Application?

Jul 30, 2010

does anyone have an idea or developed before windows authentication through flex application.I have a semi solution when user enters his/her AD username and password, and application send this data to web service which handles AD authentication, but this is one extra step which will give full comfort for users.

View 1 Replies

Flex :: Sockets - Crossdomain.xml File And FTP?

Feb 18, 2010

I am trying to do a "hello world" level test of FTP in Flex, but for three days now, I cannot overcome the issue with how to coerce flex into accepting my crossdomain policy - even for testing purposes.Here is my code: The exact error text follows.

[Code]...

View 3 Replies

Flex :: Sockets And Looping - Getting The Valid Connection?

Jan 13, 2012

On my network I have a couple of pc's all running a bespoke server which will return the username of the person logged in when queried.I have the following piece of code.

private function LoopAndList():void
{
var loopSocket:Socket;
var fourthOctet:Number = 6;

[code]....

Now when this runs it doesn't work as I first thought. The iterations go though. the fourthOctet value is decremented. But somethinjg strange happens. You will notice in the above code that I have a hardcoded IP address in the loop. I have put this there to ensure that there is always a valid connection. So am aware it will always be connecting to 192.168.0.4.

But the connection only happens on the last connect call.

The ouput is:

192.168.0.6
Connecting to 192.168.0.6
192.168.0.5
Connecting to 192.168.0.5

[code]....

View 2 Replies

Flex :: RTMFP Direct Peer-to-peer Connection Working On Windows XP / But Not On Windows 7

Mar 1, 2012

we're having a strange problem on a project here. When we use NetConnection in combination with a NetGroup to initiate communication between two local AIR applications on Windows XP, they always both connect to the NetGroup succesfully and detect each other as neighbors. However, on Windows 7 both applications connect succesfully to the NetConnection and NetGroup both don't detect each other as neighbors.To reproduce this problem, here are two AIR applications:[code]

These applications can connect and send message to each other without a problem on Windows XP. On Windows 7 however, they cannot.Does anyone know why this wouldn't work on Windows 7 and what steps can be taken to make it work? It's critical to our project that this works.In some cases, the applications take quite a long time to detect each other as neighbors (up to 15 seconds in some cases), in other cases they detect each other immediately. Does anyone know what could cause this delay?

View 1 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

Flex :: Sockets - Open A Connection Back To The Server?

Aug 4, 2009

I want to open a connection back to the server using Flex so I can stream chat messages to the Flex front-end. How do I do this and does Flex enforce any same-origin restrictions on ports or subdomains?

View 1 Replies







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