Network Message Action
You can use Network Message actions to send network messages to external devices or applications if the corresponding component is interacted with in the specified way, e.g. when a button is touched.
Creating a Network Message Action
Select the component to trigger the action. Go to the Actions tab in Inspector and click the button below the Actions list. Then select the Network Message action from the pop-up menu.
You can now select the Event, Receiver, and other general settings for the action. For more information on general settings of actions, see Using Actions.
Network Message Action Settings
The Network Message action offers the following settings for the Network Packet:
- Message: Here you can enter the message text that will be sent when the action is triggered.
- Send HEX: Select this option if you want to send a network message in hexadecimal format.
Using Network Message Actions
Network messages are useful at trade shows or anywhere where controlling external devices is required. You may also want to employ network commands for shows or stage setups.
Working with network messages in Touch Creator is similar to using them in Terminal or other command line interpreters. We recommend learning about network messages and the use of the OS X Terminal application. Also, understanding the character of TCP connections might be useful to avoid problems.
In this section an overview of how to work with network commands is given. Network commands are used in two types of cases. The first is to control external devices or applications by sending commands via a Network Sender component. The second case is to control your Touch Creator scenario through network commands received by a Network Receiver.
Basically, if you want to send network commands, create an Network Message action for the triggering component, e.g. a button. If you want an incoming command to control a scenario component, create the action for the corresponding Network Receiver. Both cases are treated separately in the sections below.
How to Send Network Commands
To send network commands via Network Sender components, you need to create the corresponding actions for the triggering components. Let's say, for instance, you want the click on a button to send a network message.
Select the corresponding Button component and create a Network Message action. Then select the triggering event, e.g. Clicked and the Network Sender as a receiver. Finally enter the corresponding message to be sent. Having completed these steps, your button is ready to send the network command.
How to Process Incoming Network Commands
To process network commands from external sources, you have to create actions for the corresponding Network Receiver component. Let's say, for instance, you want a network command to toggle the visibility of an image. Select the corresponding Network Receiver and create a Toggle Visible action for it. Next, select Network Message as the triggering event.
To complete the action, select the corresponding Image component as the Receiver and enter the command or string that triggers the action in the Parameter field. Now you are ready to control your multi-touch scenario via network commands.
Note: To send or receive network commands, a Network Sender, and a Network Receiver respectively, must be placed in your scenario and properly configured. Network Sender components must also be activated. You can use multiple network components to send network commands to or receive them from different external instances.