The default skin has a text label. Define a custom skin class to add an image to the control. The Button control has the following default characteristics: Characteristic Description Default size Wide enough to display the text label of the control Minimum size 21 pixels wide and 21 pixels high Maximum size pixels wide and pixels high Default skin class spark. Creating a Button control. Button and ToggleButton control. Public Properties. Hide Inherited Public Properties. Show Inherited Public Properties.
A convenience accessor for the description property in this UIComponent's accessibilityProperties object. A convenience accessor for the silent property in this UIComponent's accessibilityProperties object. The current accessibility implementation AccessibilityImplementation for this InteractiveObject instance.
A convenience accessor for the name property in this UIComponent's accessibilityProperties object. The current accessibility options for this display object. A convenience accessor for the shortcut property in this UIComponent's accessibilityProperties object. Indicates the alpha transparency value of the object specified. The delegate object that handles the automation-related functionality. Name that can be used as an identifier for this object. Specifies whether to dispatch repeated buttonDown events if the user holds down the mouse button.
For components, this layout constraint property is a facade on top of the similarly-named style. A value from the BlendMode class that specifies which blend mode to use.
If set to true, Flash runtimes cache an internal bitmap representation of the display object. If non-null, this Matrix object defines how a display object is rendered when cacheAsBitmap is set to true.
A reference to the class object or constructor function for a given object instance. The content property lets you pass an arbitrary object to be used in a custom skin of the button. Determines the order in which items inside of containers are rendered. Specifies the optional DesignLayer instance associated with this visual element. A reference to the document object associated with this UIComponent. The text that displayed by a component's error tip when a component is monitored by a Validator and validation fails.
Number that specifies the explicit height of the component, in pixels, in the component's coordinates. The maximum recommended height of the component to be considered by the parent during layout.
The maximum recommended width of the component to be considered by the parent during layout. The minimum recommended height of the component to be considered by the parent during layout. The minimum recommended width of the component to be considered by the parent during layout.
Number that specifies the explicit width of the component, in pixels, in the component's coordinates. An indexed array that contains each filter object currently associated with the display object. Indicates whether the component can receive focus when tabbed to. Gets the FocusManager that controls focus for this component and its peers. A flag that indicates whether child objects can receive focus. Designates another sprite to serve as the hit area for a sprite.
Specifies whether this component is included in the layout of the parent container. The beginning of this component's chain of inheriting styles. A flag that determines if an object has been through all three phases of layout: commitment, measurement, and layout provided that any were required.
An Array containing the indices required to reference this UIComponent object from its parent document. Set to true by the PopUpManager to indicate that component has been popped up. When true, the component keeps its projection matrix centered on the middle of its bounding box. The calling display object is masked by the specified mask object. The default minimum height of the component, in pixels. Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the the instance of this DisplayObject in the SWF file through a PlaceObject4 tag.
A module factory is used as context for using embedded fonts and for finding the style manager that controls the styles for this component. Determines whether or not the children of the object are mouse, or user input device, enabled. Specifies whether this object receives mouse, or other user input, messages. Specifies whether a virtual keyboard an on-screen, software keyboard should display when this InteractiveObject instance receives focus.
The beginning of this component's chain of non-inheriting styles. Specifies whether the display object is opaque with a certain background color. Specifies the height of a component as a percentage of its parent's size. Specifies the width of a component as a percentage of its parent's size. Defines a set of adjustments that can be applied to the object's transform in a way that is invisible to its parent's layout.
Set to true after immediate or deferred child creation, depending on which one happens. An Array containing the indices of the items in the data provider of the Repeaters in the parent document that produced this UIComponent.
An Array containing references to the Repeater objects in the parent document that produced this UIComponent. A flag that determines if an automation object shows in the automation hierarchy. Defines the area that should remain on-screen when a soft keyboard is displayed not available on iOS.
If false, the button displays its down skin when the user presses it but changes to its over skin when the user drags the mouse off of it. Storage for the inline inheriting styles on this object. A component's parent is used to evaluate descendant selectors. Returns the SystemManager object used by this component. Determines whether the children of the object are tab enabled.
A flag that indicates whether this object can receive focus via the TAB key This is similar to the tabEnabled property used by the Flash Player. This is usually true for components that handle keyboard input, but some components in controlbars have them set to false because they should not steal focus from another component like an editor.
Sets the x coordinate for the transform center of the component. Sets the y coordinate for the transform center of the component. Sets the z coordinate for the transform center of the component. An Array of Transition objects, where each Transition object defines a set of effects to play when a view state change occurs. Array of properties that are currently being tweened on this object. A flag that determines if an object has been through all three phases of layout validation provided that any were required.
A Boolean value that indicates whether the pointing hand hand cursor appears when the pointer rolls over a sprite in which the buttonMode property is set to true. Used by a validator to associate a subfield with this component. Protected Properties. Hide Inherited Protected Properties. Show Inherited Protected Properties. Indicates whether the mouse pointer is over the button. Indicates whether a keyboard key is pressed while the button is in focus.
Indicates whether the mouse is down and the mouse pointer was over the button when MouseEvent. Public Methods. Hide Inherited Public Methods. Show Inherited Public Methods. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta.
New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Dispatched by the drag initiator when starting a drag operation.
Dispatched after an effect is stopped, which happens only by a call to stop on the effect. Dispatched after the component has entered a view state. Dispatched just before the component exits a view state. Dispatched when an object's state changes from visible to invisible. Dispatched when the component has finished its construction and has all initialization properties set. Dispatched when a component is monitored by a Validator and the validation failed.
Dispatched from a component opened using the PopUpManager when the user clicks outside it. Dispatched from a component opened using the PopUpManager when the user scrolls the mouse wheel outside it. Dispatched at the beginning of the component initialization sequence. Dispatched when the component is removed from a container as a content child by using the removeChild , removeChildAt , removeElement , or removeElementAt method. Dispatched when an object's state changes from invisible to visible.
Dispatched after the component has entered a new state and any state transition animation to that state has finished playing. Dispatched when a component interrupts a transition to its current state in order to switch to a new state. Dispatched by the component when it is time to create a ToolTip. Dispatched by the component when its ToolTip has been hidden and is to be discarded soon.
Dispatched by the component when its ToolTip is about to be hidden. Dispatched by the component when its ToolTip is about to be shown. Dispatched by the component when its ToolTip has been shown. Dispatched by a component whose toolTip property is set, as soon as the user moves the mouse over it. A non-cancellable event, dispatched by a component when it is done responding to a touch interaction user gesture.
A non-cancellable event, dispatched by a component when it starts responding to a touch interaction user gesture. A cancellable event, dispatched by a component in an attempt to respond to a touch interaction user gesture.
Dispatched when an object has had its commitProperties , measure , and updateDisplayList methods called if needed. Dispatched when a component is monitored by a Validator and the validation succeeded. Dispatched when values are changed programmatically or by user interaction.
The default value is FF. Type: String CSS Inheritance: no The vertical distance in pixels from the top edge of the content area to the control's baseline position. The default value depends on the component class; if not overridden for the class, the default value is 0xB7BABC. Type: String CSS Inheritance: no The vertical distance, in pixels, from the bottom edge of the component to the bottom edge of its parent container's content area.
The default value for the Halo theme is 0x0BC. The default value for the Spark theme is 0x The default value depends on the component class; if not overridden for the class, the default value for the Halo theme is 0 and for the Spark theme is 2. The default value is "ltr". The default value is 0xAAB3B3. Type: Class CSS Inheritance: no Name of the class to use as the skin for the background and border when the button is not selected and is disabled.
Type: Class CSS Inheritance: no Name of the class to use as the icon when the button is not selected and the mouse button is down. Type: Class CSS Inheritance: no Name of the class to use as the skin for the background and border when the button is not selected and the mouse button is down.
Type: Class CSS Inheritance: no Name of the class to use as the skin for the button when the button is emphasized such as when serving as the default button for a container. The default value for the Halo theme is mx. The default value for the Spark theme is mx. Use [1, 1] to make the control background opaque. The default value is [ 0.
Pass the same color for both values for a flat-looking control. The default value for the Halo theme is 0. The default value for the Spark theme is 0. This value is a space-separated String that can contain any combination of "tl" , "tr" , "bl" and "br".
For example, to specify that the right side corners should be rounded, but the left side corners should be square, use "tr br". The cornerRadius style property specifies the radius of the rounded corners.
The default value depends on the component class; if not overridden for the class, default value is "tl tr bl br". The possible values are "normal" flash. This style has no effect for system fonts. The default value is "advanced". See also flash. TextField flash. Unlike in a full CSS implementation, comma-separated lists are not supported. You can use any font family name. If you specify a generic font name, it is converted to an appropriate device font. The default font for the Halo theme is "Verdana".
The default font for the Spark theme is "Arial". The possible values are "none" flash. NONE , "pixel" flash. PIXEL , and "subpixel" flash. The default value is "pixel". This property specifies the sharpness of the glyph edges. The possible values are Numbers from through The default value is 0. In the Halo theme, the default value is 10 for all controls except the ColorPicker control.
For the Halo themed ColorPicker control, the default value is In the Spark theme, the default value is 12 for all controls except the ColorPicker control. For the Spark themed ColorPicker control, the default value is Recognized values are "normal" and "italic".
The default value is "normal". This property specifies the thickness of the glyph edges. The possible values are Numbers from to This style has no effect on system fonts. Recognized values are normal and bold. The default value for Button controls is bold. The default value for all other controls is normal.
The first value specifies the transparency of the top of the highlight and the second value specifies the transparency of the bottom of the highlight. The highlight covers the top half of the skin.
Type: String CSS Inheritance: no The horizontal distance in pixels from the center of the component's content area to the center of the component. The default value is 2. Setting any other icon style overrides this setting. See also mx. Kerning adjusts the gap between certain character pairs to improve readability, and should be used only when necessary, such as with headings in large fonts.
Kerning is supported for embedded fonts only. Certain fonts, such as Verdana, and monospaced fonts, such as Courier New, do not support kerning.
Positive numbers move the label down. The default value for the Spark theme is 1. The default value for the ComboBox control is 0. Type: String CSS Inheritance: no The horizontal distance, in pixels, from the left edge of the component to the left edge of its parent container's content area.
A positive value increases the character spacing beyond the normal spacing, while a negative value decreases it. The default value is "en". Determines whether this instance is the same as, or is a subclass of, the given type.
Moves the component to a specified position within its parent. Returns true if the chain of owner properties points from child to this UIComponent. Called by Flex when a UIComponent object is added to or removed from a parent.
Method used to convert number of pixels to a percentage relative to the contents of this container. Indicates whether the specified property exists and is enumerable. Builds or rebuilds the CSS style cache for this component and, if the recursive parameter is true, for all descendants of this component as well. For each effect event, registers the EffectManager as one of the event listeners.
Removes all children from the child list of this container. Removes all visual elements from the container. Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance.
Removes the specified visual element from the child list of this container. Removes a visual element from the specified index position in the container. Removes a non-visual style client from this component instance. Sets a layout constraint value, which is the same as setting the constraint style for this component.
Changes the position of an existing visual element in the visual container. Sets the coordinates that the element uses to draw on screen. Sets the transform Matrix that is used to calculate the component's layout size and position relative to its siblings.
Sets the transform Matrix3D that is used to calculate the component's layout size and position relative to its siblings. Sets the availability of a dynamic property for loop operations. Lets the user drag the specified sprite on a touch-enabled device.
Recursively stops the timeline execution of all MovieClips rooted at this object. Ends the startTouchDrag method, for use with touch-enabled devices. Flex calls the stylesInitialized method when the styles for a component are first initialized. Swaps the z-order front-to-back order of the two specified child objects. Swaps the z-order front-to-back order of the child objects at the two specified index positions in the child list. Swaps the index of the two specified visual elements.
Swaps the visual elements at the two specified index positions in the container. Returns the string representation of this object, formatted according to locale-specific conventions. A utility method to update the rotation, scale, and translation of the transform while keeping a particular point, specified in the component's own coordinate space, fixed in the parent's coordinate space.
A utility method to transform a point specified in the local coordinates of this object to its location in the object's parent's coordinates. Validates the position and size of children and draws other visuals. Validate and update the properties and layout of this object and redraw it, if necessary.
Used by layout logic to validate the properties of a component by calling the commitProperties method. Validates the measured size of the component If the LayoutManager. Handles both the valid and invalid events from a validator assigned to this component. Returns a box Matrix which can be passed to drawRoundRect as the rot parameter when drawing a vertical gradient. Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
Protected Methods. Hide Inherited Protected Methods. Show Inherited Protected Methods. Commits the computed matrix built from the combination of the layout matrix and the transform offsets to the flash displayObject's transform. Determines if the call to the measure method can be skipped. Performs any final processing after child objects are created. Handles the MouseEvent. Creates the container's border skin if it is needed and does not already exist.
Creates a new object using a context based on the embedded font being used. Helper method for dispatching a PropertyChangeEvent when a property is updated. The event handler called when a UIComponent object gets focus. The event handler called when a UIComponent object loses focus. Initializes the implementation and storage of some of the less frequently used advanced layout features of a component. Helper method to invalidate parent size and display list if this object affects its layout includeInLayout is true.
Respond to size changes by setting the positions and sizes of this container's borders. This method is called when a UIComponent is constructed, and again whenever the ResourceManager dispatches a "change" Event to indicate that the localized resources have changed in some way.
Positions the container's content area relative to the viewable area based on the horizontalScrollPosition and verticalScrollPosition properties. Specifies a transform stretch factor in the horizontal and vertical direction.
This method is called when a state changes to check whether state-specific styles apply to this component. Resets the icon of a navigator item in the NavBar control. Sets the label property of a navigator item in the NavBar control. Click for more information on events.
Hide Inherited Events. Show Inherited Events. Click for more information on styles. Hide Inherited Styles. Show Inherited Styles. Click for more information on effects. Hide Inherited Effects. Show Inherited Effects. Public Constants. Hide Inherited Public Constants.
Show Inherited Public Constants. Constructor Detail. Event Object Type: mx. The ItemClickEvent. The properties of the event object have the following values: Property Value bubbles false cancelable false currentTarget The Object that defines the event listener that handles the event. For example, if you use myButton.
Use the currentTarget property to always access the Object listening for the event. Examples How to use this example. Language Reference only. Starting with Flex 4. Wide enough to contain all buttons with their label text and icons, if any, plus any padding and separators, and high enough to accommodate the button height. The controls do not resize by default. ButtonBar Constructor. Dispatched when the component is added to a container as a content child by using the addChild , addChildAt , addElement , or addElementAt method.
Dispatched when a display object is added to the display list. Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained. Dispatched after a child has been added to a container. Dispatched after the index among the container children of a container child changes.
Dispatched before a child of a container is removed. Dispatched when the user selects 'Clear' or 'Delete' from the text context menu. Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application.
0コメント