flyout hotspots example

  • Hallo
    Mein Problem ist damit ich keine Ahnung habe aber dvon sehr viel.
    Also versuche ich es zu lernen Stück für Stück immer einfach ausprobieren und so komme ich sehr langsam voran.
    Jetzt habe ich aber ein Problem und da komme ich nicht weiter und zwar bei den --flyout hotspots example--
    wenn ich diese jetzt aus dem Ordner von Krpano nehme bzw mir dort anschaue , liegt das Bild auf dem Boden und beim anklicken kommt es hoch auf den ganzen Bildschirm. So jetzt habe ich es über nommen und soweit für mich angepasst.
    Jetzt aber wenn ich das liegende Bild anklicke kommt es doppelt so groß auf den Bildschirm !!!
    Wie kann ich diese größe ändern??

    <!--
    krpano 1.0.8
    - flyout hotspots example
    -->

    <krpano version="1.0.8">


    <!-- view settings -->
    <view hlookat="12" vlookat="40" fov="105" />


    <hotspot name="spot"
    url="bmw-5er-f10-abmessungen - Kopie.jpg"
    distorted="true"
    ath="-90"
    atv="25"
    scale="0.3"
    rx="-25.5" ry="-15.25" rz="-15.1"
    backup_rx="0"
    backup_ry="0"
    backup_rz="0"
    backup_scale="0.5"
    flying="0.0"
    onclick="if(flying == 0.0, flyout() );
    if(flying == 1.0, flyback() );"
    />


    <!--
    flyout/flyback actions
    (for more stylish in/out moves play with different tweentypes and times)
    -->

    <action name="flyout">
    <!--
    save/backup the current rotation values!
    NOTE - it is important that the backup_* variables are predefined!
    this allows to save the variables at <hotspot> scope,
    if the variables where not predefined, they were saved at global scope
    and this would be a problem when more hotspots were used!
    -->
    copy(backup_rx,rx);
    copy(backup_ry,ry);
    copy(backup_rz,rz);
    copy(backup_scale,scale);

    <!-- tween the rotations values to 0 for a flat screen view -->
    tween(rx, 0);
    tween(ry, 0);
    tween(rz, 0);
    tween(scale, 2.5);

    <!--
    tween 'flying' to 1.0,
    this makes the hotspot independent from the panorama rotation and scaling
    -->
    tween(flying, 1.0);
    </action>

    <action name="flyback">
    <!-- tween back to the stored backup values -->
    tween(rx, get(backup_rx));
    tween(ry, get(backup_ry));
    tween(rz, get(backup_rz));
    tween(scale, get(backup_scale));

    <!-- tween 'flying' back to 0.0 -->
    tween(flying, 0.0);
    </action>


    </krpano>
    -----------------------------------
    So liegt es bei mir was muß ich ändern warum ist das so?
    LG
    Ralle

  • Hi,

    die Größe des Hotspots hängt von der Originalgröße des Hotspotbildes ab,

    eine Möglichkeit wäre eine eine kleinere Größe in der XML für den Hotspot
    zu definiert,

    z.B. die Breite auf 500px setzen:

    Code
    <hotspot name="spot" ... 
              	width="500" 
              	height="prop"
              	...
             	/>

    oder mittels "scale" die Größe skalieren,
    in dem Beispiel wird z.B. die Größe mit 2.5 skaliert:

    Code
    tween(scale, 2.5);


    hier dann einen kleinener Wert wählen,

    Schöne Grüße,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!