I'm trying to make an array that is created in a plugin accessible from krpano actions.
I've read the notes on Kinterface_array vs array here:
Array in AS3
This shows how to go the other way around; from an "array" object in krpano to an array in AS3 (using kinterface_array.getArray()). However I have not yet found out how to go from AS3 to krpano.
This does not seem to create an array at all:
Code
...
var destVarName:String = "testvar"
var myArray:Array = [11,12,13,14,15,16];
this.krpano.set(destVarName, myArray);
...
The resulting variable in krpano looks more like a string; testvar.count is not populated, and testvar[N] (where N is any numeric value) traces as "11,12,13,14,15,16"
This somewhat less naive approach doesn't work either:
Code
...
var destVarName:String = "testvar"
var myArray:Array = [11,12,13,14,15,16];
this.plugin_obj.createarray(destVarName);
var kresult:Object = this.krpano.get(destVarName);
for (var i:Number=0; i<result.length; i++) {
this.krpano.set(destVarName+"["+i+"]", result[i]);
}
...
Display More
Any hints? Is there a Kinterface_array::setArray() function?