1

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?

3
  • Do you really need a communication bridge between flash & the page ? Is there not a better solution? Commented 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. Commented 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. Commented Apr 12, 2011 at 14:04

2 Answers 2

1

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).

Sign up to request clarification or add additional context in comments.

Comments

0

So your page will contain some JavaScript to execute, but your Flash app will not be running in a browser? Can't you just use navigateToURL to open an HTML page containing JavaScript that executes on page load?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.