Hi there
I have a vtour where I have a bit more than ten panos. With the url params it should be possible to adress one pano and remove all the other panos. If no param is given, all panos remain in the tour.
I used simmilar code before but with different filtering and it worked as expected. Now with this project i don't have any logic in the pano naming so to get rid of the unwanted panos i tried to get all panos and remove then by index.
I got it to work partially, but instead of only one pano remains, there are about 5 remaining and the rest is deleted. I used trace to compare names etc. and I can't find the issue there.
Here is my action:
Code
<action name="customscenes" autorun="preinit"> if(selectview !== null, txtadd(scn, 'scene_', get(selectview));tolower(scn); for(set(i,0), i LT scene.count, inc(i), if(scene[get(i)].name !== scn, trace('removeScene ', scene[get(i)].name); set(scene[get(i)].name, null); scene.removearrayitem(get(scene[get(i)].name)); , trace('keepScene ', scene[get(i)].name); ); ); , trace('no view selected, show all'); );</action>
Any hint why the panos get removed randomly?
Thanks
Sven