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.

NZ FXUG meeting next week – free stuff

Filed under: AIR, Adobe, Flash, Flex, New Zealand — Wrote by Campbell on Tuesday, February 19th, 2008 @ 11:59 am

I'm not above bribing people to come in to a user group meeting :)  

The NZ Flex User Group is hosting a special live event to share exciting new information on Adobe's platform tools and technologies for building RIAs. You'll see an exclusive user group video presentation by Adobe Chief Software Architect, Kevin Lynch, hear some important product news, plus get your hands on some exclusive schwag and other giveaways.

Make room in your calendars for a very special Adobe Flex event.

When:        26th February

Where:       Equinox
                Annex
                Level 2
                41 Shortland Street

Register:  http://nzfug.eventbrite.com/

Or check out the user group mailing list for more details 

 

Im an Adobe Ambassador!!

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Sunday, February 3rd, 2008 @ 2:47 pm

A few weeks ago I got an interesting email from our local Pacific rim Flex bad boy Andrew Spaulding asking if I would like to become an Adobe Ambassador. Of course I loved the idea and have accepted.

Ambassador's are basically "talented and passionate community members who are external evangelists and an extension of the Adobe technical team". It involves all the stuff I have been doing anyway with helping run local FXUG meetings going to events and accepting beer as payment for helping flex dev's stuck with a problem. So not much has changed but its nice to have the things you do for the community recognised and it still means ill accept the late night emails and answer the calls for help.

Glad to be a small part of the Big Red "A" team ;)

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