| Package | mx.core |
| Interface | public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher |
| Subinterfaces | IChartElement, IListItemRenderer, IToolTipManagerClient, IUIComponent |
| Implementors | BitmapAsset, ButtonAsset, MovieClipAsset, MovieClipLoaderAsset, ProgrammaticSkin, SpriteAsset, SystemManager, TextFieldAsset, UIComponent |
| Property | Defined by | ||
|---|---|---|---|
| alpha : Number
The transparency of this object.
| IFlexDisplayObject | ||
| height : Number
The height of this object, in pixels.
| IFlexDisplayObject | ||
| mask : DisplayObject
The DisplayObject used to mask this object
so that only part of it is actually drawn.
| IFlexDisplayObject | ||
| measuredHeight : Number
[read-only]
The measured height of this object.
| IFlexDisplayObject | ||
| measuredWidth : Number
[read-only]
The measured width of this object.
| IFlexDisplayObject | ||
| name : String
The instance name of this object.
| IFlexDisplayObject | ||
| parent : DisplayObjectContainer
[read-only]
The parent of this object.
| IFlexDisplayObject | ||
| scaleX : Number
The horizontal scaling factor for this object.
| IFlexDisplayObject | ||
| scaleY : Number
The vertical scaling factor for this object.
| IFlexDisplayObject | ||
| visible : Boolean
A flag that indicates whether this object is visible.
| IFlexDisplayObject | ||
| width : Number
The width of this object, in pixels.
| IFlexDisplayObject | ||
| x : Number
The horizontal position of this object relative to its parent,
in pixel coordinates.
| IFlexDisplayObject | ||
| y : Number
The vertical position of this object relative to its parent,
in pixel coordinates.
| IFlexDisplayObject | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event.
| IEventDispatcher | |
![]() |
Dispatches an event into the event flow.
| IEventDispatcher | |
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| IEventDispatcher | |
|
Moves this object to the specified x and y coordinates.
| IFlexDisplayObject | ||
![]() |
Removes a listener from the EventDispatcher object.
| IEventDispatcher | |
|
Sets the actual size of this object.
| IFlexDisplayObject | ||
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| IEventDispatcher | |
| alpha | property |
alpha:Number [read-write]The transparency of this object. The value is a Number from 0.0 to 1.0, where 0.0 means transparent and 1.0 means fully opaque.
Implementation public function get alpha():Number
public function set alpha(value:Number):void
See also
| height | property |
height:Number [read-write]The height of this object, in pixels.
Implementation public function get height():Number
public function set height(value:Number):void
| mask | property |
mask:DisplayObject [read-write]
The DisplayObject used to mask this object
so that only part of it is actually drawn.
The mask object itself is not drawn.
Set mask to null to remove the mask.
To ensure that masking works when the stage is scaled,
the mask display object must be in an active
part of the display list.
public function get mask():DisplayObject
public function set mask(value:DisplayObject):void
See also
| measuredHeight | property |
measuredHeight:Number [read-only]The measured height of this object.
This is typically hard-coded for graphical skins
because this number is simply the number of pixels in the graphic.
For code skins, it can also be hard-coded
if you expect to be drawn at a certain size.
If your size can change based on properties, you may want
to also be an ILayoutManagerClient so a measure()
method will be called at an appropriate time,
giving you an opportunity to compute a measuredHeight.
public function get measuredHeight():Number
| measuredWidth | property |
measuredWidth:Number [read-only]The measured width of this object.
This is typically hard-coded for graphical skins
because this number is simply the number of pixels in the graphic.
For code skins, it can also be hard-coded
if you expect to be drawn at a certain size.
If your size can change based on properties, you may want
to also be an ILayoutManagerClient so a measure()
method will be called at an appropriate time,
giving you an opportunity to compute a measuredHeight.
public function get measuredWidth():Number
| name | property |
name:String [read-write]The instance name of this object.
Flash classes such as Sprite, TextField, etc.
initialize the instance name to "instanceN",
where N is a unique integer.
Flex classes such as FlexSprite, FlexTextField, etc.
initialize it to a string that combines the class name
with a unique integer, such as "Button5".
(This name is produced by the
NameUtil.createUniqueName() method.)
The Flex framework assigns instance names to some objects
that it creates, such as "upSkin" for the
"up"-state skin of a Button.
If you have assigned an MXML id to this object,
then the instance name is set to that id.
You can use the DisplayObjectContainer method
getChildByName() to get an object by name
from its parent container.
public function get name():String
public function set name(value:String):void
| parent | property |
parent:DisplayObjectContainer [read-only]The parent of this object.
This property can be null if the object has not yet
ben added to a DisplayObjectContainer with addChild()
or addChildAt(), or if it has been removed from a
DisplayObjectContainer with removeChild()
or removeChildAt().
public function get parent():DisplayObjectContainer
| scaleX | property |
scaleX:Number [read-write]The horizontal scaling factor for this object. The value is a Number where 1.0 means the object isn't scaled horziontally, 2.0 means that it is stretched to twice its normal width, and 0.5 means that it is compressed to half its normal width.
Implementation public function get scaleX():Number
public function set scaleX(value:Number):void
| scaleY | property |
scaleY:Number [read-write]The vertical scaling factor for this object. The value is a Number where 1.0 means the object isn't scaled vertically, 2.0 means that it is stretched to twice its normal height, and 0.5 means that it is compressed to half its normal height.
Implementation public function get scaleY():Number
public function set scaleY(value:Number):void
| visible | property |
visible:Boolean [read-write]A flag that indicates whether this object is visible.
Implementation public function get visible():Boolean
public function set visible(value:Boolean):void
| width | property |
width:Number [read-write]The width of this object, in pixels.
Implementation public function get width():Number
public function set width(value:Number):void
| x | property |
x:Number [read-write]The horizontal position of this object relative to its parent, in pixel coordinates.
Implementation public function get x():Number
public function set x(value:Number):void
| y | property |
y:Number [read-write]The vertical position of this object relative to its parent, in pixel coordinates.
Implementation public function get y():Number
public function set y(value:Number):void
| move | () | method |
public function move(x:Number, y:Number):voidMoves this object to the specified x and y coordinates.
Parametersx:Number — The new x-position for this object.
|
|
y:Number — The new y-position for this object.
|
| setActualSize | () | method |
public function setActualSize(newWidth:Number, newHeight:Number):voidSets the actual size of this object.
This method is mainly for use in implementing the
updateDisplayList() method, which is where
you compute this object's actual size based on
its explicit size, parent-relative (percent) size,
and measured size.
You then apply this actual size to the object
by calling setActualSize().
In other situations, you should be setting properties
such as width, height,
percentWidth, or percentHeight
rather than calling this method.
newWidth:Number — The new width for this object.
|
|
newHeight:Number — The new height for this object.
|
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/2/langref/mx/core/IFlexDisplayObject.html