externalinterface

Getting current URL in Flash from JavaScript using ExternalInterface and IE

别来无恙 提交于 2019-12-01 12:06:32
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 ExternalInterface in IE and other browsers to return to me the current URL. OR Slap an id="PA" attribute on the

jQuery(this) and ExternalInterface

强颜欢笑 提交于 2019-12-01 11:59:53
Hey Guys, I've got ExternalInterface to call a javascript function. But how can I now use jQuery to target the .swf that called the function? For example, I'm calling the "changeObject" function using ExternalInterface. How would I get jQuery to modify the same flash files object tag? This is what I have and it doesn't work: function changeObject() { jQuery(this).css('height','500px'); }; jQuery(this) get's returned as undefined. I do not know the ID of the object element. It's a dynamic ID. There will be multiple .swf's on a page too. Thanks! So I set a new Flashvar that was a unique playerID

jQuery(this) and ExternalInterface

本秂侑毒 提交于 2019-12-01 09:09:23
问题 Hey Guys, I've got ExternalInterface to call a javascript function. But how can I now use jQuery to target the .swf that called the function? For example, I'm calling the "changeObject" function using ExternalInterface. How would I get jQuery to modify the same flash files object tag? This is what I have and it doesn't work: function changeObject() { jQuery(this).css('height','500px'); }; jQuery(this) get's returned as undefined. I do not know the ID of the object element. It's a dynamic ID.

How to get/obtain Variables from URL in Flash AS3

喜欢而已 提交于 2019-11-30 07:38:16
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! Create a new instance of URLVariables . // given search: aID=1234&bID=5678 var search:String = ExternalInterface.call

Get ExternalInterface definitions in Javascript

雨燕双飞 提交于 2019-11-30 07:09:12
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 only issue is that this won't expose any methods registered through the ExternalInterfaces API. I can try and see if the function exists ( object['method'] ) and it tells me it is a function, but I would have to guess every existing method in this manner. NOTE: Obviously, I don't have access to the actionscript. Just hit this question, a tad to late it seems,

Get ExternalInterface definitions in Javascript

可紊 提交于 2019-11-29 09:08:48
问题 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 only issue is that this won't expose any methods registered through the ExternalInterfaces API. I can try and see if the function exists ( object['method'] ) and it tells me it is a function, but I would have to guess every existing method in this manner. NOTE

Problem accessing ExternalInterface exposed method in Google Chrome

 ̄綄美尐妖づ 提交于 2019-11-28 18:03:36
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 code on Chrome, I get the following error: Uncaught TypeError: Object #<an HTMLObjectElement> has no method 'setText' Here is the example HTML I am using (again, works fine in Safari, FF and IE) <html><body> <div id="mycontent"></div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script

Security Error when trying to call ActionScript function from JS

耗尽温柔 提交于 2019-11-28 12:28:34
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: ( http://www.adobe.ca/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000340.html ) When the page loads I am presented with a Flash Player error: SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file: c:/externalinterface.swf cannot access file: c:\myhtml.html at flash.external::ExternalInterface$/_initJS() at flash.external::ExternalInterface$/addCallback() at externalinterface_fla

Using ExternalInterface in Flash

倖福魔咒の 提交于 2019-11-28 11:35:19
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 call ExternalInterface.call("createPlaylist","It's my Life!"); and here's my javascript; function createPlaylist(mess){ alert("called createPlaylist: " + mess); } I've seen lots of examples and I'm mainly confused about the use of ExternalInterface.addCallback . I don't need the javascript to return anything to flash, so is this necessary? For whatever reason, I

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

久未见 提交于 2019-11-27 23:07:30
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 read that data using VB.NET 2010. I have searched on net and found that I can use My.Computer.Port to read data from USB connected device, but I am unable to get its logic and any example to get this practically done... I also been through many books to understand the practical way of doing this, but not yet resolved with anything..... If somebody can