0 Replies Latest reply on Dec 17, 2009 10:29 AM by M. Ridcully

    One more ExternalInterface question

    M. Ridcully Level 1

      This one is related to http://forums.adobe.com/thread/540043?tstart=30, butmore general.

       

      Is that true or not, that objects can be marshalled between JavaScript and ActionScript only if they contain primitive types, but not functions?

       

      For instance, if I try to call the following JS function from AS:

       

      function getObj() {

         var ret = new Object();

         ret.foo = "some foo string";

         ret.bar = function() {

            return "some bar string";

         }

       

         return ret;

      }

       

       

      foo property is returned to AS without problems, but bar is set to null.