This article contains random tips and tricks we and our customers have come across in our work with Intuiface. If you have a tip or trick you'd like to share, tell us!
SlideShow playlist with Videos and Images
Start by binding the "Display duration" property of the SlideShow to a Text Asset. The TextAsset will be used as a variable. With Triggers and Actions, set the desired display duration value to the text so that the next slide will be based on this value.
The approach is as follows:
- Add a Text Asset on the scene (it will be used to define the Display duration of the SlideShow). Each slide will modify this text so that the next slide will respect the set duration.
- Bind the value of the SlideShow's Display duration property to the Text Asset
- Set Triggers and Actions on each asset in the SlideShow that will modify the text
For example:
- WHEN - Slide 1 - Moved into focus - THEN - Set text - 00:00:05
Since the SlideShow's duration is bound to the text, the next slide will last for 5 seconds.
Assuming your video is on slide 3, you will have to set the following trigger on slide 2 :
- WHEN - Slide 2 - Moved into focus - THEN - set text - 00:00:20
Upon loading, slide 3 will have the duration value of 20 seconds.
In order to play the video from the beginning, each time it comes into focus, you will have to setup the following triggers and actions on the video:
-
WHEN - Video - Moved into focus - THEN - Video - play (you can set this action on the same moved into focus trigger that changes the text)
-
WHEN - Video - Moved out of focus - THEN - Video - Stop
To see the theory in action, download this sample experience
Create an infinite looping scroll
To create an infinite looping scroll effect, you can use the Scroll Collection with the following trigger and action on the collection itself:
WHEN- Scroll Collection - Reaches right boundary - THEN - Scroll collection - Scroll to left boundary
This action exposes animation parameters that you can configure according to your needs.
To see this theory in action, download this sample experience.
Create a Video Playlist
To create an automatic video playlist you can use Triggers & Actions combined with the Video asset's Ends trigger to scroll a collection containing your videos and then call the Play action on the next video.
To make the playlist loop, setup the following trigger on the last video of the collection:
- WHEN - Video - ends - THEN - Collection - Scroll to index 1 + Video 1 - Play
To see the theory in action, download this sample experience.
Alternatively, you can also use the Autoscroll behavior (only available in ordered collections) to have your videos played successively. The Autoplay video in focus property will overridesoverride the "Item display duration" property.
If using the second method, manipulating the video's timeline is not possible. The video will jump back to starting position.
You can download our Ordered Collection Properties Demo from the Marketplace to have a better understanding on how this feature works.
Simulate Item in focus for Asset Grid
The Index in focus Property is only available on certain ordered collections (Asset Flow, Carousel, Helix, Flip Chart), to emulate this property and achieve a similar behavior to "Item in focus" Property on an Asset Grid, you can use the following approach:
- Using Bindings get the value of Index in focus property of the Asset Grid's Scroll offset Property.
- Using a Custom Script Converter convert this value to an emulated index property.
As an example we will use a Carousel and bind it's "Index in focus" Property to the "Scroll offset" Property of an Asset Grid collection. On this binding we will use a Custom Script Converter to change the value returned by the Asset Grid's scroll offset property into an index value
Below you will find the formula to be used in the Custom Script Converter
Math.floor(INPUT / (300 + 15)) +1
where:
- 300 represents the default item width of the Asset Grid
- 15 represents the item spacing
- +1 is set because index starts at one
- Math.floor() returns the lower integer of the division.
To see the theory in action, download this sample experience.
Animate a Simple Text through the screen
- Use the Simple Text asset to create your text
- Move it outside of your scene
- Create a Timer trigger on the scene that will call a move to action on your text asset
- Set the animation to repeat indefinitely with a jump to start reverse behavior.
Adjust the duration of the animation to change the scrolling effect speed.
Animate a list of elements, like an RSS or Twitter feed.
- Modify the design & layout of your RSS or Twitter feed to have a horizontal Asset Grid
- Enlarge the Asset Grid's width so that all elements are visible.
- Hint: width = item width * number of elements
- Move the Asset Grid outside the scene
- Create a Timer trigger on the scene that will call a move to action on your Asset Grid
- Set the animation to repeat indefinitely with a jump to start reverse behavior.
Blur assets that are out of focus in a Scroll-able Collection
! NOTE: using blur effect may affect rendering performances.
Preset the blur property to your desired value for all images, the initial scroll effect of the Asset Flow will automatically make the first image clearly visible when the experience is played.
Add the following triggers and actions on the images nested within the Asset Flow:
-
WHEN - Image - Asset Flow - Moved into focus - THEN - Image - Visibility & Effects - Apply effects (blur 15)
-
WHEN - Image - Asset Flow - Moved out of focus - THEN - Image - Visibility & Effects - Apply effects (blur 15)
To see the theory in action, download this sample experience.
Excel Category filtering on a different sheet
If you need to display a "more details" section for items coming from an Excel Data Feed, add the additional content on a different Excel sheet, other than the one from which the filtering action is triggered.
Each "more details" entry should have a corresponding identifier on the secondary sheet. In the image below, the identifier is the Author's name.
The Trigger/Action:
Excel's Sheet structure:
And, the result:
To see the theory in action, download this sample experience.
Excel Based Leader-board
Using the add row action you can write values in excel. The excel file can then be sorted using the sort action so that it displays, in descending order, a list of entered values. By combining the two actions, you can create a leader board for your games.
The experience that you will find for download below it is based on the Marketplace sample Wheel of Fortune. Before trying the experience, it is advisable to get familiar to how the original Wheel of Fortune was built. Please find more details here.
To see the theory in action, download this sample experience.
Mix content types within an Excel data feed
You may sometimes need to reference different types of media in the same column of an Excel spreadsheet referenced by the Excel Interface Asset. To display this mixed media using only one data feed, use Custom Script Converters to determine the visibility of each asset type (Video, Image, Document, etc).
Method n°1 - Using file extensions
Important NOTE: This approach requires that all media of the same type (e.g. all images) must have the same file extension. In addition, file extensions are case sensitive.
Here is an example that evaluates an image's visibility. This converter would be associated, via binding, with the Visibility property of an Image Asset placed within the data template (see next section):
if (INPUT.endsWith(".jpg"))
true;
else
false;
The asset containers for each media type need to be stacked on top of each other inside a Group Asset which will become the master template element for the data feed as shown below:
To see the theory in action, download this sample experience.
Method n°2 - Using media types
This alternative method is explained in details and available on Community, it basically overcomes the usage of media file extensions.
Comments
0 comments
Article is closed for comments.