Questions tagged [externalinterface]

The ActionScript ExternalInterface class enables communication between ActionScript and the SWF container. For example, ExternalInterface can be used to call an ActionScript function in Flash, from JavaScript in an HTML page. This is often use for sending variables from a container HTML page to an SWF file.

The ActionScript ExternalInterface class enables communication between ActionScript and the SWF container. For example, ExternalInterface can be used to call an ActionScript function in Flash, from JavaScript in an HTML page. This is often use for sending variables from a container HTML page to an SWF file.

308 questions
6
votes
2 answers

Accessing an ActionScript function via Javascript

I'm trying to call a function in an action script using the ExternalInterface.addCallback API, but I can't seem to get it to work. Here's what I have: ActionScript: //MyClass.as package { import flash.display.Sprite; import…
Swift
  • 13,118
  • 5
  • 56
  • 80
6
votes
3 answers

Actionscript3 to JavaScript communication: best practices

On a more abstract level then a previous question, in my experience there are 3 ways to call a javascript function on an html page from an embedded .swf using AS3: ExternalInterface, fscommand, and navigateToURL. Let's compare and contrast these…
matt lohkamp
  • 2,174
  • 3
  • 28
  • 47
6
votes
1 answer

Actionscript 3 ExternalInterface, Pass variable to javascript?

How would I go about passing a variable to a javascript function using ExternalInterface?
Probocop
  • 10,346
  • 28
  • 85
  • 115
6
votes
5 answers

Problem accessing ExternalInterface exposed method in Google Chrome

My simple ActionScript I am trying to use Flash's ExternalInterface to setup a callback so that JavaScript can call a method on my Flash object. Everything works fine in Safari, Firefox and in IE, but I cannot get Chrome working. When I try the…
Rob Di Marco
  • 43,054
  • 9
  • 66
  • 56
5
votes
3 answers

Flash: can I forbid ExternalInterface access to loaded SWF?

We have a Flash app (AS3). This is a desktop application that runs in our own projector. No Air. The projector is written in C++. The projector gives Flash part an indirect access to Windows API via ExternalInterface. Now we want to let our…
Pavel
  • 2,610
  • 3
  • 31
  • 50
5
votes
3 answers

flash: ExternalInterface works with embed tag but not with object tag

The "modern" updated way to embed a flash object, according to Adobe:
Yuval A.
  • 5,849
  • 11
  • 51
  • 63
5
votes
1 answer

Flash/AS3: ExternalInterface.call() "Why u no console.log?"

I'm trying to do a very simple test to get the AS3 ExternalInterface.call() to Javascript console.log() for me. I have a simple SWF with AS3 on a top layer and a button that triggers the call. import flash.external.ExternalInterface; function…
user463112
5
votes
1 answer

Security Error when trying to call ActionScript function from JS

I have a little test swf to test calling an ActionScript(3.0) function from JavaScript. I am using the Flash documentation as a reference: …
Nick
  • 19,198
  • 51
  • 185
  • 312
5
votes
1 answer

ExternalInterface.call leaks in IE 9

I created a really simple SWF to demonstrate: package { import flash.display.MovieClip; import flash.events.Event; import flash.external.ExternalInterface; public class FlashIELeak extends MovieClip { public function…
5
votes
1 answer

Javascript to Flash communication without SWFObject.js

Wondering if its possible to communication from javascript to flash without the use of SWFobject or any other extra javascript file. Currently I am using the following…
Alec Smart
  • 94,115
  • 39
  • 120
  • 184
4
votes
2 answers

Using ExternalInterface in Flash

I'm trying to edit some flash to make an external javascript function call, but with no success. Here's my actionscript 2.0 code: //testing external .js calls import flash.external.ExternalInterface; //attempting to make external js…
danwoods
  • 4,889
  • 11
  • 62
  • 90
4
votes
4 answers

how to read a global javascript variable from actionscript

Given that there is a global javascript variable on my web page named myVar, how can I access the value of the variable myVar from within my flash movie using javascript? I see plenty of examples of using external interface in order to execute…
Rafe
  • 8,467
  • 8
  • 47
  • 67
4
votes
1 answer

How do I communicate between JS and AS3 in an AIR Android Application?

I am using ExternalInterface but I have never worked with it before so I don't know what really to do. I don't even know if ExternalInterface works with AIR Android . I am trying to implement the JS Google Maps API . At this point I am able to load…
4
votes
3 answers

as3 ExternalInterface.addCallback is not working right

I was trying to access swf from javascript, so this example in livedocs is what I'm trying to modify. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html#includeExamplesSummary However,it is not working…
shibbydoo
  • 569
  • 4
  • 18
  • 32
4
votes
2 answers

Controlling the scope of a document.write call coming from a third party

I'm writing a webpage that relies on an external javascript file (that I have no control of), which returns data by using document.write's. Is there any way to dynamically call the function without it overwriting the whole document? Here's the most…
Phil
  • 1,110
  • 1
  • 9
  • 25
1
2
3
20 21