The Frontal Sprite

From Frontal Wiki

Jump to: navigation, search

Every visual element in Frontal has an instance of a FrontalSprite to represent it. The FrontalSprite is simply an extension of the Flash Sprite class with various properties and methods that ease things like applying filters and changing the registration point around which scales and rotations occur.

More often than not, you will not be manipulating the FrontalSprite instance directly but will instead be affecting it via style changes on its associated XML element in the Frontal document. To that end, there are styles that map to all of the special properties that the FrontalSprite class provides. All of these style are listed at div#Styles.

If you do need to access the FrontalSprite, you can get it through any visual element's "movie" property. However, be sure to read about the synchStyles method and the disable-rendering style for caveats regarding conflicts between directly manipulating the FrontalSprite and the normal application of styles during the Frontal rendering process.

The following properties are particular to the FrontalSprite:

  • movieRegistrationX: Sets the point around which scaling and rotation will be done.
  • movieRegistrationY: Sets the point around which scaling and rotation will be done.
  • scale: This sets both the x and y scale simultaneously. When used to read, it returns the maximum of scaleX and scaleY if they differ.
  • brightness: Sets the brightness (from -255 to 255). If this is non-zero, a ColorMatrixFilter is applied to do this.

The following are FrontalSprite properties that apply a Flash BlurFilter to the movie. This filter is applied only when the blurX and blurY styles (or combined, the blur style) are non-zero.

  • blurX: Sets the blurX property of the filter.
  • blurY: Sets the blurY property of the filter.
  • blur: Sets both the blurX and blurY properties.
  • blurQuality: Sets the quality of the filter.

The following are FrontalSprite properties that apply a Flash DropShadowFilter to the movie. This filter is applied only when the shadowAlpha, shadowDistance and shadowStrength styles are non-zero.

  • shadowAlpha: Sets the alpha property of the filter.
  • shadowDistance: Sets the distance property of the filter.
  • shadowStrength: Sets the strength property of the filter.
  • shadowAngle: Sets the angle property of the filter.
  • shadowBlurX: Sets the blurX property of the filter.
  • shadowBlurY: Sets the blurY property of the filter.
  • shadowBlur: Set both the blurX and blurY properties of the filter.
  • shadowColor: Sets the color property of the filter.
  • shadowInner: Sets the inner property of the filter.
  • shadowHideObject: Sets the hideObject property of the filter.
  • shadowKnockout: Sets the knockout property of the filter.
  • shadowQuality: Sets the quality property of the filter.

The following are FrontalSprite properties that apply a Flash GlowFilter to the movie. This filter is applied only when the glowAlpha and glowStrength styles are non-zero.

  • glowAlpha: Sets the alpha property of the filter.
  • glowStrength: Sets the strength property of the filter.
  • glowBlurX: Sets the blurX property of the filter.
  • glowBlurY: Sets the blurY property of the filter.
  • glowBlur: Set both the blurX and blurY properties of the filter.
  • glowColor: Sets the color property of the filter.
  • glowInner: Sets the inner property of the filter.
  • glowKnockout: Sets the knockout property of the filter.
  • glowQuality: Sets the quality property of the filter.
Personal tools
Get Adobe Flash player