Skip to content

Studio Script Reference: Lifecycle actions

context.actions.activate()

Activates a scene or component. Not supported in cloud render contexts.

Example:

js
context.actions.activate({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.deactivate()

Deactivates a scene or component. Omit target to deactivate the current element. Not supported in cloud render contexts.

Example:

js
// Deactivate a specific target:
context.actions.deactivate({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

// Deactivate the element that triggered this action:
context.actions.deactivate({});

context.actions.focusMove()

Moves focus to a specific focusable element. Used for remote control / keyboard navigation.

Example:

js
context.actions.focusMove({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.hideScene()

Hides a scene.

Example:

js
context.actions.hideScene({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.showScene()

Shows a scene.

Example:

js
context.actions.showScene({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.toggleActive()

Toggles the active state of a scene or component. Not supported in cloud render contexts.

Example:

js
context.actions.toggleActive({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.toggleScene()

Toggles the visibility of a scene.

Example:

js
context.actions.toggleScene({
  target: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});