ActionScript 3.0 :: ExternalInterface Call Not Working In Firefox

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


Similar Posts:


Flash - Externalinterface.call Won't Call The JavaScript Function - Firefox 3.6

Feb 10, 2011

I have a function defined in JavaScript like so:

function fadeBack() {
alert("fadeBack called");
};

I call that function from my Flash file like so:

import flash.external.*;
flash.external.ExternalInterface.call("fadeBack");

This works in both Safari and Chrome, but for some reason Firefox won't ever call the function. Still, I can't figure this out. How can I fix it?

View 2 Replies

IDE :: ExternalInterface.addCallback Not Working In FireFox?

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

ActionScript 3.0 :: ExternalInterface.call Not Working?

Apr 22, 2010

I am having a problem using ExternalInterface.call to a javascript  function. I have used this method many times in many places and at some  point during this project, it was working, but now it stalls my Flash  file when executed. I have the function: var initialize=function(){ExternalInterface.call("SCOInitialize");statusTxt.text="initializing"; } On my html page, there is a SCOInitialize function that works perfectly  if I call it via the html page: <body onLoad="SCOInitialize()"> ... </body> When I make the call using flash... initialize(); ...the Flash file just gets hung up and it actually wont execute the  second line of code in the function: statusTxt.text="initializing"; What is the deal? I can't for the life of me figure out why it won't

View 7 Replies

ActionScript 2.0 :: Create A Working ExternalInterface.call Example?

Aug 21, 2009

Can someone create a working ExternalInterface.call example?Just a simple alert function call, with the javascript function on the html page?I've been searching for 2 days, and even samples that people have posted on blog tutorials are not workingURL...

View 9 Replies

ActionScript 3.0 :: ExternalInterface.call Not Working With JS Function?

Aug 14, 2011

In Wordpress I have put the following javascript code in my HEAD section:

Code:
<script type="text/javascript">
function helloWorld() {
alert('Hello World');
}
</script>

[Code]...

View 4 Replies

ActionScript 3.0 :: ExternalInterface.call Inside Iframe Not Working In IE?

Jan 14, 2009

The structure of my site is as follows:

mainPage.html contains - menu.swf & iframe1
iframe1 contains - subpage.html
subpage.html contains - subMenu.swf & contentpage.html

The way it works is that when menu.swf is clicked it changes the .src of iframe1 to load the appropriate subpage.html. Then when you click the subMenu.swf it changes the .src of iframe2 to load the appropriate contentpage.html[URL]..

It all works perfectly in Firefox but in IE the ExternalInterface call from the subMenu never reaches the container page to change the .src of the iframe.It seems as though it's something to do with the .swf being inside the iframe because I am still able to call a javascript function from within the iframe using an html button.

View 5 Replies

ActionScript 3.0 :: Externalinterface.call Not Working With Background-image

Apr 7, 2010

I've put together a slideshow in AS3. When the user clicks on an image in the slideshow, I'm using FlashLightboxInjector to bring up a Lightbox version of the image they just clicked on. In my AS3, each time I add a thumbnail into the slideshow, ExternalInterface.call is supposed to call a function within FlashLightboxInjector that appends the image onto a <div>. The div is used as a reference to Lightbox to know what the image path/title are.

Code:
public function buildPicArray():void
{
for each(var pic:XML in picXML.photo)

[Code].....

This works fine when I don't use a background-image in the body css. However, when I do use a background image, none of the myFlashLightboxInjector.append() functions are called or the appends aren't functioning correctly because they don't show up in Firebug, there is just an empty div. So, when I click on a thumbnail, no Lightbox image comes up.

View 1 Replies

Javascript :: Reference The Html Object That Made The Call To SomeFunction Directly Using The ExternalInterface.call Call?

Jun 28, 2011

i have some actionscript that makes a

ExternalInterface.call('someFunction');

call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?

Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.

Currently:

Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);

[code]....

View 1 Replies

CS4 - ExternalInterface & FireFox V3.013?

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

ActionScript 3.0 :: Use ExternalInterface.Call To Call A JavaScript Function To Launch A Lightbox Window?

Jun 22, 2009

I'm trying to use ExternalInterface.Call to call a JavaScript function to launch a lightbox window. So far I have this:

