as3 ExternalInterface.addCallback is not working right
Date : March 29 2020, 07:55 AM
may help you . The problem is that the SWF file isn't fully loaded by the time you try to call it. The flash player is probably loaded but it takes a while to load and initialise the swf file. What you need to do is make a call from the SWF file to a javascript function when it's loaded and put your javascript there rather than in the page loaded handler that you seem to be doing now. That way you know that your flash application is properly initialized by then. The ExternalInterface class you are using has methods to let you call back into the javascript.
|
ExternalInterface.addCallback not working?
Date : March 29 2020, 07:55 AM
This might help you So my call back method was expecting a parameter and I was not passing one when calling it from JS, so I guess it was just failing silently.
|
ExternalInterface.addCallback does not work right
Date : March 29 2020, 07:55 AM
it should still fix some issue It looks like the issue is in your flash embed html, Mozilla browsers rely on the embed tag but you have object again. Try using something like so within your object node: <embed type="application/x-shockwave-flash" data="BusFlex/BusProducts.swf" width="850" height="588" allowscriptaccess="always">
</embed>
|
Trying to register ExternalInterface.addCallback() in swf
Date : March 29 2020, 07:55 AM
will help you I am not a flash developer. I am trying to wire up communication from javascript to a .swf file. I found here and other places that the simplest method was to use ExternalInterface.addCallback(). I have used the above link as well as the official docs as reference. , in JS there is 1 parameter, GetSWF("Project").updateText(**value**);
private function updateText(pid:String**, playerName:String**):void
|
ExternalInterface.addCallback is not working
Date : March 29 2020, 07:55 AM
|