PDA

View Full Version : Complex calls using ExternalInterface


wac
01-21-2009, 07:04 PM
Sorry, accidentally posted this in the flash forum and didn't know how to move a posting
-------------------------------------------------------------------------
I'm having a problem calling functions from C# to Flex ActionScript.
I can successfully call functions with "simple" parameters (int, String, Boolean), but I'm having problems calling functions with parameters like ArrayCollection. I'm using the ExternalInterface classes at the adobe site
http://livedocs.adobe.com/flex/3/htm...erface_10.html

wac
01-21-2009, 08:44 PM
On the Flex side, I'm getting the following exception.

TypeError: Error #1034: Type Coercion failed: cannot convert []@94f85f1 to mx.collections.ArrayCollection

The request passed to _flashControl.CallFunction is as follows

============
<invoke name="setDecompTreeCollection" returntype="xml"><arguments><array><property id="0"><object><property id="id"><number>0</number></property><property id="name"><string>All CUSTOMER_AGE
$6,175,043.81</string></property><property id="tooltip"><string>All CUSTOMER_AGE
Sum of NEW_BUSINESS_VALUE $6,175,043.81</string></property><property id="cardinality"><number>6</number></property><property id="levelNumber"><number>0</number></property><property id="childLevelLabel"><string /></property><property id="dimensionSeparator"><string /></property><property id="linkLabel"><string>100.00%</string></property><property id="isExpanded"><false /></property><property id="parentId"><number>2147483647</number></property></object></property></array></arguments></invoke>