tags:

views:

207

answers:

1

I want to render a very simple Flex data grid. How do I anchor the SWF flash file in the HTML? Do I need to compile a special .swf or can I use a 'standard' data grid .swf - and just pass the data to it?

+2  A: 

The way Flex works is you create an MXML file which contains your application definition (user interface, "states" to transition to, etc.). This is where your DataGrid would "live." You could also place a button in your user interface that, when clicked, would call an external data source and fill your grid (alternately, you could have it happen automatically when the application is started).

To create an MXML file, all you really need is a text editor and the Flex SDK, BUT, if you are new to programming Flex, you should look into purchasing Flex Builder (the download is for a trial version).

To get up to speed in Flex, I strongly recommend looking at Adobe's web site devoted to all things Flex. It's at http://www.adobe.com/devnet/flex/.

EDIT: For Linux, an alpha version of FlexBuilder is available at http://labs.adobe.com/technologies/flex/flexbuilder_linux/ (and the SDK download I mentioned previously should work on Linux as is). Download it and "install" it and you'll then be able to compile MXML files (at the command line) to SWF files for use on web sites. The original point, though, still remains; you'll need to learn more about Flex and ActionScript before you can create an SWF file and place it on a web page. That's where the DevNet site comes in.

Michael Todd
I work on linux and just want to render a simple data grid. Ideally I want to do:shell> flexify My.mxml > My.swfWhat are my chances? Is there a command-line tool for this?
See the update in my answer for further information.
Michael Todd
If you're looking for an example of how to do this on the command line - check out this blog posthttp://asantoso.wordpress.com/2008/05/18/flex-3-sdk-command-line-development-with-example-on-linux/
Nate
Good link. That should get them going.
Michael Todd