Packagecom.dwuser.ss4.pseudoStyleClasses
Classpublic class XMLAttributeFormats

This pseudo-class describes the various XML attribute formats which are supported in the XML configuration files. This class is never really used; it is just used as holder for the documentation regarding XML attribute values.

There are special formats which can be used for XML attributes. Though the original value is always a string in the XML file, the value will be automatically cast based on its format. Each constant value below represents one of the possible formats. Note that some types are only available in certain areas, such as the Layout XML (in the <ui>...</ui> section).



Public Methods
 MethodDefined by
  
XMLAttributeFormats
Public Constants
 ConstantDefined by
  ARRAY : String = "(See constant's description)"
[static] Creates a native Array with the passed comma-separated values, formatting each subvalue.
XMLAttributeFormats
  BINDING_EXPRESSION : String = "(See constant's description)"
[static] In the Layout XML, to bind an attibute value to some other bindable Actionscript variable, use the following format.
XMLAttributeFormats
  BLUR_FILTER : String = "(See constant's description)"
[static] Creates a native BlurFilter instance which can be used as a filter on various objects.
XMLAttributeFormats
  BOOLEAN_VALUE : String = "(See constant's description)"
[static] To pass a boolean value, use a string value of true or false.
XMLAttributeFormats
  CLASS_REFERENCE : String = "(See constant's description)"
[static] The following format can be used to specify class references.
XMLAttributeFormats
  DROP_SHADOW_FILTER : String = "(See constant's description)"
[static] Creates a native DropShadowFilter instance which can be used as a filter on various objects.
XMLAttributeFormats
  EASING_FUNCTION_REFERENCE : String = "(See constant's description)"
[static] The following format can be used to return an easing function.
XMLAttributeFormats
  EFFECT_REFERENCE : String = "(See constant's description)"
[static] The following format can be used to return an effect instance from the EffectLibrary repository.
XMLAttributeFormats
  EVAL_EXPRESSION : String = "(See constant's description)"
[static] In the Layout XML, to evaluate an Actionscript expression, use the following format.
XMLAttributeFormats
  EVAL_SILENT_EXPRESSION : String = "(See constant's description)"
[static] Functions exactly the same as the format described by EVAL_EXPRESSION, but no error is thrown (and no error message displayed) if an error occurs.
XMLAttributeFormats
  GLOW_FILTER : String = "(See constant's description)"
[static] Creates a native GlowFilter instance which can be used as a filter on various objects.
XMLAttributeFormats
  HEX_COLOR_STRING : String = "(See constant's description)"
[static] Hexadecimal color strings (in HTML format) are automatically converted to their native numerical equivalent.
XMLAttributeFormats
  NAN_VALUE : String = "(See constant's description)"
[static] To pass an actual NaN value, use the following format.
XMLAttributeFormats
  NULL_VALUE : String = "(See constant's description)"
[static] To pass an actual null value, use the following format.
XMLAttributeFormats
  NUMBER : String = "(See constant's description)"
[static] Non-empty attributes which are numbers are automatically cast as their numerical value.
XMLAttributeFormats
  RECTANGLE : String = "(See constant's description)"
[static] Creates a flash.geom.Rectangle instance.
XMLAttributeFormats
  UNDEFINED_VALUE : String = "(See constant's description)"
[static] To pass an actual undefined value, use the following format.
XMLAttributeFormats
Constructor detail
XMLAttributeFormats()constructor
public function XMLAttributeFormats()
Constant detail
ARRAYconstant
public static const ARRAY:String = "(See constant's description)"

Creates a native Array with the passed comma-separated values, formatting each subvalue. The format is: Array(value1,value2)

