Making content interactive

Interactivity allows you to control how certain actions are triggered in your content. For example, you can use interactivity to add the following functionality to your content:

add rollovers to objects

define hyperlinks that link to other content

launch an application

play animation sequences or sounds based on user actions

An interactive element comprises the following two components:

an event, such as a button click, that is used as a trigger

an action, such as the playing of an animation or sound, that is triggered by that event

The BlackBerry® Composer enables you to add interactive elements by defining an event trigger, then specifying the actions triggered when the event occurs. One event can trigger multiple actions.

Using different combinations of event triggers and actions, you can create a variety of interactive effects.

For example, when you create an animation object, you create a self-contained animation with its own timeline; it is not based on the main timeline of the BlackBerry Composer project, and may not begin playing when the content is loaded on the BlackBerry device. To begin playing the animation object, it must be triggered by an event.

You can trigger the animation by defining any of the following types of events:

user-initiated; for example, when a user clicks a button or presses a specified key on the BlackBerry device keypad

timeline-initiated; for example, when the main timeline reaches a specified frame

an event that is relative to some other action; for example, 5 seconds after Animation_X stops playing