ExternalInterface and an LMS

I’m trying to achieve bookmarking through use ExternalInterface.call. I’m not getting the results I want. Here’s my HTML:

//Alert user to bookmarking if returning
    var oprompt;
    function promptUser() {
        if(api.LMSGetValue("cmi.core.lesson_status") != "not started") {
            var x = window.confirm("You are returning from a previous attempt in this course. Would you like to return from where you left off?");
            if (x) {
                oprompt = api.LMSGetValue("cmi.core.lesson_location");
            } else {
                oprompt = 2;
            }
        } else {
            oprompt = 2;
        }
        return oprompt;
    }

Here’s my FLA (frame 1) code:

//This is needed to make any calls to HTML/JS/LMS from Flash
import flash.external.*;

// --> Get bookmark from LMS
var prompt;
function getBkmk(){
    //modstatus = ExternalInterface.call("api.LMSGetValue","cmi.core.lesson_status");
    //bookmarkframe = ExternalInterface.call("api.LMSGetValue","cmi.core.lesson_location");
    prompt = ExternalInterface.call("promptUser");
    ExternalInterface.call("alert","oprompt = "+oprompt);
    _root.gotoAndStop("main",oprompt);
    /*if(modstatus == "incomplete"){
        gotoAndStop(bookmarkframe);
    }else{
        gotoAndStop(2);
    }*/
}
getBkmk();

I’m using the ADL Test Suite to test it, but I’ve also put it up on a devbox in my real LMS.

I think the problem is Flash is not receiving the “oprompt” variable.

Any thoughts?