Given the following Flash method:
function sendToJava(name:String, ... args) { ExternalInterface.call('sendCommand', name, args); }
How do I ensure that ExternalInterface.call() interprets args in its expanded form? Right now, if I pass a list into ‘args’, that list gets interpreted as a single argument of type ‘Object[]’ by ExternalInterface.call(). When the arguments reach Java, I have no way of differentiating between multiple arguments separated by commas versus a single argument containing commas as part of its value.
One small typo. It should be:
Just change ‘array’ to ‘apply’
Anyways, thanks a ton for posting this. You’re a lifesaver!