Archive for August, 2011

Flex 4 – StackOverflow Question on Memory Profiler

Wednesday, August 24th, 2011

I asked a question on StackOverflow regarding the Flash Builder 4 memory profiler, view the question and answer here.

The app below was used to investigate the use of the profiler. As the circles UIComponents are added to the stage, the app would eventually slow to a halt, unless the objects were removed from the stage and garbage collection takes place. Other than that, it just looks good.

There is a handy garbage collection trick here too:

* Forces a garbage collection to occur. More reliable
* than System.gc() for certain Flash Player versions
private function garbageCollectionHack():void{

  try {
	new LocalConnection().connect('foo');

	new LocalConnection().connect('foo');
  } catch (e:*) {}

Also uses a cool total FlashPlayer memory graph developed by Flexponential, and skinnable icon buttons.

Click image to launch, ViewSource enabled Memory graph demo coming soon…..

Flex app with GoogleMaps API & GeoNames WebService

Wednesday, August 24th, 2011

This is a demo application I made for viewing country statistics and locations using the Google Maps API and GeoNames webservice (if GeoNames is unavailable – which happens occasionally – it loads a local copy of the country xml).

The app also uses a moveable/draggable canvas and has a clever implementation of multiple filters for the autocomplete and and combo box.

Click the image below to run the demo: ViewSource enabled (right click on the app)

Stat Map App (click to launch - ViewSource enabled)