XML Flash Slideshow v4 Help    |    Support Home    |    DWUser.com Home  Download Help PDF (29MB)    |    Search:

The <effects> section - UI Effects

This section contains the definitions of all reusable user-interface effects.    To learn more about using user interface effects, see the Using UI Effects topic; you should review this topic before proceeding.  

Because the same effects are often used more than once, UI effects are defined in one central location, the <effects> section.    Each of the defined effects is assigned a unique ID identifier.  When an effect is needed in the layout, an effect is referenced using its ID value in the following format:

<SomeElement ... hideEffect="{effect.effectIDValue}" ... />

In this example, a hide effect is specified.

To begin, here is an example of an <effects> section with two effects:

<effects>
     <effect id="simpleFadeIn" type="sequence">
          <Fade duration="4000" alphaFrom="0" alphaTo="1" easingFunction="Easing(Back.easeIn)"/>
     </effect>
     <effect id="blurBlinds" type="parallel">
          <Blur duration="4000" blurXTo="10" blurYFrom="0" blurXFrom="0" blurYTo="10"/>
          <Fade duration="4000" alphaTo="0" alphaFrom="1"/>
     </effect>
</effects>

The <effects> section is used by the slideshow to populate the effect library.    All UI effects are managed by the com.dwuser.ss4.managers.EffectLibrary class.  You should review this class (in the API Reference) for more information about how effects are managed.

The XML Structure

The <effects> section is comprised of one or more <effect> nodes.    Each of these <effect> nodes defines a separate effect.    Each <effect> has two required attributes:

Attribute Description
id Required; specifies the unique ID value with which the effect will be referenced elsewhere (see above).
type

Required; specifies if the subeffects which comprise the effect play in sequence or in parallel (all at the same time).    Supported values are:

  • parallel - Specifies that the subeffects which comprise the effect should play at the same time, in parallel.
  • sequence - Specifies that the subeffects which comprise the effect should play in ordered sequence (according to the order in which they appear in the XML definition).

Note: Effect types are covered in the Using UI Effects topic referenced above.

 

As covered in the Using UI Effects topic referenced earlier, each UI effect is comprised of one or more sub-effects.    In the XML, each sub-effect is represented by a single node whose name is the effect name.    Each of these sub-effect nodes is placed within the <effect> node.    For example, the Blur effect is represented in the example above by a <Blur ... /> node.    The attributes on each sub-effect node set the properties of that sub-effect.

To learn about all of the available sub-effects, see the com.dwuser.ss4.managers.EffectLibrary class in the API Reference.    This lists the available sub-effects as well as the class to reference for all of the available attributes.