Szenen übernehmen die die Einstellung von normalview..kann ich das auschalten und den szenen eigene vlookat, fov, hlookat geben?

  • Hallo zusammen,

    mein Panorama startet mit little planet und geht dann in die normale Panoramaansicht.

    <action name="normalview">
    tween(view.hlookat, 263, 1.5, easeInOutQuad );
    tween(view.vlookat, -10, 1.5, easeInOutQuad );
    tween(view.fov, 100,1, 1.5, easeInOutQuad );
    </action>

    Zusätzlich habe ich szenen eingebaut, die sich über buidlthumbs anklicken lassen. Diese Szenen übernehmen aber die Einstellungen von hlookat, vlookat und fov vom "normalview".

    Ich möchte aber, dass die Szenen ihre eigenen Starteinstellungen haben (hlookat, vlookat und fov).

    Ich poste hier mal meinen Quelltext und bitte Euch um Hilfe
    Ich hab die Problemstellen unten Farblich gekennzeichnet *cry*
    Danke da Woasnix


    <krpano version="1.0.8" onstart="startup();">

    <action name="startup">


    </action>

    <plugin name="logo" url="../logo.png" align="top, right" keep="true" />

    <include url="skin/defaultskin.xml" />

    <view hlookat="0" vlookat="0" maxpixelzoom="1.0" />
    <display details="22" />

    <include url="skin/defaultskin.xml" />

    <!-- view startup settings for little planets -->
    <view stereographic="true"
    fisheye="1.0"
    fov="150"
    fovmax="150"
    hlookat="0"
    vlookat="90"
    />

    <!-- fisheye and little planets projections needs much rendering performance
    to get more performance switch to flash9 rendering while in fisheye
    or littleplanet/stereographic mode
    -->

    <display flash10="on" details="14" />
    <events onloadcomplete="delayedcall(1.0, normalview());" />

    <action name="normalview">
    tween(view.hlookat, 263, 1.5, easeInOutQuad );
    tween(view.vlookat, -10, 1.5, easeInOutQuad );
    tween(view.fov, 100,1, 1.5, easeInOutQuad );
    tween(view.fisheye, 0.0, 1.5, easeInOutQuad, WAIT);
    set(display.flash10,on);
    showtext(get(data[infotext].content), infostyle)
    </action>

    <image type="CUBE" multires="true" tilesize="955" progressive="false">
    <level tiledimagewidth="1910" tiledimageheight="1910">
    <left url="haus.tiles/l2_l_%0v_%0h.jpg" />
    <front url="haus.tiles/l2_f_%0v_%0h.jpg" />
    <right url="haus.tiles/l2_r_%0v_%0h.jpg" />
    <back url="haus.tiles/l2_b_%0v_%0h.jpg" />
    <up url="haus.tiles/l2_u_%0v_%0h.jpg" />
    <down url="haus.tiles/l2_d_%0v_%0h.jpg" />
    </level>
    <level tiledimagewidth="955" tiledimageheight="955">
    <left url="haus.tiles/l1_l_%0v_%0h.jpg" />
    <front url="haus.tiles/l1_f_%0v_%0h.jpg" />
    <right url="haus.tiles/l1_r_%0v_%0h.jpg" />
    <back url="haus.tiles/l1_b_%0v_%0h.jpg" />
    <up url="haus.tiles/l1_u_%0v_%0h.jpg" />
    <down url="haus.tiles/l1_d_%0v_%0h.jpg" />
    </level>
    </image>


    <scene name="scene_pano2" title="pano2" onstart="" thumburl="../Pano2\pano2.tiles\thumb.jpg">

    <view hlookat="263" vlookat="-10" fovtype="MFOV" fov="200" fovmin="130" fovmax="140" />
    "Diese Werte werden anfänglich geladen aber dann gehen sie wieder in normalview über tween(view.hlookat, 263, 1.5, easeInOutQuad ); tween(view.vlookat, -10, 1.5, easeInOutQuad ); tween(view.fov, 100,1, 1.5, easeInOutQuad );"


    <preview url="../Pano2\pano2.tiles\thumb.jpg" />

    <image>
    <left url="../Pano2/pano2.tiles/mobile_l.jpg" />
    <front url="../Pano2/pano2.tiles/mobile_f.jpg" />
    <right url="../Pano2/pano2.tiles/mobile_r.jpg" />
    <back url="../Pano2/pano2.tiles/mobile_b.jpg" />
    <up url="../Pano2/pano2.tiles/mobile_u.jpg" />
    <down url="../Pano2/pano2.tiles/mobile_d.jpg" />
    <mobile>
    <left url="../Pano2/pano2.tiles/mobile_l.jpg" />
    <front url="../Pano2/pano2.tiles/mobile_f.jpg" />
    <right url="../Pano2/pano2.tiles/mobile_r.jpg" />
    <back url="../Pano2/pano2.tiles/mobile_b.jpg" />
    <up url="../Pano2/pano2.tiles/mobile_u.jpg" />
    <down url="../Pano2/pano2.tiles/mobile_d.jpg" />
    </mobile>
    <tablet>
    <left url="../Pano2/pano2.tiles/mobile_l.jpg" />
    <front url="../Pano2/pano2.tiles/mobile_f.jpg" />
    <right url="../Pano2/pano2.tiles/mobile_r.jpg" />
    <back url="../Pano2/pano2.tiles/mobile_b.jpg" />
    <up url="../Pano2/pano2.tiles/mobile_u.jpg" />
    <down url="../Pano2/pano2.tiles/mobile_d.jpg" />
    </tablet>
    </image>
    </scene>

  • Hi,

    das liegt an diesem Code:

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


    dieser wird nach dem Laden jedes Panoramas, der Scene neu aufgerufen,

    um da zu verhindern könnte sich das Event selber wieder zurücksetzen,
    z.B. mit:

    Code
    <events onloadcomplete="delayedcall(1.0, normalview()); set(events.onloadcomplete,null);" />


    dann passiert beim Laden der nächste Szene nichts mehr,

    Schöne Grüße,
    Klaus

Participate now!

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