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:

[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://blog.sephiroth.it/wp-content/uploads/2006/09/example.swf” width=”300″ height=”150″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

Download the source code here:

[attachments docid=856 force_saveas=”1″ logged_users=”0″]

From Web to Desktop

Yesterday Screenweaver HX was announced as part of the haxe framework.
With SWHX, you create an application by using two layers :

  • the System layer : written in haXe and using the Neko API, you can access the local filesystem, databases, network sockets… You can also easily extend its capabilities by writing your own DLL.
  • the Flash layer : written in haXe or any other technology capable of producing SWF, you can use this layer to display the graphical interface, handle user interactions, play sound and video…

Unfortunately I’m trying to install haxe/swhx on my Windows Vista but I’m not lucky at the moment 🙁

The second project is directly from Adobe labs, called Apollo (flash, html, and pdf together), and currently it’s only a long description of what it can do and a list of F.A.Q., but Adobe says it will be pre-released on Adobe labs in the second half of 2006..

I’ve also found a diagram which display makeup of an Apollo application.

Apollo is the code name for a cross-operating system runtime being developed by Adobe that allows developers to leverage their existing web development skills (Flash, Flex, HTML, JavaScript, Ajax) to build and deploy Rich Internet Applications (RIAs) to the desktop.

Genere Avventura

The terrific menace of the invaders from the audiogalaxy!

Some italian guys finally released the first version of their adventure game, after 3 years working on it during their free time. I still remember when IlTimido (one of the authors) has shown to me an early beta of the game. I was impressed by the quality of the graphic and the musics.
The game graphics are similar to the famous “Day of the Tentacle”, the navigation is completely mouse based (click and move, click and take…) and there are a lot of citations during the game. (the game is written in flash and you can play it for free from the web)

Go and play the game!
http://www.genereavventura.com

MDM “Designer Vs Developer” Contest

MDM has lauched a flash contest for both Designers and Developers.
The prize is a Flash Goodie Bag with $1000 of Flash Software for each winner.

Check out the Designer Brief and the Developer Brief.
The two Contest winners (one from each category) will each receive a Flash Goodie Bag which includes over $1000 worth of Flash software including:

One Runner up from each contest will also receive a prize of MDM Zinc v2.5.

Launch Date: Monday 24 July 2006
Closing Date: Thursday 31 August 2006

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.

[attachments docid=832 force_saveas=”1″ logged_users=”0″]

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--)
{
trace(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);
}
system("PAUSE");
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 🙁