Page 1 of 1

Controlling the scale of the hotspot?

Posted: Thu May 31, 2007 10:16 am
by damepe
Hello
I´ve just started to mess around with flash panoramas. Congratulations, you have a great piece of software!
I managed to create custom hotspots inside container.fla, and it works great.
But I have a problem. Current hotspots scale like the fov, the bigger the fov is, the bigger the hotspot is. This is nice for hotspots placed for navigation from one panorama to another. But imagine a picture on the wall, i want to make it interactive and link it to another URL with information about that picture. This is the easy part.
So I make a rectangular movieclip that´s exactly the same shape the picture is, let´s say it´s a frame with some semitransparent fill over that picture and add it with vr.pano.addHotspot. Ok, no problem till this point.
But when you zoom, the size of the "real" picture and the size of the movieclip go inverse. Is there anyway to control this?
Thanks for your help.

Posted: Wed Jun 06, 2007 2:53 pm
by thomas
Yes, you can hand code this with the current Fov but there is some math involved. You need to calculate the height in degrees for your label and then you should get the height for your label with

Code: Select all

height_in_pixels=Math.tan(height_in_degrees/vr.pano.fov())*_root._height
if I did it correct. But this would be a nice feature for the API.... :)

Posted: Wed Jun 06, 2007 3:46 pm
by damepe
Thanks Thomas
I´ll try to code this and let you know if I´ve managed to make a hotspot that is the silouette of an object.