CubeRotate flickr slideshow

Get Adobe Flash player

Thanks to alex uhlmann who released the source code of his presentation at MAX, I’ve managed to do this little flickr slideshow based on his CubeRotate flex effect.

This effect, beside all the others in the flex component, are based in Sandy (a great opensource 3D engine).

Using the flickr libs from first I’ve created a very simple slideshow to take pictures from my personal gallery, then I followed the examples provided within the Alex’s files and voilà.. a little but indeed cool effect 🙂

Just one remark. I need to put a PHP page on my site with reads the flickr image file, using php’s function readfile, otherwise all the bitmapdata effects couldn’t works, because images are not from the same domain…If someone is interested I put toghether also a little tutorial on how to make it.

For more informations read the original entry @ Alex Uhlmann blog.

P.S. Do you like that little boy in the first picture? 🙂 It’s me!

Source Code for Flex
Title: flickr_cube (0 click)
Caption: Source Code for Flex
Size: 646 KB

Ben Forta presents ColdFusion Powered Flex and Scorpio (CF8)

On 6th of November staff will present a new event about Ajax, ColdFusion, Flex2, Flash Remoting and more. The speakers will be: Ben Forta, Vince Bonfanti, Charlie Arehart and Giorgio Natili.
In particular Ben Forta will present all the new features of ColdFusion 8 (codename Scorpio, planned for released mid-2007) and its integration with Flex2.

These are the other seminars:

  • AJAX & CFML Applications
  • Accessibility & AJAX
  • CFML Developement on .NET & J2EE platform
  • Flex Data Services & Coldfusion – CF8 sneaks
  • Coldfusion debug; Flex, Ajax& Flash Remoting with Fusion Debug
  • FusionReactor

The event will be in Rome at the Ritz hotel.
For more info visit the event page at

Flex2 and namespaces extending components

I took 2 hours to find a solution for that and I decided to blog it..
I was creating my new Flex2 component extending the UIComponent class and I need to define new custom styles for my own component…
Ok, i opened the “create and extend components” PDF guide and found that I need to put this code to accomplish it:
private static function classConstruct():Boolean
if (!StyleManager.getStyleDeclaration("ResizeManager"))
var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration();
newStyleDeclaration.setStyle("boxSize", 4);
StyleManager.setStyleDeclaration("ResizeManager", newStyleDeclaration, true);
return true;

That’s all, but at this time the compiler die with that error message “1000: Riferimento ambiguo a setStyle”, which in english should be: “1000: Ambiguous reference to setStyle“.
I google for some time but without finding a solution, then I discovered the problem. I was using in my component the mx_internal namespace, that was the problem. Once changed namespace everything was ok.

Flex2 again: CheckBox 3state

I continue with Flex2 experiments and still fighting again the documentation..

Ok, does someone know where I can find an exhaustive documentation of all the compc command line arguments? I looked around but I had no luck.. only few words about them.
Second, I haven’t found anything really complete about create Flex2 components, styles and skins, setting default styles, embedding stc.. I had to search in many places and looking at the code of someone else already did.. fortunately I’ve found an example from Peter Ent.

Ok, this I created a checkbox which allows a ‘3rd state’ selection. Flex2 checkboxe allows only selected/unselected state, so I added the possibility to set a “middle” state.

Here a couple of example about it:

Get Adobe Flash player

Download the source code here:

Source code for the Checkbox3State component
Title: checkbox3state source (0 click)
Caption: Source code for the Checkbox3State component
Size: 314 KB

FlashFlickr, testing Flickr API

In my 30 days trial with Flex2 I decied to make all the tests I can in order to learn as much as possible.
After making my first component I thought at doing something more interesting and much similar to a web application. So I first downloaded the ActionScript 3 libraries developed by the Adobe labs, then I activated an application key with Flickr.

I had to modify something in the flickr actionscript libraries and add some new classes for my experiment (adding for example the Comments and Interestingness class, currently missing in the adobe libraries), read the documentation of the Flickr API, but at the end I managed to build a first test: a Flash web-based Flickr browser.
Here the link, obviously it requires Flash player 9 (9,0,16):

Click here to open see the SWF in a new Window.

Source code for the FlashFlickr browser
Title: FlashFlickr Source (0 click)
Caption: Source code for the FlashFlickr browser
Size: 172 KB

Programming logic

During my tests with Flex2 I encountered a strange behavior with the “for” statement and I first thought about a bug of the player.
This simple script was crashing the player (it enters in an infinite loop):
<?xml version="1.0" encoding="utf-8"?>
private function test():void
for(var a:uint = 10; a >= 0; a--)

Once I changed the type of the “a” variable into a “Number” and an “int” I understand what I was missing…
The script worked well after the type change. But to be sure I did also a little test in C which gave me the same results as the flex2 one (infinite loop):

int main(int argc, char *argv[])
unsigned int a;
for(a = 10; a >= 0; a--)
printf("a = %d\n", a);
return 0;

Yes, it’s absolutely logical!
After the last step, when a is 0, the program loses next value because it cannot be a negative value and then the loop continues to cicle.

Ok, it’s not a player bug… it’s me 🙁

Flex2 crazyness

After the interesting conference I decided to give more of my free time to Flex2 and expecially to components creation.
I must admit that ActionScript 3.0 documentation is probably the best documentation I ever seen about flash, but I can’t say the same thing about Flex developement.
Once I had to look for advanced features of Flex components, advanced compiler options etc.. I began to slam against a wall. The developer compoents guide is incomplete and does not cover all the aspects and it has some errors probably due to incorrect revision after the beta program.
So I had to search in the livedocs, but here there are missing links (many links still point to the beta version and they’ve benn removed) and the informations are spread in completely different pages…

Anyway, this is my first test with Flex2 components.. I just made a porting of my color picker as2 component.. that’s because the builtin flex2 picker is too poor.

The problem with the compiled SWC file is that Flex displays also all the other classes used in the component as they are different UI components and I didn’t find anywhere how to compile with compc an swc file which exposes just the UIComponent I want. The documentation says about “-include-component” compiler option, but it’s an error because the compiler does not allow that option!
This is the script I’m using for compiling it:
compc -source-path="." -namespace mxml-manifest.xml -if assets.swf images\assets.swf -if CPicker.png CPicker.png -include-namespaces -output "C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\libs\sephiroth\CPicker.swc"

Flash Player 9, Flex 2, ActionScript 3.0: A Survey of the New Landscape

Colin has posted an interesting article on flash9, flex2, actionscript3.
Why ActionScript 2 coders should start learning ActionScript3 as soon as possible and why timeline coders and flash designers shouldn’t…
Colin underlined a significant aspect of this new flash release: the free flex2 command line compiler. (I asked for it since so much time!)

Read the full entry here: