|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<events name="checkhotspots" keep="true" onviewchange="checkhotspots();" />
<action name="checkhotspots">
for(set(i,0), i LT hotspot.count, inc(i),
copy(hs,hotspot[get(i)]);
hs.getcenter(hs_h, hs_v);
getlooktodistance(d, hs_h, hs_v);
if(d LT 20,
set(hs.hovering, true);
,
set(hs.hovering, false);
);
);
</action>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
for(set(i,0), i LT hotspot.count, inc(i),
copy(hs,hotspot[get(i)]);
hs.getcenter(hs_h, hs_v);
getlooktodistance(d, hs_h, hs_v);
div(dfov , view.fov , 20);
if(d LT dfov,
if (!hs.hovering ,
set(hs.hovering, true);
trace('started hovering ' , hs.name);
);
,
if (hs.hovering ,
set(hs.hovering, false);
trace('ended hovering ' , hs.name);
);
);
);
|
|
|
Quellcode |
1 2 3 |
<style name="info_area" handcursor="true" capture="false" alpha="0.1" fillcolor="0x222222" fillalpha="0" borderwidth="4" bordercolor="0xffffff" borderalpha="1" ondown="" onup="" onloaded="" keep="false" visible="true" enabled="true" onover="tweencall(get(name) ,get(hsname) ,1,1);" onhover="tweencall(get(name) ,get(hsname),1,1);" onout="tweencall(get(name) ,get(hsname), 0.1 ,1);cleartext();" onclick="zoomtosubject(get(zoomspot) , get(hspot) , get(vspot));" ></style>
<action name="tweencall"> tween(hotspot[%1].alpha, %3, %4); trace('border alpha' , hotspot[%1].name ); showtext(get(data[%2].content) , InfoStyle); </action>
|
The condition (destVar == 0 ) is never true.
Zitat
<action name="checkhotspots">
for(set(i,0), i LT hotspot.count, inc(i),
copy(hs,hotspot[get(i)]);
hs.getcenter(hs_h, hs_v);
getlooktodistance(d, hs_h, hs_v);
plugin[string].txtfind(destVar,get(hs.name),'h');
if(destVar == 0,
if(d LT 20,
set(hs.alpha, "0.9");
,
set(hs.alpha, "0");
);
);
);
</action>
Hi herrpedrothank you so much for the fast response
i added a variable dfov that shrinks with FOV so the center does not grow
initially i got a 120fov so 6º seems ok
with the initial 20 i had a "christmas tree" on my pc since i change the gama and they all lit up :D
.....
div(dfov , view.fov , 20);
if(d LT dfov, .... ...
in desktop the "onout" is not triggered.. added a trace and it shows in log
i'll add an aditional IF for a state change so it does changes hovering to true if already true or false if already false
and does not seem to work on my phone at all (the visual part)
i added a trace to the hs.hovering = true and it traces the hover hotspot correctly
is there any limitation for polygonal hotspots? when i click them it makes the zoom i programmed it to do.. but not hovering
thanks again