You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 27th 2012, 12:39pm

hide and show=play the video again

Hello again!

I have hided video in my panorama with this code
<action name="flyin">

if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );

if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
set(hotspot[%1].onhover,showtext(klicka för att stänga, videohoverstyle));
set(hotspot[%1].enabled,true);
set(hotspot[%1].visible,true);
tween(hotspot[%1].alpha, 1.0);
tween(hotspot[%1].flying, 1.0);
tween(hotspot[%1].scale, 1.0);
tween(hotspot[%1].rx, 0.0);
tween(hotspot[%1].ry, 0.0);
tween(hotspot[%1].rz, 0.0);
set(plugin[video1].visible, false);
set(plugin[playthevideo].visible, true);

and
<action name="novideo">
plugin[video1].closevideo();

</action>

<hotspot name="hs1" devices="all"

keep="false"
visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
zorder="0"
fillcolor ="0xffffff" fillalpha ="0.00" borderwidth ="0.0" bordercolor ="0xffffff" borderalpha ="0.00"
fillcolorhover="0xffffff" fillalphahover="0.10" borderwidthhover="4.0" bordercolorhover="0xffffff" borderalphahover="0.80"
fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
onhover="showtext(klicka för info, videohoverstyle));"
onout=""
ondown=""
onup=""
onclick="showpic(); order1(); novideo();"
altonloaded="if(isphone, mul(scale,2));"
alturl="hotspots/zoomicon.png"
pic="bild1"




and now I want to play the same video from the start with this code. The problem is that the video just shows where I last stopped it and I want it to play from the beginning again. Is there any kind person that would like to help.

<action name="videoagain">
set(plugin[video1].visible, true);
plugin[video1].play;


</action>

<plugin name="playthevideo"

url="plugins/stop.png"
align="bottom"
edge="right"
x="0" y="30"
keep="false"
zorder="3"
parent=""
visible="false"
handcursor="true"
alpha="1"
blendmode="normal"
onclick="videoagain();"
scale="1"
/>

I have struggled and tried every variations but with no luck, again I think its an easy problem but I can't find out what is wrong.

url to the project. http://www.pernylen.se/pano/wiik/

Regards

Per Nylén

This post has been edited 1 times, last edit by "Per Nylén" (Apr 27th 2012, 1:09pm)


2

Friday, April 27th 2012, 2:13pm

Hi!


You need to stop the video in order to make it start again. In your code you just make it invisible. So, add to novideo action this line: "plugin[video1].stop();" Now it will start from the beginning again.

Regards,
Jesse Passoja
Passoja design
www.passojadesign.com