RichEditableText textFlow attribute not updating properly

April 28, 2014

Was having an issue with the RET component as described in the adobe form:
textFlow (RichEditableText) not updating properly

I had created a popup window to display Bibliography references and it was not always updating when new text was injected into the textflow attribute. The view would refresh if I clicked on the text area. Based on the information in the adobe forum, I changed the initial component implementation:

<s:RichEditableText id="biblioInfo"
						textFlow="{TextConverter.importToFlow(pageInfo, TextConverter.TEXT_FIELD_HTML_FORMAT)}"

to the following:

<s:RichEditableText id="biblioInfo"

Where updateFlow was a function which was defined in the script section of the mxml file in the following manner:

private function updateFlow(clip:String):TextFlow {
		if (this.biblioInfo){
			this.biblioInfo.textFlow = null;
		//  Converts html text into a TextFlow
		var flow:TextFlow = TextConverter.importToFlow(clip, TextConverter.TEXT_FIELD_HTML_FORMAT);
		return flow;

I found this approach solved the refresh problem for my RichEditableText component.


Flashbuilder 4.6 to 4.7 HTML Wrapper – playerProductInstall vs expressInstall

April 8, 2014

We had created a custom template file called ${application}${build_suffix}.template.php (instead of html template) which we used to autogenerate our output webpage.

When I upgraded from Flashbuilder 4.6 to Flashbuilder 4.7. I noticed that the xiSwfUrlStr substitution value changed from playerProductInstall to expressInstall.

Template line was:
var xiSwfUrlStr = “${expressInstallSwf}”;

Output from 4.6
php file contained line:
var xiSwfUrlStr = “playerProductInstall.swf”;
Flashbuilder also output to bin directory:

Output from 4.7
php file contained line:
var xiSwfUrlStr = “expressInstallSwf”;
Flashbuilder also output to bin directory:

Flashbuilder 4.6 has a page on html templates which discusses the substitution

Here is mention of the change on the apache flex developement site:

Here is swfobject google code location:

Otherwise I could not find a reference to this change on the adobe site.

AS3 Textfield New Line not being Recognized

January 14, 2014

I loaded an xml file into a program which was then used to set string based variables. The text from the xml file was contained between CDATA tags and contained the \n character as shown below:

<![CDATA[Directions:\n1. Choose a patient by clicking on a silhouette.\n\n]]>

The AS3 textfield was not recognizing the new line character when set from the xml file and was just displaying the \n within the Textfield so it appeared in the textfield like this:

Directions:\n1. Choose a patient by clicking on a silhouette.\n\n

Finally found a solution from a post from 2008:

Newline characters not recognized when parsing external xml file

Once I added the code recommended on the site:

myText.replace(/\\n/g, "\n");

The new line was recognized in the textfield.

Reminder /g is a flag to globally replace all the occurrences.

Flashbuilder 4.7 and ASUS Nexus 7 Device Driver

November 8, 2013

I am currently doing development work on a Windows 7 Machine. Based on my previous XOOM device driver installation for flex, I started out by doing the following steps:

  1. Downloaded and installed Nexus 7 usb device driver
  2. Installed the USB device driver
  3. Enabled Nexus 7 Device to allow USB debugging

Nexus 7 Device Drivers
Googling brought up the following ASUS site where I downloaded the drivers:

I selected the support link right above the device.
The new page came up with “FAQ” selected.
I then chose “Driver & Tools”.
The OS I selected was “Others”.
I then selected the USB driver for windows and downloaded it and extracted the files from the zip file.

Nexus Website Download

Nexus Website USB Driver Download

Installed USB Device Driver
I then proceeded to loosely follow the installation instructions for the Nexus device using the following link I found in the FAQ.

Enabled USB Device Debugging Device Setting
I then went to the device settings on the Nexus 7. Selected App Development and selected enable usb debugging.

Finally I was ready to debug my code on the Device. I brought up Flashbuilder 4.7 and proceeded to run my app in debug mode on the device. ACK! – I got the message that my device was recognized but it was offline!

Adobe Air Not Installed and Device Offline

Adobe Air Not Installed and Device Offline

A quick google brought up the following links from Stack Overflow:

I read the two answers and determined that I needed to download the latest SDK for Android which I found at SDK Download from Android Developer site

Followed the instructions to copy the files to the new directories (files to copy were not exactly the same but I also kept the old ones just in case)

I brought up Flashbuilder 4.7 and proceeded to run my app in debug mode on the device. And Voila it recognized my device and I was on my merry way!

EXCEPT the next day I came back and tried to debug on the device but now no devices were listed in the Flashbuilder Dialog device listing box where you choose the device to run your code.

The NEXUS was being detected as a media device and apparently I needed to change the storage mode settings to make it a camera per this online posting

I discovered that it was necessary to change my USB transfer mode.

You can do this on the Nexus 7 by going to Settings > Storage, clicking on the strange menu icon in the top right hand corner and selecting “USB computer connection”. I then changed the storage mode to “Camera (PTP)”, and it immediately prompted me with the permission dialog as shown in your post above. I was then able to deploy apps, debug, etc and it all worked.

I don’t know what I would do without all the information sharing that the internet allows individuals to provide to one another!

Creating Flex Component View using Flash CS5

September 27, 2012

We created some Flex based component views using Flash CS5 by following the instructions in the Adobe Article Combining animation and ActionScript using Flash Professional CS5 and Flash Builder 4 which we used inside our course player. These View components had text fields which would dynamically resize when the player was resized on the fly(Only for firefox and safari, IE and chrome do not allow resizing). These views also had images which would scale appropriately as well.

Note this led to my series on embedding fonts due to conflict messages with respect to flex based textfield and flash based textfields(This is explained in detail in Part 3 of the series).

Skinning the SpinnerList for Flex 4.6 Mobile

May 28, 2012

The SpinnerList component for Flex 4.6 mobile comes with a standard look and feel. When I incorporated this into one of our mobile views, we wanted to personalize it. I started by referencing the following post on the adobe site, Use of a SpinnerList in a mobile application.

Hilite the Currently Selected Item in SpinnerList
One of the desires was to make the currently selected item to appear to be selected. The default behavior of the spinner list is to have the selected item in the center of the component and, by default, is displayed under the selection indicator. We wanted to skin the box around the selected item a light blue to enhance the impression/appearance that it was the selected value. The initially referenced adobe article said to create a custom skin for the SpinnerListContainer.

Continue reading

Flex 4.6 Mobile Resizing TextArea Component to Fit Content – Part 2

May 25, 2012

Now that the view sets the height of the TextArea component after it has been created as discussed in Part 1, what do we need to do when the user rotates the view from portrait to landscape and back again. The TextArea component continues to reuse the number of lines of text from the previous orientation view. We need to force the component to resize itself and then recalculate the number of lines to display so we can reset the height to the appropriate value.

Continue reading