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
181
votes
7 answers

Call AngularJS from legacy code

I'm using AngularJS to build HTML controls that interact with a legacy Flex application. All callbacks from the Flex app must be attached to the DOM window. For example (in AS3) ExternalInterface.call("save", data); Will call window.save =…
kreek
  • 8,774
  • 8
  • 44
  • 69
20
votes
3 answers

How do I access the global object (window) using webpack?

I'm trying to interface ActionScript with JavaScript using ExternalInterface and webpack. ExternalInterface can only provoked (call) functions found on the global object (window). How can I get a webpack module reference on window (global…
19
votes
6 answers

Cross Domain ExternalInterface "Error calling method on NPObject"

I am trying to enable communication between Javascript and Flash via ExternalInterface across domains. The Javascript works great when it is located on the same domain as the SWF. But in one case, the HTML resides on domain A, the javascript and the…
Josh
  • 10,961
  • 11
  • 65
  • 108
14
votes
2 answers

Why does ExternalInterface breaks when I pass parameter with JSON like string?

I have a very odd problem with Flash 10 and ExternalInterface. I am currently using a homemade bridge to use RTMFP with Javascript and whenever I try to pass data that contains JSON, I get a wierd Javascript error that comes from Flash : missing )…
HoLyVieR
  • 10,985
  • 5
  • 42
  • 67
11
votes
2 answers

Javascript -> Flash throwing "Error calling method on NPObject"

I'm trying to call a Flash (AS3) function from Javascript. When the code runs, I get the error "Error: uncaught exception: Error calling method on NPObject!" From my day's worth of googling around, this seems to be be a security matter, and I've…
Jim Miller
10
votes
3 answers

Can R cause a file to be opened by another program?

This is a bit of a strange question, but I thought people here might be interested. Is it possible to have R cause a file to be opened in another program? For example, could you write a command line that would cause a music file to start playing? …
Laura
  • 679
  • 2
  • 5
  • 14
10
votes
8 answers

Functions registered with ExternalInterface.addCallback not available in Javascript

I'm working on a Flash game that needs to call some Javascript on the page and get data back from it. Calling Javascript from Flash works. Calling the Flash functions from Javascript (often) doesn't. I'm using the Gaia framework. What happens: The…
Selene
  • 1,917
  • 2
  • 13
  • 17
9
votes
3 answers

How to get the data from a USB port in VB.NET

I have developed a software for managing the details of patients, the software stores the data into MSsql database.... However, the data I need to get stored has to be read from an external device which transmits data... Now my query is how I can…
Django Anonymous
  • 2,987
  • 16
  • 58
  • 106
9
votes
5 answers

Get ExternalInterface definitions in Javascript

Is there a way to get a list of the exposed functions from a Flash object? For example, you could get a list of all methods in an object by executing: for (var i in object) { if (typeof object[i] == "function") { console.log(i); } } The…
Jamal Fanaian
  • 381
  • 2
  • 7
9
votes
1 answer

AS3 Flash - render html via ExternalInterface

This is my first question on Stack Overflow. It's not the first time I wanted to write one, but usually I find a solution using the search bar, this time I didn't. The problem I'm tackling is a little bit complex so I'll try and be as thorough as…
8
votes
2 answers

Returning a byte string to ExternalInterface.call throws an error

I am working on my open source project Downloadify, and up until now it simply handles returning Strings in response to ExternalInterface.call commands. I am trying to put together a test case using JSZip and Downloadify together, the end result…
Doug Neiner
  • 65,509
  • 13
  • 109
  • 118
8
votes
3 answers

Send array from Flash (AS3) to JavaScript

Is it possible to send an array from Flash (AS3) to JavaScript using an ExternalInterface call? I currently am calling a function multiple times from a 'for each' loop inside Flash but it goes too fast for the JavaScript to keep up. My idea is to…
Josh
  • 6,256
  • 2
  • 37
  • 56
7
votes
2 answers

How to get/obtain Variables from URL in Flash AS3

So I have a URL that I need my Flash movie to extract variables from: example link: http://www.example.com/example_xml.php?aID=1234&bID=5678 I need to get the aID and the bID numbers. I'm able to get the full URL into a String via…
Leon Gaban
  • 36,509
  • 115
  • 332
  • 529
7
votes
2 answers

AS3 ExternalInterface call using jquery

I'm calling into a flash app embedded in a html page using the ExternalInterface. The following code works fine (I'm using a button to test): $(document).ready(function(){ $("#button").click(function(){ var app =…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
6
votes
2 answers

R .call() interface and EXTPTRSXP: Understanding PROTECT/UNPROTECT with externally allocated objects

In the following code, object of type foo is created with a call to foo_new() and an external-pointer to the object is returned to R. Subsequent computations are performed by passing ptr_foo. The object is eventually freed with an explicit call to…
user151410
  • 776
  • 9
  • 22
1
2 3
20 21