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
Similar Posts:
May 28, 2009
I'm considering writing a flash client using sockets to connect to a chat server that I've already written in C#. Unfortunately I don't have any AS experience so was hoping that someone might be able to point me in the right direction (to tutorials or the like for socket connections etc).
View 4 Replies
Apr 9, 2010
I'm building a Flex application, which is going to perform many server requests (let's say, that almost all interactions require an update from server). At the moment I'm using remote procedure calls for it. But I was wondering if using a socket would be better. In other terms, is maybe better to keep the connection alive rather then performing many calls in sequence? For my demo app I only have 1 client. Is the number of clients connecting to the server a factor for this choice?
View 1 Replies
Jan 21, 2011
Now I have server code on C++ program. But I don't know how to coding client socket on Flash AS3.0.
View 1 Replies
Jul 21, 2011
In my project, I need to get some data dynamically from socket server. so i build following app:
[Code]...
View 1 Replies
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
Feb 1, 2010
Would Director be an option for creating a socket client? My client needs to accept server commands; frame rate, start etc.Director seems like it was made for controlling movies. I've got Director 11.5 at the office.
Interaction with client
SERVER==>XML PACKET==>CLIENT==>swf plays on given frame and duration
[code].....
View 1 Replies
Dec 18, 2011
Use on server node.js and module Socket.IO.Data is sent as follows:
var tests = [555, 777];
client.send("Test string"); //first message
client.send({tests:tests}); //second message
[code].....
View 2 Replies
Oct 18, 2009
I made sure the playback security was set to network only on the publish settings menu. I have another program that connects to the same server without a problem, so I don't think it's a cross-domain policy file problem.
[Code]...
View 1 Replies
May 26, 2010
I am attempting to use an online Flash file to communicate and pass data to a device linked to a client machine.I have got the Flash to work using sockets and when run from the same machine as the device it works fine.However, the flash file needs to be online and I need a way to allow the data to be passed. At the moment it won't connect to the socket on the client machine (I just get a connection failed message after about 10 secs) and I believe that this has to do with the security settings.
I am looking into Cross Domain Policy files as a way of securing the connection, but all of the information present suggests that these are only applicable to server machines. Can I put a Cross Domain policy file on the client machine that would allow the online flash to access one of it's sockets or will a CDP file on the server hosting the flash file be able to allow access to a client machines sockets?
View 1 Replies
Nov 8, 2011
I've read about WebSockets but they don't seem to be pure "sockets", because there is an application layer protocol over them. "ws:"Is there any way of doing a pure socket connection from a web browser, to enliven webpages?Here are my random stabs in the darkApplets sockets provided by Java (need java installed)Flash sockets provided by Flash (need flash installed)But about HTML5, Why are they called WebSockets if they aren't Sockets?
View 3 Replies
Dec 31, 2011
I'm having a problem to receive data from socket.io to Flash (actionscript).
I've tried:
Server (nodejs) socket.io :
var io = require('socket.io').listen(9000);
setInterval(function() {
[Code]....
Flash connects succesful to the server and trace "Connected to flash" but it cannot receive data.
View 2 Replies
Nov 20, 2010
I have designed with Adobe Flash Professional CS5 a .fla project that integrates a client - server connection. After publishing it, I have the following issue:- when running the generated .exe file for Windows, then the connection to the server works perfectly- but when I am running the published .html file, then nothing is sent to the server.
I have tried to change the Publish Settings. When setting the Local Playback Security in Flash menu to "Access network only" instead of "Access local files only" then the last packet that was send using the .exe file is resent once and that's all (the html client does not receive the response from the server and the next connection attemps generate data transfer). I guess I have to change some security settings somewhere but I didn't find which.
View 1 Replies
Dec 30, 2011
how to make a policy file for a socket server made on java with a client made on as2.
View 21 Replies
Sep 18, 2011
I'm writing a SWF that I'd like to communicate with a Java process via Sockets. This is usually quite easy with standard Sockets, but for some reason the events described in the Socket documentation aren't firing when all signs say they should be.
On the Java side, I've set up a ServerSocket that's listening on port 8080. Using netcat I've confirmed it works as designed.[code]...
When I run the resulting SWF, all I get is "Called connect!" on the stage, and none of the events ever fire. Even more strangely, when I investigate the communication from the ServerSocket on the Java end, it receives and accepts a connection. When I close the SWF the code calling my Server completes as normal -- meaning it was hanging on a connection made with my SWF.
I'm left with a few questions...
With the exception of the event handlers, this is the end of control for my code (after the connection is established, we just wait for events and render them appropriately). Could the entire program be "terminating," and I'm just misunderstood about the Runtime model?Are there visibilty/naming requirements for the callbacks for them to be called? They're all public, but could it be that the Runtime isn't seeing them?Are there any gotchas with AS3 Socket programming? I kept thinking this was an issue of sandboxing, etc., but the SECURITY_ERROR didn't fire either.
View 2 Replies
Dec 1, 2009
I'm trying to implement a binary protocol between a flash application and a Custom Java Server using TCP/IP sockets, the protocol's messages are of variable length, so my idea is to add a field indicating the number of bytes I have to read before parsing a complete message, something like this:[code]if while processing a message (supossing it is complete) other data arrives through the socket, are messages of type ProgressEvent.SOCKET_DATA queued so the number of times my handler is called is equal (at least in this case) to the number of messages arrived or should I read until all data the socket has available? or simpler: are in general messages for a handler queued in flash?
View 1 Replies
Oct 11, 2010
i've created a socket extension class. the pseudo code below tries to make a socket connection using the passed parameters. if there is an security error, such as the port number not being an acceptable port number, i want to handle the security error.
however, i can't catch the security error. a popup window appears with a description of the error and my errorHandler function is never called.
[Code]...
View 1 Replies
Oct 6, 2011
I am trying to debug a socket connection issue between flash in a web browser and flash in a client type program. The connection is closing properly in the web, so I would like to understand how the web side of things work. Right now I can load up a remote flash file in a web browser and that triggers a connection ESTABLISHED stat when viewing with netstats -fn. When I close the dialog which runs some javascript to remove the flash from the dom, the connection stats goes to TIME_WAIT. Does the act of removing the flash from the html DOM sever the flash connection which triggers a TIME_WAIT state? How does that process work?
View 1 Replies
May 30, 2010
Basically I'm using Flash to connect to a Java server.Despite my Java application replying to the <policy-file-request/>, in the Flash debug log it lists (not sure about the order as there are lots):
Security Sandbox Violation *
Connection to 192.168.1.86:4049 halted
Warning: Timeout on
[code].....
View 1 Replies
Mar 23, 2010
I am working with flash CS4, compiling AS3 for Flash Player 9. So I use the class flash.net.Socket The main function is quite simple:
[Code]...
View 2 Replies
Jun 16, 2009
insert captions into a live flash video stream.[URL]this example uses a Flash client app wich can invoke something like video_nc.call("sendDataEvent",null,inputfield_txt.text);How can do this without any Flash client/environment ? (I of course still use an FMS 3.5) I would like to use a python (or php...whatever) piece of code to extract caption from VBI in the incoming video stream and insert it in the flash stream.
View 3 Replies
Nov 11, 2009
I have an FTP program written that uploads ByteArrays through sockets. It works great on my Mac! I open a command connection, then a data connection, send the ByteArray and then use socket.close() on my data connection. This causes the server to disconnect me and sends the 226:transfer succeeded message back through my command connection. The problem is that in IE8, FF 3.5, and Safari 4 on Windows the socket.close() func does not make the server close the connection. The fact that it works in all of my Mac browsers, and the IDE, but not in Windows browsers makes me think that it's something to do with the Flash Player.
My FP version check data:
MAC 10,0,32,18
WIN 10,0,32,18
View 1 Replies
Jan 15, 2010
how do you do socket connection to port 8000?
View 2 Replies
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
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
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
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
Aug 30, 2010
What if I access video delivered through media streaming server on IPAD client. Does it supports?
View 5 Replies
Apr 8, 2009
build a chat application in Flash/Flex and Actionscript using XML Socket class.
View 1 Replies
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