ExteranlInterface is rather limited and clunky to use regarding return values. If you absolutely HAVE to make the call from actionscript, this is how I'd do it.
AS
Code:
function makeCall():Void
{
ExternalInterface.call('sendUScriptVar');
}
function receiveVar( val:Number ):Void
{
// do stuff with val
}
UnrealScript (This would be in the GFxMoviePlayer class you set up to host the UI)
Code:
var int Value;
function sendUScriptVar() // function can be parameterized, look at UDN Scaleform reference
{
SendVar(Value); // Where value is the predefined var u wanted
}
function SendVar(int val)
{
ActionScriptVoid("receiveVar"); // AS2
ActionScriptVoid("_root.receiveVar") // AS3
}
For more information, or a better explaination, look at the technical reference
http://udn.epicgames.com/Three/Scale...icalGuide.html
Bookmarks