Note that there are some explanatory texts on larger screens.

plurals
  1. POExternalInterface callback not working
    primarykey
    data
    text
    <p>I'm trying to call a function in my ActionScript from my JavaScript, I've managed to successfully do this with another flash file but in the current one it's failing for some reason. I'm using jQuery SWFEmbed, this is my JS code:</p> <pre><code>$.ajax({ url: '&lt;?php echo $html-&gt;url(array('controller' =&gt; 'voicenotes', 'action' =&gt; 'get_url'), true);?&gt;' + '/' + container.children('#VoicenoteVnid').val(), dataType: 'json', type: 'POST', success: function(response) { container.children('.voicenote-info').children('.player').addClass('active'); flashMovie = container.children('.voicenote-info').children('.player'); alert(flashMovie.html()); flashMovie.flash({ swf: '&lt;?php echo $html-&gt;url('/files/flash/reproductor_compact.swf',true); ?&gt;', width: 240, height: 40, quality: "high", wmode: "transparent", allowscriptaccess: "always", }); alert($('.player.active &gt; object')[0].callIt()); } }); </code></pre> <p>And here is my AS code, this is in my constructor:</p> <pre><code>public function reproductor() { ExternalInterface.addCallback("callIt", test); ExternalInterface.call("alert", "Que fue?"); trace(ExternalInterface.available); } </code></pre> <p>And this is my function:</p> <pre><code>private function test():String { return "this is a test"; } </code></pre> <p>The ExternalInterface.call work, and the trace outputs true, I have no idea what's going on.</p> <p>P.S: If you could also tell me how I can pass parameters to a ExternalInterface callback I'd appreciate it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload