Adressing scene attributes

  • For use in a tour control module i would like to have the names of all pano-previewfiles i use in the scenes of the tour.
    For the first scene eg. (<scene name="scene01" ...) i tried
    (but failed) to adress it url via " scene[scene01].preview.url ".

    Only fetching the actual scene-attributes works (via " preview.url ").

    is my syntax wrong?

  • Hi PanAustria,

    Interesting. *rolleyes*
    Just tried this but no way to do it work...

    Code
    onclick="set(scene[scene1].preview.url,preview1.jpg;);loadscene(scene1, null, MERGE, BLEND(1));"

    Looking at the documentation https://krpano.com/docu/programming/ we can see this:


    Then I have tried this:

    Code
    onclick="set(scene[scene1].preview[t1].url,preview1.jpg;);loadscene(scene1, null, MERGE, BLEND(1));"

    But Krpano Debugger do not like:

    Quote

    ERROR: unknown attriubate/path - preview[t1].name

    note: *confused* attriubate ??? *rolleyes* *wink* what is this Klaus *question* *g*

    Perhaps it is not allowed yet? *smile*

    Salut.

  • Hallo michel,

    thanks for your answer...

    ... i hope Klaus will tell me the right way to adress this, but for the moment (needed this feature for coding in actionscript) i found a workaround:
    Krpano allows to adress

    Code
    scene[scenename].content

    and this DOES work!
    The return (string) includes the whole scene node. So in as3 it is no miracle to navigate to and isolate the requestet item, but it would of course be much simpler to adress it the way we expected to...

  • Hi,

    yes, the <scene> node is a special one (like <data> and <action>)
    the content of it was not parsed until it was loaded,

    only access to "scene[name].content" is possible at the moment,
    but I will think about a way to make the content also direct accessible,

    Quote

    note: attriubate ??? what is this Klaus

    thanks for this note, will be fixed in the next release

    best regards,
    Klaus

Participate now!

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