Socket Communication


 

Step 1

 

Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and select Frame 1. Expand the Actions window and enter the following code:

 

 

       mdm.Network.UDP.Socket.startServer(4000);

 

 

This Command is required to enable the socket server; It has only one parameter which is the port that the projector is instructed to listen to. In this case, we have set the port to "4000".

 

Select the TEXT tool and create a dynamic text box anywhere on the movie. Label this box "cMessage".

 

tutorial_sockets_01

 

After creating your text box, export your Movie as a SWF called "Client.swf".

 

Continue to Step 2