ActionScript 2.0 :: External Interface Does Not Work In IE?
Dec 4, 2009External interface does not work in IE when we keep the flash inside a form..
View 1 RepliesExternal interface does not work in IE when we keep the flash inside a form..
View 1 RepliesI am using in AS3 "External Interface ". When I call the JS function that is on the same page as swf everything works fine.
I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.
I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.
how to call a JS function that is on an external file from AS3?
I was studying about EventDispatcher and tried to make my own class and interface IEventDispatcher.Then later i was wondering, what use does the interface have anyway when you still have to declare the functions that are in the interface to the class that implements the interface? The dispatcher will still work without the interface. Like addEventListener, removeEventListener, these functions are within EventDispatcher so why do i need an IEventDispatcher?
View 3 Repliestrying to build simple website interface with flash but wont work, not sure why
btn_info.addEventListener(MouseEvent.CLICK,func_in fo);
function func_info(e:MouseEvent):void{
navigateToURL(new URLRequest("info.html"), "_self");
}
ive got other buttons with their own individual instance names and function names and such thought perhaps the buttons weren't working cause the objects don't exist, they're not loaded on the firstframe so the code is trying to reference something that but not sure how to get around this output window just says
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Im testing a program in FlashDevelop, which uses Flash player 10. Need externalInterface to work, but on running this simple test program, it displays "ExternalInterface is not available". How do I get ExternalInterface working? [URL]
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function init():void {
if (ExternalInterface.available) {
[Code] .....
By the way, this script shows "External Interface is available" when I run it in my browser. Its only when I run it in Flash Player 10, that it is not available.
I've got a SWF with buttons that are calling a javascript function using External Interface - specifically the Milkbox photo gallery. For various reasons, the page with the embedded SWF has to work online as well as being run from someones local machine. The online version runs fine on every OS/browser. However, I've run into a snag where, for some reason, the local version isn't firing the javascript on Win XP in any browser.Is there perhaps some snag with using External Interface locally on an XP machine, or is there something else at play here? FYI, no problems at all on Vista/any browser.
View 1 RepliesI'm having a problem with Flash and Internet Explorer. I'm trying to close out a browser window with
//as code ExternalInterface.call("closeWindow");[URL].. Of course this works in all other browsers except IE, the error that I am getting is:'null' is null or not an object
I have created a peelback advert that peels down from the top right. All is well apart from it it obstructs the user ability of the site underneath as the peelback advert is effectively over the top. I have been giving some guidlines to stop this but i am struggling to understand them. The instructions specificall say that the file must be set with the transparent parameter.
Here are the options that i have:
OPTION 1:
import flash.external.ExternalInterface;
// Function executed in answer to the event
function onClic(pEvt:Event):void {
[code]...
I think it could be the latter two that i need but am not entirely sure, i have tried them but have failed in my attempts?!If this is definetly the way to do it i will persevere! If these are not the way, what does the corner_show/hide method method do?
I have a navigation menu set up using standard jquery to load new body text and play a swf. There are about 10 links, each having there own body text and swf file. The swf's simply play, then stop after about 30 frames. When clicking through each menu item, a new swf plays and body text appears. I've been running into a problem lately with IE not reloading a swf. Instead it stops on the last frame of the swf and appears as an image. I was told to try using the external interface so jquery can force it to reload. I've never used the external interface before though, how to do this?
View 2 RepliesSeveral months ago for a project at work i developed a video player using flash, external interface and swfobject.js. I used external interface to facilitate communication between javascript and actionscript. This works great. Currently I am working on an extension to this that requires me to extrapolate logic from what i already written. I am using the same swf file in both applications, but in the extension i can't get the flash object to recognize my calls. Since i am using the same swf object i know that my problem is in the javascript, i just don't know where. I am using the JQuery Library. Without further adieu here's my code.
[Code]...
i am trying to communicate from javascript to AS3 by using External Interfaces, now the problem is that the function i am trying to call works fine with Internet Explorer 8, but it doesn't works with firefox 3.5.9 or google chrome, below is the html / javascript code.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
[Code]....
Having a problem trying to get the external interface working with as3. My flash file has 2 input text boxes with instances of 'received_ti' and 'sending_ti' and a button with instance of 'send_button'. My html code has a simple form with 'sendField' and 'receivedField' inputs and a submit with a value of 'Send'.
At the moment i can get the flash file to send text into the html 'receivedField' input but cannot send text from html into the flash file's 'received_ti' text box.
[Code]....
I'm trying to go full screen by using the external interface...
i am able to communicate with the flash via JS but there it doesn't go full screen.
Is there any security issue concerning this?
Using Flash - AS 3.0: I am trying to use ExternalInterface.call to open a .pdf file - but it is not working - nothing is happening...
ExternalInterface.call ("window.open","diagrams/v1/crh.pdf", "WindowName", params);
But this line DOES work - call an .html file to open.
ExternalInterface.call ("window.open","m5_quiz/v1/quiz.html", "WindowName", params);
I can't find any information that says this should or shouldn't work - it seems to me it should open it. To get around this - I have been using 'navigateToURL' to open the pdf file - but that triggers the pop-up blocker - using the External Interface call does not.
We're using External Interface for interfacing between Flash and JavaScript on the HTML page. All works fine online. When we
try to localize the pages though (so that a Salesperson can have a CD full of demos), none of them seem to work.Is this an over-sensitive Flash security issue? We already have allowscriptaccess='always' and swliveconnect=true in the object/embed tags.
What can we do that doesn't require changes on each individual machine to set trust paths or any other kind of browser configuration? Not only do we want to have this content working on the machine of a salesperson, we may get clients that want to deploy content offline (kiosks, machines without any network access).
I have been at it for two days now and have not been able to resolve this issue. I am trying to call an AS3 function from JavaScript via ExternalInterface API which is simply not working at all. If I to call a JavaScript function form html loaded swf, it works beautifully.[code]
View 1 RepliesI'm trying to get javascript to talk to flash, but I haven't been able to get it to work.I've gotten flash to talk to javascript, but not the other way around. It seems as thought flash isn't listening to the javascript, or I'm doing something wrongPart of the AS3 to initially call the js:
ExternalInterface.call("showGal", slastSelectedNumber);
The js i'm trying to use is:
function showGal(dPicture) {
document.getElementById('fullsizegallery').style.display = 'block';
document.getElementById("flashGalleryContent").someFunctionName(dPicture);
[code].....
is there anyway to get the External.Interface.call functionality to work in Internet Explorer 7 when you have wmode set to transparent on the flash object in question?I've tried pretty much everything under the sun I can think of without any success after a long time browsing the net for fixes. I should point out that I get the calls to work in chrome and firefox with identical code and that it also seems to work in ie if I dont have wmode set to transparent.Essentially what I want to accomplish is to have a flash dropdown menu set to transparent so it can go down over html content without covering it and then using external.interface to resize the div the flash object is contained in when the mouse goes off or on the menu. In doing so making the html content accessable again when the mouse goes off the menu.
View 8 RepliesI wanna be able to call a Javascript funktion which triggers an ajax postback, but when I call the function from flash with an external interface the page reloads in IE, not in FF or Chrome. If I make a button outside flash which triggers the button and then the postback everything works fine.
View 0 RepliesI am currently just finishing a project and I am having a big time problem with an ExternalInterface call. My application runs fine but when the javascript call is being made from flash using external interface, IE is going from the "Done" message, to showing the "!" icon, with "error on page" as the message. There is no error that is showing up in Firefox.
The current error I am seeing is an 'Unterminated String Constant', which wouldn't be a problem except for that it appears on line 1... which is [URL]
I am trying to access JS functions of the container HTML code from the swf(using External Interface). But until I add the swf in Global Security Settings it doesn't work, even from localhost. My question is how to ensure that this problem doesn't come to users who access the site. If I have to build a crossdomain.xml what should be the content? I am not accessing different domains.[code]
View 2 RepliesI was wondering if there is a way to get the External.Interface.call functionality to work in Internet Explorer 7 when you have wmode set to transparent on the flash object in question?I've tried pretty much everything under the sun I can think of without any success after a long time browsing the net for fixes. I should point out that I get the calls to work in chrome and firefox with identical code and that it also seems to work in ie if I dont have wmode set to transparent.Essentially what I want to accomplish is to have a flash dropdown menu set to transparent so it can go down over html content without covering it and then using external.interface to resize the div the flash object is contained in when the mouse goes off or on the menu. In doing so making the html content accessable again when the mouse goes off the menu.
View 2 RepliesI am looking for flash to javascript function calling external interface using AS3[code]...
View 1 RepliesWhat I have:A swf exports a function via ExternalInterfaceJavascript creates new embed object and adds it to the documentCalling flash functions works fine in other browsersCalling flash functions will fail in IE 8Example of exporting functions in swf:
flash.external.ExternalInterface.addCallback("isActive", ...
Example of creating the embed object:
var b = document.createElement('embed');
[code].....
Everytime I try to do even an
ExternalInterface.call('alert','abc');
(Which will work on every browser) I get an
object doesn't support this property or method
After the alert appears. It even happens in the HTML generated by flash without me touching it...
I have a flash player with an external javascript interface: reloadData() I'm calling that function via Javascript when editing information on the page - basically to keep data on the page and in the player in synch. The reloadData() function works fine when the player is hosted locally. When we move it to the CDN (Amazon Cloudfront), the player loads successfully, but the external javascript interface no longer works - console.log(player) reveals the following:
<object type=,"application/x-shockwave-flash" data="[our_cloudfront_url].swf" width="920" height="404" id="player" style="visibility:visible;">
Uncaught TypeError: Object #<an HTMLObjectElement> has no method 'reloadData'
I know there are a lot of things that behave differently when working with items on a CDN, but we're using a CNAME to point to the cloudfront distribution
(buildid.ourdomain.net => distributionid.cloudfront.net)
We have a flash game embedded in a web page (using SWFObject v2.2) and there are some links on the page that call into the flash in the following manner:
window.document["flashObjectId"].flashMethod();
This has worked great on all browsers we have tried including IE7 and 8, however on IE9 it generates the following error: "SCRIPT438: Object doesn't support this property or method".
It does work in compatibility mode so I tried adding a meta tag to tell IE9 to use compatibility mode by default, however that didn't work because our game runs in an IFrame within Facebook.
I have tried referencing the flash object every way I could think of in the Javascript but I always get that same error message in IE9.
I have a flash (flex actionscript project) that has to pass data to javascript in cyrrilic through externalinterface. However, data turns out at the javascript end in ????? instead of real cyrillic letters
how can this be fixed so it shows up as cyrillic?
[Code]...
I need to register events in flex and listen to them in java script. Is there any way other than using external interface.
View 1 RepliesI have a series of 10 external interface callbacks that are called through javascript and load mp3 files. The problem is, someone is able to click these while my pre-load function is running and it causes multiple files to load. Is there a way to disable the callbacks while the pre-load function is running?
ExternalInterface.addCallback("receiveText1", receiveText1);
function receiveText1(value:String):void {
channel.stop();
channel2.stop();
[code]....