Flying hotspot width relative to stagewidth

  • Hi,

    I'm trying to set the width of a flying hotspot to the stagewidth:

    While it does set the width of the hotspot, the results are different among various devices (tested on Chrome on Mac, iPad, Pixel smartphone). Do I have to correct for certain device properties? I tried to find a connection to device.pixelratio, but I couldn't find any.

  • Do you want to make the hotspot width equal to the stagewidth? Just set the width to 100%


    That's exactly what I'd like to do, but setting percentages only works on layers. Right?

    I dug a little deeper into this forum. 10 years ago, Klaus said:

    sorry, but that's not possible yet,
    the size of the (distorted) hotspots is always relative to the pano size,
    the size of the plugin not,


    Is this still the case, Klaus? Can't flying hotspots be sized relative to the stage size?

  • Oh yes, I confused hotspot and layer. Strange, but even event oresize does not work.

    Code
    <events name="resize_hotspot" onresize="
        trace(stagewidth);
        trace(hotspot[test].width);
        set(hotspot[test].width,get(stagewidth));
        trace(hotspot[test].width);
        "/>

    translation difficulties *huh*

  • I connected the hotspot size to the stage size like this (btw, I prefer scale over width, so the dimensions remain the same):


    It kind of works, but it feels quite hacky.

    Klaus, can you help me out? Is there a logic behind the flying hotspot sizing? And is it possible to elegantly connect hotspot size to stage size?

    Thanks!

Jetzt mitmachen!

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