Hi,
don't mix up krpano xml code and as3 code,
if you want it simple - try this code:
var krpano : krpano_as3_interface = null;
krpano = krpano_as3_interface.getInstance();
var showing:String = krpano.get("scene[get(xml.scene)].index");
trace(showing);
or if you want more information about each step and work in as3:
|
Source code
|
1
2
3
4
5
6
7
8
|
var current_scene_name:String = krpano.get("xml.scene");
var scene_array:Object = krpano.get("scene");
var scene_item:Object = scene_array.getItem(current_scene_name);
if(scene_item != null)
{
var scene_item_index:int = scene_item.index;
trace(scene_item_index);
}
|
see here the documentation about the as3-representation of the krpano objects and array:
http://krpano.com/docu/plugininterface/#plugininterface
btw - for new plugins I would recommend not using the "krpano_as3_interface.as" anymore, but instead the new plugin structure with the "registerplugin" entry as plugin start, see the link above for details,
best regards,
Klaus