externalinterface

How to list available callbacks exposed by a flash element

微笑、不失礼 提交于 2019-12-10 16:19:48
问题 Is there a way to query an embedded flash element to determine the available methods that can be executed on it via JavaScript? Edit: It appears that in IE it's as simple as for ( i in flashNode ) { alert(i); } After much clicking, they will be some of the very last members enumerated. Still not able to determine this in Firefox though. 回答1: While it is possible to get the callbacks by enumerating the <object> DOM node in IE, they are mixed in with all the other properties of the DOM node and

How can I call an Actionscript function when the .swf is referenced by jQuery?

六月ゝ 毕业季﹏ 提交于 2019-12-10 10:35:17
问题 I have an .swf that I am embedding into HTML using the jQuery SWF Object plugin (http://jquery.thewikies.com/swfobject). I have a number of functions within the .swf that I need to call from within javascript functions. I've made these actionscript functions accessible to javascript by calling flash.external.ExternalInterface.addCallback(). Yet nothing happens when I make the call. I've had this happen before and it seems to be that when you reference the .swf from jQuery, you can't call

how to read a global javascript variable from actionscript

只谈情不闲聊 提交于 2019-12-10 09:24:02
问题 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 javascript from actionscript, but I am unable to find examples of returning values back into the flash movie using actionscript. Thanks in advance. I hope my question is clear enough. 回答1: ExternalInterface works by allowing JavaScript to invoke an

Calling a flash ExternalInterface in swiffyobject

℡╲_俬逩灬. 提交于 2019-12-08 06:34:23
问题 I have a flash that communicates with a javascript using ExternalInterface. I have converted this into HTML5 using swiffy. How do call the methods i have created in flash using javascript? 回答1: As per the swiffy documentation, ExternalInterface is not supported for AS 2.0 or AS 3.0 by swiffy. Please refer to: ActionScript 2.0 support ActionScript 3.0 support 回答2: Here is an update to the answer for who is still looking: As of now, Swiffy 5.3 has already supported ExternalInterface. I am able

How do I pass information between Flash's ExternalInterface and JavaScript?

为君一笑 提交于 2019-12-08 05:48:51
问题 How do i pass three arguments using external interface in flash to a java script function and get back output and display it in flash? import flash.external.ExternalInterface; var para:Array = new Array(); send_btn.addEventListener(MouseEvent.CLICK, clickListener); function clickListener(eventObj:Object ):void { para.push(mean.text); para.push(std.text); para.push(points.text); trace("click > " + para); var output =ExternalInterface.call("calc",int(para[0]),int(para[1]),int(para[2]) ); out

ExternalInterface.addCallback for as3 doesn't work

ぃ、小莉子 提交于 2019-12-08 04:05:12
问题 I want to call AS function from JS. I have the following ActionScript 3 code: package { import flash.display.*; import flash.events.*; import flash.system.*; import flash.external.ExternalInterface; public class Main extends Sprite { public function Main() { ExternalInterface.addCallback("PlaySound", PlaySound); } public function PlaySound():void { } } } I need to call function PlaySound() from JavaScript. I try to do it in the following way: function thisMovie(movieName) { if (navigator

Does the ExternalInterface, in Flex 3, have a data size limitation?

情到浓时终转凉″ 提交于 2019-12-08 03:59:41
问题 I am using the ExternalInterface on Flex 3. We are actually using flex to compress a large amount of DOM data, so this is specifically being used with LARGE data. To further investigate, if there is a limitation, is this universal? (IE. Silverlight) First, let me state that this is being done with an application that was made by inexperienced software engineers. This is an app that we need to buy time by compressing the data so that we can build a long-term solution. We have no other options,

ExternalInterface in Chrome

泄露秘密 提交于 2019-12-08 02:41:21
问题 I would like to call js function via ExternalInterface from as3 code LOCALLY, not on remote server. All browsers work great but not Chrome. Note that in flash-debug player version (C:\Windows\system32\Macromed\Flash\NPSWF32_11_9_900_170.dll, version 11,9,900,170) I have installed in Chrome it works. But in default flash player version (C:\Program Files\Google\Chrome\Application\33.0.1750.117\PepperFlash\pepflashplayer.dll, version 12.0.0.70) it doesn't work. PS: I've also tried to open my old

Is it possible to debug ExternalInterface through file:// from Flash Builder?

非 Y 不嫁゛ 提交于 2019-12-08 01:42:52
问题 I have a project written in ActionScript 3 using Adobe Flash Builder 4.5. It registers several functions in an ExternalInterface , so that they may be called from JavaScript. If I access the Flash document on a server, for example http://localhost/ , I am able to call the defined functions successfully. If I just open the file in my browser directly (through the file:/// protocol) it will fail with an error like this: *** Security Sandbox Violation *** SecurityDomain 'null' tried to access

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

可紊 提交于 2019-12-07 09:48:59
问题 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 the webpage with StageWebView. I can access the longitudes and latitudes values in JS but I need to access those values from AS3 when the selects a location on the map. Here is HTML: <!DOCTYPE html> <html> <head> <style type="text/css"> html, body