Flex Builder 3 Profiller Gotcha…

Filed under: Adobe, Flex — Wrote by Campbell on Tuesday, March 25th, 2008 @ 10:54 pm

Today I was getting close to launch of an application I have been working on and decided to a bit more Profiling on to clean the performance again (its running on the end of the Flash players VM capabilities). The problem sprang from the fact I had recently changed the compiler options to us Flex 3’s new Runtime Shared Libraries (RSL’s) of the framework to improve caching performance. But to my surprise I was greeted with a lovely error message:

“profiling can only be done on the debug version of an application.”

WTF? Right click the flash player instance in the browser… yep its the latest player DEBUG version. I run up the standard “Test” project I always have to test different things as I develop. Yep profiling runs fine on that too.

The problem springs from the fact that I had changed the Flex app to use the RSL compiled framework, which when you think about it, it makes perfect sense. The RSL version of the library is compiled without the debug code so as to provide the smallest file possible.

To resolve it’s necessary to indicate “Merged into code” in Project > Properties > Flex Builder Path > Library Path > Framework linkage.

So just keep an eye out for this one. Is anyone out there using RSLs yet? or the profiler?

The Externaliser – minus the Arnie accent, and bad acting

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Monday, March 24th, 2008 @ 12:21 pm

As promised in yesterdays post, I have just re-factored a quick util class I made the other day that uses metadata in classes to expose methods to the external interface. It has been scaled back as I had a lot of guff in there and wanted to keep it really simple to understand. There are comments on what could be made better, so please feel free to use abuse the script :)

What does it do? Well using flash.utils.describeType it looks over an object for any methods in that class marked [Externalise (description="blah")] and accordingly exposes that method to the javascript. It also stores (albeit not efficiently) what is currently exposed and allows a 3rd party developer to call listExternalMethods() and see what has been exposed.

Just a quick helper class that made my previous hate of the -keep-as3-metadata compiler switch rear its ugly head again…..

OH NOTE: add the -keep-as3-metadata+=Externalise to your project that uses the Externaliser (grrrrrrrR)

EXAMPLE (view source enabled)

SOURCE

keep-as3-metadata – But I never want to loose it!

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Sunday, March 23rd, 2008 @ 2:02 pm

First up its Easter weekend and I’m 5 beers to the wind on a lovely Easter Sunday so no poking fun at my gramer, ok.

I have recently been working on a project that required the External interface of the flash player, and seeing I have been playing with Metadata in AS3 I thought what better time. Simply put you call Externaliser.instance.externalise(this); Which (without terminator accent) externilises functions in that class with the metatdata [Externalise] placed above.

[Externalise (description="foo cummon"]
publif function foo():void{
// do Stuff
}

Cool, simple right. Well not quite. To keep metadata taging information available to use at runtime, in as3 you have to add the metadata tag name to the compiler settings: keep-as3-metadata Externalise.

But why? Apart from the standard metadata (ie [Bindable] etc) if I’m putting meta data into a class I would obviously want to keep it. And seeing we don’t have access to pre-processors in flex builder, im pretty sure the only time I would put metadata into a class would be to access it later on (over and above the standard metadata) at runtime. So I would like to see the change keep-as3-metadata change to loose-as3-metadata in the compiler in the next version and keep all non-standard as3 metadata by default.

So I will be placing a “bug” n the bugbase for flexbuilder 3 in hope of changing this.

In the mean time I will release the externalise class later on today (with source) so you can keep you externalisation quick and simple.

On a side note too I started work on an ActiveRecord implementation about 6 mnths ago, for AIR and SQLLite which uses the metadata tags heavily and after my current contract reaches it end I will be taking a week off, which should provie me time to clean this up for release. Stay tuned.

UPDATE: Added the issue in the bugbase HERE

What’s better than WebOrb for .NET? FREE WebORb for .NET!!

Filed under: AIR, Adobe, Flash, Flex, MS .NET — Wrote by Campbell on Friday, March 7th, 2008 @ 10:47 pm

WebOrb .NET

FREE as in beer!!

Yep what used to cost 10k is now absolutely free. Mark Pillar from The Midnight Coders has made this latest version of WebOrb free, and there are a few special surprises in this latest version I managed to drag out of Mark.

If your currently using it please check your versions numbers as version 4.3.0.2 is about 400% faster.
What used to take 26 seconds now takes only 300 milliseconds. Mark will be publishing a bench testing application in the next few days to profile the performance.

For more indepth details about this head over to the WebOrb blog and check it out.

Cheers Mark for such a nice gift to the community.

Battlefield Heroes – looks like great fun

Filed under: General — Wrote by Campbell on Saturday, March 1st, 2008 @ 9:04 pm

Anyone who knows me knows I love games. And sometimes I like challenging game but sometimes Im just looking for easy entry get on and shoot stuff fun. A new game that has caught my attention is Battlefield Heroes. Check it out. AND ITS GOING TO BE FREE!

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -