Sound

From MegaZine3
Jump to: navigation, search


Used to load sound files (MP3). This does not stop a background sound defined using the Backgroundsounds plugin, i.e. the sounds will be played simultaneously. Sounds are played in an infinite loop, and continue playing even if the containing page is not visible (they are being muted, though).


Contents

Attributes

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.

loop

Determines whether the sound runs in an infinite loop or is played only once. If it should not loop, but start again when the page becomes visible a second time, additionally use the restart attribute.

onlywhenactive

When set to true, playback may only commence once the containing page is the main / current page. Normally playback can begin once the page is visible, i.e. even if it is just visible because the user lifts the corner of the page hiding the containing page.

restart

When set to true, instead of continuing the playback when the user returns to the containing page, the sound restarted, i.e. playback begins anew at the beginning.

src

Absolute or relative path to the sound file to load. Relative paths are (normally) relative to the megazine.swf file.

Example

<page bgcolor="0x01BCDEF1" foldfx="0" stiff="true" >
    <snd src="snd/your.mp3" onlywhenactive="true"/>
</page>
MegaZine3 Core-related articles
Book elements Book · Chapter · Page · Spreadpage
Page elements Area · GIF · Image · Navigation · Sound · Text · Video
Personal tools
Namespaces
Variants
Actions
Navigation
documentation
miscellaneous
Toolbox