A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Receiving Socket Messages

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    40

    Receiving Socket Messages

    Hello,
    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, please let me know.

    Thanks,
    Jake

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    The Socket class (and XMLSocket class) in AS3 has a data event -- this event fires when data arrives on a socket. You'll need to add an event listener to your socket object which can handle the data when it arrives.
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center