Sign in to follow this  
tsc

MTASC & fusionCharts

Recommended Posts

As I read in the knowledgebase it is not possible to compile swfs with fusioncharts-classes, which disappointed me very much.

 

Now I found a dirty workaround to avoid compiling in Flash IDE and wait for minutes until it is finished.

 

 

 

simply instantiate the class containing the fusioncharts-instances using a String, like that:

 

 

 

var chartsContainingClass:mvc.AbstractView = new eval("views.GraphView")();

 

 

 

This way they are hidden to MTASC, but also not present at compile-time, which is sad.

 

In order to make them present you simply need to instantiate the class once in the Flash IDE and to tell

 

MTASC to "-keep" (AS2 classe compiled by MMC into the SWF). The only necessary code in the .as -file

 

needs to include the LoadingFunctions.as & AppMessages.as, the dummy call of the "chartsContainingClass":

 

 

 

#include "../src/com/fusioncharts/includes/LoadingFunctions.as"

 

#include "../src/com/fusioncharts/includes/AppMessages.as"

 

var chartsContainingClass:views.GraphView = new views.GraphView();

 

// thats the main entry point of my application

 

MyApplication.main();

 

stop();

 

 

 

the only flaw is that you won't get any compile errors for classes beyond the GraphView (i.e), as MTASC doesn't know about the class.

 

 

 

(hope it helps)

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this