Archive for the ‘Flex’ Category

JRockit JVM with Flash Builder 4, Performance .ini Settings

Friday, February 7th, 2014

Flash Builder performance can be increased with the use of JRockit JVM.

Good post by Mike Cann on the process

The FlashBuilder.ini setting I am using are below (Window 7, 64 bit Flash Builder 4.7)

-vm C:/Program Files/Adobe/Adobe Flash Builder 4.7 (64 Bit)/jre/bin

Eclipse/Flash Builder 4.7 Hanging on Loading Workbench

Thursday, January 16th, 2014

Firstly, go to the .metadata folder of the workspace in question.
Open the .log file, and see if it contains the following:

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

The recovery can sometimes fail, which will prevent Eclipse from loading, and will hang on the splash screen.

Try the following: Go to,


And delete the .snap file (make a backup first of course)

Your workspace should now open ok… hopefully.

.snap files represent the changes in workspace state of the IDE during the runtime. This is mostly for eclipse crash recovery plan. When a crash happens these files are used to recover the state fo eclipse workspace.



Reusing BitmapData for Multiple Bitmap/Image Objects

Thursday, June 6th, 2013

I was working with Bitmap and BitmapData objects quite a lot recently.

Noticed that it is better to reuse the BitmapData objects for each new Bitmap object that is created, where the underlying pixels will be the same. They can then be manipulated as required separately, but without having multiple instances of the complex BitmapData object.

A code example I was using to check this out, as well as for loading the sample image locally in Air, is given below:

<mx:WindowedApplication xmlns:mx="" layout="absolute" 
						creationComplete="creationCompleteHandler(event)" >
			import mx.controls.Image;
			import mx.core.UIComponent;
			private var myTimer:Timer;
			private var myBitmapData:BitmapData;
			protected function creationCompleteHandler(event:FlexEvent):void
				var urlString:String = "file:///C:/assets/images/client_logo.png";
				var req:URLRequest = new URLRequest(urlString);
				var ldr:Loader = new Loader();
				ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoadComplete);
				ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);				
			private function onIOError(event:IOErrorEvent):void{
			private function fileLoadComplete(event:Event):void
				var ldr:Loader = Loader(;
				var bitmap:Bitmap = Bitmap(ldr.content);
				myBitmapData = bitmap.bitmapData;
				displayImage1.source = new Bitmap(myBitmapData);		
				displayImage2.source = new Bitmap(myBitmapData);
	<mx:Image id="displayImage1"/>
	<mx:Image id="displayImage2" y="0" x="50"/>


Flash Player 10.1 and AIR 2.5 the reuse of BitmapData among many instances of Bitmap objects is now done automatically, for improved performance.

Flash Builder/Eclipse Breakpoint Working Sets

Wednesday, February 27th, 2013

As a way of managing (sharing, exporting, or importing) breakpoints, the Working Sets feature of Flash Builder/Eclipse can be used.

There are many occasions when I will have dozens of temporary breakpoints set while working on a particular issue/task, and at the same time I will have some permanent breakpoints that I wish to monitor regardless of the task I am working on. When the temporary task is completed, I usually just want to delete all the breakpoints in one go, but it can be tedious having to go through and deselect all of the permanent breakpoints. This is where Working Sets can come in very handy.

I have a default Working Set (WS), and any breakpoints that I create automatically get set under this WS. I also create a secondary WS, and call it Permanent, and simply move the permanent breakpoints to this WS. In the Breakpoints tab, hit the down arrow, and select Working Sets and create some new ones. Then set the default working set.

Create, then set the Default Working Set

Create, then set the Default Working Set

Group you breakpoints by Breakpoint working sets:


When Deleting breakpoints, just select the Default WS and hit the single X button. The Permanent breakpoints will be left as is. Voila!

Delete just the Default breakpoints

Delete just the Default breakpoints


Flash Builder 4.6 – Conditional Breakpoints

Wednesday, September 5th, 2012

When debugging an application, in FB 4.6 one can now set conditions on when a breakpoint is activated. This can be very handy when you want to know when a certain condition is met on a piece of logic without having to set up IF statements, traces or debug logs.

Right-click on the breakpoint in the Breakpoint window to set the BP Properties. The conditions are set as shown in the picture, and you can only reference the objects/parameters that are available at that exact breakpoint line.

Setting Conditional Breakpoints

Flex/Flash Builder – Update JRE, .ini, Increase Memory

Tuesday, May 22nd, 2012

Working with Flex Builder 3 project, and getting the odd ‘out of memory error’ on Windows 7 64bit. Can also be done for Flash Builder 4.6

The following steps helped to speed things up and alleviate the problem (so far!)

1. Check what version of the JRE FB is using Help>Product Details>Configuration (even if you have the latest, FB will probably have defaulted to JRE 1.5 which comes with the install)

Configuration Details

2. Download the latest Jre (use the 32bit version – as FB3 is 32 bit Eclipse)

JRE 6 can be downloaded here

Install, and copy the Jre Files from: C:\Program Files (x86)\Java\jre6 to C:\Program Files (x86)\Adobe\Flex Builder 3\jre (and keep backup of original of course just in case)

3. Increase the memory for FB3 – C:\Program Files (x86)\Adobe\Flex Builder 3\FlexBuilder.ini


You can only increase the memory so far, otherwise FB will fail to load (let me know what values you got away with!!)


Adding -showlocation before vmargs will display the current workspace in the title bar of FB

Adding -refresh, -clean clears the FB4 cache. Faster Garbage Collection: -XX:+UseParallelGC

Disable FB4 Validation: Window>Preferences>Validation (disable all but Class Path Dependencies)

New Flex Logo – very sleek and curvy

Monday, February 6th, 2012

So, a new logo has finally been chosen for Apache Flex, and I have to say, I think it’s pretty sweet!

More details and pics on the Apache site

New Apache Flex Logo

AnyChart – Flex, Flash and HTML5 Charting Component

Tuesday, January 31st, 2012

Doing an feasibility study of AnyChart API for Flex at the moment. Its looking very promising….

AnyChart for Flex and Html5:

AnyChart - Flex and HTML5

AnyChart Financial for Flex

AnyChart Stock Components

Data visualization in Flex 4.5 with Kolbert – Radar to Petal Chart

Wednesday, December 14th, 2011

Sometimes the data displayed in a Radar Chart can be difficult to intuitively analyse. I read a good article on alternatives to radar charts and wanted to apply the “Petal Chart” in Flex. When you look at the result, you would’nt think that both charts visualize the same data!

I used Kap Labs’ Kolbert API to generate a regular Radar Chart, and edited the data source and axis items to create a Flex Petal Chart. The two different data source CSV files can be seen if you right-click, View Source, and go to assets folder.

Radar and Petal Chart - Flex 4.5 using Kolbert

Flex 4.6 Mobile Running on Web (desktop browser)

Wednesday, December 14th, 2011

For those who have not yet tried out the Flex 4.6 mobile components, I have put together a collection of samples from the Adobe Help website that are runnable from a desktop web browser. I think the SplitViewNavigator looks really cool. Links to the code snippets used in the examples are below. View Source enabled!


Flex 4.6 Mobile UI Running on Web (view source enabled)


Holly Schinsky has a good tutorial on getting mobile components running in  a Flex web app or desktop Air app.

Code Snippet Links:

Multiple Panes in a Mobile Application – Adobe Help

Date Spinners – Adobe Help

Spinner List with Embedded Images – Adobe Help