Slideshow

From MegaZine3
Revision as of 15:26, 10 July 2015 by Hnuecke (talk | contribs) (Extended the general description of the slideshow features (slideshow and goto target))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
{{#if: | }} {{#if: | }}{{#if: * slideshow.swf
  • slideshow.asul |
}}{{#if: * Navigationbar}}
Plugin: Slideshow
[[File:{{{image}}}]]
Name Slideshow
Since version

{{{version}}}

Files
  • slideshow.swf
  • slideshow.asul
Related plugins

The slideshow plugin adds a slideshow functionality to the engine. Basically this allows an automatic, time based page turning.

Plugin interactions

If loaded, registers with the JavaScript plugin to allow JavaScript interaction (events for slideshow start and stop, starting and stopping slideshow).

If the navigationbar plugin is loaded, a button to start and pause the slideshow will be added to it. To remove the button, remove it from the ASUL definition of the plugin (slideshow.asul).

The slideshow plugin supports two almost independent features:

  1. a standard slideshow, where pages are flipped automatically after a defined time
  2. a "go back to target" function, that allows to define a "default" page the book will open after the defined time of inactivity (slideidle).

Both features could work in parallel, although this is not a very useful function. The slideshow will stop once the idletime is over and the target page was opened.
This could be used for special needs like demonstrating flipping pages right after the book was opened; in using the slideshow feature with a low slidedelay value. After the slideidle time (which should be significantly bigger than the slidedelay time to see the effect at all) the default (slidetarget) page will be opened and kept open until a user flips pages interactively. A user activity will restart the slideidle timer, but not the slideshow. The slideshow could be restarted with the slideshow button, if that button is availalbe in the navigationbar. The target page will be opened again once once the user stops working with the book (no more interactivities like moving the mouse or flip a page for longer than slideidle time).

As rule of thumb:

  • set slidetarget to "-1" and/or slideidle to "0" to disable the "goto target" feature (the default setting)
  • set slidedelay to "0" and/or slidestart to "false" to disable the slidshow feature.


Settings

This plugin uses or defines the following settings.

== slidedelay =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 3 |
  • Default: 3}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

The default delay in seconds, i.e. how long to wait before turning pages. This can be overridden in chapters and pages (see below). Can be a decimal fraction (i.e. you can say it should take 2.5 seconds). A value of "0" disables the automatic slideshow, which is useful for the slidetarget feature.{{#if: |

  • See also: {{{see}}}}}

== slideidle =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 0 |
  • Default: 0}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: 2.1.2 |
  • Version: 2.1.2}}

The time in seconds, defining how long to wait after a user interaction, before the slide show continues or before the target page is opened (in case of parameter slidetarget is set to a valid page number).

Disabled if value = 0 (default){{#if: |

  • See also: {{{see}}}}}

== slidetarget =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: -1 |
  • Default: -1}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: 2.1.3 |
  • Version: 2.1.3}}

To reset the book to the selected page after a defined time of no user activity, so the book always is in a default state. The parameter slidetarget defines the target page number to be opened, in case no user interactions like mouse move, page drag, page flip etc. occured for more than 'slideidle' seconds. The page number starts with '0'.

Parameter slidedelay should be set to 0 to disable the slideshow, which in most cases will be the desired behavior.

If a slidetarget is defined, the idel timer will be started independent of the setting of slidestart.

Remark: If the mouse is hovering or positioned over the drag range or bookedge area, an automatic jump to the target slide is disabled. This is on purpose to not confuse a user operating the book. Experiencing an automatic change of the actual slide while actively working with the book is not an expected behavior.{{#if: |

  • See also: {{{see}}}}}

== sliderepeat =={{#if: Boolean |

  • Type: Boolean}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: false |
  • Default: false}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Determines whether the slideshow should "rewind" the book (jump back to the first page) after reaching the end or not. If set to true the slideshow will continue until manually stopped.{{#if: |

  • See also: {{{see}}}}}

== slideMouseDelta =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 0 |
  • Default: 0}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: 2.2.0 |
  • Version: 2.2.0}}

Only retriggers the slideidle timer, i.e. avoids a jump to the target page, if a certain trigger level is exeeded. The number is "kind of" combination of x- and y-moves in Pixels. A setting to numbers like 10...20 can help to address potential jitters (e.g. together with a TUIO plugin if sensitivity of the camera is high).{{#if: |

  • See also: {{{see}}}}}

== slidestart =={{#if: Boolean |

  • Type: Boolean}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: false |
  • Default: false}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Determines whether to automatically start the slideshow after the engine has initialized.{{#if: |

  • See also: {{{see}}}}}

Attributes

Chapter

=== slidedelay ==={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: |
  • Default: {{{default}}}}}{{#if: book@slidedelay |
  • Overrides: book@slidedelay}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

The default delay for pages in this chapter, i.e. how long to wait before turning pages. This can be overridden in pages (see below).{{#if: |

  • See also: {{{see}}}}}

Page

=== slidedelay ==={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: |
  • Default: {{{default}}}}}{{#if: chapter@slidedelay |
  • Overrides: chapter@slidedelay}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

The delay for this page, i.e. how long to wait before turning to the next page.{{#if: |

  • See also: {{{see}}}}}

Examples

<book plugins="slideshow" slidedelay="5" sliderepeat="true" slidestart="true">
    <chapter slidedelay="10">
        <!-- ... -->
    </chapter>
    <chapter>
        <page slidedelay="2">
            <img src="blank.jpg"/>
        </page>
        <!-- ... -->
    </chapter>
</book>
MegaZine3 Plugin-related articles
Plugins Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles
Plugin Articles Writing a plugin · Writing a plugin II · Plugin development

{{#if: | |}}