[resolved] hotspot position

  • Hi all,

    i'm building a virtual tour with krpano (great work btw !). I have to load krapno into a bigger application. So, i use the as3 interface. It just works fine to load pano and command it.
    I now just need to create my own swf hotspots. I started with a test (just a red circle)

    The hotspot is loaded in an other class with

    Code
    // chargement du pano
            	this._krpano.call("loadPano('" + vURLXML + "')");
    			this._krpano.set('area.height', this._stage.height);
            	// création du hotspot
    			this._krpano.call("addhotspot(hotspot1);");
    			this._krpano.set("hotspot[hotspot1].url", GXML.getPath("krpano.plugins") + "textHotspot.swf");
    			this._krpano.set("hotspot[hotspot1].ath", "18");
    			this._krpano.set("hotspot[hotspot1].atv", "10");

    everything is quite perfect *love*
    BUT... *cry*
    the position of the hotspot in the pano is not fixed. It moves depending the look position.

    I certainly miss a parameter or made something wrong, but i just can't find where...

    Here is my xml

    Thanks for you help ! *smile*

    Einmal editiert, zuletzt von grandlap (6. August 2010 um 13:20)

  • Hi,

    thanks for your quick answer ! *smile*

    Yeah, i tried that, it doesn't work for me.

    But, there's something new, when i load the hotspot_ani_black.swf (found in example folder), it just works perfectly with the same embed method.
    I just know now where is the problem, but not how to solve it ^^

    any other clue ?

    Marc

  • Hop !

    Ok I think i got it. The position of the hotspot certainly depends on LoaderInfo dimensions of the loaded swf.
    My hotspot swf export dimension was something like 500x400. When I change it to 10x10 (wich is the size of my magnificent red circle) everything's ok ! *thumbsup*

    Thanks again !

  • Kind of funny. That actually was the other issue I had with my hotspot long ago. I guess I should have just pointed to the original thread. My spot was in the top left corner of the stage with plenty of free space to the right and below.

    Glad you got it worked out.

  • Kind of funny. That actually was the other issue I had with my hotspot long ago. I guess I should have just pointed to the original thread. My spot was in the top left corner of the stage with plenty of free space to the right and below.

    Glad you got it worked out.

    same issue here. on my ipad, the spots stay in the top left corner... why is that?

  • Here it is:

  • I copied the code, made a 50x50 image and named it hotspotIN.png and it works correctly for me. While the 50x50 pix is quite small, it was just to test your code. Check your image to see if you may need to crop it or something. Does it stay in that location while you are moving around in the pano ?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!