How to perform Event "onsceneloaded" ?!?

  • Hi there,

    is there such thing as "onsceneloaded"? I know there are onload-, onpreview-, onnew-, onxmlcomplete-events, but how do I tell krpano to perform an action every time a scene is fully loaded? The onloadedcomplete-event loads the full SWF-File before performing the action, which is quite ineffective if the SWF is about 10-20mb.

    I need to perform an action after the first scene is fully loaded to remove the initial black-screen and progress bar.

    Thanks and best regards
    Nupsi

  • Hi,

    onloadcomplete-event, which loads the full SWF before it triggers the action.

    this is NOT correct!
    the onloadcomplete event will be called when the pano image was loaded completely,

    to your question either use the global onloadcomplete event or use a local/named onloadcomplete event inside the scene,
    e.g.

    Code
    <scene ...>
       <events name="scene" onloadcomplete="..." />
       ...
    </scene>

    best regards,
    Klaus

  • Hey again, Klaus *wink*

    After a feeeew tests it seems that the onloadcomplete-tag really loads the whole SWF-File before it triggers the event. I´ve got a few tours which sizes from 3 to 10 MB and every tour is buld the same way with the same loading-order inside the SWF-File:

    tour.xml <<--main xml with scenes etc.
    audio.xml <<--just a few standard sound-actions
    soundinterface.swf
    preview01.jpg <<--lowres-version of the first pano (about 10KB)
    pano01.jpg <<--flat highres-version of the first pano (about 1MB)

    and then comes the rest like interface-graphics, one or two SWF-animations etc.

    And krpano always loads the full SWF before the first pano starts, which I checked with a monitoring-software.
    Here´s the basic code I use to start the tour.....

    Do you have any idea how I could manage it to start the first scene-action "action(camview_entre)" after the preview and pano is loaded, but before the rest of the SWF-File is loaded? Because right now it takes about 1 minute to start the tour with a slower connection (128kbit/s), because the whole 8mb are loaded.

    Thanks and best regards
    Nupsi

  • Hi,

    After a feeeew tests it seems that the onloadcomplete-tag really loads the whole SWF-File before it triggers the event.

    the onloadcomplete event has nothing to do with the swf file loading,

    it will be called when the pano image defined in the <image> element was loaded completely,

    when you have embedded these images into the swf, and the images are at the end of the swf file - then yes, then it could happen at the same time as when the swf file itself was loaded completely,

    or when you use plugin or hotspot images and load them with preload="true" but embedded them behind the pano image in the swf file, then the viewer also needs to wait until the swf is loaded so far to have these images, before it can continue,

    so typically I would recommend when embedding files - first the xml files, then small button images, plugins and the preview images, and the finally at the end the pano images,

    best regards,
    Klaus

  • Hi again, Klaus,

    I think I´ve found the problem why krpano loads the whole SWF-file, even the loading-order is perfect! Every time I embed a SWF-File inside the tour-SWF (an animation, short flash-video etc.) krpano loads the main-SWF to the point where the embedded SWF sits inside the loading-order, no matter if the embedded SWF-Animation is used or not! At least that´s what I figured out during my last tests. I hope you understand what I mean, because that´s really tricky to explain in english, so here´s the whole thing in german for better understanding (sorry to all non-germans *wink* )

    * * *


    Ich glaube ich habe das Problem gefunden, warum krpano teils das komplette SWF-File lädt, auch wenn die Ladereihenfolge innerhalb von kprotect stimmt. Wenn ich in die Haupt-SWF, welche die komplette Tour enthält, ein weiteres SWF-File einbette (zB eine kleine Flash-Animation) dann lädt krpano die Haupt-SWF bis zu dem Punkt wo auch die zweite, eingebettete SWF liegt. Und erst wenn diese ebenfalls geladen ist, startet die Tour - völlig schnurz ob die kleine Flash-Animation erst ganz am Ende der Tour genutzt wird, oder auch überhaupt nicht. Zumindest lädt krpano die Tour ratz fatz sobald ich die inkludierte SWF-Animation nicht mit einbette, sondern sie einfach mit ins Verzeichnis lege.

    * * *

    Maybe you can take a loot at this weird behavior in a spare minute....if you ever have one *g*

    Thanks and best regards
    Nupsi

  • Hi,

    das Forum selbst ist eigentlich zweisprachig, d.h. es können Posts sowohl in Englisch als auch Deutsch gepostet werden,
    beim Erstellen des Themas gibt es ein Sprachauswahl,

    zu dem Problem:

    Wie und wo wird diese SWF in der XML eingebunden? (preload=true?)
    Und liegt diese SWF in kprotect Tool in der Liste der einzubindenden Dateien 'vorne', also vor den Panorama Bilder usw.?

    Schöne Grüße,
    Klaus

  • Fragen an die Community stelle ich eigentlich immer auf englisch, da so mehr krpano-User erreicht werden *wink*

    Zum Problem: Ich glaube ich habe einen grundsätzlichen Denkfehler beim einbinden der XML. Wenn ich eine XML per include innerhalb einer Szene lade, wird diese wohl zuerst abgearbeitet bevor die eigentliche Szene geladen und angezeigt wird. Wenn ich die XML erst etwas später inkludiere, wird die SWF-Animation auch erst entsprechend später geladen und der Start des Rundgangs verläuft wie er soll.

    Sorry für den überflüssigen Post, Klaus *sad* Manchmal braucht es wohl erst ´nen Denkanstoß um die eigenen Gedanken zu entwirren *g*

    Dank und Gruß
    Nupsi

Participate now!

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