Several issues back I introduced the use of Behaviors in IMS
Web Engine to create complex interactive Web Pages. A few
weeks later this was followed by an article on using behaviors
to create a counter Text Object. For those of you that did not
have a chance to read them, both articles are available on the
IMS Web Tips site at: http://www.imswebtips.com/issue20top3.htm http://www.imswebtips.com/issue22top3.htm
As was mentioned in these articles, a Behavior can be
separated into two main components. An Event that triggers
the Behavior and an Action that is taken when the Event
occurs. The Behavior Editor includes several dialogs to set the
various Actions. These are the Links, Actions, Formulas and
Metamorph Dialogs.
The Links Dialog is pretty straight forward and mirrors the
Links Dialog in the Object Editor. The primary difference is
not in the link but in the Events that can be used to trigger it.
A standard hyper-link requires that a user click on it. A
Behavior however, can be used to trigger a link when any of
many different events occur. These could be when a user
moves a mouse over an Object, when two objects intersect or
when a formula value is realized. Is28fig2 illustrates a simple
example where a link will be selected if you correctly answer
a simple math problem. A bad answer will trigger a rebuke.
The Actions Dialog provides the most common actions that
can be taken when an event occurs. Unlike the Link, Value
and Metamorph Dialogs, the Actions dialog can assign actions
when the Object is triggered either Active or Not Active. The
Motion, Visible and Sound check boxes will work on the
current Object to start or Stop its Action component, make it
Visible or Invisible or to play a Sound Effect. Is28fig3 illustrates
all three examples when you click on the Object.
The Trigger and Reset check boxes can be used to make
another Object Active or Inactive. In the example at Is28fig4 two
Objects will alternately trace a path as in the previous example
but will be triggered by each other with the Trigger boxes.
The Reset Path and Reset Trigger check boxes can be used to
restart an Object's Action and reset the Behavior. This is
normally done when an Object enters the 'Not Active' state.
For example, an Object can be set to trace a path 3 times when
it is triggered active with a Mouse click. If the 'At Path End'
option is selected in the 'End Event' dialog, the Object will
enter the Not Active state when it has finished tracing the
path. By checking the Not Active 'Reset Path' and 'Reset
Trigger' options, the animation can be restarted by clicking on
the Object again after it has finished tracing the path. If the
box is not checked, the Object can not be restarted. By
checking the 'Reset Path' and 'Reset Triggers' boxes in the
Active section, the animation can be restarted at any time. Is28fig4
uses the Reset Path and Reset Triggers options to reset each
Wizard to start again when triggered by the other Wizard.
The Formulas and Metamorph dialogs can be used to create
more advanced Behaviors. These will be IMS Tip topics for a
near future newsletter.
"IMS Web Tips" is a weekly news letter for all web site managers regardless of experience who are looking for detailed information on creating, maintaining and promoting their web sites.