Description
The Swap collection enables your users to browse through a collection of content one at a time, like slides in a slideshow. Multiple transition options exist, as illustrated in the image below.
Like most collections, the Swap collection can include any asset type, including buttons and even other collections. Buttons in a Swap collection can be used to trigger any action, including navigation to other scenes. To do so:
- Create Simple or Image buttons in the same scene as the Swap collection .
- If Image buttons, select an image for each button, optionally using different images for Pressed and Released states.
- Define actions for each button using the Triggers and Actions panel.
- Drag these buttons into the Swap collection either from the Scene Structure panel or from the design canvas.
- Using Player or Composer's Preview Mode, click the button actively displayed in the Swap Collection to trigger its action(s)
NOTE: If you embed buttons in the Swap collection then use of the Swap Collection control is required to move from one button to the next. A touch anywhere inside the active item of the Swap collection will be seen as a Pressed trigger followed by a Released trigger for the actively displayed button.
Properties, Triggers & Actions
Properties
See Common collection properties for details of common properties shared by different all collection types
Container & Content
- Style: provides the list of currently available collection styles. Select another collection style to display your content in a different way.
Collection Appearance
- Display loading images: shows the loading indicator set by the experience property
Appearance
- Index in focus: specify which item in the collection should have focus
- Show curtain shadows: generates a shadow effect on the left and right-hand side of the Swap collection container
- Show icons: displays "asset type" identification icons on the assets in the Swap collection
Behavior
- Transition: visual effect to use when moving from one item in the collection to another
- Allow scroll: Specify whether a tap or swipe of the item in focus should cause the collection to move to the next or previous item. Even if "Allow scroll" is disabled, the collection controls - if visible - can still be used to manually navigate through the collection.
If selected, two additional properties appear- Tap item to flip: Toggle if Swap collection should move to the previous / next item if tapped on the left / right side of the item in focus.
- Swipe item to flip: Toggle if the Swap collection should move to the previous / next item if swiped to the right / left.
- Scroll by: defines the number of items scrolled when the scroll arrows are tapped
- Initial scroll effect: reminds users that the collection is scrollable each time the scene is displayed
- Soft move speed: defines the soft move speed when items are scrolled horizontally or vertically
- Allow interaction with item: toggle whether or not an item can be interacted with. For example, if this property is turned on, touching a video in a collection can cause the video to play.
- Show usage animation: toggles whether or not to display a graphic illustrating how to interact with this collection
- Tap item to open: toggle whether or not a touch on an item will cause a copy of that item to open outside of its parent collection. NOTE: If Tap item to open and Allow scroll are both selected, then Tap item to open requires a touch in the center of the visible Swap collection item. Touches on the left and right side of the Swap collection would cause the collection to move to the previous/next item.
- Drag and drop item to open: toggle whether or not a drag-and-drop action on an item will cause a copy of that item to open outside of the Swap collection.
- Resize ratio for opened item: identify the size multiple of an opened item in comparison to its size while inside the collection. A ratio of 1 means don't change the size, a ratio of 2 means double the size, a ratio of 0.5 means reduce the size in half, and so on.
Autoscroll is discussed in the article about common collection properties.
Triggers
See Triggers Overview to get details of common triggers shared by all assets or collections
- Index is changed: Raised when the index has changed.
- Is moved to the next item: Raised when this collection is moved to the next item.
- Is moved to the previous item: Raised when this collection is moved to the previous item.
- Is scrolled: Raised when this collection has been scrolled.
- Last item is reached: Raised when the last item has been reached.
- Reaches index: Raised when the specified index is reached
- Index: the index to reach
- Autoscroll
- Autoscrolling is paused: Raised if autoscrolling is paused due to a user action
- Autoscroll is activated: Raised if autoscrolling has started
- Autoscroll is deactivated: Raised if autoscrolling has been stopped
- Is autoscrolled: Raised if the collection has autoscrolled
The screenshots below illustrate the set of triggers and actions specific to the Swap Collection.
Actions
See Actions Overview to get details of common actions shared by all assets or collections
NOTE: The Open item action requires that the collection's Visible property be set to True and that the item to be opened is already scrolled into view. If the item is not yet scrolled into view, use the Scroll to or Scroll to an asset actions before calling Open item.
- Close all opened collection items: Close all opened collection items.
- Next: Go to the next item.
- Open item: Open a copy of the item outside its collection.
- Index: The index of the item to open.
- X: The X position to open the item at.
- Y: The Y position to open the item at.
- Orientation: The orientation to open the item with.
- Previous: Go to the previous item.
- Scroll to an index: Scroll to an item using its index.
- Index: The index of the item to scroll to.
- Scroll to an item: Scroll to an item using its Name property.
- Item name: the asset name to scroll to.
- Autoscroll
- Start autoscroll: Start autoscroll for this collection if it isn't already running
- Stop autoscroll: Stop autoscroll for this collection if it hasn't already stopped
- Toggle autoscroll: Start autoscroll if it's stopped, stop it if it's running
Comments
0 comments
Article is closed for comments.