|
|
Quellcode |
1 2 3 |
var krpano = document.getElementById("krpanoSWFObject");
var mousex = krpano.get("mouse.x");
var mousey = krpano.get("mouse.y");
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Jarredja« (30. September 2009, 05:20)
|
|
Quellcode |
1 2 3 4 |
align="center" edge="lefttop" x="-230" y="20" |
I seem to be getting some results.
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<hotspot name="hotspot1" url="ball.swf" ath="-87" atv="4"
scale="0.5" zoom="true" onhover="showtext(show text here,bold);"
keep="false"
visible="true" enabled="true" handcursor="true" capture="true" children="true"
zorder="0"
alpha="1.00" blendmode="normal"
smoothing="true"
onloaded="resetsize();"
onout=""
onclick="looktohotspot(hotspot1);
loadpano(pano.xml, null, MERGE, BLEND(1));
lookat(-170,0,10);
zoomto(90,smooth(720,50,360));"
/>
|
Your are talking about to get coordinates of plugins and Jarredja
Zitat
I have 30 plugins (small red ball)
are talking about to get coordinates of hotspots...
Hotspot coordinates are relative to the full 360 pano and plugins coordinates are relative to the Krpano display screen.
Zitat
I did stay away from the ath= and atv= as i thought they were for positions within the 360 degree panorama itself and that the X and Y was for a position on the actual flash viewer?
). But, if I am not on mistake, the x y coordinates it gives are relative to the topleft of the screen... And you are looking to retrieve coordinates relative to center of the screen...
....
(I go out for some minutes)Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »michel« (30. September 2009, 20:56)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
<krpano version="1.0.8"> <!-- use only a grid preview pano to save download space ;-) --> <preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" /> <!-- floor plan - aligned lefttop to get correct X Y --> <plugin name="floor_plan" url="your_floor_plan_image.png" align="lefttop" edge="lefttop" handcursor="false" capture="false" /> <!-- cursorposition plugin - one aligned leftbottom of the floor plan, the other one aligned righttop --> <plugin name="cur_pos_leftbottom" url="%SWFPATH%/plugins/cursorposition.swf" parent="floor_plan" align="leftbottom" edge="lefttop" zorder="1" blendmode="difference" /> <plugin name="cur_pos_righttop" url="%SWFPATH%/plugins/cursorposition.swf" parent="floor_plan" align="righttop" edge="lefttop" zorder="1" blendmode="difference" /> <!-- the childs, list of small red ball you need --> <!-- X value from the cursorposision plugin --> <!-- Y value from the cursorposision plugin --> <plugin name="red_ball_1" url="your_red_ball_image.png" zorder="99" parent="floor_plan" align="lefttop" edge="center" x="70" y="60" /> <plugin name="red_ball_2" url="your_red_ball_image.png" zorder="99" parent="floor_plan" align="lefttop" edge="center" x="168" y="168" /> </krpano> |
Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von »michel« (30. September 2009, 22:32)
Zitat
I've no idea what you just said with childs and parents........
Salutparent/child system:
- parent attribute for all plugins/hotspots
- usage:
- parent="pluginname" or parent="plugin[pluginname]" or parent="hotspot[hotspotname]"
- the aligment of a child refers then to the parent
- can be changed dynamically
- "scalechildren" attribute - to scale also child plugins on parent scaling, default="false"
Zitat
<plugin name="floor plan"
Your are absolutly right...
Zitat
I did find that the parent tags didn't work though. Either the parent plugin should be renamed map or the parent tags should be made to match name of the plugin
It was my mistake when copy past my code an rectifying it to adapt to andrew22222 ..