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 ).
I have a Flex web app (compiled to regular SWF) that tries to connect to a (binary, not XML) socket on its own server. So if the swf is at [URL], the socket is [URL] This should be possible, AFAIK, but when I try to connect I get a security error saying that [URL] cannot access [URL]. Even though it shouldn't be needed, I also have a crossdomain.xml file containing
In my Flash app, I'm connecting to my server like this:
Security.loadPolicyFile("xmlsocket://example.com:12860"); socket = new Socket("example.com", 12869); socket.writeByte(...); socket.flush();
At port 12860 I'm running a socket policy server, which (according to this document) correctly serves up my policy like this:
[Code]...
I get no security warnings, which I used to get before the policy server was in place. Still, the connection to port 12869 doesn't work. It's made (I can see with Wireshark and on the server), but no data is sent by Flash. It might be worth knowing that the SWF itself is served from example.com as well.
I read through the method to connect to a socket server : [URL]. I wrote an AIR application to connect to the java server code, but the client cannot connect. What is missing in the code?
I'm tring to write an instant messager implementation, but i got a problem with the initial socket connection.I need to send a GET request with some parameters to a server and it will reply with a seed number message server IP.
Code: Select allvar socket:Socket = new Socket("appmsg.gadu-gadu.pl", 80); var response:String = new String; var request:String = new String;[code]......
why the socket isn't sending any data after the connect,i also wrote a small pop3 client and it works fine.
i am receiving this error "ArgumentError: Error #1063: Argument count mismatch on flash.net::Socket/connect(). Expected 2, got 0.".
I have created a .net tcp server that sends 1 byte of data while reading a file, now the flash client connects but i get this error and i don't receive any data at all.
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.
i'm trying to connect my flash application to my nodejs server running socket.io. To connect via web-browser is no problem. Now the problem, when the socket-server isn't running i get an IOError in Flash what seams alright. Now when i start the server and try to connect again, i don't get an error, but the socket-server doesn't receive a connection either?!
Before I start I should state I have read it all, I was following this, this and this (and more...) and still I cannot connect to our running server via Socket over the internet.
Here is what I try to in AS3:
[Code]...
We can see from the log output of the server that this is really sent to the connecting socket. A null byte is of course sent after the xml data. And after that, the server closes the connection. However, it seems that Flash somehow does not like it, as "Error #2048" still appears after ~3 seconds.
Optivote IR8 is basically a voting system with a bunch of remote controllers, which can send IR signals to a receiver, which is connected to a computer through a USB port. And I'm trying to write my own little software for that with Flash.Optivote receiver communicates with software through a virtual serial port. When I connect to that port through PuTTY, I can see signals whenever I press any button on the remote controllers. Although, when I connect to that port through Serproxy (which relays a socket connection to a serial port connection), the remote controllers don't seem to work. I just get the same signal every half a second or so, over and over. I'm guessing the receiver is trying to make some kind of handshake this way.
The thing I can't figure out is what PuTTY does that Serproxy doesn't to make the serial port connection work. Maybe there's some proper way to tell the other end when I connect?(I use Serproxy, because Flash applications cannot connect to a serial port directly, but supports socket connections)
I just installed FMS 4.5 w/ built in apache on Win2008R2 - accepting all defaults. Samples streams play fine when playing on the server. I copied the sample directory and put on a client on the network. I modified the stream URL using the server's IP address. I also modified the manifest files so that localhost was replaced with the server's IP. When I attempt to view in the sample player I get the following:
When using the bone tool, I have been fairly successful in working with either a shape or a selection of symbols. However, I am unable to connect a shape to a symbol. Is this possible with the bone tool or am I barking up the wrong tree? If not, is there some sort of work-around when part of the animation is constructed from symbols and part is constructed from shapes?
I have been trying to get my live feed up and running for friends but they are unale to view it. I have FMS 4 with FMLE 3.2 on Win7. Under the fms url i have 'rtmp://localhost/live' and Stream name is 'livestream' I can view the stream just fine from my computer on which i am running both FMS and FMLE. but when i put the html file on my website, my friends just see the empty swfplayer. You can view it at[URL]. I was trying to figure out what the problem was so i copied the swf code 6 times with different settings but nothing worked. on my computer, only the first swf player works and im guessing that is because its localhost.
I have installed Adobe FMS 3.5 on an server and inside "applications" folder I have created a new folder say "abc" and restart the FMS service, now when I try to connect to it from Flash using nectconnection it does not get connected and in netstatus event handler there are 2 messages: NetConnection.Connect.Rejected NetConnection.Connect.Closed Although Flash is connecting to 2 folders "live" and "vod" which were created there by default with installation on FMS. I am not able to figure out why it is happening.
I'm trying to connect to a very simple .NET WCF web service (created in .NET 4.0) within Flash Builder Burrito and the process hangs on "Introspecting the service". I get no errors -- it just hangs. The web service is on my local network, although not on my local machine.
I have been reading about Flash VOIP capabilities. I wonder if flash i able directly to connect to VOIP server ex. Asterisk [URL].. or do I need The Adobe Flash Media Server?
I would be grateful for info on this, also any links to info how to build VOIP client using Flash would be very be useful.
I'm making a program in flash builder 4.5 using WebOrb 4 (which is fantastic, I might add). When I go to deploy, however, it gives me this error:
>There was an error during model deployment for xxxxProgram. > >The server returned the following message: > >Unable to contact the RDS Server "Data Services on Tomcat (localhost)." > >Connection refused: connect > >Do you want to continue launching your Flex application?
I've poked around online for a solution, but for the most part I either don't understand them (forum grammar can be somewhat obtuse) or the answer in the post doesn't apply.
I am creating a side scrolling game in Flash (as3) and trying to keep things organized and clean.Ive created a "Level" class that gets all the level data, player data, and creates all the terrain objects and the player object. Its starting to get messy because im handlng all of the functions for player collision checks and player movement, terrain movement, sound starting and stopping, enemies, and more, all in this class. Is this normal? Or is there a better way to organize things to keep them separate, but still allow them to interact with each other.
package { import flash.display.Sprite; public class MySprite extends Sprite{
[Code]....
and extend that class, if more than one internal classes are defined:
package { public class MainClass extends MySprite { public function MainClass():void{}
[Code]....
ReferenceError: Error #1065: Variable MainClass is not defined.Note that this only happens (as far as I can tell) when the public class of the package extends another class, and multiple internal classes are defined. The internal classes don't even need to be instanced or referenced to generate the error (the bare-bones code above will error out). If only a single internal class is defined, it works fine (no error). Even if the internal class is instanced.
I am trying to debug a Flash Web Application using Flash Builder 4. However, I keep getting this error:Unable to connect to the application to fetch profile data. try profiling the application again.I am using Internet Explorer 8 (the same problem also occurs with Internet Explorer 7) with Adobe Flash Player 10.1.102.64 (the Debug Player). In other words, I installed the latest of everything.For my launch configuration, I have used the path to an HTML file. This works fine for debugging but does not seem to work for profiling.
i've got a fair bit of text i'm trying to keep on an internal page by just making each section a scrolling content box. So there are 3 buttons at the top, each 'scrolls' onto a new section and I would like the ability for it to scroll back too, hence using the tween class to do this. I've managed to set it up and each button goes to each 'page' fine in reading order, so to speak (1, 2, 3), but if I got to 1, 2 then back to 1 it will start from 0 on the x axis.
Basically what i'm wanting to do is set the tween from the current _x value. So if I go 1, 2, then back to one, it will take the current _x value from 2, and scroll the opposite direction back to one. I am using the following code on the buttons:
i am using xmllistcollection for displaying data in list. whenever i run my application data is display in list control, but this warning has displayed in console. How can i remove this warning warning: unable to bind to property 'xmlnode' on class 'XML' (class is not an IEventDispatcher)
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
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.