James T
James T

Reputation: 3320

AxShockwaveFlash.CallFunction() Help (VB 2008)

I'm trying to use CallFunction() to call a function inside a flash file, but no matter what I do it throws a HRESULT E_FAIL error. Any clues why? My flash version is 10 if you need it.

Upvotes: 2

Views: 3673

Answers (1)

M.A. Hanin
M.A. Hanin

Reputation: 8074

The HRESULT E_FAIL can be due to passing a wrong XML string to the AxShockwaveFlash.CallFunction's argument, or calling a function that is not registered with the ExternalInterface, but it can also be a result of a runtime-error occuring inside the Flash SWF file.

  1. Make sure your are passing a valid XML string as the argument (details on Flash's XML format can be found here). Keep in mind that ActionScript is case-sensitive.
  2. Make sure the function you're calling actually works well with the supplied arguments, by testing it from inside the Flash Actionscript code.
  3. Make sure your Actionscript function is properly registered with the ExternalInterface. Details of using the ExternalInterface for calling an actionscript function from the SWF's container can be found here.
  4. If you can't find the cause, please supply us with the relevant code of the vb.net method, the Actionscript function and Actionscript ExternalInterface registration.

Upvotes: 3

Related Questions