Hi all!
I have just subscribed to this list, and have a problem...
I have problem of passing vars from JS to AS? Here is the code that does
it, and it all fires up, but the values are not there?
JavaScript code:
// returns various settings to Flash
function getSettings() {
var maxTime = doLMSGetValue("cmi.student_data.max_time_allowed");
var tmp1 = maxTime.split(":");
var t1 = GetCookie("cat");
var t2 = GetCookie("cQuestionNum") - 0;
var t3 = GetCookie("lessTime") - 0;
var t4 = (parseInt(tmp1[0],10) * 3600 + parseInt(tmp1[1],10) * 60 +
parseInt(tmp1[2]),10) * 1000;
alert("cat: " + t1 + ", CQuestionNum: " + t2 + ", lessTime: " + t3);
alert("maxTime: " + t4);
flashProxy.call("getSettingsReturn", t1, t2, t3, t4);
}
ActionScript code:
// poziv JavaScriptu
function getSettings():Void
{
proxy.call("getSettings");
}
// poziva se iz JavaScripta
function getSettingsReturn(t1:String, t2:Number, t3:Number, t4:String):Void {
getURL( "javascript:alert( 't1: " + t1 + " t2: " + t2 + " t3: " + t3 + "
t4: " + t4 + "');" );
Cat = t1;
QuestionNum = t2;
lessTime = t3;
allowedTime = t4;
}
--
f13o na pletisan.rs.ba
http://www.pletisan.rs.ba
http://www.esperanto.rs.ba
http://kadro.blogspot.com
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org