WolfTech Billboard Slide Events
The latest version of the Billboard display engine comes with better built in functionality to allow for more control over your dynamic slides. To access this functionality, in the header of your dynamic script, please include the following HTML:
<script type="text/javascript" src="http://billboard.ncsu.edu/bb_app/public/v3/slideEvents.js"></script>
This loads the Slide Events JavaScript file that will act as an event listener for your web page for the functions that the Billboard display engine triggers. Billboard can trigger 6 different functions in your slide: slideStarting(), slideStarted(), slideIsNext(), slideIsStopping(), slideStopped(), and slideSkip(). While this JavaScript replaces the slideDetect.js file originally distributed, it works very differently.
slideStarting(slideInfo)
If the slideStarted function exists on your web page, it is called when the slide begins to transition in to view. The function is useful when combined with the WolfTech Scroller plugin for jQuery or if you write JavaScript code that requires accessing size information from the DOM. This function is called in rapid succession with slideStarted(), so be careful about duplicate code between the two.
At the moment, the only information passed is the slide's desired runtime, which can be accessed with slideInfo.runtime
slideStarted(slideInfo)
If the slideStarted function exists on your web page, it is called when the slide begins displaying and the transition into the slide is complete. slideStarted is passed an object with values about the slide. At the moment, the only information passed is the slide's desired runtime, which can be accessed with slideInfo.runtime
slideIsNext()
slideIsNext is called when the slide is next in rotation. This can allow you to make sure any values that need to be reset before displaying a slide are properly done.
slideIsStopping()
This function is called when the slide has begun it's transition out of the display. Useful if you need to stop a dynamic element that may cause issues during transitions away from the slide or stopping video.
slideStopped()
This function is called roughly three seconds after the slideIsStopping() function. At this point the slide should be completely off the screen.
slideSkip()
The ability to skip slides is a new feature in this display engine. For a while we've received comments that it would be nice if there were a programmatic way to skip a dynamic slide that had no new content, while at the same time not having to remove the slide from the Billboard rotation. This is now something Billboard is able to do with the slideSkip() function. If this function exists on a page and returns true (the boolean value), Billboard will recognize that it should not show this slide and skip it in rotation. In the background, after 10 minutes, your slide will automatically refresh to get new information. If there is no new information (i.e. if the slideSkip function still exists and validates to true) the process will begin again; otherwise the slide will display at it's normal place in the rotation.
Example:
Say you're using TownCrier to display upcoming seminars in your area. If you have an upcoming event, you can have your slide automatically display it just like you always could. But if you don't have an event? You'd have to code your webpage with a nice error message that said "Sorry, no upcoming events. Check back later." Now, instead of coding in that message, just add the Slide Events JavaScript code at the top of the page along with:
<script type="text/javascript"> function slideSkip() { return true; } </script>
Billboard will automatically skip the slide and continue doing so until a new upcoming event appears.