JSignage:InteractiveTutorial5

From SpinetiX Support Wiki

Jump to: navigation, search

Description

Interactive slideshow

  • Demonstrates how to control a dynamic slideshow.
  • We push the numbers on demand in the button click handler.

Source code

$.uiStyle = 'round';

var counter = 0, button, bar;

$('svg').add([
  button = $.pushButton( { left: 540, top: 200, width: 200, height: 60, fontWeight: 'bold', begin: 0 }, 'Next' ),
  bar = $.textBar({
    begin: 'indefinite',
    left: 200, top: 400, width: 880, height: 120,
    fill: 'white',
    frame: { shape: 'round', backColor: 'blue', backOpacity: 0.7 }
  }).fadeIn().fadeOut()
]);

button.click( function() {
  bar.pushData( 'Now calling: '+ ++counter );
});

Preview

This page was last modified on 9 August 2017, at 17:14.