Sound

From MegaZine3
(Redirected from Snd)
Jump to navigation Jump to 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).


Attributes

{{#switch:left | left =

{{#switch:{{#if: | {{{smallimage}}} | }} | none =

| #default =

}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}

| #default =

{{#switch: | none =

| #default =

}}

{{#if: | {{#ifeq:|none

 | 
| }} }}

}}

== 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}}}}}

== loop =={{#if: Boolean |

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

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.{{#if: |

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

== onlywhenactive =={{#if: Boolean |

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

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.{{#if: |

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

== restart =={{#if: Boolean |

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

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.{{#if: |

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

== src =={{#if: String |

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

Absolute or relative path to the sound file to load. Relative paths are (normally) relative to the megazine.swf file.{{#if: |

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

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