I am writing an XMLSocket Flash program and basically on startup, i call a funcion initialize, which connects the socket to the server and sends a message. Now I need to to wait for several startup messages from the server before I can continue. I need this to time out if they are not received.
I want to create a function based (not frame) delay of about 10 seconds to the function at the start of a flash movie, the code only needs to run once.I'm very new to actionscript and have been given links to SetInterval and SetTimer examples but they all seem to be very complex.The function is below. I believe it's possible to add the commandTimer(delay:Number, repeatCount:int = 0) how me to a simple example.
i am writing a flash app that receives its data over a XMLSocket. On the testmachine that worked really fine, but now the data will be ssl secured. Is there any XMLSSLSocket or something similar available? If not XMLSocket a normal SSLSocket would be a great help as well.
I have a perl socket on my apache server that correctly takes input from sockets and sends it back out to every socket connected to the perl socket. I have tested the perl socket, and it works correctly. When I launch the Flash in the IDE, as a flash program, it functions correctly with the perl socket. However, when I try to launch the Flash in a Browser on my apache server, it tells me it is unable to connect to the server.However, I am seeing from feedback from my perl socket, the flash connects for about a half of a second, and thats it.
What could be the problem, do I have to include code in the flash to allow XMLSockets to connect in a browser as well? Is there certain things I need to do with my apache server to make it work?
Also if I 'Preview as HTML' from Adobe Flash CS4, it does not connect.
I'm trying to make a socket client in FlashAS3 for my socket server written in nodejs. I also have a mobile app client that communicates with it.
In AS3 I wrote some test code that works perfectly when I publish and run Windows EXE file but when publishing to SWF and opening in browsers it does not connect to server. Even all that "imports" do not help. The Code:
On this page it says "The XMLSocket.connect method can connect only to TCP port numbers greater than or equal to 1024"This makes it hard to get a chatserver to work through a firewall.BUT I recently discovered on this page that you can set up "policies" for your flash movie that allow it to run on port 80.
i have uploaded everything. and yet i cannot send new messages. i tpye the message in and hit send and it disappears. also i keep hearing about some permission 777 thing what is that. how do i change it to it? example. [URL]
Im looking for a solution for the Error #2048 from Flash. I have a server program developed in Java using the class xSocket and it works fine. It manage the clients from Flash. Well, once i installed the server app in my domain "97.225.158.110" and running the client developed in Flash from my PC within Flash environment, it connects to the server with no problem. But, if i upload the flash to the domain and load it in a web explorer, it doesnt work. Well, i have been seeing many web pages mentioning the policy file and i will show you how i have done it: In the the Java App i have a event handler for incomming data where i idetify the incomming string:
Code: if(data.equalsIgnoreCase("<policy-file-request/>")) { Main.Log.append("Enviando archivo Politica Seguridad"); nbc.write("<cross-domain-policy><allow-access-from domain="*" to-ports="8090"/></cross-domain-policy>�");[code].............
Well, the java server app receive the string policy request and it should answer with the quoted file but the Flash never receive it and in a minute the Error 2048 appear.
I am sure that I am missing something simple but I am doing an overhaul of a flash chat application that I wrote a few years back.I have everything humming along in Actionscript 3 and it works well when I test the .swf in Flash CS3 Pro but when I publish it and view it in the browser, I get no joy.I can see the flash plug-in retrieving the crossdomain.xml in my web server's root directory but in the browser, the XMLSocket Object fails to connect I installed flashpolicy server that is responding on port 843, but again, through the browser, the XMLSocket Object fails to connect.I have tried both Firefox and Safari browsers with the same result.I have swapped out the XMLSocket Object for the Socket Object and I am able to connect to my socket server, from within Flash CS3, but not from a browser.
I have a XMLSocket and I call send twice in the same function. The first send works but the second does not? Does XMLSocket have a restriction to only send one message per frame? Do I have to queue messages and have an onEnterFrame function that checks the queue and sends one message for a frame?
I have a server that I have written in Python and I'm trying to connect to it via Flash's XMLSocket. I know for sure that this server is working properly as I have used it successfully with multiple non-Flash client applications. For right now, I just want to connect to the remote server with an SWF residing on my local disk. From what I understand, this means that I do not need a security policy file since the SWF is not in another domain. I have also confirmed that the security sandbox property of the file is set to local-trusted, so the SWF should be able to connect to servers and retrieve data from them. Here's the important code from the AS file:
I'm writing a flash chat program using XMLSocket.It's connecting and sending data just fine. The server is sending the data back just fine (I checked the packets on Ethereal), but Flash is just not receiving any data.[code]The server is a Java server written with the NIO classes.
I'm currently playing around a bit with Java and Flash's XMLSocket to get them to talk together. The Flash documentation doesn't mention this anywhere, so I assumed that Flash's XMLSocket sends out its data encoded in UTF-8 just like XML.load expects its XML files to be UTF-8 encoded (and won't take anything else even if you tell it to!). This seems to be correct, because I've had Java send the string back as UTF-8 and Flash displayed it fine.However, there is a slight complication. XMLSocket's EOF marker for both input and output is a single zero byte, but certain high-codepoint Unicode characters get encoded in UTF-8 containing several zero bytes. When I have Java send back a byte sequence containing one of these multi-bytes characters, XMLSocket's onData seems to fire for the zero bytes that are part of the UTF-8 encoded string, as well as the zero byte EOF markerCode:61 62 63 00My Java server receives this sequence successfully and echoes it back to Flash identically. So Flash then receives:Code:61 62 63 00XMLSocket reads this, fires onData when it hits the last zero byte, and all is fine.
And ALL I'm trying to do is return the information from the dataHandler to my main flash application.So just to emphasise I don't want it to trace the output (which it does OK), I want to return it as a String to my main application.
I have done everything in my knowledge and everything i can find in Google to successfully connect to a simple php socket server that I create on my friends server.I can connect to the server successfully as long as the flash file is not on the server.If I "run" the fla on my computer, it works perfectly.I also sent the SWF to my friend who owns the server and he was able to get it to work running from his computer.He had a security thing at first but was able to change his settings to get it to work.I have tried uploading the swf to one of my servers and run it but it did not work either.As found in google, I added a crossdomain.xml file to the server and allowed any possible path that could be used. Nothing seems to work unless the flash is running straight off of the users computer.I have also tried the loadPolicyFile and it did not help either.
I'm trying to make a multi-player game. Should I use SharedObject, which I find REALLY simple, or XMLSocket to make the users communicate with the server? Which will be the faster option?
some other buds are creating a game where we need to have multiple players in 'real time'. I have tested the solution of using a database/text file to handle the player positions, but it used huge amounts of CPU w/ only 2 players. So I wrote a socket server in PHP, and now I need help creating the AS part of it .I already wrote a bunch of accessors, I would like you to tell me if this is the best way to do it, as I am a total AS n00b.
Code: /* Handle the receiving of player positions */ XMLSocket.prototype.onData = function (PlayerList)[code]...........
I am currently working on a project that involves using sockets. I am using Flash CS5 and AIR2.0. I am also using another program that will be acting as the socket server (Esperient Creator).I have successfully SENT socket commands from my AIR app to the server.What I need to do is RECEIVE socket commands within my AIR app from the server program. I read somewhere that this was a new feature for AIR 2.0. If anyone has any insight on how to get this to work.
I'm working on a game in flash right now, written in actionscript 2, where bottles fall from above at random speeds, and the object is to shoot the bottles as they fall, and every time you hit a bottle a different message appears on the screen for a brief period of time before disappearing. So far I'm able to make the bottles fall and I'm able to shoot and break them, but I don't know how to work it so a different message appears each time you shoot a bottle. I'm attaching the file of what I have so far. Attachments: Bottles!!!!!!.fla.zip (45.0 K)
I'd like to capture the feedback I receive in the Output panel when testing something in the Flash IDE, and display it in a TextArea included in my movie when it is compiled and running in a live environment. Is there any way I can make this happen?
Is it possible to deserialize the AmfPhp messages while remoting? They are in binary, and assuming that amfphp understands what they are I should be able to decode what it s.
Is there a way to log debug messages with Actionscript 3 like log4j? i want to log user interactions in a Flash app(all the events and the user inputs).
I have a system where clients connect via http streaming channels and use Producer and Consumer classes to dispatch and receive messages. I need to test the latency of messages in a way that adequately simulates real-world usage when the server is under load. I have 3 ideas for how this may be accomplished. Has anyone tried and succeeded or failed with these methods?
something I seem to be seeing a lot more these days are error messages from flash.. often on quite major websites - and now that I am using AS3 they are also starting to appear in mine! (still at the testing phase though)
Often the site continues to run fine in spite of the error, but its a real bad look to end users, clients etc. Is there any way just to turn error reporting off in the flash player or in a published swf?
I know it would be better to fix the errors but some of them are really dumb. Like the one that is plaguing me at the moment - I have some objects that check the "relatedObject" property on rollout. Sometimes they are quite near the edge of the stage.. if you click and then roll right out of the browser window it says:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at nxx_fla::main_1/clip_rollout()