| Package | com.afcomponents.umap.styles |
| Class | public class MediaStyle |
| Inheritance | MediaStyle Style |
| Property | Defined by | ||
|---|---|---|---|
| align : Align
Specifies Align object that will be used to align the media inside container.
| MediaStyle | ||
| colorTransform : ColorTransform = null
Specifies the color transform object that should be applied to the media.
| MediaStyle | ||
| scaleMode : String = "maintainAspectRatio"
Specifies scaling mode of the media.
| MediaStyle | ||
| Method | Defined by | ||
|---|---|---|---|
|
MediaStyle(param:Object = null)
MediaStyle contructor.
| MediaStyle | ||
|
Applies the style to a DisplayObject.
| MediaStyle | ||
![]() |
Creates a copy of the
Style object. | Style | |
![]() |
Creates a clone of this
Style,
copies the properties from specified object and returns the new style. | Style | |
![]() |
copy(object:Object):void
Copies all the properties from the specified object into the
Style object. | Style | |
![]() |
copyStyle(dest:Object, src:Object):void
[static]
Copies all properties of one object into another.
| Style | |
![]() |
getStyleFromXML(xml:XML):Style
[static]
Returns new
Style object, from the source XML object. | Style | |
![]() |
getXMLFromStyle(style:Style, name:String = ""):XML
[static]
Returns an
XML object that represents all the style's properties. | Style | |
![]() |
toString():String
Returns a
String that represents all the style's properties. | Style | |
![]() |
toXML(afcTags:Boolean = false):XML
Abstract function.
| Style | |
| align | property |
public var align:AlignSpecifies Align object that will be used to align the media inside container.
The default value is bottom-center alignment.
See also
| colorTransform | property |
public var colorTransform:ColorTransform = nullSpecifies the color transform object that should be applied to the media.
The default value is No color transformation..
| scaleMode | property |
public var scaleMode:String = "maintainAspectRatio"Specifies scaling mode of the media. MediaScaleMode class defines possible values for this property: EXACT_FIT, MAINTAIN_ASPECT_RATIO, or NO_SCALE
The default value is MediaScaleMode.MAINTAIN_ASPECT_RATIO.
See also
| MediaStyle | () | constructor |
public function MediaStyle(param:Object = null)MediaStyle contructor.
Creates new MediaStyle object with the default parameters.
Properties defined in param object will override the default values.
By default, mdeia will be aligned middle-center with scale mode set to MAINTAIN_ASPECT_RATIO,
and no color transformation applied.
param:Object (default = null) — Object that holds all the properites of a style you wish to override upon its creation.
|
| applyTo | () | method |
public function applyTo(media:DisplayObject, size:Size):voidApplies the style to a DisplayObject.
Parametersmedia:DisplayObject — DisplayObject that needs to be resized & aligned.
|
|
size:Size — Size of the container to which we are aligning and resizing.
|
See also