I have an .swf that I am embedding into HTML using the jQuery SWF Object plugin (http://jquery.thewikies.com/swfobject). I have a number of functions within the .swf that I need to call from within javascript functions. I've made these actionscript functions accessible to javascript by calling flash.external.ExternalInterface.addCallback(). Yet nothing happens when I make the call. I've had this happen before and it seems to be that when you reference the .swf from jQuery, you can't call flash functions. Is there anyway around this (aside from not using jQuery)?
Thanks.
I've never used the jquery swfobject plugin but if you give add an id param in the embed code you can access the the swf through
I had the same problem. You can use
$('#myflashelement').context.myactionscriptfunction(arg)
to fix it. For convenience I made a jQuery 'plugin' to call them and to not rely oncontext
in all of my code:You can call it with
$('#myflashelement').callAS('myactionscriptfunction', arg)
.In jQuery
works for me