Currently network operations run in separate threads that AS Execution and 
DisplayList Rendering. Only when data has been loaded, do these events cascade 
into the ASExecution. Networking threads include all calls to: LoadVars, XML, 
LoadMovie, LoadVariables, URLStream, Socket, XMLSocket, FileReference, Etc. 
These are all just TCP socket connections!

You need to use flash.net.Socket!

Socket is a full 2 way connection and you can shove just about anything over in 
both directions including SWF, TEXT, AMF, XML, GIF, PNG, JPG and more. When 
data arrives, the "socketData" fires letting you know that data is in the 
ByteArray buffer.

Think of it this way:

The AS point of execution can only be in one place at one time at any moment. 
It is either:

1. Executing AS Bytecode.

2. Updating the DisplayList.

3. Processing events with AS Bytecode. 

When data arrives over Socket, URLStream, URLLoader, XMLSocket, data is 
processed in #3. 

Darron's VNC code uses the VNC binary RFB Protocol directly. As packets are 
received from the VNC server, the component renders graphical updates to a 
common image that looks like a desktop. As you move the cursor or type, it 
tells the server to move the cursor on the remote machine, which in turn sends 
more graphical updates. I personally spent about 2 hours pouring over that 
codebase and I learned a ton. Now understand I am biased given my IFBIN 
involvement, so take that with a grain of salt.

Polling in this type app would be a mistake given the overhead of HTTP. Working 
locally with SYNC (Python Twisted) using the flash.net.Socket you can make 
about 500-1000 round trips per second to a local server. It is the fastest way 
to get any data in and out of the player. Given working locally your bandwidth 
is very high with near zero latency. Socket is the right answer as you can send 
and receive data as needed.

setInterval is executed in the event phase of the player execution loop. There 
is never a single moment when bytecode is executed in parallel in the same 
player instance.

Cheers,

Cynergy Systems, Inc.
Theodore Patrick
Sr. Consultant
[EMAIL PROTECTED]
tel: 1.866.CYNERGY
http://www.cynergysystems.com

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.1/278 - Release Date: 3/9/2006
 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to