ActionScriptInt always returns 0. Am I doing something wrong?

I have some code in an .as file.

AS3

function someFunction():int {
    ExternalInterface.call("Log", "I'm going to return 1.");
    return 1;
}

I call that function from my game.
US

function Log(string LogMessage)
{
    // This gets called from ActionScript, telling me it's going to return 1
    `Log(LogMessage);
}

function CallActionScript()
{
    local int Result;
    Result = ActionScriptInt("someFunction");
    // Result is always 0
}

Has this ever happened to you? Why does this happen? How do you fix it?

OK, I got it working using invoke instead of ActionScriptInt. I don’t like doing that because it’s supposed to be worse for performance. But if this is what I have to do to make it work, I guess that’s what I’ll have to do.