views:

610

answers:

3

We are looking to do display some mathematical data in a Flex GUI chart. We need to do plot for two array of data the following.

cross-correlation of both auto-correaltion of each and correlation coefficient

It looks like Flex does not support scientific formula like cross-correlation,auto-correlation and co-relation co-efficient natively. Please correct me if I am wrong or if there are reasonable alternatives at this point.

While looking for alternatives I did come across the article at actionscript.org [--not allowed--]

and I am presently trying to see whether I can invoke excel formulas from the actionscript. It looks like there might be some complexity involved in passing the data between flex and vbscript. Will this be the right approach?

This is for a POC and as such we are looking for a quick hack only.

A: 

I have never used VBScript, but I know that you can access JavaScript from AS3 and vice versa using the ExternalInterface class in AS3. And as far as I know, you can also access VB functions embedded in web pages from JavaScript. So, it shouldn't be too hard to invoke VB functions from Flash.

David Hanak
Thanks for the reply. The reason I wanted to use VBScript is to try and use the Excel methods like COREL(A[],B[]) from flex. So it is more of an excel call than a VB call. Not sure whether that can be done easily.For now, we are going ahead and started coding the formula directly in AS3.
A: 

Using ActionScript you can write your own version of COREL to do the calculation. That will be much easier than trying to communicate with Excel. Certainly there is no direct way to communicate with Excel from a Flex app.

Sam
+1  A: 
inferis