In a previous example, “Parsing ISO dates with Flex and ActionScript”, we saw how to parse ISO formatted dates (2008-01-25T06:14:23Z) and convert them into an ActionScript 3.0 Date object.
The following example shows how you can convert a Java formatted date (Wed Jul 22 14:29:30 PST 2009) and convert the timezone into an ActionScript 3.0 friendly format (UTC-0700) so you can use the static Date.parse() method to convert them into an ActionScript 3.0 Date object.
Full code after the jump.
[click to continue…]
Tagged as:
parse()
The following example shows how you can use Regular Expressions to globally replace carriage returns and line feeds with the newline character (“\n”) in a string using Flex.
Full code after the jump.
[click to continue…]
Tagged as:
fromCharCode(),
newline,
replace()
The following example shows how you can set mouse cursors in Flash Player 10 by setting the Mouse object’s cursor property to one of the static constants in the MouseCursor class.
Full code after the jump.
[click to continue…]
Tagged as:
cursor
The following example shows how you can determine the total bytes of your Flex application by accessing the loaderInfo.bytesTotal property.
Full code after the jump.
[click to continue…]
Tagged as:
bytesTotal,
loaderInfo
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