Actionscript 3 :: ExternalInterface Works In IE But Not Firefox?
Jan 7, 2011
I am trying to execute an AS3 function from my javascript using the ExternalInterface. Seems to work fine in IE, but firefox is always returning javascript error method undefined.
I have been Googling this for ages and eliminated the following possibilities:
1) Some people say you need to have an embed tag inside your object tag, so added one - no luck.
2) Many people say that you need to make sure that your flash is loaded before calling the javascript. Well my call is after pressing a link on the page. I am always using the flash application first and only pressing the link at the end.
3) Then I thought that maybe it is a security problem so added the following:
try {
ExternalInterface.addCallback("test", testing);
trace("added callback");
[Code]....
I am running the latest Firefox and FlashPlayer 10.
View 2 Replies
Similar Posts:
Jul 21, 2009
works perfect on my macbook pro (safari, firefox, and opera) but when I view the site on Vmare Fusion Windows XP and use IE and FireFox the pages don't load... I don't know what to make of this. Has anyone hear or seen anything like this happen before? BTW the website was created in Adobe Flash CS4/ AS 3.0 and published using Flash Player 10.
View 2 Replies
Aug 19, 2009
I've spent about a day on this... Publishing a swf for AS3/FP9, following the example in the ActionScript 3 documentation to get two-way communication between a SWF and javascript. Works great in IE.
I've sifted through what seems like a million posts on the subject, with people getting the same result... the function I/they are attempting to call doesn't exist.
In the documentation example, there's a function to find/return either the SWF as an object or embed tag depending on which browser you're viewing the page in.
[Code]...
View 1 Replies
Jun 10, 2010
I have an issue with my ExternalInterface. The way it is currently set up is, on the page load up, a boolean is set to true in JavaScript and then checked by ActionScript constructors (using a timer) until it is true. This marks that JavaScript is ready to get calls from AS3.
At this point, AS3 will add the callback and do some internal stuff, and at the end of the constructor I call JavaScript. So far so good. JavaScript will at this point call a function in AS3 (that was defined in the callback described above), and this is where it all messes up.
On IE this works perfectly fine. On FireFox though, it does not. When I debug it, I see that the javascript function is called but when it tries to call AS3, nothing happens. I also tried to add a timer, but for some reason the function STILL executes straight away (in IE).
[Code]...
View 1 Replies
Jun 26, 2008
I have set up a function in Flash that i want available to Javascript.
Code:
function OpenBrowse():Void {
...
}
_trace(flash.external.ExternalInterface.addCallback("OpenBrowse",null,openBrowse));
[code].....
View 3 Replies
Apr 15, 2010
I'm trying to call a method inside a flash movie from js, every time the mouse leaves the "div". It works on Internet Explorer, but not in firefox. Here is the html script:
<script type="text/javascript">
window.onload = function(e){
init();
}function init(){
document.getElementById('div').onmouseout = function(e) {
[Code] .....
Here is example of the problem, there is an alert for the js and the flash should be able to remove the swf (see a gray background? it works! see a image, flash didn't receive the call): [URL]. This should work with internet explorer / safari / chrome (pc/mac) only firefox seams to reject this.
View 2 Replies
Jan 3, 2010
I've got a very basic test file that just fires a Javascript function with an alert() in it (i.e. alert("You clicked a button."). In IE this works just fine, but in Firefox it wasn't doing a thing. I finally realised it might be SWFObject, so I published the HTML file straight from Flash and all of sudden my ExternalInterface call works perfectly in Firefox as well.
Here's my SWFObject embed code:
PHP Code:
<script type="text/javascript">var params = {};
var flashvars = {};
var attributes = {id:"testTool", name:"testTool"}
params.allowscriptaccess = "always";
params.bgcolor = "#B0E3DE";
[Code] .....
I've been googling this for about 4 hours and there are lots of mentions of the SWFObject requiring an ID attribute for addCallBack calls (hence the attributes object), and I've been through a whole bunch of posts in various forums but can't pinpoint a single solution for ExternalInterface.call() not working with SWFObject in Firefox.
View 4 Replies
Aug 5, 2010
I have two swf files: swf_sender and swf_receiver. The swf_sender controls the swf_receiver via java script.Everything works fine in IE however, the swf_receiver doesn't receive communication from java script if openned by Safari or Firefox.The first part of communication: swf_sender - Java works ok (I tested it with alert() in Java) in all browsers.Here is my Java interface code:
Code:
<script type="text/javascript">
function getFlashMovie(movieName) {
[code].....
View 2 Replies
Nov 9, 2010
Mainly because I have it ALWAYS working locally, when I test in a browser, but the moment I deploy to a server it stops working.
I've added trace commands and confirmed that ExternalInterface is in fact available before adding the callback, and an alert command in the javascript method correctly identifies the flash object. I also checked and allowscriptaccess is set to 'always'.
Could it have something to do with the flash being served on a remote server?
View 1 Replies
Sep 19, 2011
The "modern" updated way to embed a flash object, according to Adobe:
[Code]...
Then it works on Firefox and Chrome (the AS function is called and works properly) - (it doesn't work in IE though). How come it doesn't work with an object tag? How "safe" it is to use the embed tag instead of the object tag? Is it not obsolete? Note, that it is definitely not a timing issue - If I call the AS function from JS from an onclick function - then the results are the same.
View 2 Replies
Aug 7, 2010
I know there have been other questions on getting JavaScript / Flex ExternalInterface to play nicely, but I've what I think is a weird one. It works perfectly in every browser except Safari (on a Mac). Chrome, IE, Firefox - all ok, but Safari, nope it just wont fire.I've copied my code below, can anyone see why it doesn't work in Safari pls ?(the 'are you sure' dialog window appears in Safari but the method in the Flex app just doesn't get called)
Flex code :
if(ExternalInterface.available){
ExternalInterface.addCallback("flexShutdownHandler",flexShutdownHandler);
[code].....
View 1 Replies
Aug 21, 2009
I finished my website and uploaded to internet. And when I showed friends that use IE7, Chrome or any other browser besides Firefox it failed to work. The SWF gets stuck at the preloader at a certain percentage but the animation of the preloader still runs. Here is the link (try to watch from different browsers): [URL]
View 2 Replies
Sep 30, 2010
Trying to recode map program to utilise modest map rather than original hand made map routines. Finished up yesterday and had squashed bugs pretty much(annoying flicker issue but that didn't appear on another web browser I figure it's flash/browser related issue). Then I realised I need to try this in IE as well. And it doesn't work. Map loads up so modest map code is working. What is NOT working is everything else. It's supposed to track locations and draw arrows to their positions.
It doesn't go to where it's supposed to initially. No arrows are drawn. No control buttons from HTML side work. Nothing. Zip. I have suspicion it could be the ExternalInterface which works differently on firefox and IE. Could that be reason? If so how does one go detecting what browser I am using and how does one need to take that into account? Or is there something else that's different between IE and firefox I need to take into account?
IE itself only gives rather mystified error message.
Message: Unspecified error(my translation since original is in Finnish)
Line: 49
Column: 5
Code 0:
[URL]
Funny thing is both php file and output html file is 37 lines long...
View 1 Replies
Nov 9, 2009
I've started my first flash movie and it works in IE but not in Firefox. Can anyone help me out? Here is the code that I am using (I pulled the syntax from a web site and modified it):
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab#version=6,0,40,0"
[code]....
View 1 Replies
Mar 7, 2010
in IE this just pretends its loading forever also, i got the width and the height to adjust to the window size and its working great (in firefox anyways) but thats not what im really after, i want the height to be 100% but i want the width to adjust based on either the height of the window or the height of the object. anyone know a trick for that? i cant seem to find a way to do it in SWFobject
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].....
View 1 Replies
Jan 20, 2009
I made a scale animation that works on IE 7 but it does notwork on Firefox 3.The button toggles between scaling up and down. In Firefox, it starts the loop for scaling up but it isquickly interrupted and return to its original scale.What should I change in the below code to make it alsofunctional on Firefox 3 ?
<head>
<script language="javascript">
var obj = null;
[code]......
View 1 Replies
Jan 21, 2009
I made a scale animation that works on IE 7 but it does not work on Firefox 3. The button toggles between scaling up and down. In Firefox, it starts the loop for scaling up but it is quickly interrupted and return to its original scale. What should I change in the below code to make it also functional on Firefox 3?
[Code]...
View 2 Replies
Mar 2, 2010
My swf is on a secure server (https / Apache). It makes calls to a php script in order to connect to a database. This works fine in firefox, but for some reason doesn't work in Internet Explorer (have tried using version 6 & 7).
Now I've read Gary Rogers' page about going to Internet Options> Advanced> Disable the option "save encrypted pages to server". The problem is that this option wasn't checked when testing the games in IE, meaning that it was not the cause of the problem, however, most other people said this fixed their issue.
View 0 Replies
Mar 7, 2010
in IE this just pretends its loading forever also, i got the width and the height to adjust to the window size and its working great (in firefox anyways) but thats not what im really after, i want the height to be 100% but i want the width to adjust based on either the height of the window or the height of the object. anyone know a trick for that? i cant seem to find a way to do it in SWFobject
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].....
View 1 Replies
Mar 16, 2010
Would anyone know why the photo stack flash gallery won't work in Firefox? IE works fine. I'm fairly sure its just a bit of syntax i'm missing, or a compatibility issue. I am using a .swf file which imports images in using an xm l file and then displays them as a stack of photos which can then be rotated and looked through.
[Code]....
View 1 Replies
Jul 13, 2011
I have flash files on a page which load and play a sound file, then advance via getURL javascript to the next page when the sound file has finished playing (i.e. the movie is non-interactive, maybe this is part of the problem).
On firefox - both PC and Mac - it works just fine. On Mac Safari and Chrome at least is doesn't seem to do anything, but the same javascript works fine when I issue it to the browser manually.
the getURL statement
Code:
getURL("javascript:document.getElementById('NextButton').click();");
1. In the html I have used OBJECT with nested EMBED. With all the browsers that I tested, this worked fine, as did having only the EMBED code
2. I have used the allowScriptAccess parameter correctly in both cases (always), and the swf is hosted on the same subdomain as the survey engine too...
3. I'll check now if a simple alert() is displayed
View 0 Replies
Mar 2, 2007
My portfolio is a combination of elements from Kirupa's gallery and my own.The portfolio works fine but the loader just doesn't work correctly. It can be tested at URL...In Firefox the loadbar flashes once(which it shouldn't do) and the dynamic text box displays a NaN% and then 100% so something isn't being defined correctly. In IE 6.5 however there is no NaN% displayed, the preload bar flashes once and then works fine. I don't know why there would be a difference between browsers.Please take a look at the code below and let me know why the files being loaded into the picture container aren't correctly preloading. It's been a week of working on this endless portfolio and I just want it to be over.[code]
View 3 Replies
Mar 14, 2008
I have a movie that retrieves an RSS feed from this URL: [URL]
The XML document can be successfully parsed in Flash when viewed in Firefox, but it doesn't work in IE. Here is a file that demonstrate this: [URL]
However, if I open the RSS feed and save a copy of it and post it to my web server, it does work in IE: [URL]
Here's the version of the RSS that is working when saved: [URL]
I don't believe that there is any difference in the two XML documents. Cross domain policy files are in place on both servers - and it doesn't appear to be a cross-domain issue since it works in Firefox.
The code in the flash files are the same except for the URL of the XML they are retrieving. Here's the code for the one that isn't working:
var xmlFeed:XML = new XML();
xmlFeed.ignoreWhite = true;
xmlFeed.load("http://www.clipsyndicate.com/rss/feed/5572?wpid=2892");
xmlFeed.onLoad = function(success) {
txtTest.text=xmlFeed;
}
View 1 Replies
Jan 2, 2009
I added a UIScrollBar component to a dynamic text box. You can see it at following address: [URL]. The first time it loads up in IE the scroll bar does not work, when you hit refresh the scroll bar works. When loaded on Firefox it does not work at all, even when refreshed. Here's a sample of how it is structured: The Dynamic text box is under two movie clips. I want to keep it as a dynamic text box because the content is pulled from an XML file found online. As a test I created a SWF with a dynamic text box and added the UIScrollBar on it, this one however is not under any movie clips and it works fine in both IE and Firefox.
View 1 Replies
Jan 20, 2009
I'm using Flash CS3, exporting for flash player 9 and having troubles with the code below only in Firefox 3 (flash player 9 or 10).In IE 6 & 7, all works OK.The code below should show small thumbnails of images. It does work on everything I tested except firefox 3. What is weird is that if I empty my cache and load the page online, it does not show any thumbnails or sometimes only one. However, if i reload the page without emptying my cache, it will then work perfectly.Here is my code :
Code:
System.security.allowDomain("http://www.translucidedesign.com");
var prefix = 'http://www.translucidedesign.com/kana/';[code]..........
View 16 Replies
Jan 22, 2010
Why the preloader doesn't work in IE 8 but works in FireFox?
Attachments:
index.swf (224.8 K)
index.html.zip (3.2 K)
View 16 Replies
Jul 12, 2011
I am building a video player web-app that uses flash for playback and jquery/javascript for UI. By design of the person who wrote the flash component I need to use setVariable to communicate between the javascript and the flash player. I've read all over the internet that a lot of people have had problems gettin setVariable to work in FireFox. I designed my app in firefox because i wanted to use firebug to help me in development. Now that the whole thing has been built, i find that setVariable is not working in IE. The error i get is:Object doesn't support property or method 'SetVariable';Here's a bit of the pertinent code:I construct my html through javascript, so this is how I construct the player:
var player =
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16
[code].....
View 1 Replies
Dec 7, 2010
Can anyone give me a clue as to why this markup works fine in Safari, but not in Firefox?This should load an ugly blue placeholder (which I get in safari) but in Firefox, swfobject just gives me the alternative content.[code]
View 1 Replies
Dec 5, 2011
I have a flash-based ad that displays/hides based on some javascript. It works in Firefox, Safari, Chrome ... but not in Internet Explorer 8. This is for donations to a non-profit during the holiday season,
<div class="grid_12 alpha omega">
<script type="text/javascript">
GA_googleFillSlot("360_dropdown");
[code]......
View 1 Replies
Feb 21, 2010
my site is comprised of several images loaded dynamically and added to the display list. i declare a bunch of loaders on the first frame, and add a preloader progress listener to the largest image to have one preloader for all the assets. I then added a COMPLETE listener to the same image, and add that image, along with all the others in the onComplete function. i have two issue. the preloader doesnt work in Safari. but works fine in Firefox? and i'm totally stumped on what it could be? another compatibility issue that seems to be arising is that one of the galleries of my site which corresponds to the "drawn" link. also does not seem to be working in Safari, but works in Firefox. its a fairly simple xml based image gallery, which loads thumbs on to the stage, and then loads a larger version of each, when the corresponding thumbnail is clicked. the other galleries of the site work fine in safari, and are basically the same code wise.heres my code for the loading and preloader in the first frame
Code:
import caurina.transitions.*;
stop();
[code]......
View 1 Replies