externalinterface

C# and Flash communication

别来无恙 提交于 2019-12-21 20:44:04
问题 Is there any way for C# to get a list of the methods the swf exposes through ExternaInterface? 回答1: Update: Just realized that I've misread your question as you are looking for methods defined via the Flex ExternalInterface class rather than those of the Shockwave ActiveX control itself; I'm gonna keep my original answer below as it might still be helpful regarding SWF usage via C# in general. Concerning ExternalInterface I don't have an answer right now, but you might look into Fun with C#

Actionscript3 to JavaScript communication: best practices

此生再无相见时 提交于 2019-12-21 15:19:32
问题 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 methods (and maybe others I haven't listed) and talk about the pros and cons of each - right now, ExternalInterface seems like the way to go in terms of flexibility, but is it right for all situations? Are there concrete benefits in terms of execution

AS3 ExternalInterface call using jquery

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 11:45:16
问题 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 = document.getElementById('ApplicationID') console.debug(app) app.pageUnloading() }) }) So this calls into the flash app fine and prints: <embed id="ApplicationID" width="600" height="400" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go

Send array from Flash (AS3) to JavaScript

蹲街弑〆低调 提交于 2019-12-21 09:22:11
问题 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 create an array of the attributes, pass that to the JavaScript function and then to loop through that in the JavaScript. Thanks, Josh 回答1: Further to the suggestion of using JSON, this should be faster for small arrays and wouldn't require the use of

Javascript to flash via ExternalInterface

…衆ロ難τιáo~ 提交于 2019-12-21 06:06:14
问题 I'm wondering if someone could look over my code. I'm trying to pass a dummy variable from javascript to actionscript 3 with the following code: HTML: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="music_player" width="500" height="375" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"> <param name="movie" value="music_player.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess"

Javascript to Flash communication doesn't work

你说的曾经没有我的故事 提交于 2019-12-20 06:09:19
问题 I'm trying to control a flash player from javascript, i did as i saw on the internet and i get an "not supported" error here what i've wrote: on js: function getFlashMovieObject(movieName) { if (window.document[movieName]) { return window.document[movieName]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document

Getting current URL in Flash from JavaScript using ExternalInterface and IE

邮差的信 提交于 2019-12-19 10:28:38
问题 I'm trying to get the current URL that the Flash player is on. Not the URL of the .swf file, but the URL that the browser is pointing to. Thus far I've used: var st:String = ExternalInterface.call("window.location.href"); Unfortunately this doesn't work in IE. From my research, I can see that it won't work with IE either way. The only other thing I found around the Internet is putting an 'id' tag on the tag. So I'm trying to find out if and/or how I can: Somehow make a call using the

How to get/obtain Variables from URL in Flash AS3

风格不统一 提交于 2019-12-18 12:34:07
问题 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 ExternalInterface var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url; Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers. Appreciate any tips, links or help with this! 回答1: Create a

Call AngularJS from legacy code

百般思念 提交于 2019-12-16 20:16:01
问题 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 = function(data){ // want to update a service // or dispatch an event here... } From within the JS resize function I'd like to dispatch an event that a controller can hear. It seems that creating a service is the way to go. Can you update a service from

ExternalInterface gives me an option of stopping the script when using multiple parameters. Why?

自闭症网瘾萝莉.ら 提交于 2019-12-14 01:47:05
问题 First version: ExternalInterface.call("$(document).trigger", "opened_file_chooser"); Second version: ExternalInterface.call("$(document).trigger('opened_file_chooser')"); If I use the first version, it's much, much slower than the second. Also, the browser blocks, and after a few seconds Firefox shows me the dialog with "A script is not responding ... " and it offers me the possibility of stopping it. If I use the 2nd version, the call to Javascript is instantaneous. Is there a way I could