views:

481

answers:

3

I've been unsuccessful in trying to find an example how to get a sqlite data based flare visualization (swf) to run in Adobe AIR desktop application.

Here is what I have:

  1. ProjectA: a flare visualization sample done in FlexBuilder based on a tutorial;
  2. ProjectB: a desktop AIR app that is able to retrieve data from sqlite based on a tutorial.

Here is what I would like to have:

  1. query data from sqlite db via flash.data.SQLResult (this doesn't appear in ProjectA namespace for importing - can't try sqlite based visualization without AIR)
  2. transform the resultset into flare.data.DataSet and create the visualization with flare
  3. show the visualization in the windowedApplication (I don't know how to add visualization result from 2.)
  4. control the visualization (will get there once the first three points will work)

Tried googling and adobeairtutorials but was unable to find anything useful.

A: 

I got my problem resolved after noticing that the flare.vis.Visualization object was disconnected from my main window.

Here is how I resolved the problem:

mx:Canvas id="container" // "main window" definition in app.mxml file

<mx:Script>
...
vis = new Visualization(data);
container.stage.addChild(vis); // make sure that you add the vis object

Now, I'm off to the 4. point - controlling the visualization :)

André
A: 

Here's a blog entry that might help with this process: http://www.boxshapedworld.com/blog/post/SQLite-Flare-and-AIR.aspx

A: 

You can also check out the article Using Flare Visualization with Flex

Thomas Burleson