CourseLab CourseLab 3.5. User's Guide Previous topic Next topic

Agent

An Agent is an animated character with a set of basic Actions which can be launched using this Object’s Methods.

Examples of Object appearance:

Object Parameters

You can specify an Agent’s appearance and display parameters

In case Warn if security settings are too strict checkbox is set and there is no possibility to setup connection with Agent Flash-movie, warning message will appear.

Use HTTPS in codebase attribute is used to check Flash Player version using secure protocol HTTPS. If you do not know if you need it or not - just left it set.

Object control

By default, Object is displayed in idle mode for an indefinite period of time. Object Methods (functions embedded in the Object, which modify the state of the Agent) are used to control the Agent.

Picture a situation when we have both a question and an Agent character presented in a Slide. The Agent’s task is to applaud when the provided answer to the question is correct.

Here is the sequence of the necessary Actions:

1. Memorize character ID and open Actions dialog for the Question Object.

2. Select on Success event in the Events panel.

3. Select METHOD action in the Action panel.

4. Specify parameters for the selected Action – select character ID; in the Select Method dialog specify ACTION with the following parameters: Applaud and Return upon completion. Confirm your choice. At this point, configuration of the relationship among the Objects is completed.

In this example, the Event of the Question Object has been used for launching the Action. However, any other Events or delayed Actions can be employed for the same purpose.

Object Methods

The following Methods can be used when working with Agent Character:

Let us review the ACTION Method in greater details. Almost all Actions embedded into the Object have two execution phases: Action execution and return to idle state.

When you select automatic return into the idle mode, the above-mentioned Action phases will be automatically executed one after another. When we select wait for signal to return to idle mode, only the first phase - execution of the Action itself - is launched. The return to idle state is postponed until you use the IDLE Method or launch any other Action (in that case, before the new Action can be executed, the Object returns to the idle state automatically).

Sequence of Actions

If the agent receives a command for a new Action while it is not in the idle mode ( meaning it is in the process of completion of a previous Action) this command is stored in the agent’s “commands queue” and new Action is postponed until the previous one finishes execution. The “Command queue” of the “Agent” role is based on the FIFO (First In First Out) data handling concept: i.e. each new incoming Action command is added to the end of the execution line. Therefore, by employing the “Command queue” you can create any sequence of Actions for the character.

Object Events

Object is capable generating events with regards to the user's actions and interpretation of the actions by the object. When combined with actions events can be employed for building up intellectual behavior models for other objects depending on the current state of the Object. Events are available using CourseLab built-in events manipulation mechanism.

Event Triggered Upon
on Ready When Flash-movie is fully loaded and ready to accept commands
on Action End When any action is ended

Object Specific Properties

Along with common object properties, this object has some specific properties, that can be used in actions and in text substitutions (OBJ_ID below means current object ID):

Property Returns Syntax
curState Current state (action) - one of action token (short names) $OBJ_ID.curState
lastState Last state (action) - one of action token (short names) $OBJ_ID.lastState
queue Action queue (action tokens, comma-delimited) $OBJ_ID.queue