video hotspot and flyout images

  • Hi all,

    This question was posted awhile back without an answer,..wondering if someone can help or direct me to the answer. I have a video hotspot playing in a tv,..all works well,...upon clinks video will pause and unpause. I have added flying out hotspot images from the sample code, and all works well, except upon clicking the flyout, the video is stopped but the video sound continues.......any thoughts. Thanks.

    Rob

  • Hi Klaus and thanks for your look,.........

    The tour is here http://www.cthomes4sale.com/mp9/mp9.html

    tour opens to the front deck,..enter the front door to the living room. The TV is playing a video and the flyout is on the coffee table. A click enable the flyout but kills the video. Also can I preload the video in the main xml page for a quick start??

    <krpano version="1.0.8">
    <events onloadcomplete="plugin[combobox].selectitem(Living Room);stopsound(beach);"/>
    <panoview h="0" v="0" fov="90"/>
    <view fisheye="0" limitview="lookat" vlookatmin="10" vlookatmax="-90" fovmin="75" fovmax="110" fov="90" hlookat="0" vlookat="0"/>
    <progress showload="none"/>
    <autorotate horizon="0" tofov="90"/>
    <preview url="mp9data/mp97/preview.jpg"/>
    <image type="CUBE">
    <left url="mp9data/mp97/3.jpg"/>
    <front url="mp9data/mp97/0.jpg"/>
    <right url="mp9data/mp97/1.jpg"/>
    <back url="mp9data/mp97/2.jpg"/>
    <up url="mp9data/mp97/4.jpg"/>
    <down url="mp9data/mp97/5.jpg"/>
    </image>


    <plugin name="editor" url="plugins/editor.swf" />

    <style name="minn"
    distorted="true"

    flystate="4"/>


    <!-- use a <style> to share the same attriubtes of all hotspots -->
    <style name="flyoutimage"
    distorted="true"
    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)) );"
    />

    <hotspot name="spot6" style="flyoutimage"
    url="1.jpg"
    zorder="1"
    ath="45"
    atv="54"
    scale="0.15"
    rx="-22.5" ry="-26.25" rz="-50.1"
    />

    <hotspot name="spot7" style="flyoutimage"
    url="2.jpg"
    zorder="2"
    ath="231"
    atv="38.49"
    scale="0.10"
    rx="-22.5" ry="-26.25" rz="-50.1"
    />

    <hotspot name="spot8" style="flyoutimage"
    url="3.jpg"
    zorder="3"
    ath="75"
    atv="58"
    scale="0.15"
    rx="-22.5" ry="-26.25" rz="-50.1"
    />


    <!--
    flyout/flyback actions
    (for more stylish in/out moves play with different tweentypes and times)
    -->

    <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);
    );

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

    <!-- 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.5);

    <!--
    tween 'flying' to 1.0,
    this makes the hotspot independent from the panorama rotation and scaling
    -->
    tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); );
    </action>


    <action name="flyback_by_name">
    if(hotspot[%1].flystate != 3,
    set(hotspot[%1].flystate,3);

    <!-- tween back to the stored backup values -->
    tween(hotspot[%1].rx, get(hotspot[%1].backup_rx) );
    tween(hotspot[%1].ry, get(hotspot[%1].backup_ry) );
    tween(hotspot[%1].rz, get(hotspot[%1].backup_rz) );
    tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) );

    copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);

    <!-- tween 'flying' also back to 0.0 -->
    tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); );
    );
    </action>


    <action name="flyback_others">
    set(i,0);
    flyback_others_innerloop(get(i));
    </action>

    <action name="flyback_others_innerloop">
    if(hotspot[%1].flystate != 0, flyback_by_name(get(hotspot[%1].name)); );
    inc(i);
    if(i LT hotspot.count, flyback_others_innerloop(get(i)); );
    </action>

    <hotspot name="minn" handcursor="false" url="mp9data/graphics/videoplayer.swf" style="minn" videourl="mp9data/spots/Brett Favre Game Winning TD Pass to Greg Lewis..Vikings vs. 49ers.flv" onclick="togglepause()" onhover="showtext(GO VIKES%2C Click Screen to Turn OFF/ON);" distorted="true" ath="-150.455" atv="2.85194" width="238" height="198" rx="4.36565" ry="-11.7927" rz="0.40532"/>


    </krpano>


    Also, I used zoomify files for a marina scene (see cedar beach menu box link),..wondering how it works on your end and if I am mising any neccesary code. I also am wondring technically the advantage to using zoomiy over kr4pano multi-res., I'm assuming a quicker load and increased zoom capabilities. What are the file sixe limits(or recommended limits). The marina scene is 55360 x 4235. Below is the code for the zoomify file.

    Thanks for your time and great work.

    <krpano version="1.0.8">
    <events onloadcomplete="plugin[combobox].selectitem(Cedar Beach);stopsound(beach);playsound(beach,Shorebirds_Talking_On_Beach-SoundBible.com-1977029266.mp3,30);"/>


    <image type="ZOOMIFY" hfov="121" vfov="9.3" voffset="4" multires="true" tilesize="1229" baseindex="0">
    <zoomify type="CYLINDER"
    url="cc/captainscove/ImageProperties.xml"/>
    </image>
    <hotspot name="spot0" onclick="stopsound(beach);set(state,autorotate.enabled);set(autorotate.enabled,false);loadpano(mp99.xml);set(autorotate.enabled,state);" url="mp9data/spots/hotspot_ani.swf" onhover="showtext(To the Front Deck);" ath="335.957" atv="6.34872"/>
    </krpano>

  • Hi,

    tour opens to the front deck,..enter the front door to the living room. The TV is playing a video and the flyout is on the coffee table. A click enable the flyout but kills the video. Also can I preload the video in the main xml page for a quick start??

    the problem comes from the the flyout actions,
    they assume all hotspots are flyout hotspots

    to get it working - add a variable (e.g. isflyoutimage) to the flyout hotspots,
    to let these actions know which hotspots are the flyout hotspots,

    e.g.
    add - isflyoutimage="true" - to the flyoutimage style:

    Code
    <style name="flyoutimage"
       isflyoutimage="true"
       ...

    and change the the flyback_others_innerloop action to:

    Code
    <action name="flyback_others_innerloop">
    if(hotspot[%1].isflyoutimage == true, 
      if(hotspot[%1].flystate != 0, flyback_by_name(get(hotspot[%1].name)); );
      );
    inc(i);
    if(i LT hotspot.count, flyback_others_innerloop(get(i)); );
    </action>


    best regards,
    Klaus

  • Been away a while, that did the trick. Is there a preload command I could use so that the video with play smooth upon it's start. Initially the video sometimes plays jittery...but once cached it runs perfect on the second loop.

    Hi,

    you could try increasing the "buffertime"

    e.g.

    Code
    <hotspot name="video"
             url="videoplayer.swf"
             videourl="video.flv"
             ...
             buffertime="2"
             ...
             />

    it's the time in the seconds which the flashplayer will load before starting playing...

    best regards,
    Klaus

Participate now!

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