Automatic fly out image

  • Hi I am using this code, I wanted to achieve that the named hotspot would fly out automatically without clicking on it.
    I still want to keep the click-ability of the hotspot.
    After the pano is loaded it zoomes in to position according to the script, but the hotspot does not fly out. Where am I making the mistake?
    Thanks for a reply.

    <events onloadcomplete="delayedcall(1.0, normalview());" />
    <action name="normalview">

    tween(view.fov, 80, 11, easeInOutQuad);
    tween(view.vlookat, 39, 11, easeInOutQuad);
    set(hotspot[apartmany_czpic].flying, ...)


    <style name="flyoutimage"
    distorted="true"
    alpha="0.0"
    backup_rx="0"
    backup_ry="0"
    backup_rz="0"
    backup_scale="0"
    backup_zorder="0"
    flying="0.0"
    flystate="0"
    onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"
    />


    <action name="flyout_by_name">
    <!-- make all other hotspots flying back -->
    flyback_others();

    <!--
    for best control set 4 fly states:
    0 = normal
    1 = while flying out
    2 = out
    3 = while flying back
    -->

    <!-- save original position/rotation -->
    if(hotspot[%1].flystate == 0,
    copy(hotspot[%1].backup_rx, hotspot[%1].rx);
    copy(hotspot[%1].backup_ry, hotspot[%1].ry);
    copy(hotspot[%1].backup_rz, hotspot[%1].rz);
    copy(hotspot[%1].backup_scale, hotspot[%1].scale);
    copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
    copy(hotspot[%1].backup_alpha, hotspot[%1].alpha);
    );

    <!-- set new state -->
    set(hotspot[%1].flystate,1);
    set(hotspot[%1].zorder,99);
    set(hotspot[%1].alpha,1);

    <!-- tween the rotations values to 0 for a flat screen view -->
    tween(hotspot[%1].rx, 0);
    tween(hotspot[%1].ry, 0);
    tween(hotspot[%1].rz, 0);
    tween(hotspot[%1].scale, 1);


    tween(hotspot[%1].flying, 1.0, 1.0, default, set(hotspot[%1].flystate,2); );
    </action>

    <hotspot name="apartmany_czpic" style="flyoutimage"
    url="images/apartmany_cz.jpg"
    enabled="true"
    zorder="2"
    ath="-3.4116918836863306" atv="17.318784905827883"
    scale="0.05"
    rx="0" ry="0" rz="180"
    onhover="showtext(Lipno Lake Resort., logostyll)"
    onclick=""

  • Hi,

    do you have a link?

    and

    do you want them to fly out just automaticaly or when you look to them (see them )

    how do you want to trigger the fly out? And can we see where you call that action ( to start flying?)


    Tuur *thumbsup*

  • After the pano loads, this event comes up

    <events onloadcomplete="delayedcall(1.0, normalview());" />

    The normal view action is specified here:

    <action name="normalview">
    tween(view.fov, 60, 5, easeInOutQuad);
    tween(view.vlookat, 20, 5, easeInOutQuad);
    showtext(get(data[infotext].content), infostyle);
    set(hotspot[apartmany_czpic].flying, ...)
    </action>

    This is what should trigger the hotspot -image- flying after the pano is loaded.
    set(hotspot[apartmany_czpic].flying, ...)


    The hotspot is defined like this:

    <hotspot name="apartmany_czpic" style="flyoutimage"
    url="images/apartmany_cz.jpg"
    enabled="true"
    zorder="2"
    ath="-3.41" atv="17.32"
    scale="0.05"
    rx="0" ry="0" rz="180"
    onhover="showtext(Lipno Lake Resort., logostyll)"
    onclick=""
    />

    The style according to which it flies out is here:

    <style name="flyoutimage"
    distorted="true"
    alpha="0.0"
    backup_rx="0"
    backup_ry="0"
    backup_rz="0"
    backup_scale="0"
    backup_zorder="0"
    flying="0.0"
    flystate="0"
    onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"
    />


    Basically I would like to achieve the same effect like here:
    Instead of the text, I would like one of the hotspots to come up automaticaly after the pano is loaded.

    Einmal editiert, zuletzt von PistaJ (16. Oktober 2012 um 19:55)

Jetzt mitmachen!

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