ActionScript 3.0 :: Socket - Keep It Alive / Reconnect Every Time You Need It?

Oct 26, 2009

What would be the better approach for using the Sockets in AS3.

1st) open one connection and keep it alive until the site unloads?

2nd) open a connection, use it, and close it when done; then, open again when I need?

Considering a scenario where some users will make a constant use of the Socket, but others will almost not use it, what would be the better approach? Does an alive Socket connection use too much bandwidth? Does the action of connecting consumes more than keeping it alive?

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Reconnect To Socket After Connection Drops?

Dec 22, 2011

I would like Flash to reconnect to a socket if its connection is dropped. I am using the Socket class to establish a connection and then adding an Event.CLOSE listener to the socket. What is a good strategy to reconnect back to the socket if the connection has suddenly closed? Here is a the method I am calling inside the close handler. The connect() method establishes a new socket connection

HTML Code:
private function handleOutage():void
{
// if socket is not connected

[code]...

However, I keep getting the following error:

HTML Code: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation

View 1 Replies

Actionscript 3 :: Socket.readInt() And C# Socket.Send() Different Values Of Int-variable?

Nov 19, 2011

When I send number (int)52 s.Send(BitConverter.GetBytes((int)872415232));, flash show me trace(socket.readInt()); 872415232 If i send 872415232, flash show 52.Why? And how it fix?

View 1 Replies

Flex :: VideoDisplay Reconnect After Idletimeout?

Mar 26, 2010

I have a VideoDisplay that is able to connect to a source and play. After the connection times out I want the connection to be re-established when my play button is clicked. Right now when I reset the source and play the videoDisplay, it gets stuck in the loading state.

View 1 Replies

ActionScript 3.0 :: Lost Main Fla. File / Reconnect?

Apr 11, 2012

In an effort to tidy up my large folder I accidentally moved a fla. file and now I cannot open it.

[Code]...

I tried moving the file back into it's original folder but that did not change things. Is there anything I can do or should I start to accept that it's gone?

View 2 Replies

ActionScript 2.0 :: Reconnect To Classes Files Or Folders?

Jul 23, 2010

I am in cs3, publishing as version 7, using actionscript 2. It is asking to be linked to my classes because of the error messages I am receiving.

what to link to in classes. Is it the file, the folder or folders with sub folders?

View 0 Replies

Media Server :: Live Stream Reconnect / Disconnect Best Practice

Apr 19, 2010

When streaming a live event through FMS 3.5, is there a list of guidelines or best practices to handle the situation when the stream disconnects and should reconnect.Basically, what I do now is wait 20 seconds after the initial disconnect, then close the stream and ask the user to ty to reconnect to the stream again.

View 3 Replies

Actionscript 3.0 :: Handling User Connection Disconnect & Reconnect In Stream?

Sep 9, 2009

I have a problem where I'm streaming a video via RMTP from akamai for a video serving site and an issue has come up during QA where a user starts a video stream and then disconnects their internet connection, which causes the video player to go into the buffer state. The problem occurs when they reconnect their internet connection and we'd like to pick up the stream again.

View 1 Replies

Flash :: Papervision 3d Development Alive?

Dec 18, 2010

So I wonder if papervision 3d development alive? Any google code or ght..?

View 1 Replies

Flash :: (as3) URLloader Keeping Connection Alive?

Feb 1, 2010

I have a little problem with a simple URLLoader,it simply just loads the data from an url, and processes that data, nothing complicated. But, when ever i run it, it leaves the connection open. At the bottom of the browser it says:

Transfering Data From www....

The data is read sucessfully, so it should close the connection? but doesnt seem to want to do it. Is there anyway to close all open connections, or somehow remove such message?

View 1 Replies

Asp.net Mvc :: Keep Alive Page With A Flash On It / Ping Controller

Jun 17, 2010

I have page in my asp.net mvc website with a flash app on it, and the user can stay on that page for hours, but his auth cookie/session is going to expire, so I'm thinking to create a PingController and to call it using jquery $.post each 20 minutes.

View 2 Replies

Flex :: Merge Pdfs(Alive PDF) In Flex3?

Apr 12, 2011

My flex application generates individual pdf documents based on individual selection criterion,but i need to merge those generated pdfs or is it possible to store individual pdfs temporarily then merge those into single pdf?

View 2 Replies

Flex :: Directly Print From Alive Pdf Instead Of Generating It?

Jun 9, 2011

Is there a way to directly print using alive pdf (by passing the step where it saves the datagrid in pdf). Right now I am using Alive Pdf for generating PDF from datagrid and its doing a great job. Since flex printing by itself sucks I was wondering if I could directly print using Alive PDF?

View 1 Replies

Professional :: Overview Of Alive Flash Slideshow Maker?

Nov 13, 2010

Alive Flash Slideshow Maker is a professional slideshow builder to easily create high-impact photo slideshows. It turns your digital photos to flash ( SWF ) slideshow with background music and transition effects. So that you can upload the output flash file to websites and share your memorial moments with your family and friends. You can also post the flash slide show on MySpace, facebook, YouTube, or your Blog.
 
With this extremely easy to use flash slideshow maker, You don't need to learn any additional skills to make a flash slideshow. Simply  drag & drop the photos into Alive Flash Slideshow Maker, click "Publish" and a stunning flash slide show will be generated. Alive Flash Slideshow Maker supports almost all picture formats including JPEG, BMP, GIF, TIFF, PNG, PSD, RAW, WMF, EMF, etc.
 
Features:-Output Flash (.SWF) File and HTML pageCreate two files: a Flash (SWF) file and a HTML page file. This allows you to share the slideshow via uploading the two files to your website simply..-Output Flash (.SWF) FileCreate a standalone Flash (SWF) file only. But the corresponding HTML code will be generated for embedding the flash slideshow into your own webpage. You will be able to copy and paste the code into any webpage.-Output Executed Flash File (.EXE)Create an executable Flash slideshow (.exe file). So that you can play and share the slideshow without webpage and browser. Just double click the generated .EXE file, the slideshow will be played without any Internet Browser.

View 1 Replies

ActionScript 3.0 :: Keeping The Session Alive In Flash Using Keys

Mar 11, 2010

working with a AS3 flash movie button linking to an html form

I have a client that wants to keep the browser session going when it comes to a form being filled out and to pre-fill this data where necessary so basically for Flash to check the user URL and see if there are session keys attached to the URL..

I need Flash to look at the incoming URL which may already have keys attached such as 'uVB2GC1F/xGG3QX1F' and use them by adding them to a button link. These keys will be different every time for each session.

View 10 Replies

Media Server :: Judge Whether A Specific Video Stream Is Alive?

Oct 5, 2010

We need different parameters to play live/playback:
 
// play live from server  //ns.play("test",-1,-1,true);  //playback  //ns.play("test",0);
 
So how to wrap it all up so that it'll automatically detect whether the stream to play is alive,and use the proper parameters ?

View 1 Replies

Flex :: Blazeds - Keeping Alive HTTP Session For Long

Oct 30, 2009

Any standard way to keep alive the http session as long user has open the flex app in the browser? I played around with the polling mechanism of blazeds. But it had no affect on the http session.

View 3 Replies

Flex :: What Keeps Locally Scoped Objects Alive When Listeners Are Registered

Jul 5, 2011

I see this type of apparent magic in all sorts of AS3 code, but here is a reduced example:

[Code]...

As indicated in the code comment, the loader variable should fall out of scope after the URLLoaderExample constructor. However... it still seems to be kept alive (not garbage collected) somewhere since the onComplete listener/handler is able to receive it cleanly. Where is the magic/hidden/global reference to loader that keeps it alive so that it can complete it's load operation, and then be handed to the onComplete listener/callback? Can this reference be seen somewhere?

To help with context... as a similar example, I know that the loader instance will have the onComplete listener registered. I also know I need to be careful to use removeEventListener at all times (?) to avoid potential memory leaks resulting from stranded listeners. What concerns me is that I don't understand where the magic loader reference is and whether (or when) I need to clean that up.

View 3 Replies

Flex :: Actionscript 3 - Flex Socket And Erlang Socket Communication

Jun 29, 2011

I'm creating a client-server game. My client is a flex based game, and my server is erlang server. At the beginning, when I test directly my flex client in flash player, I can establish a connection easily to my erlang server through socket connection. And both can exchange data with no problem. The problem rise when I deploy my flex app at Apache http server, and running it using a browser by calling [URL] my flex socket sends message requesting for a crossdomain policy to my erlang server. So I create an xml message that represent a crossdomain policy, and send it back to my flex app as a response for that request.

Yet still I can't establish any permanent socket connection between my flex client and my erlang server. I know this because I add listener on my flex socket that will modify its internal state to CONNECTED, if a connection between client-server has established.

View 2 Replies

Actionscript 3 :: Create A Pdf In Flex With Pdf Alive For Flex In 300dpi

Mar 1, 2012

Im trying to create a pdf in high resolution in 300dpi with pdf alive for flex, i used this code: var image:ImageSnapshot = ImageSnapshot.captureImage(page[i], 300, new JPEGEncoder()); but i create the pages with a loop for(), and this makes that my web aplication crashed, beacause it spend a lot of time to create the PDF. Exist some way to create this process in the background but dont want the .swf to freeze while the number crunching happens, or another way to create pdf in high resolution(300dpi) with flex.

View 1 Replies

Media Server :: Media Server Can Reconnect If Connection Is Lost During Playback?

Jan 31, 2011

First,i am in project for creating some website with streaming video.The connection to the host is bad and i need to know if Flash media server can reconnect if connection is lost during playback and second,is there some kind of plugin for subtitles,this is very important,If there is a positive answers on those two questions,the third would be "where can i buy it and how"?

View 3 Replies

Javascript :: JavaScript Socket Vs Flash Socket?

Apr 30, 2010

Steve Jobs just posted this article on why Apple rejects Flash... [URL] I agree that javascript and css can be used to replicate some of Flash's animation, though Flash does all sorts of scaling and tweening that is incredibly powerful, and I'm not sure that there's anything comparable in javascript, if there is, I certainly haven't seen it.

However, my question is about the socket. Flash has an incredibly powerful openSocket class that allows you to connect to a server and have the server and the client talk back and forth to one another. As far as I know there is no equivalent class in Javascript. Am I mistaken? Is there some secret mystery Ajax class that replicates the openSocket? If not, then that feature alone makes Flash an invaluable tool.

View 1 Replies

Port 80 Socket Limitation?

Jun 28, 2009

I don't need to deploy an HTTP server and all the connections are made on port 80, the default HTTP port, which is generally not blocked by firewall.Unfortunatly at the end of my work I realized that the flash socket component has some limitation on using port 80.[URL]As nobody is interested by this report, I now think that this limitation is done on purpose by Adobe. I don't know exactly why, may be to force to use their data service product.

I can understand that. But what I am hangry about is that nowhere in the documentation of the socket component there is an information about this limitation. I guess lot of people lost time trying to reach an unreachable goal ! And most of the time you find the problem at the end of the work because local connection is working ok on port 80.

View 1 Replies

Actionscript 3 :: Socket Error - Sometimes?

Sep 5, 2010

I have this Socket (not XMLSocket, just Socket) client. I also have a custom PHP script on my server, that listens on port X. My client tries to connect to it.Everything works fine, the security and communication, sync and whatever else. But - the Flash Player (AIR runtime actually) shoots an error when trying to connect, but ONLY when the server is not running... the error is actually handled by try catch (IOError), and even weirder, the line that is specified in the output as the error line is the line where I just CREATE the Socket...?

Output:

Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
at ---.server::Client()[/DevProjects/Libs/ASLibs/---/server/Client.as:167]
at Function/<anonymous>()[---_fla.MainTimeline::frame1:430][code].....

when I comment out the line where I actually connect using Sock.connect(...) - it does not throw the error, but it obviously does not work... Also, the connect part is also in try catch (IOError) block...

View 1 Replies

AS3 :: C# - Socket / Server MMO Communication

Nov 27, 2010

I'm working on a flash MMO with a c# server. I have a simple messaging protocol for the sockets. When a client joins he sends out this:

[Code]...

View 2 Replies

Flash :: Cant Connect AIR App To Socket.io?

Oct 8, 2011

I'm trying to connect an AIR application to socket.io, it's just not working.

[Code]...

View 1 Replies

AS3 :: Know When A Socket Has No More Data To Return?

Oct 21, 2011

I am trying to communicate using this protocol. It works fine except when the socket has a lot of data to return. Right now I am checking if a packet ends with to determine if I have received all the packages. Problem is that sometimes a package can end with as a line break even if it is not the last package, so I can not use that.

I am using a command queue, because I want to wait for a complete response before sending the next command.

The code with unnecessary stuff removed:

class CustomSocket extends Socket
{
private var _response:String;
private var _commandQueue:Array;

[Code]....

The problem is in the function readResponse. I've googled a lot without finding anything of interest.

Is there a way to know the total amount of bytes/packets a socket will return? Or a way to detect EOF or that a package is the last?

View 2 Replies

ActionScript 3.0 :: Receiving Socket Messages?

May 25, 2010

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.

View 1 Replies

ActionScript 3.0 :: Debugging Socket Connection?

Nov 12, 2008

I have a project where I communicate net.socket class.Everything works fine but when I try to start the debugger I only get someerror message:

Versuch, zu starten und Verbindung zu Player mit URL
c:flash_testSocket.swf herzustellen
[SWF] c:flash_testSocket.swf - 6006 Byte nach

[code].....

View 1 Replies

ActionScript 3.0 :: Hex/Binary Data Over Socket?

Oct 21, 2008

I have a custom socket class designed to connect to a server and talk with it. At one point, the server uses hex data for speed, however Flash seems to not get ANY of this data. In fact, it doesn't get ANY of the data from that point to the next packet.

View 2 Replies







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