Hello There!
Thank you very much in advance!
The question:
How to get a plugin attribute value (located in the krpano xml file) and pass it to a flash plugin, in order to trigger an action (in flash).
The story:
I have a scrolling thumbnails plugin inside krpano, which shows a red frame around the corresponding thumbnail when a scene loads.
As a default the red frame always starts in the first thumbnail, as the virtual tour always loads the first scene first.
Recently I purchased the SWFaddress plugin, which allows me to load any scene from the same html file, changing the url.
So what I would like to do is to put the red frame in the corresponding scene loaded.
DO NOT PANIC! I know exactly how to do that, but my action scrip 3 knowledge is very limited.
Roughly, this is the code I need:
//get the path attribute value from the swfaddress plugion and put it in a variable
var scene_path:Object = krpano.get("plugin[swfaddress].path");
//the input should be /pano01/ or /pano02/, etc... but it returns noting. Not 'nulll'. It just prints a blank like
trace (scene_path);
// trigger this action
change_seleted();
//if the attribute == '/pano01/' then put the frame around the first item of the array [0]
//if the attribute == '/pano02/' then put the frame around the second item of the array [1]
function change_seleted () {
if (scene_path == "/pano01/") { myScroll.selectItemAt(0); }
if (scene_path == "/pano02/") { myScroll.selectItemAt(1); }
}
Display More
So after all it is just a syntax thing.
The example:
Thank you !!!