If you need to specify a comma within an individual value, use the ` character instead; it will be replaced with a comma.

This example creates an array of two colors, red and white:

    <node ... someAttribute="Array(#FF0000,#FFFFFF)" ... />
    
BINDING_EXPRESSIONconstant 
public static const BINDING_EXPRESSION:String = "(See constant's description)"

In the Layout XML, to bind an attibute value to some other bindable Actionscript variable, use the following format. The property must be wrapped in Bind{...} . The following example sets the background color of a BorderBox instance to always match the dominant color in the current image:

    <BorderBox
       width="100%" 
       height="100%" 
       backgroundColor="Bind{slideshow.currentDelayedSyncSlide.dominantColorDark}"  
       backgroundChangeEffect="true"
       backgroundChangeEffectDuration="1700"
    />
    

This example binds a Caption element's width and position to the displayed images global coordiantes, making the caption float on top of the image.

    <Caption 
      globalX="Bind{slideshow.currentDelayedSyncSlide.outerImageGlobalPosition.x}" 
      globalY="Bind{slideshow.currentDelayedSyncSlide.outerImageGlobalPosition.y}" 
      width="Bind{slideshow.currentDelayedSyncSlide.outerImageWidth}" 
      visible="Bind{slideshow.currentDelayedSyncSlideExists}" 
      moveEffect="{effects.move1000}"
      resizeEffect="{effects.resize1000}" />
    

You can also bind to specific attributes on the current image's XML descriptor with expressions like this:

See also

BLUR_FILTERconstant 
public static const BLUR_FILTER:String = "(See constant's description)"

Creates a native BlurFilter instance which can be used as a filter on various objects. The format is (with all parameters required): BlurFilter(blurX,blurY,quality)

Usually, you'll want to use a quality of 1.

The following example applies a blur filter to a Button element instance. Because it is within an array, it uses ` instead of commas to separate each parameter (see this class's ARRAY constant for more information).

    <Button label="Demo" filters="Array(BlurFilter(4`4`1))" />
    

See also

flash.filters.BlurFilter
BOOLEAN_VALUEconstant 
public static const BOOLEAN_VALUE:String = "(See constant's description)"

To pass a boolean value, use a string value of true or false. Example:

    <node ... someAttribute="true" ... />
    -or-
    <node ... someAttribute="false" ... />
    

CLASS_REFERENCEconstant 
public static const CLASS_REFERENCE:String = "(See constant's description)"

The following format can be used to specify class references. The formatter will attempt to find any classes which are available, including any classes which were defined in the special external skin file which can be specified. The returned value will be a Class instance. The format is: ClassReference('package.subpackage.ClassName')

This example uses the default PreviousButtonSkin class as the skin for a generic Button element:

    <Button name="previousButton" toolTip="Back" label="Back" skin="ClassReference('com.dwuser.ss4.skins.PreviousButtonSkin')" event_click="mx.controls.Alert.show('Look at me!');" />
    

Note: Even though not commonly used, you can also use Skin('...') and it will function the same way as ClassReference('...') .

DROP_SHADOW_FILTERconstant 
public static const DROP_SHADOW_FILTER:String = "(See constant's description)"

Creates a native DropShadowFilter instance which can be used as a filter on various objects. The format is (with only the first parameter required): DropShadowFilter(distance,angle,color,alpha,blurX,blurY,strength,quality,inner,knockout,hideObject)

The parameters have the following formats and default values: distance:Number = 4.0, angle:Number = 45, color:uint = 0, alpha:Number = 1.0, blurX:Number = 4.0, blurY:Number = 4.0, strength:Number = 1.0, quality:int = 1, inner:Boolean = false, knockout:Boolean = false, hideObject:Boolean = false.

The following example applies a green drop shadow to a Button element instance. Because it is within an array, it uses ` instead of commas to separate each parameter (see this class's ARRAY constant for more information).

    <Button label="Demo" filters="Array(DropShadowFilter(4`90`#00FF00))" />
    

For more information about each parameter, see the flash.filters.DropShadowFilter reference.

See also

flash.filters.DropShadowFilter
EASING_FUNCTION_REFERENCEconstant 
public static const EASING_FUNCTION_REFERENCE:String = "(See constant's description)"

The following format can be used to return an easing function. The format is: Easing(Quartic.easeInOut)

This can be used with any property which needs an easing function reference. The first value is the easing class name; the second value (following the dot) is the easing type. Listed below are all of the supported class names. Every easing class has three easing types: easeIn, easeInOut, and easeOut. The exception is the Linear easing class, which has an easeNone type. All Linear easing functions have no effective easing; they are linear.

The following easing classes are available:

Back,Bounce,Circular,Cubic,Elastic,Exponential,Linear,Quadratic,Quartic,Quintic,Sine

For more information about easing function, see its corresponding class reference in the mx.effects.easing package.

See also

EFFECT_REFERENCEconstant 
public static const EFFECT_REFERENCE:String = "(See constant's description)"

The following format can be used to return an effect instance from the EffectLibrary repository. See the EffectLibrary class for more information. The format is: {effects.effectIDValue}

The effectIDValue should point to the id attribute value on the corresponding <effect id="effectIDValue" ... /> tag in the <effects> section of the XML configuration file.

This example specifies a move effect for a VBox element. It assumes that an <effect id="customMoveEffect" ... > effect has already been defined.

    <VBox ... moveEffect="{effects.customMoveEffectID}" >
    

See also

EVAL_EXPRESSIONconstant 
public static const EVAL_EXPRESSION:String = "(See constant's description)"

In the Layout XML, to evaluate an Actionscript expression, use the following format. The format is: Eval{...}. Note that this does not bind the expression; see the BINDING_EXPRESSION constant for more information about property binding. It is evaluated once when the slideshow has finished creating / setting up the layout, or when a DataLooper loop is executed. The following example would initially set a LayoutJumpButton's visibility based on the existence of multiple galleries:

    <LayoutJumpButton ... visible="Eval{import com.dwuser.ss4.managers.ImageManager; return ImageManager.multipleGalleriesExist}" ... />
    
Note that on event handlers, actionscript code does not need to be wrapped in this special format; it can be entered directly. Event handlers are defined in the Layout XML by defining a special attribute named event_EventType . For example, the following code would handle the show event on a VBox element instance and move that VBox instance down 20 pixels:
    <VBox id="tempBox" ... event_show="tempBox.y += 20;" >
    

In all evaluation expressions and binding expressions, the main slideshow (which is a FlashSlideshow instance) can be referenced by using slideshow.someProperty... . The main layout manager (which is a LayoutManager instance) can be referenced by using layoutManager.someProperty... . Additionally, you can access any named layout element by referencing it's id value (as specified by the id attribute on that element).

See also

EVAL_SILENT_EXPRESSIONconstant 
public static const EVAL_SILENT_EXPRESSION:String = "(See constant's description)"

Functions exactly the same as the format described by EVAL_EXPRESSION, but no error is thrown (and no error message displayed) if an error occurs.

See also

GLOW_FILTERconstant 
public static const GLOW_FILTER:String = "(See constant's description)"

Creates a native GlowFilter instance which can be used as a filter on various objects. The format is (with only the first parameter required): GlowFilter(color,alpha,blurX,blurY,strength,quality,inner,knockout)

The parameters have the following formats: color is a color value; alpha, blurX, blurY, strength, and quality are all numbers; inner and knockout are boolean values.

Default values for the optional parameters are: alpha:Number = 1.0, blurX:Number = 6.0, blurY:Number = 6.0, strength:Number = 2, quality:int = 1, inner:Boolean = false, knockout:Boolean = false.

The following example applies a blue glow filter to a Button element instance. Because it is within an array, it uses ` instead of commas to separate each parameter (see this class's ARRAY constant for more information).

    <Button label="Demo" filters="Array(GlowFilter(#0000FF`0.8`10`10))" />
    

For more information about each parameter, see the flash.filters.GlowFilter reference.

See also

flash.filters.GlowFilter
HEX_COLOR_STRINGconstant 
public static const HEX_COLOR_STRING:String = "(See constant's description)"

Hexadecimal color strings (in HTML format) are automatically converted to their native numerical equivalent. The format is just like that used in CSS or HTML: #FF0000

This example specifies red (#FF0000) as the backgroundColor for a VBox element:

    <VBox ... backgroundColor="#FF0000" >
    
NAN_VALUEconstant 
public static const NAN_VALUE:String = "(See constant's description)"

To pass an actual NaN value, use the following format. The format is: NaN .

    <node ... someAttribute="NaN" ... />
    

NULL_VALUEconstant 
public static const NULL_VALUE:String = "(See constant's description)"

To pass an actual null value, use the following format. The format is: {null} .

    <node ... someAttribute="{null}" ... />
    

NUMBERconstant 
public static const NUMBER:String = "(See constant's description)"

Non-empty attributes which are numbers are automatically cast as their numerical value.

This example specifies the x-position for a VBox element to be 100:

    <VBox ... x="100" >
    
RECTANGLEconstant 
public static const RECTANGLE:String = "(See constant's description)"

Creates a flash.geom.Rectangle instance. The format is: Rectangle(x,y,width,height)

This example creates a rectangle at 0,0 with a width of 200 and a height of 100:

    <node ... someAttribute="Rectangle(0,0,200,100)" ... />
    
UNDEFINED_VALUEconstant 
public static const UNDEFINED_VALUE:String = "(See constant's description)"

To pass an actual undefined value, use the following format. The format is: {undefined} .

    <node ... someAttribute="{undefined}" ... />