How do I create a carousel?

How do I create a carousel?

You can create a simple carousel using JavaScript API
1. Create a block layer with a 'magic' name-"SignStix_Carousel"
2. Add a WebView layer and drag this off the sign, this will be used for writing your 
JavaScript
3. Set the URL as 'about:blank' 
4. In 'Associating a folder' drag and drop the folder containing the images 
you would like in your Carousel from 'Media Management'
5. Tick 'JavaScript API'
6. Edit the Javascript API, using the Javascript below will add a Carousel to your block with the images contained

//returns a JSON full of files matching the search parameter
var l_jsonFiles = JSON.parse(SignStixFiles.getFilesMatching("",".*" , false));
console.log("l_jsonFiles: " + JSON.stringify(l_jsonFiles));

var carouselLayer = SignStixGraphics.getLayerNamed("SignStix_Carousel");

for(var i = 0; i < l_jsonFiles.length; i++)
{
    var obj = l_jsonFiles[i];

  var ref =  SignStixFiles.getFileRef(obj.path, obj.name);
  
    carouselLayer.addCarouselImage(ref,"nothing");
}
 
function shiftUp() {
  carouselLayer.carouselShiftUp();
}

// Set the last param here to the delay before changing images, 3000 is 3 seconds, 4000 is 4 seconds etc
setInterval(function(){ shiftUp() }, 5000);
    • Related Articles

    • How do I create a sign?

      Signs can be created using the Creator tool in your SignStix account.   Please see the following link for some step by step instructions on how to create your first sign in SignStix: https://www.signstix.com/support/tutorials/creating-a-new-sign/
    • How do I create a widget?

      You can use the SignStix webview tool in Creator along with SignStix javascript API to build components for SignStix.  There are some examples here: https://bitbucket.org/signstix/code-snippets The gist is that you create a webview layer with a URL ...
    • How do I create a playlist?

      To create a playlist: 1. Navigate to content, click the (+) icon and choose ‘New Playlist’. 2. Enter a name for the playlist. 3. Click the plus (+) button on the right hand side. 5. Add your video. 6. Add further videos if you like. 7. Click ‘close’ ...
    • How do I create a location?

      Locations are used for organising your devices (screens) and assigning signage content.  Typically, locations represent geographical areas but may also be used for departments or product groups.  Locations can be arranged into a hierarchical ...
    • How do I create interactive content for a touchscreen?

      An interactive sign is a digital sign intended for deployment to a touchscreen.  Interactive signs are created, edited, and deployed in the same way as 'normal signs'.  The only difference is that an interactive sign contains 'events'.   A ...