Adobe InDesign CS6 Server (8.0) Object Model JS: Behavior
From InDesign Server CS6
Behavior
A behavior object.
Superclass of AnimationBehavior, ClearFormBehavior, GotoAnchorBehavior, GotoFirstPageBehavior, GotoLastPageBehavior, GotoNextPageBehavior, GotoNextStateBehavior, GotoNextViewBehavior, GotoPageBehavior, GotoPreviousPageBehavior, GotoPreviousStateBehavior, GotoPreviousViewBehavior, GotoStateBehavior, GotoURLBehavior, MovieBehavior, OpenFileBehavior, PrintFormBehavior, ShowHideFieldsBehavior, SoundBehavior, SubmitFormBehavior, and ViewZoomBehavior
QuickLinks
addEventListener, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifierHierarchy
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| behaviorEvent | BehaviorEvents: BehaviorEvents.MOUSE_UP BehaviorEvents.MOUSE_DOWN BehaviorEvents.MOUSE_ENTER BehaviorEvents.MOUSE_EXIT BehaviorEvents.ON_FOCUS BehaviorEvents.ON_BLUR |
r/w | The event which triggers the behavior. |
| enableBehavior | bool | r/w | If true, the behavior is enabled. |
| eventListeners | EventListeners EventListener | readonly | A collection of event listeners. |
| events | Events Event | readonly | A collection of events. |
| id | number | readonly | The unique ID of the Behavior. |
| index | number | readonly | The index of the Behavior within its containing object. |
| isValid | bool | readonly | Returns true if the object specifier resolves to valid objects. |
| label | string | r/w | A property that can be set to any string. |
| name | string | readonly | The name of the Behavior. |
| parent | Button CheckBox ComboBox ListBox RadioButton SignatureField TextBox |
readonly | The parent of the Behavior (a Button, CheckBox, ComboBox, ListBox, RadioButton, TextBox or SignatureField). |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
Methods
Instances
EventListener addEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Adds an event listener.
| Parameter | Type | Description |
|---|---|---|
| eventType | string | The event type. |
| handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
| captures | bool | This parameter is obsolete. (Optional) (default: false) |
string extractLabel (key:
string)
Gets the label value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
Array of Behavior getElements ()
Resolves the object specifier, creating an array of object references.
void insertLabel (key:
string, value:
string)
Sets the label to the value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
| value | string | The value. |
void remove ()
Deletes the Behavior.
bool removeEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Removes the event listener.
| Parameter | Type | Description |
|---|---|---|
| eventType | string | The registered event type. |
| handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
| captures | bool | This parameter is obsolete. (Optional) (default: false) |
string toSource ()
Generates a string which, if executed, will return the Behavior.
string toSpecifier ()
Retrieves the object specifier.
Element of
TimingTarget.dynamicTarget
Used in:
Behavior Behaviors.nextItem (obj: Behavior)
Behavior Behaviors.previousItem (obj: Behavior)
Return
Array of Behavior Behavior.getElements ()
Behavior Behaviors.[] (index: number)
Behavior Behaviors.anyItem ()
Array of Behavior Behaviors.everyItem ()
Behavior Behaviors.firstItem ()
Behavior Behaviors.item (index: varies)
Behavior Behaviors.itemByID (id: number)
Behavior Behaviors.itemByName (name: string)
Array of Behavior Behaviors.itemByRange (from: varies, to: varies)
Behavior Behaviors.lastItem ()
Behavior Behaviors.middleItem ()
Behavior Behaviors.nextItem (obj: Behavior)
Behavior Behaviors.previousItem (obj: Behavior)
| Jongware, 28-Apr-2012 v3.0.3i | Contents :: Index |