First try and first problems!

  • Hi guys!
    I've just put up a hidden test page containing my first attempt at an online pano:
    http://www.frozentime.co.uk/omk/
    This is what I'd like to achieve:
    The black horizonatal <div> in which the pano is opened if 500px tall, but obviously when opened the panorama is defaulting to showing full width. Really I'd like it to open zoomed to fit that height.
    Secondly when opened I'd like it to be panning slowly on its own.
    Is this achievable please?
    Thanks in advance,
    Chris.

  • Ok this is what I've tried:


    But it doesnt seem to work. can someone tell me why please?
    Thanks again!

  • Thanks for that. Added the bracket.
    Double checked for other typos and can't see any.
    Sadly it still doesnt work *sad*

    Start thinking like a developer,
    try one command in a simple action and use trace afterwards to see if your action worked at all..
    Trace at the start of the action
    trace('1');
    trace after your command went off etc...
    See if your actions works,, set up plugins to call them.. use the error console.
    Then once you get a handle on troubleshooting a whole new world opens up.

  • Well my latest itteration of code is:


    The onstart is operating as I had a trace in there. It appears the onidle command isn't working because now I moved the trace it never happens.
    Still cannot see why at the moment though :(

  • I've now spent another half day tinkering with this to no effect.
    I thought perhaps because some events are defined in the "skin" xml file that maybe they needed to be in the same place but that didnt work.
    I even tried:

    Code
    <action name="test";>     trace('0');
                   set(events.onidle=("test2";);</action><action name="test";>    trace('1');</action>


    But whilst the 0 appears in the window, the 1 never happens.

  • UH what?
    ;)
    No
    it would be like

    <krpano version="1.0.8" onstart="test();" idletime="5"

    <action name="test">
    trace('0');
    set(events.idletime,4);
    set(events.onidle,'test2();');
    </action>

    <action name="test2">
    trace('1');
    </action>

    This worked fine... note that it's ONIDLE, which means you can touch anything for "4" seconds to fire this.

  • That is very similar to:


    But when run the window displays 0 but the 1 never happens i.e. it appears the onidle event never triggers.
    Thank you again for your time though.

  • put
    set(step,1);
    in your first action.
    Worked on mine.

    <action name="test">
    set(step,1);
    trace('0');
    set(events.idletime,4);
    set(events.onidle,'test2();');
    </action>

    <action name="test2">
    trace('step ',get(step));
    if(step==1,
    lookto(-180,0,,smooth);
    inc(step);
    );
    oninterrupt(break);
    trace('step ',get(step));
    </action>

  • This code only results in "Info: 0" in the window.
    I've tried it in IE9 and in Firefox 4, so it seems unlikely to be a browser setting that isn't working.
    Is there a server side setting that might be stopping this working?

  • This code only results in "Info: 0" in the window.
    I've tried it in IE9 and in Firefox 4, so it seems unlikely to be a browser setting that isn't working.
    Is there a server side setting that might be stopping this working?

    You must have other include code interfering or some style perhaps.

Participate now!

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