Name: openBackground

Type: message

Syntax: openBackground <pBackgroundID>

Summary:
Sent to all background groups when a card they are placed on is opened.

Associations: group

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
on openBackground theBackgroundID
  -- update content of group
end openBackground

Example:
on openBackground theBackgroundID
   if the short name of this card is "highscores" then
      show button "play again"
   end if
end openBackground

Parameters:
pBackgroundID:
The ID number of the background being opened.

Description:
Handle the <openBackground> message to change a group's objects, or
perform other updates, when a card with the group on it is opened.

The <openBackground> <message> is sent to background groups, if there is
more than one <group> on the <card>, the <openBackground> <message> is
sent to each one.

The <openBackground> <message> is sent after the destination <card> is
visible. To make changes that take effect before the <card> becomes
visible on the screen, use the <preOpenBackground> <message> instead.

The actual navigation is not triggered by the <openBackground>
<message>, so <trap|trapping> the <message> and not allowing it to
<pass> does not prevent the <card> with the <group> from opening.

>*Note:*  A group is only considered a background group if its
> <backgroundBehavior> property is set to true.

References: group (command), pass (control structure), message (glossary),
trap (glossary), card (keyword), preOpenBackground (message),
openCard (message), startup (message), newBackground (message),
closeBackground (message), openStack (message),
backgroundBehavior (property)

Tags: navigation

