I have an ActionScript program that I want to access some external JavaScript functions. By external, I mean that the ActionScript/swf aren't going to be loaded via the HTML/JavaScript. Everything I see recommends ExternalInterface, but that seems to imply that your JS loads your swf. Is there a way to call a JavaScript function by URL?
-
Do you really need a communication bridge between flash & the page ? Is there not a better solution?Raynos– Raynos2011-04-12 13:31:39 +00:00Commented Apr 12, 2011 at 13:31
-
Perhaps this is more of an architecture question then. I'm building ActionScript in Flash Builder, and then debugging from there. How would I then integrate my javascript? And yes, it really is needed - I need to perform a json call to get some data.cryptic_star– cryptic_star2011-04-12 13:57:14 +00:00Commented Apr 12, 2011 at 13:57
-
why can't you communicate with your server through a socket in the flash file. Alternatively compile your ActionScript and flash file then embed it in the javascript page and run it from there.Raynos– Raynos2011-04-12 14:04:11 +00:00Commented Apr 12, 2011 at 14:04
Add a comment
|
2 Answers
I'm not sure what do you mean by calling a JavaScript function by URL, what you probably need is a JSON based web interface / service.
How / where do you plan to run the Flash content if not embedded in the HTML? You'll need one place or an other to actually run that JS code, be it on client side in the browser or server side (in which case you need the webservice).