Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorvicdan
    • CommentTimeFeb 15th 2007
     
    Hi,

    I have spent a few hours beating my head against the wall on this one, with no luck.

    I have the ExternalInterface.call working fine, so the most obvious error is out. However, each time I try to register a callback, I get a failure! My AS code, straight from Adobe example:

    var method:Function = someF;
    var methodName:String = "someF";
    ExternalInterface.addCallback(methodName, this, method);

    public function someF(str:String):String {
    Alert.show ("Got string: " + str, "Callback!", Alert.OK, _root);
    return "callback return";
    }


    I embed the object using Adobe-recommended object/embed tag nesting, over HTTP; I verified that the applet executes in 'remote' context. The Flash movie itself works perfectly fine. allowScriptAccess is set to 'always', the 'name' tag doesn't exist, and I tried calling addCallback with and without the second parameter, as have seen some examples on the net omit it. I have also tried using both 'this' and 'null' for the second param.

    No luck! It returns 'false' both under Firefox on OS/X, and IE on Windows. I am at my wits' end. I can get my stuff to work without callbacks (by serializing the JavaScript calls, so that I can use their return result instead of the callback), but this will be Very Bad.

    Does anyone have any ideas? I am sure I am missing something painfully obvious.

    Thanks in advance!