In this Lesson
You will learn how to attach an agent to a scene.
Concepts
The process of attaching an agent to a scene is called binding an agent or simply binding. Binding an agent to a scene allows the content and function of the agent to animate the skin and transform it into product.
Agents can be bound to the scene at two levels
- Agents can be attached to a layer
The agent will be started when the layer is opened and stopped when the layer is closed. - Agents can be attached to a scene
These are called global agents. Global agents are started when the scene opens and stopped when the scene closes.
Agent binding is accomplished in the following ways
- Linking an agent node to a scene element
- Linking an agent event to a scene element
- Linking an agent conduit to a scene element
- Adding an agent to the scene or layer without linking it to any specific element
This allows a scene to run and do things other than contribute content or function to scene elements.
[ hmmm, what might those things be? ]
Bind an agent to a scene
You will now bind the PartyList agent to the PartyDefinition scene.
- Open the PartyDefinition scene
- Delete layers 1, 3, and 4
- Remove the “Open Layer 2” button from the remaining layer
- Select the Agent Binding Perspective
- Add the PartyList agent to the layer
- Take a moment to review how the agent information is presented
- Bind the partyName node to an element by dragging the node and dropping it on the element designed for the party name.
- Right click on the element to see its bindings
- Close the element properties by clicking on the layer design canvas.
- Right click on the row to see its bindings
- Close the element properties by clicking on the layer design canvas.
- Drag the host name node to its element in the scene
- Drag the partyDate node to its element in the scene
- Save the scene
Test the Scene
- Start the Derby database server if it is not already running.
- Start the server
- Start the solution
- Click through the splash scene.
- You should see parties from the Party table displayed in the scene.
That’s all for this lesson.