AMX IS-SPX-1000/1300 manual Triggering of SVG Animations

Page 52

Remote Control

It might be desirable for the main media not to start over each time it is reopened. In this case, two scenarios are possible: The main media resume its playback, as if paused during the alternative content.

The main media continue playing, as if playing in the background during the alternative content.

The first scenario can be controlled using the Resume where left parameters of the menu_media.svg template. Settings

this parameter to 'on' will prevent the main media from restarting each time it is opened. For the second scenario, the main media must be placed in a schedule file. It is also possible to use the spx:begin attribute on the <svg> element of

the main media.

Triggering of SVG Animations

For more advanced effects, you can design your custom SVG document to include animations that will be triggered remotely over the network. To do this, you design the animations as if triggered by time, but use indefinite as the begin

attribute.

In a <script> element you can then instantiate a shared variable for remote control and install an update listener on the variable. From this callback, you can use the beginElement() or beginElementAt() methods of the smil::ElementTimeControl interface to trigger the animation.

In the sample document below, a rectangle is set to move through the screen from left to right when the “kick” variable is set to “go”.

<?xml version="1.0" encoding="UTF-8"?>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" dur="indefinite" viewport-fill="white">

<script><![CDATA[

var anim=document.getElementById( "anim" ); var v=createSharedVariable( "kick" ); v.addUpdateListener( function () { anim.beginElement(); } ); ]]></script>

<rect x="0" y="260" width="200" height="200" fill="blue"> <animateTransform xml:id="anim" attributeName="transform" begin="indefinite" type="translate" to="1080,0" dur="3s" fill="freeze"/> </rect>

</svg>

You can also use the content of the shared variable to modify the document on the fly. In the example below, a rectangle will flash for once second each time the variable is updated and its color is set to the content of the variable.

<?xml version="1.0" encoding="UTF-8"?>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" dur="indefinite" viewport-fill="white">

<script><![CDATA[

var anim=document.getElementById( "anim" ); var rect=document.getElementById( "rect" ); var v=createSharedVariable( "kick" ); v.addUpdateListener( function ( sv ) { rect.setAttribute( "fill", sv.value ); anim.beginElement();

});

]]></script>

<rect xml:id="rect" display="none" x="540" y="260" width="200" height="200" fill="blue">

<animate xml:id="anim" attributeName="display" begin="indefinite" to="inherit" dur="1s"/>

</rect>

</svg>

44

Inspired XPress - Programming Guide

