Skip to main content
Participating Frequently
February 27, 2013
Question

C# to Actionscript function call, externalinterface callfunction silent fail

  • February 27, 2013
  • 10 replies
  • 3235 views

Hi,

I'm trying to call an Actionscript 3 function exposed using externalinterface.addcallback from C# using callfunction(). When I use the XML API, it returned </invalid>. I tried using some code I found for Externalinterfaceproxy class on Google but it also is unresponsive.

I've tried adding the .swf to Flash Player's global security settings, no change. Within Actionscript the functions are called successfully. Externalinterface.available is true. AllowScriptAccess is set to "always" for the C# axshockwaveflash control.

Any idea what's missing? Can anyone point to working example code of C# -> Actionscript 3 function calls? Is there any procedure for troubleshooting the externalinterface API?

Thanks,

Alex

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

asfarleyAuthor
Participating Frequently
March 4, 2013

Anybody?

Is there any well-documented method of calling Actionscript 3 functions from C#?

robdillon
Participating Frequently
March 4, 2013

The last time that I had to do something like that, I needed to use VBScript on the html page to "go-between" the C# and Actionscript. You can use ExternalInterface to communicate with VBScript.

asfarleyAuthor
Participating Frequently
March 4, 2013

Thanks for the reply. This is for a desktop Windows application; I'm using an axShockwaveFlash control in a Windows Form so there's no HTML page in between.