The following example shows how you can get the Flex TextInput control to display the currently selected text regardless of whether it has focus by using the mx_internal namespace, the getTextField() method and the Boolean alwaysShowSelection property.
Full code after the jump.
[click to continue…]
Tagged as:
alwaysShowSelection,
getTextField(),
mx internal
The following example shows how you can set tab stops on the Flex TextArea control by setting the tabStops property on a TextFormat object and setting the defaultTextFormat property or setTextFormat() method, or by setting the TextArea control’s htmlText property to an HTML string with a <TextFormat> tag.
Full code after the jump.
[click to continue…]
Tagged as:
defaultTextFormat,
getTextField(),
mx internal,
setTextFormat(),
tabStops
The following example shows how you can determine your Flex SDK version within a Flex application by using the internal mx_internal::VERSION property.
You can also find the version number by doing one of the following:
(a) Viewing the flex-sdk-description.xml file in your Flex SDK’s root directory:
<?xml version="1.0"?>
<flex-sdk-description>
<name>Flex 4.0</name>
<version>4.0.0</version>
<build>3934</build>
</flex-sdk-description>
(b) At a command prompt, navigate to your Flex SDK’s /bin/ directory and type mxmlc -version:
C:\\dev\\flexSDKs\\4.0.0.3934\\bin>mxmlc -version
Version 4.0.0 build 3934
Full code after the jump.
[click to continue…]
Tagged as:
mx internal,
version
The following example shows how you can create a non-editable Flex NumericStepper control (users cannot type numbers directly into the control, but can still use the up arrow, down arrow, and keyboard to change the value) by setting the editable property on the nested inputField TextInput control.
Full code after the jump.
[click to continue…]
Tagged as:
editable,
inputField,
mx internal
The following example shows how you can get the number of lines in a Flex TextArea control by using the getTextField() method (in the mx_internal namespace) and the numLines property.
Full code after the jump.
[click to continue…]
Tagged as:
getTextField(),
mx internal,
numLines
I posted this in response to a forum question the other day and thought I’d share the code here.
The following example shows you how you can clear a VideoDisplay control’s content using the videoPlayer property in the mx_internal namespace.
Full code after the jump.
[click to continue…]
Tagged as:
clear(),
mx internal,
videoPlayer