Image 52
Contents Inspired Signage XPress WARRANTY, Disclaimer and License Table of Contents Remote Control Synchronized Content Interactivity Serial Protocol File Editor Table of Contents Inspired XPress Programming Guide Installation When to use XPress Authoring Features?Installing Inspired Signage XPress for the First Time IntroductionMinimum Recommended PC Requirements XPress must be restarted to complete the activationInspired Signage XPress UI Installation LocationXPress Removal XPress Projects Learning XPress Authoring FeaturesXPress Main Interface Creating a New Project My Projects folderBrowsing Panel New Project dialog TargetImporting Images Importing Multi-Media FilesImporting Video Creating and Editing SVG Files Importing PowerPoint PresentationsImporting Flash SWF Files Editing an Existing SVG Document Template Document ParametersEdit a Media Property Media description dialog lets you changeInteractive Editing Interactively Editing SVG FilesEditing Media Elements Layout Demonstration of Media ElementsEditing Media Links Editing TextComposing a Scene Multi-Layered SVG TemplatesCustomizing a Multi-Layer SVG Document Example Editing Playlist TemplateHow to Customize a Playlist SVG Document Composing a playlist SVG documentPlaylist Tab Special News Templates Composing a Live News DocumentLayout Templates Format HelpersCustomizing a News SVG Document News.svgNewsticker.svg Newscrawler.svgUsing Format Helpers Switch.svgBouncingtext.svg Fittext.svgScalable Content and Aspect Ratio of Your Display Example of 169 content169 templates as shows on a 43 screen Multimedia Effects Configuring EffectsAdding Effects Preview XPress Content PreviewingUsing Quick Publish PublishingMonitoring Manually Add Devices to XPressScheduling the Content Displayed by an IS-SPX Player SchedulingCheck the Status of the Devices Open a DeviceCreate a New Schedule Open a ScheduleAdd Events To a Schedule Calendar viewDefine a Default Animation Define Default Events and RecurrencesModify the Scheduling Properties of an Event Define Recurring Events Edit recurrence rulePreview Scheduled Content Data Polling RatesRemote Control of Content When To Use Remote ControlHow To Use Remote Control OverviewID table Triggering a Content Switch Over IP PlaylistExample Testing Settings menu Enable Network APISwitching Content With the Serial Port Switching Content With a USB HID DeviceSwitching Content From Another Device Key Identifiers tabWhen To Use Remote Control of Playback Remote Control of PlaybackHow To Use Remote Control of Playback Interactive Pause/Resume Using Http GET Interactive Pause/Resume Over TCP Interactive Pause/Resume From a Device GET Embedded In an Html Timed pause/seek/resume Getting Feedback On the Playback Progress Knowing the Current Position With Extra AccuracyRemote Triggers Triggering an Alternative ContentTriggering a Text or Image Overlay Triggering of SVG Animations Multiscreen Displays Application ExamplesDesigning Basic Projects for Multiscreen Layouts Creating a Configurable Multiscreen Project New Project menuMultiscreen Properties Creating a Multiscreen Project from Templates Finding the multiscreen templatesNew multiscreen project can now be Saved and Edited Editing Multiscreen Content Multiscreen layout drop down optionsConfigure the Multiscreen ID Configuring XPress and the IS-SPX PlayerCreate a Virtual Device Publish Your Project To Your Device SynchronizationSynchronizing Devices Configure NTP Through the Http Interface Administration Date/TimeUsing an IS-SPX Player as an NTP Server Advanced ConfigurationConfiguration Configuration of the IS-SPX Player Acting as Master Master/Server Architecture ExamplesSyntax for Multiscreen Synchronized Content Synchronization ElementsCanvas and Viewbox Concepts Multiscreen ElementsExtension of the SVG switch Element Additional Syntax for Multiscreen ContentSpxbegin Element Extension of JavaScript Example Screen Layout With Six ScreensExample switch SVG Element Example Screen Layout With Spread DisplaysTroubleshooting Example JavaScriptNTP Synchronization Project CreationSynchronized Content Synchronized Content Inspired XPress Programming Guide Creating Interactive Content Interactivity Template FilesCreating a Touch Screen Menu Creating ButtonsControlling Media Adding an Action IDTesting the Project Enter Interactive ModeCreating a Keyboard Menu Creating the MenuConfiguring the menu Button Action IDsRGB values Hexadecimal value Eyedropper tool Controlling the Menu Color Selection greenKeystrokes Interactive controlsControlling Media Layers tab keystroke.svgPlayback Projects Testing the ProjectSuggestions for Further Projects Playback Template New ProjectPlayback Position Controlling the MediaExample Media player Playback.svg details Slider.svg placement IS-SPX Player Configuration Interactivity SettingsCalibration For Touch Screens Calibration of a Touchscreen Through the IS-SPX PlayerManual Calibration Procedure TroubleshootingSerial Protocol File Editor Adding a List VariableAdding a Range Variable Edit Variable Page List variableExporting the Finished File Edit Variable page Range variablePage Javascript API Concepts Behind Shared VariablesInterface Setting the Variable Sample CodeNetwork API Reading the VariableList of Commands Network API CommandsEnabling the Network API Sample CodeRestarting XPress will reset all the shared variables API EmulationShared Variables Inspired XPress Programming Guide Serial Protocol Commands Text Gathering Display Serial Protocol CommandsSerial Control Serial Protocol Commands Hex Creating a Serial Protocol FileManual Command Text Entries HexVolume Control Variable Variable ListScreen Mute Picture On Screen Mute Picture OffMute On Sound Mute Off SoundUnder the Administration section, select RS232 / USB IO Uploading the Serial Protocol FileCreating New Templates XPress My Templates FolderCreating and updating a new calendar file XML Tree with new attribute param1New.ics file Adding Additional Templates to Inspired Signage XPress Power commandSerial Control From NetLinx Commonly Used Terms FSMIncrease Your Revenue through education + knowledge