Archive for the ‘Adobe Flex’ Category

Frameworks, my take on it

Tuesday, May 20th, 2008

Flash and Flex frameworks.

Lately I've working on three big projects that would require the usage of a framework, and not wanting to extend my own framework, that consists mostly of accumulated libraries over time, I decided to give the most prominent ones a go.

So I started by checking out what was on the market, I found as-hive, pureMVC, Cairngorm and Mate ( there are a few more but somehow I didn't feel they were mature enough to be used.
(more...)

The MXMLLoader Class > Dynamic load MXML In Flex Builder 3

Thursday, April 24th, 2008

First of all I don’t really use flex to do flex stuff and I’m not a big fan of flex. But in my latest project I had to build with flex an interface witch would be always diferent (a dynamic interface). In the beginning we thought in parsing some type of XML, but if we are in flex why not parse MXML? I took a look over the internet and I only found MXMLLoader component v0.01, witch didn’t compile on flex builder 3 and was really in the beginning. So there it is, as XMMLLoader class for flex builder 3. You just have to instantiate the class with the mxml :

You can access objects by name:

Or by id:

And have access to component events like:

The class with an example:

mxml-loader.zip

Example swf

Load an external flex swf into a flash project and communicate with him.

Tuesday, April 15th, 2008

Loading the swf is easy; you can make a normal loader and load it. And now the tricky part, if the swf is a swf flash file you can call the function you want, but in flex, because it have 2 frames, (first frame is just for loading), you need to wait until frame 2 is available, you can’t also access directly to a swf, you have to refer application before, so there’s the code:

you can also add Event Listener's to myClip.application , like myClip.addEventLIstener(“ON_CHANGE”,function), so by this way you can embed flex swf into an flash application and communicate with him by calling function and receiving events.

First Decorator screens!

Monday, March 3rd, 2008

Today our good friend Gabor announced his new baby: Decorator.
Decorator is an Image Generator that exports/print postscript from it. Which means you can print your images a large as you want, without any pixel.

It generates lovely outputs and I can already see the potential to this awsome tool, my living room will love this new way of wallpaper, and the best about it's always unique due to a random seed generator.

I've had the opportunity to try the closed beta, and I must say that I was impressed with the outcome of just a little fiddling with the engine.

So be sure to drop by FlashGuy.de and check the amazing outputs of Decorator.

Giving Flex Builder a Library (SWC)

Wednesday, February 27th, 2008

Have you ever wondered why Flex doesn't have a nice library like Flash IDE?
You'd love to use Flex but not having that nice little library there puts you off?
Well here's how we do it:
First create your FLA file, then create all the items you want inside (they don't need to be on stage just library will do), be sure to tick 'export for actionscript' and 'export in firstframe', also you can change the base class to something else that will add functionality to your movieclip.
Then in export preferences, tick 'export swc'.
Ok so now we have a nice little SWC file, how do we get it into Flex? Easy :)
Open project properties, go to Build Path > Library Path and add your SWC file.
That's it!
Congratulations now you have auto complete goodness on your AS3 Flex Builder application :)
Just keep in mind that these elements will be exported in the initial load of your website, so if you want to preload them be sure to use the preloader.

Flex3 and AIR 1.0 are out!!!

Monday, February 25th, 2008

These were the news everyone was waiting for, both AIR and Flex3 are out, they're final, ready to be taken by us and pushed to new levels!!!

The details and pricing for Flex3 can be found here and I find them quite accessible for a full version going only for CHF 319.00, it's a bargain for the best Flash/Flex development IDE.

As for AIR it now has a nice little official Adobe link, and they even show an impressive list of clients for a just released product, featuring the likes of ebay and nasdaq.

So get your copy of Flex3 while it's fresh, I know I'll get mine ;)

Ah, also for those of us who live in Europe we'll have plenty of chances to catching the on.air tour here's the link with the dates.

MVC in Adobe Flex

Wednesday, January 30th, 2008

Here's a set of different perspectives in respect to the use of the Model-View-Controller software architecture when using Adobe Flex:

"MVC considered harmful" [weblogs@macromedia]

"How Flex fits the MVC models" [livedocs@adobe]

"The Flex Show - Episode 33: PureMVC Framework" [theflexshow]

Update: The follow-up by Grant Skinner is also a good read on the subject.

Why I won’t enter the eBay Flex widget contest

Wednesday, January 30th, 2008

After reading about the eBay Flex widget contest over at Doug's blog and seeing eBay changing the contest rules, to allow the use of open-source code licensed under the MIT or BSD licenses, I got curious and went to the site. I registered, got the API access keys and tried a couple of samples they have for download. Just like Doug said: "thought maybe I’d whip something together and enter".

While I was brainstorming today with Bilou about possible things we could do, I went over to to read the FAQ again and saw this clause:

The eBay Developer Widget Build Off Contest 2008” (the “Contest”) is open to legal residents of the fifty United States, the District of Columbia, Canada (excluding the province of Quebec) or the UK;

Since we're in Portugal, I guess we won't be entering this contest anymore. That's bad, why not open the contest for other developers?

Update: Sunny Li, from eBay, was kind enough to reply to us saying that the reason only US, CA and UK are allowed into the contest is purely legal. You can check his response here.

Minimal component set

Thursday, January 17th, 2008

I've been doing a lot of forms lately and that, as you most likely know, it's hard boring work. Always fighting your way through components and the woes of skins.

So I set out to find and easier of doing things and found it over at Keith Peters blog bit-101, it's best two features that will save you the hassle of always having to create component, addChild, set x position, set y position, you can do it all in one line. Components that fire events such as click or change, also take a fourth parameter of defaultHandler and that also saves the addEventListener.

So be sure to check them out at: bit-101 blog or download source here.

Memory Leak Unit Test

Monday, January 7th, 2008

(or Programmatically Detecting Memory Leaks in AS3 via Unit Tests)

I've been writing unit tests for a class that deals with the loading/unloading of different types of media files. One of the tests I would like to have is a check for memory leaks. This is especially important now that we have automated our builds, so we can known instantly if a new change in the code doesn't break the behavior we're expecting.

(more...)