Package | com.ghostwire.ui.controls |
Class | public class uiLink |
Inheritance | uiLink ![]() ![]() ![]() |
uiLink
is a button containing a uiText
instance allowing you to
display a text inside the button. You can associate the instance with a URL allowing it to behave
like a HTML anchor link.
"useHandCursor" Property
The useHandCursor
property is set to true
by default, which means that a native hand cursor will show when the mouse is over the instance. Set this property to false
if this is not desired.
"skin" Property
The default value is Link
, and the asset(s) used are:
Link.png
~ This class is available in Aspire UI Components Lite Edition ~
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
![]() | data : Object
Indicates the data to be associated with this button.
| uiButton | |
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | displaceX : int
Indicates the amount of pixels to move any embedded child object horizontally to the right when the
button is pressed down.
| uiButton | |
![]() | displaceY : int
Indicates the amount of pixels to move any embedded child object vertically downwards when the
button is pressed down.
| uiButton | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | group : uiButtonGroup
Indicates the
uiButtonGroup this button is assigned to. | uiButton | |
![]() | height : Number
Indicates the current
height of the component. | uiComponent | |
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : Object
Indicates the thickness of the interior space from the edge of the component to the content area,
which is where child components, if any, are contained.
| uiComponent | |
![]() | selected : Boolean
Indicates whether the button is selected; applicable only if the
toggle property is
set to true . | uiButton | |
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
target : String
Indicates the name of the target window where the URL should be loaded.
| uiLink | ||
text : String
Indicates the text displayed inside/beside the button.
| uiLink | ||
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toggle : Boolean
Indicates whether the button should toggle its
selected property value between
true and false when it is clicked. | uiButton | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
uitext : uiText
[read-only]
Returns the embedded
uiText instance - for advanced users only. | uiLink | ||
url : String
Indicates the URL to associate with this
uiLink instance. | uiLink | ||
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent |
Method | Defined by | ||
---|---|---|---|
uiLink(text:String = null, url:String = null, target:String = null)
Constructor - creates a new
uiLink instance. | uiLink | ||
![]() |
activate(noEvent:Boolean = false):void
Activates and gives focus to the button as if the button has been clicked on (a
MouseEvent.CLICK event will be dispatched). | uiButton | |
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its
tabEnabled property set to true , otherwise this method will fail
silently. | uiComponent | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
![]() |
Dispatched when the selected property changes. | uiButton | ||
![]() |
Dispatched when the button is activated, either by user clicking on it or pressing the
SPACE key while the button is in focus. | uiButton | ||
![]() |
Dispatched when the component's visible property is changed from true to
false via calling the setVisible() method. | uiComponent | ||
Dispatched when the instance is activated/clicked and the value of its url property is a String value with the "event:" prefix. | uiLink | |||
![]() |
Dispatched when the component's position within its parent container has changed via calling the
move() method. | uiComponent | ||
![]() |
Dispatched when the component's size has changed via calling the setSize() method. | uiComponent | ||
![]() |
Dispatched when the component's visible property is changed from false to
true via calling the setVisible() method. | uiComponent |
target | property |
target:String
[read-write]Indicates the name of the target window where the URL should be loaded. Options include _self, _blank, _parent, and _top. The _self option specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window.
This property has no meaning when using the "event:" scheme for the url
property.
The default value is null
.
public function get target():String
public function set target(value:String):void
text | property |
text:String
[read-write]
Indicates the text displayed inside/beside the button. The property returns null
if no text is displayed.
The default value is null
.
public function get text():String
public function set text(value:String):void
uitext | property |
uitext:uiText
[read-only]
Returns the embedded uiText
instance - for advanced users only. This property
is exposed in case you would like greater control over the embedded uiText
instance.
public function get uitext():uiText
url | property |
url:String
[read-write]
Indicates the URL to associate with this uiLink
instance. The URL can be either absolute or relative to the location of the SWF file that is loading the page. An example of an absolute reference to a URL is http://www.ghostwire.com; an example of a relative reference is /index.html. Absolute URLs must be prefixed with http://; otherwise, Flash treats them as relative URLs. If this url
is prefixed with "event:", the instance will dispatch a TextEvent.LINK
event instead of opening a URL. For example, if you set the url
to "event:myText", when the user clicks the uiLink
instance, it will dispatch a TextEvent.LINK
event with its text
property set to "myText". You must listen to this TextEvent.LINK
event and handle the event to make the instance useful.
The default value is null
.
public function get url():String
public function set url(value:String):void
uiLink | () | constructor |
public function uiLink(text:String = null, url:String = null, target:String = null)
Constructor - creates a new uiLink
instance.
text:String (default = null ) — A String value specifying the text to be displayed inside the button.
|
|
url:String (default = null ) — A String value specifying the URL to associate with the instance. The URL can be either absolute or relative to the location of the SWF file that is loading the page. An example of an absolute reference to a URL is http://www.ghostwire.com; an example of a relative reference is /index.html. Absolute URLs must be prefixed with http://; otherwise, Flash treats them as relative URLs. If this url is prefixed with "event:", the instance will dispatch a TextEvent.LINK event instead of opening a URL. For example, if you set the url to "event:myText", when the user clicks the uiLink instance, it will dispatch a TextEvent.LINK event with its text property set to "myText". You must listen to this TextEvent.LINK event and handle the event to make the uiLink instance useful.
|
|
target:String (default = null ) — A String value specifying the name of the target window where the URL should be loaded. Options include _self, _blank, _parent, and _top. The _self option specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window.
|
link | event |
flash.events.TextEvent
Dispatched when the instance is activated/clicked and the value of its url
property is a String value with the "event:" prefix. The TextEvent
object dispatched will have its text
property set to the value that comes after the prefix. For example, if you set the url
to "event:myText", when the user clicks the uiLink
instance, it will dispatch a TextEvent.LINK
event with its text
property set to "myText". You must listen to this TextEvent.LINK
event and handle the event to make the uiLink
instance useful.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The uiLink instance dispatching the event. |
text | The remainder of the URL after "event:" |