hi,
if they no not have anything to do with each other
you do a for loop on all hostspots and add the action on onviewchange
it mught be a good ideia to copy the current zoom to a variable and, if the zoom does not change from the previous value (the user has just made a pan) you dont call this
|
Source code
|
1
2
|
<hotspot name="some1zoom" fovmin="50" fovmax="80 otherattributes />
<hotspot name="some2zoom" fovmin="80" fovmax="10 otherattributes />
|
--> action code
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
|
for(set(i,0), i LT hotspot.count, inc(i),
copy(ly, hotspot[get(i)]);
if (ly.fovmin AND ly.fovmax ,
if ((view.fov LE fovmax) AND (vide.FOV GT ly.fovmin) ,
set(ly.visible , true);
,
set(ly.visible , false);
);
);
);
|
(this was just written so forgive some typos