mardi 22 septembre 2015

Can window.postMessage be called from an ExternalInterface call?

I'm trying to use ExternalInterface to send a message via window.postMessage to an iFrame on the page containing my Flash object. The code works as 'normal' JavaScript on the page, but not when written to the page from Flash. Has anyone been able to do this?

ExternalInterface.call("function(){window.top.frames[1].postMessage('Stuff','*');}")

I'm able to see the frames in the log:

ExternalInterface.call("function(){console.log(window.top.frames.length);}")

Aucun commentaire:

Enregistrer un commentaire