AS3:
flash.external.ExternalInterface.call("launchLB", "" + aUrl + "");
JavaScript:
function launchLB(url) {
alert(url);

[Code]....

I get the alert but I can't get the lightbox window to display. When my as code makes the ExternalInterface call I get what looks like a page refresh and a blank browser window.

View 1 Replies

Flash :: Call Anonymous Function From ExternalInterface.call() Method?

Nov 4, 2010

I need to get a javascript var in my Flash application. I like to be able to just set a variable in the javascript (client constraints) rather than define a function.

Can this be done? I am trying to use the ExternalInterface.call()

AS:

ExternalInterface.call("function(){return window.someVar}", null);

JS:

var someVar = "Test";

This does not work and I suspect it is because the ExternalInterface.call() does not like the anonymous function.

View 2 Replies

Flash :: Replace A URLLoader Call With ExternalInterface Call?

Feb 10, 2011

We have been given some code that does a URLRequest call which is really slow to respond, so I was looking to make it pull the data from the page, as it is already on the page.[code]I have tried to replace it with this (actionscript is definitely not my forte):[code]I am using addCallBack as that is what the editor suggested via autocomplete, unfortunately it doesn't seem to work. Unfortunately I cannot go back to the developer at this time.The error message is:Call to a possibly undefined method addCallback through a reference with static type flash.external:ExternalInterface

View 3 Replies

Javascript :: ExternalInterface On Loadup With FireFox?

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

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

ActionScript 3.0 :: Flash Website Not Working On Firefox On PC But Works Fine On FireFox On MAC?

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

JavaScript :: ExternalInterface.AddCallback Does Not Work On Firefox?

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

ActionScript 3.0 :: Call Javascript With ExternalInterface.call

Sep 29, 2008

I'm trying to call a javascript function from a flash movie. I'm using IE.

This one works:
AS3: ExternalInterface.call("test();");
Javascript:
function test()

[Code].....

...it says "undefined" insted of alert(666)...it seems that if i use a field in the function it simply stops working. (I'm accessing the page [URL]

View 2 Replies

ActionScript 3.0 :: Java ExternalInterface Doesn't Communicate With Swf In Firefox & Safari?

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

Flash ExternalInterface.call In IE

Feb 21, 2010

I am having an issues with ExternalInterface.call to return a value in IE. It is working fine in Firefox. Eventhough I changed the "allowscript access" to "always", still it is not working. Is there any thing that I need to change in Flex or the HTML to make this work? or this is a security setting in IE?

View 1 Replies

ActionScript 2.0 :: Log Every ExternalInterface Call?

Nov 20, 2011

I'm wondering if you guys know a way to log every data coming to a flash 8 swf from its container?

I know that it is a bit weird, but I'm trying to figure this one out. Maybe one of you already faced a similar situation?

View 3 Replies

ActionScript 3.0 :: Call C++ Functions Using ExternalInterface?

Oct 20, 2009

I am trying to call a C++ function from actionScript3. using Programming ActionScript 3.0 > Using the external API > Using the ExternalInterface class > Calling external code from ActionScript,  I could call function from JavaScript .
 
it will be good if i could call C++ functions directly from Action Script.

View 2 Replies

ActionScript 3.0 :: Why Call ExternalInterface Fail

Jan 11, 2011

I want to ActionScript3 set HomePage to Google ",so I use following stagement:[code]Then I call this swf in html page,like follows:[code]When I use mouse click,IE8 raise javascript error.'null' is null or not object

View 5 Replies

ActionScript 3.0 :: ExternalInterface Call From Child Swf

Apr 8, 2011

I am trying to make a JS function call from a child swf, but I am running into issues when the child swf is loaded on a different domain than the parent.

Here's what my scenario looks like:

my HTML test page is on domainA.com and loads the parent swf, which is located in [URL].

The parent swf loads a child swd located in domainC.com.

After the child swf is loaded I want to make a JS function call, but when I call ExternalInterface.call("myJSFunction", "params"), the JS code never gets executed.

When I placed all of the files under the same domain, everything works fine.

View 1 Replies

ActionScript 2.0 :: ExternalInterface.call : Get The Variable From JS?

Dec 28, 2011

I am simply trying to get the variable from JS but can't get it

Code:
<script>
var APIfound = true
</script>

[code]....

View 0 Replies

Actionscript 2.0 :: ExternalInterface.call(); Still Supported?

Aug 22, 2009

This does not work:

Within the HTML Head tags:
Code: Select all<script type="text/javascript">
function show_alert()
{
alert("I am an alert box!");

[Code]...

View 1 Replies

ActionScript 3.0 :: ExternalInterface.call Won't Work In Ie

Feb 11, 2008

I'm having some serious issues trying to get externalinterface to work in ie. I've looked around and seen that there are problems with ie when the swf is inside a form tag but my swf is not. Also I have set "allowscriptaccess" to "always" and still nothing. It works fine in FF and safari. In ie all i get is a little icon in the bottom corner that says "Error on page" and when I select that it just says something to the effect that there is a syntax error but doesn't give any helpful details at all.

View 10 Replies

ActionScript 3.0 :: Using ExternalInterface To Call Jquery

Jun 30, 2009

in an aspx page, the call for a lightbox to appear is this:

Code:
<a href="somePage.htm" rel="superbox[iframe][873x436]">

i need to make the same call, but from flash. i am pretty sure this would be done using ExternalInterface.call(); however, i am not sure how this would be done. can anyone shed some light on this? i tried doing the following, but to no avail:

[Code]....

View 4 Replies

Professional :: Button Link Not Working In Safari, But Working In Firefox?

Apr 18, 2011

[URL]
 
The ad on the bottom right of the screen (the one with lightning flashing) has an invisible button in its Flash file (CS5) linking to [URL]. This file is imported as SWF in Dreamweaver CS5.
 
The hyperlink works in Firefox, but not in Safari. Maybe it is just my computer.

View 1 Replies

ActionScript 3.0 :: Get Current Browser URL ExternalInterface.call

Oct 22, 2010

I'm trying to assign the current URL in the browser to a variable in AS3 (CS3).URl...I have tried the following code Actionscript Code: import flash.external.*;var currentURL:String = String(ExternalInterface.call("window.location.href.toString"));trace(currentURL);I export the file (html & SWF) and try it locally and I have [code]I get no compile errors but I do get the security warning from my Flash player 10 in IE8 saying it stopped due to a potentially unsafe operation etc etc.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved