Background Sounds

From MegaZine3
Revision as of 16:17, 18 December 2009 by Fnuecke (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Plugin: Backgroundsounds
Name Backgroundsounds
Files
  • backgroundsounds.swf

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).

Contents

Attributes

Chapter

bgsound

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.

delay

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.

fade

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).

Page

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

bgsound

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.

delay

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.

fade

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

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
Personal tools
Namespaces
Variants
Actions
Navigation
documentation
miscellaneous
Toolbox