cryptic_star
cryptic_star

Reputation: 1873

Call External JavaScript Function

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?

Upvotes: 1

Views: 741

Answers (2)

dain
dain

Reputation: 6689

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

Upvotes: 1

shanethehat
shanethehat

Reputation: 15560

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?

Upvotes: 0

Related Questions