Background Sounds

From MegaZine3
Jump to navigation Jump to search
{{#if: | }} {{#if: | }}{{#if: * backgroundsounds.swf | }}{{#if: | }}
Plugin: Backgroundsounds
[[File:{{{image}}}]]
Name Backgroundsounds
Since version

{{{version}}}

Files
  • backgroundsounds.swf
Related plugins

{{{related}}}

The backgroundsounds plugin adds a possibility to define a background sound for a whole chapter, or a single page (as an alternative to the sound page element).

Attributes

Chapter

== bgsound =={{#if: String |

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

URL to a sound file (MP3) to play in the background while any page of this chapter is visible. Sounds are looped infinitely and continue playing even if muted (e.g. no page in the chapter is visible). Can be an absolute or relative path. Relative paths are always relative to the megazine.swf file.{{#if: |

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

== delay =={{#if: Integer |

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

Time in milliseconds before the sound starts fading in. This does not affect fadeout, which will still begin immediately if all pages in the chapter become invisible.{{#if: |

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

== fade =={{#if: Integer |

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

Time in milliseconds over which to fade in and out the sound when the chapter becomes visible or hidden, respectively (i.e. at least one page in the chapter gets visible, or all pages become invisible).{{#if: |

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

Page

Consider using the sound element to achieve the same effect for pages, with better configurability.

== bgsound =={{#if: String |

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

URL to a sound file (MP3) to play in the background while the page is visible. Sounds are looped infinitely and continue playing even if muted (e.g. the page is invisible). Can be an absolute or relative path. Relative paths are always relative to the megazine.swf file.{{#if: |

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

== delay =={{#if: Integer |

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

Time in milliseconds before the sound starts fading in. This does not affect fadeout, which will still begin immediately if the containing page becomes invisible.{{#if: |

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

== fade =={{#if: Integer |

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

Time in milliseconds over which to fade in and out the sound when the containing page becomes visible or hidden, respectively.{{#if: |

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

Example

<book plugins="backgroundsounds">
    <chapter>
        <!-- ... -->
    </chapter>
    <chapter bgsound="data/bg.mp3" fade="1000" delay="500">
        <!-- ... -->
    </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: | |}}