0

I am building an application in C# which calls Flash SWF (AS3) and that flash file, things are going fine so far and i can receive info from c program easily by using ExternalInterface.addCallback();

But to tackle some errors, i was wondering if this is possible to list whatever is received on Flash end. Like dumping all variables.

Any ideas on this?

Many thanks!

Aamir Siddique
  • 334
  • 3
  • 15

1 Answers1

0

If I got you well, you can use this code to track parameters from JS - it traces params to flash log console (that available in any IDE while debugging, it's output alsa available in any debug flash player in folder like C:\Users\user\AppData\Roaming\Macromedia\Flash Player\Logs\). This code also shows how to write all parameters to the browser console.log, it also can be useful sometimes.

public function astest()
{
    if(ExternalInterface.available)
    {
        ExternalInterface.addCallback("jsCallback", jsCallback);
    }

    log("flash started");
}

public function jsCallback(... params):void
{
    for each(var param:Object in params)
        log(String(param));
}

private function log(msg:String):void
{
    trace(msg);
    if(ExternalInterface.available)
    {
        ExternalInterface.call("console.log", msg);
    }
}
fsbmain
  • 5,267
  • 2
  • 16
  • 23