how to remove the object frame for html5

  • hi klaus,because krpano cannot support object360 in html5,i learn a way for build one frame for object360 in html5,i also want to link scene between
    object and panorama scene, so i use the code.when i click the layer(inside), it can link the scene_2,but can not remove the frames. can u help me to solve this.

    <action name="startup" autorun="onstart">
    if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
    loadscene(get(startscene), null, MERGE);
    if(startactions !== null, startactions() );
    </action>


    <scene name="scene_1" title="" onstart="buildframes(%CURRENTXML%/objects/,36);">
    <events onresize="updateframes()" onviewchange="updateframesscale()" />
    <layer name="inside" url="tell.png" scale="1" align="leftbottom" x="0" y="65"
    onclick="loadscene(scene_2);"/>
    <style name="frame" keep="true" visible="false"
    align="center"
    onloaded="updateframesize(get(name));set(plugin[loadingtext].visible,false);"
    ondown="copy(oldmousex,mouse.x);domouserotate();"
    />

    <plugin name="loadingtext" url="plugins/textfield.swf" zorder="100" visible="true" enabled="false"
    preload="true"
    align="center"
    autoheight="true"
    width="100"
    background="false"
    html="[p]Loading...[/p]"
    css="p {color:#FFFFFF; font-family:arial; font-size:16px }"
    />


    <layer name="gallerynext" url="gallerybtns.png"
    align="right" x="0" y="0" zorder="100"
    crop="100|0|100|100"
    onovercrop="100|100|100|100"
    ondowncrop="100|100|100|100"
    ondown="set(y,1);dorotate();"
    onup="set(y,0)"
    direction="-1"
    />

    <layer name="galleryprev" url="gallerybtns.png"
    align="left" x="0" y="0" zorder="100"
    crop="0|0|100|100"
    onovercrop="0|100|100|100"
    ondowncrop="0|100|100|100"
    ondown="set(y,1);dorotate();"
    onup="set(y,0)"
    direction="1"
    />

    <action name="buildframes">
    for(set(i,0), i LT %2, inc(i),
    txtadd(fname,frame,get(i));
    txtadd(furl,%1,get(i),.jpg);
    addplugin(get(fname));
    plugin[get(fname)].loadstyle(frame);
    copy(plugin[get(fname)].url,furl);
    );
    set(currentframe,0);
    set(framecount,%2);
    set(oldmousex,0);
    showframe(0);
    </action>

    <action name="updateframesize">
    if(plugin[%1].imagewidth GT stagewidth,
    set(plugin[%1].width,100%);
    set(plugin[%1].height,prop);
    ,
    if(plugin[%1].imageheight GT stageheight,
    set(plugin[%1].width,prop);
    set(plugin[%1].height,100%);
    ,
    plugin[%1].resetsize();
    );
    );
    </action>

    <action name="updateframesscale">
    for(set(i,0), i LT framecount, inc(i),
    txtadd(fname,frame,get(i));
    sub(temp,180,view.fov);
    div(newscale,temp,70);
    copy(plugin[get(fname)].scale,newscale);
    );
    </action>

    <action name="updateframes">
    for(set(i,0), i LT framecount, inc(i),
    txtadd(fname,frame,get(i));
    updateframesize(get(fname));
    );
    </action>

    <action name="showframe">
    txtadd(fname,frame,get(currentframe));
    txtadd(tempstr,'set(plugin[',get(fname),'].visible,false);');
    ifnot(%1 == 0, delayedcall(0.03,get(tempstr)); );
    add(currentframe,%1);
    if(currentframe LT 0, sub(currentframe,framecount,1); );
    if(currentframe == framecount, set(currentframe,0); );
    txtadd(fname,frame,get(currentframe));
    set(plugin[get(fname)].visible,true);
    ifnot(plugin[get(fname)].loaded, set(plugin[loadingtext].visible,true);, set(plugin[loadingtext].visible,false); );
    </action>

    <action name="dorotate">
    if(pressed,
    showframe(get(direction));
    delayedcall(0.05,dorotate(););
    );
    </action>

    <action name="domouserotate">
    if(pressed,
    sub(temp,oldmousex,mouse.x);
    if(temp GT 0, set(temp,1); );
    if(temp LT 0, set(temp,-1); );
    showframe(get(temp));
    copy(oldmousex,mouse.x);
    delayedcall(0.03,domouserotate(););
    );
    </action>
    </scene>
    <scene name="scene_2" title="2" onstart="" thumburl="panos/2.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/2.tiles/preview.jpg" />

    <image>
    <cube url="panos/2.tiles/pano_%s.jpg" />
    <mobile>
    <cube url="panos/2.tiles/mobile_%s.jpg" />
    </mobile>
    </image>

    <!-- place your scene hotspots here -->
    <layer name="outside" keep="true" url="tell.png" scale="1" align="leftbottom" x="0" y="65"
    onclick="loadscene(scene_1,);"/>
    </scene>

Participate now!

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