Topic: Flash/Flex

Will web flash stuff like flex work on the chumby?

~Ryan~

Re: Flash/Flex

The Flash Player running on the chumby is FlashLite 2.0, which is roughly equivalent to Flash 7, minus a few features such as LocalConnections, XMLSockets (XML objects work fine), stylesheets, rich text, etc.  Having a touchscreen and no keyboard, it also doesn't support input and password TextFields.

A server-side application running Flex that produces a Flash 7 compatible movie should work just fine on the chumby.

As with movies running within a browser plugin, Flash's security framework applies.  If you make a widget that fetches images or movies from another site, that site must have the appropriate crossdomain.xml file.

We plan on updating the chumby firmware with FlashLite 2.1 which should also provide some support for SVG.

Re: Flash/Flex

Cool. Sounds good! Just need to go catch my self a chumby and try it. ^____^

~Ryan~

Re: Flash/Flex

The new Flex 2.0 requires Flash 8 (actually Flash 9) to run. As Duane says FlashLite 2.0 is "almost Flash 7" so Flex 2.0 applications will not run on it (and in any case they tend to be a little "large" smile

There have been some experiments in running Laszlo apps (http://www.openlaszlo.org/ - an open source environment very similar to Flex) on FlashLite 2.0. Lazlo produces Flash 7 compatible files. They may still be a little too big for the Chumby but it's worth a try.

-- Raffaele

Re: Flash/Flex

Thanks for the information, Raffaele!

Re: Flash/Flex

I didn't have a chance to see the emulator yet, but one thing you should provide for Flash developers is a "template" for their FlashLite emulator (that runs when you test your Flash app in the Flash authoring tool after selecting the appropriate device). Adobe provides a few for the supported phones and it should be easy to make one for the Chumby. It's just a matter to create an XML file describing the supported features (buttons, button codes, screen size, etc.) and a few images.

There is a post here on how to build a template for the iRiver U10 (it's a FlashLite 1.1) :
http://www.scottjanousek.com/blog/?p=180 (the site seems to be currently unavailable but I swear the info are there. Otherwise I should still have a copy saved somewhere and I can post something tomorrow.

-- Raffaele

Re: Flash/Flex

That is a good idea.

~Ryan~

Re: Flash/Flex

The use of FlashLite is a great choice.  I'm definitely intrigued by Chumby's potential.

Duane, can you relate the experience of porting FL2.0 to linux?  I've been pondering licensing FlashLite from Adobe for a different linux-based device project I'm working on (yes, I know how expensive it is), and I'm curious about how easy it was to integrate the player.  Did you need a middleware layer like Qt to sit in between the player and the hardware?

Re: Flash/Flex

The first trick was getting FlashLite to cross-compile under arm-linux-gcc - I went so far as to go through the entire codebase to make it compile with no warnings, since some of the warnings were, in fact, material.

At that point, you have to implement all of the callbacks that Macromedia defines for your specific platform.

In our case, we're built to the raw iron - we open /dev/fb and wrote a smart blitter to copy the pixels out of Flash's buffer to the display.  We capture touchscreen input from /dev/ts and convert it to Flash's mouseDown and mouseUp events.   We wrote our own network async streaming layer, and our own async audio playback layer.  We wrote custom ASnative() implementations for all of the funny hardware.

So, no, there's no Qt or X, or anything standing in between Flash and the device.

One of the more interesting peculiarities of the ARM is that "char"=="unsigned char", not "signed char".  Every now and then you find code that assumes otherwise.

Re: Flash/Flex

Very cool.  Thanks for those tips. 

I'm running under ARM as well, and I was afraid I was going to hit a lot of MMX-specific stuff.  It seems like FL2.1 is a little more processor agnostic, which is a good thing....

Re: Flash/Flex

sounds like you had quite an adventure! =p

~Ryan~

Re: Flash/Flex

So basically so far, it can play flash videos, but not avi's or the like, which you may have on a pen drive?
I'm new here, and looking to see if it can visit websites.

Does it have some sort of file manager, so if you plugged in a pen drive you could navigate through  some .swf files on that drive and set one to be your wake up alarm video?

Re: Flash/Flex

zydeco wrote:

I'm running under ARM as well, and I was afraid I was going to hit a lot of MMX-specific stuff.  It seems like FL2.1 is a little more processor agnostic, which is a good thing....

There is some x86 assembly code in there (I think some MMX), but there are pure C equivalents that work pretty well.  If you're ambitious, you can hand-code some ARM assembly to replace some of it if you think you can do better than the compiler.

There are also some quirks with particular versions of gcc where the optimizer generates bad ARM code.  It took us a while to come up with a stable toolchain that would compile everything - Linux, Flash, tools, etc. - correctly.  As I'm sure you know, the ARM code generation in gcc is not as mature as for x86.

Re: Flash/Flex

Warpling wrote:

Will web flash stuff like flex work on the chumby?

One very good idea or data communication with he back end server is to use AMF::Perl on the server and Flash Remoting on the client.
You avoid to parse XMl and you simply get a data object right from the start.