# ExternalInterface.available returns false on a Mac

**URL:** <https://forum.kirupa.com/t/externalinterface-available-returns-false-on-a-mac/201329>\
**Category:** flash\
**Created:** [September 20, 2006, 2:45pm UTC](https://forum.kirupa.com/t/externalinterface-available-returns-false-on-a-mac/201329 "2006-09-20T14:45:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andra](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/andra/32/2006_2.png) [@Andra](https://forum.kirupa.com/u/Andra)\
**Post date:** [September 20, 2006, 2:45pm UTC](https://forum.kirupa.com/t/externalinterface-available-returns-false-on-a-mac/201329/1 "2006-09-20T14:45:19Z")

</div>

Hi there!

I’m triyng to get the browsers back-button to work with my flash site. The general principle is this:  
There is an index.html page containing an (not yet) hidden Iframe and the flash movie.  
The Iframe contains page A, which starts with JavaScript calling a BACK-function on the index-page.  
The BACK-function triggers an AS-function in the flash-movie that activates its own back-button, and then changes the URL of the Iframe to Page B. This causes a new History to be added to the browser.

The flash movie now contains 5 frames (labeled in the middle of the stage) and two navigation buttons: back (Terug) and forward (Verder). Those buttons do exactly what you’d expect them to do (prevFrame and nextFrame).

On a PC (IE) this seems to work pretty well. But on a mac nothing seems to work propperly.  
I’ve got a testpage at: [[COLOR=#800080]http://www.multimediamatters.nl/test[/COLOR]](http://www.multimediamatters.nl/test)  
Here’s the code I have on the first frame.  
\*  
stop();

\_root.terug.onRelease = function(){  
prevFrame();  
}

terugF = function(){  
trace(\_root.\_currentframe);  
if (\_root.\_currentframe \> 1){  
\_root.terug.onRelease();  
}  
else {  
\_root.getURL(“javascript::history.go(-2)”);  
}  
}

import flash.external.\*;

var isAvailable:Boolean = ExternalInterface.available;

var txtField2:TextField = this.createTextField(“txtField”, this.getNextHighestDepth(), 300, 0, 200, 50);  
txtField2.border = true;  
txtField2.text = "ExternalInterface.available = "+isAvailable.toString();

var methodName:String = “goHome”;  
var instance:Object = null;  
var method:Function = terugF;  
var wasSuccessful:Boolean = ExternalInterface.addCallback(methodName, instance, method);

var txtField:TextField = this.createTextField(“txtField”, this.getNextHighestDepth(), 0, 0, 200, 50);  
txtField.border = true;  
txtField.text = "ExternalInterface.addCallback = "+wasSuccessful.toString();\*

Somehow the ExternalInterface doesn’t seem to get loaded. Any suggestions to solve this?  
Thanks in advance.

Yours,  
Andra

P.S.  
The condition _if (\_root.\_currentframe \> 1){_ doesn’t work on a PC either. It always calls _\_root.terug.onRelease()_. I can’t figure out why…
