ExternalInterface.available returns false on a Mac

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:
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...

Woops!! I guess I wasn't paying enough attention...
On a mac using Internet Explorer, both
ExternalInterface.available and
ExternalInterface.addCallback return false. Using the back
button does reload Page A into the Iframe, but doesn't execute any
AS-functions.
Using Safari, they both return true. However, using the back
button reloads the entire index.html instead of loading Page A back
into the Iframe. This means the flash-movie is reloaded aswell, so
you're automatically back at frame 1.
Is there any way I could get this working properly?
Yours,
Andra

Similar Messages

  • ExternalInterface.available returns true in standalone

    Incredibly frustrating - no matter what I try, in standalone test environment it always returns true - it should return false - any thoughts on this anyone.
    Its just ridiculous that Bugs like this occur.......
    Cheers,

    To add to this - I also have incubator "Molehill" build.
    I can simply create a new document - place the following on the root timeline
    trace(ExternalInterface.available);
    and it will return true.
    Anyone help with this ? Adobe needs to be aware of this as it may be an incubator issue, and therefore serious.

  • BufferedReader.ready() keeps returning false using JSSE 1.0.2/jdk 1.2.2

    I'm running into difficulties reading a response data stream from a server via HTTPS. The SSL sets up fine (I can see both the client side and server side certificate chains, and the two sides can handshake and agree on a cipher (SSL_RSA_WITH_RC4_128_SHA in this case)). I get no errors getting the output or input streams from the socket, and the GET request seems to work (no errors reported by the PrintWriter), but in.ready() returns false, and the while loop exits immediately. But I know there is data available (I can paste the printed url into Netscape and get data back). Since this should not be all that complex once the SSL session is established, I'm probably missing something silly, Can someone tell me what it is please?
    Thanks
    Doug
    // code excerpt
    // just finished printing the cipher suite, cert chains, etc
    try{
    out = new PrintWriter(
    new BufferedWriter(
    new outputStreamWriter(socket.getOutputStream() )));
    } catch(Exception e) {
    System.out.println("Error getting input and output streams from socket ");
    System.out.println(e.getMessage());
    e.printStackTrace();
    throw(e);
    try{   // time to submit the request and get the data
    // build the URL to get
    // tried constructing it here and nailing it up at declaration time - no difference
    // path = "https://" + dlp.host + ":" + Integer.toString(dlp.port) + "/" +
    // dlp.basePath + "?StartDate=" + longDateFmtURL.format(dlp.startDate) +
    // "&EndDate=" + longDateFmtURL.format(dlp.endDate);
    System.out.println("Sending request for URL" );
    System.out.println(path);
    out.println("GET " + path );
    out.println();
    out.flush();
    * Make sure there were no errors
    if (out.checkError()){
    System.out.println("Error sending request to server");
    throw(new IOException("Error sending request to server")
    try{
         in = new BufferedReader(
              new InputStreamReader(
              socket.getInputStream() ));
    } catch(Exception e) {
    System.out.println("Error getting input stream from socket ");
    System.out.println(e.getMessage());
    e.printStackTrace();
    //System.exit(3);
    throw(e);
    if (!in.ready()) {   //  in.ready() keeps returning false
    System.out.println("Error - socket input stream not ready for reading");
    while ((inputLine = in.readLine()) != null) {
    // loop over and process lines if it was ever not null
    }

    Never mind.
    The problem seems to be related to the development/debugging enviroment (Oracle JDeveloper 3.2.3), When I run things outside of that eviroment using the "plain" runtime, it works as expected (back to System.out.println() for debugging). That said, I usually find it to be a nice development/debugging enviroment for Java.

  • File_get_contents ($file) works -- file_get_contents ($url) returns false

    Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of filegetcontents() on a local file works fine -- the file is read and returned. But any call of filegetcontents on a url -- any url, local or remote -- always returns false.
    var_dump (filegetcontents ('http://www.google.com/'));
    bool(false)
    I've checked php.ini, and the obvious seems okay:
    allowurlfopen => On => On
    Any ideas?
    ...Rene

    n0dix wrote:Check that the PHP setting allow_url_fopen is set to On. Use phpinfo() to check all settings. And your firewall
    allow_url_fopen is set to on.  I verified via phpinfo(), but I didn't really have to because some pages work and some don't.  The fact that some pages work would also tend to rule out the firewall concern.

  • Bug Report: ResultSet.isLast() returns false when queries return zero rows

    When calling the method isLast() on a resultset that contains zero (0) rows, false is returned. If a resultset contains no rows, isLast() should return true because returning false would indicate that there are more rows to be retrieved.
    Try the following Java source:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    public class Test2 {
    public static void main (String [] args) throws Exception {
    Connection conn = null;
    String jdbcURL = "jdbc:oracle:thin:@" +
    "(DESCRIPTION=(ADDRESS=(HOST=<host computer>)"+
    "(PROTOCOL=tcp)(PORT=<DB port number>))"+
    "(CONNECT_DATA=(SID=<Oracle DB instance>)))";
    String userId = "userid";
    String password = "password";
    try{
    // Load the Oracle JDBC Driver and register it.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // *** The following statement creates a database connection object
    // using the DriverManager.getConnection method. The first parameter is
    // the database URL which is constructed based on the connection parameters
    // specified in ConnectionParams.java.
    // The URL syntax is as follows:
    // "jdbc:oracle:<driver>:@<db connection string>"
    // <driver>, can be 'thin' or 'oci8'
    // <db connect string>, is a Net8 name-value, denoting the TNSNAMES entry
    conn = DriverManager.getConnection(jdbcURL, userId, password);
    } catch(SQLException ex){ //Trap SQL errors
    // catch error
    //conn = new OracleDriver().defaultConnection(); // Connect to Oracle 8i (8.1.7), use Oracle thin client.
    PreparedStatement ps = conn.prepareStatement("select 'a' from dual where ? = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // Use any query that will return zero rows.
    ps.setInt(1, 1); // Set the params so that the query returns 0 rows.
    ps.setInt(2, 2);
    ResultSet rs = ps.executeQuery();
    System.out.println("1. Last here? " + rs.isLast());
    while (rs.next()) {
    // do whatever
    System.out.println("2. Last here? " + rs.isLast());
    ps.close();
    rs.close();
    EXPECTED RESULT -
    1. Last here? true
    2. Last here? true
    ACTUAL RESULT -
    1. Last here? false
    2. Last here? false
    This happens to me on Oracle 9.2.0.1.0.

    387561,
    For your information, I discovered this problem from
    running a query that did access an actual DB table.
    Try it and let me know.I did say I was only guessing, and yes, I did try it (after I posted my reply, and before I read yours). And I did check the query plan for the queries I tried -- to verify that they were actually doing some database "gets".
    In any case, the usual way that I determine whether a "ResultSet" is empty is when the very first invocation of method "next()" returns 'false'. Is that not sufficient for you?
    Good Luck,
    Avi.

  • In a javascript function invoked from an onsubmit handler, if the function returns false, the form is still submitted. If I find an error in a form, how do I cancel the submit?

    HTML form has: action="/TTFFRP/addlicense.rex" method="get" onsubmit="validate_data();"
    validate_data is defined in tags:
    function validate_data()
    alert('in validate routine');
    if (document.getElementById('custname').value == '')
    alert('Customer name must not be blank; put in name of organization licensing File RePackager');
    return false;
    }

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    [http://forums.mozillazine.org/viewforum.php?f=25]
    You'll need to register and login to be able to post in that forum.

  • How do I find a word in all my document, return false if it's not in there.

    Hi,
    I struggle with something that should be easy, and didn't find any answer on this forum.
    I have a list of word that I want to search in a 300 pages catalogue in InDesign. I'd like to know how can i:
    1) Look for the word
    2) Return true if it's in the document
    3) Return false if it's not
    FYI, the words i'm searching are product code, so if they're not in the catalogue, the product isn't in the catalogue.
    Thanks a lot,
    Olivier

    Hi Oliver,
    Use this,
    var doc = app.documents;
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.findWhat = "Text";
    var foundtext = app.activeDocument.stories.everyItem().paragraphs.everyItem().findText();
    for (var i=0;i<foundtext.length;i++){
            if (foundtext[i].length != 0){
                alert("True");
            else{
                alert("False")
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

  • How to install a big program that is only available for PC on a Mac.

    Hi everyone,
    I really need help about that, I've just start a new job that requiered 20-20 Design, witch is only support by PC. But I don't want change my Mac for PC My iMac has Bootcamp already so I need to know, if I'm installing Windows Vista or 7 (witch is requiered by my program/software...I don't know how I'm suppose to call it in english), will I be able to make it work? And if it can help, my 20-20 design is working with an USB key not an installation CD. I've read a lot of topics but no one answer my question
    Thanks for your help....you can save my life, my job and my Mac :P

    How to install a big program that is only available for PC on a Mac.
    Run the Boot Camp Setup Assistant. Install Windows. Install your "big program"

  • (New to C# here) What is the best way to return false in a function if it cannot be executed successfully?

    In Javascript or PHP you can have a function that could return, for example, a string in case of success and false in case of failure.
    I've noticed (in the few days I've been learning C#) that you need to define a type of value that the function will return, so you need to return that type of value but in case of failure you can't return false.
    What is the best way to achieve this behavior and is there an example I can see?
    Thank you in advance,
    Juan

    Juan, be aware that returning null won't work with value types, such as an int, which can't be null. You'd have to use a nullable value type. A nullable int would be declared with a "?", such as:
    int? someOtherFunction(int param)
    if(something goes great)
    return param * 42;
    return null;
    And you have to use it like this:
    int? result = someOtherFunction(666);
    if (result != null) // you can also use result.HasValue
    // it worked, do something with the result
    // if you're doing math with the result, no problem
    int x = result * 2;
    // but if you're assigning it to another an int, you need to use this syntax
    int y = result.Value;
    Before nullable value types came along, for a method that returned an int, I'd use a value of something that wouldn't normally be returned by that method to indicate failure, such as a -1.
    ~~Bonnie DeWitt [C# MVP]
    That's something very very important to keep in mind. Can save you from a lot of headaches!
    So if you have an int function and it might return NULL, if you are doing Math with the return value you can use it directly, but if you're assigning it to another variable you have to use .Value?
    Thanks

  • Webutil_file_transfer.as_to_client_with_progress returns false

    Hi,
    I have the following problem: I want to transfer a file from the application server to the client. I use the following code:
    DECLARE
    l_cache_filename VARCHAR2(150) := 'Q:\OracleReportsTemp\123.html';
    l_report_desname VARCHAR2(150) := 'C:\pcedownload\456.html';
    BEGIN
    IF NOT webutil_file_transfer.is_as_readable(l_cache_filename)
    THEN
    message('error in configuration');
    ELSE
    IF NOT webutil_file_transfer.as_to_client_with_progress(l_report_desname, l_cache_filename, 'Transferring to '||l_report_desname, 'Transferring to '||l_report_desname)
    THEN
    message('error while transferring');
    END IF;
    END IF;
    END;
    The file Q:\OracleReportsTemp\123.html exists on the application server and the directory C:\pcedownload exists on the client PC.
    This is the extract from webutil.cfg from the application server:
    transfer.database.enabled=FALSE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.workAreaRoot=Q:\OracleReportsTemp
    transfer.appsrv.accessControl=TRUE
    transfer.appsrv.read.1=Q:\OracleReportsTemp
    Although this code works fine on my local OC4J, webutil_file_transfer.as_to_client_with_progress always return FALSE on the Application Server. The function webutil_file_transfer.is_as_readable returns true on both environments. Other webutil function such as client_text_io also work fine on both environments.
    Versions:
    Forms 10g Release 2
    Application Server 10g Release2 using OID and SSL
    Webutil 1.0.6
    Jinitiator 1.3.1.22

    Hi,
    You can try as follows in your webutil.cfg file:
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.workAreaRoot=
    transfer.appsrv.accessControl=FALSE
    transfer.appsrv.read.1=
    transfer.appsrv.write.1=
    In formsweb.cfg you might have:
    [webutil]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
    archive=frmall.jar
    lookAndFeel=oracle
    userid=user/pwd@mbcprod10g
    width=100%
    height=100%
    then try with the following link:
    http://localhost:8889/forms/frmservlet?config=webutil&form=<Form_Name>
    Hopefully it will work.
    Regards
    Kausar Iqbal

  • The mkdir() function in java returning false. Why?

    I am trying to create the folder archive under the following directory structure:
    E:/preweb/CATest/DL/Zipra Internal/EventCompletion/html/archive/
    using the boolean mkdir() function in java.
    Though the folder archive does not exist under html folder, still the function is returning false.
    Canm someone let me know why?

    And you have checked that by using
    File file =// E:/preweb/CATest/DL/Zipra Internal/EventCompletion/html/archive/
    Sys.out.println( file.getParentFile().exists() );

  • File.exists() returns false for existing file, help :)

    Hi all,
    I'm having the STRANGEST behavior... I'm working on a simple DNS management system, and before I overwrite a zone file, I want to check if it exists... but exists() is returning false even when the file exists.
    Here is my code snippet:
    finest( "Checking the existance of "+filename ) ;
    File zoneFile = new File( filename ) ;
    if ( zoneFile.exists() ) {
        finest( "Zone File "+zoneFile+" already exists." ) ;
        throw( new ZoneFileExistsException( fqdn ) ) ;
    else {
        finest( "Creating Zone File "+zoneFile ) ;
        ...It's producing this in the log (I cut off the timestamp parts):
    Checking the existance of /opt/DNS/db.testingbutler222.com
    Creating Zone File /opt/DNS/db.testingbutler222.com
    but...
    # ls -l /opt/DNS/db.testingbutler222.com
    -rw-r--r-- 1 root other 733 Aug 27 19:23 /opt/DNS/db.testingbutler222.com
    So... as you can see, the file CLEARLY exists... what the heck am I doing wrong or misunderstanding? This can't really be a bug in File, can it?
    Kenny Smith

    Hi,
    Thanks for your response, but as I showed in my first post, I'm using absolute paths. My log file contains this:
    Checking the existance of /opt/DNS/db.testbutler222.com...
    Existance of /opt/DNS/db.testbutler222.com=false
    # ls -l /opt/DNS/db.testbutler222.com
    -rw-r--r-- 1 root other 695 Aug 29 12:17 /opt/DNS/db.testbutler222.com
    I don't understand what is happening... I wrote a separate class that just tests the existance of a file, and that one is reporting the existance correctly.... (the source code is found in the second post above) I don't understand why my servlet code can see the file.
    I have jakarta-tomcat running as root, and the file I'm checking was created by the same servlet. I've double checked permissions and such, just to make sure it wasn't that.. but it's still not working.
    I even added code to create a FileReader from the file, that way if it throws a FileNotFoundException, I would know the file doesn't exist... and even though the file does exist, it throws the exception. :(
    Kenny

  • File.exists() returns false even when the file exists

    hi,
    the exists() function of java.io.File function returns false even when the file exists on the file system. why is this? i checked the path of the file which gives me the correct path, but exists returns false. can anyone help?

    post some of the code you�re using - then maybe I can help you out
    //Anders

  • How to make reader.ready() return false

    reader.ready() method returned false for me when reading from
    when reader is obtained from databse. eg. Clob reader.
    So that can be acceptable that next call may block thats why ready() returned false.
    But i want to simulate situation when reader.ready() returns false even if reader is eg. FileReader, directy reading from
    existing file on local unix machine. (and this file is having content)
    So can it happen? And in which cases?

    can you telll me those few cases for this method ?
    I am interested in cases when io operations on local non empty file may lead to blocking call so that this method will return false

  • Default hostnameverifier always returns false ...

    Hi,
    I am trying to run wsdl2java by supplying an https URL. The JVM args that I am using are:
    javax.net.ssl.trustStore=E:/Romil/projects/AirDeccanPlugin/localhost.ks
    java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
    On running wsdl2java, I end up getting the following exception:
    java.io.IOException: wrong hostname : should be <...>
    I've verified that the hostname (IP address) in the URL exactly matches the CN (IP address) in the server certificate .
    When I look at the JSSE code, it seems like the default HostnameVerifier always returns "false".
    I also couldnt figure out a non-programatical way of supplying my own
    HostnameVerfier to JSSE that returns a "true"
    Any solutions/thoughts ?
    Thanks and regards,
    Romil

    try this code before creating a connection
    com.sun.net.ssl.HostnameVerifier hv=new com.sun.net.ssl.HostnameVerifier() {
    public boolean verify(String urlHostname, String certHostname) {
    System.out.println("Warning: Hostname is not matched for cert: "+urlHostname+ certHostname);
    return true;
    com.sun.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(hv);
    this should solve your problem
    cheers

Maybe you are looking for

  • Version control bug

    JDev Team, a) The candidates tab of pending changes window lists the "JDeveloper project" files although I have "**/*.jpr" added to global ignore list. b) Incoming tab of pending changes window does not bring in changes checked into version control r

  • Is it possible to set a multi-path to jsp files?

    Hello,           When using:           weblogic.httpd.documentRoot=public_html/           It's O.K. but I'm looking for a way to set a path so in case the jsp           file does no exist there it will be taken from a completely different           p

  • Date and time for credit block and release in Sales document

    Hi. For sales document [sales order and delivery], we need to find out the date and time : 1. when it was blocked from credit block. 2. when it was released from credit block. Is there a standard table that stores these dates and time? Tks. Rgds, Joh

  • Release strategy not kicking in

    dear gurus, i have created release strategies and have run a check release strategies everything seems to be ok except for one which is it shows an error message sayin No release group exists Message no. ME_RELCHK014 Diagnosis You have not created a

  • Item Label with special Character

    Hi All, I trying to Conditionly  name the ladel of an item with two different special character accoding to the condition Two characters are asterisk    *             Diamond  -  equivalent HTML code is & #9830; {Code}    IF (codition is true )    TH