I am almost finished integrating a video player into my krpano project and I am stuck. Here is my project:
http://earlycommit.com/clemson/test/vickery-auditorium.html
I want to be able to load the video from a video button I have on my navigation but it is not working. I figure this should be done by addplugin but I cannot get it to function properly. Currently, I have the video player automatically load and I can get rid of it through the removeplugin function that I placed on the exit button video, but I cannot get the videoplayer to come back. Can anyone help? You can see my current code as well as commented previous attempts below:
/* Video Button located in file rc.swf */
button_video.addEventListener(MouseEvent.MOUSE_OVER, video_over);
button_video.addEventListener(MouseEvent.CLICK, video_clicked);
function video_clicked(mouseevent:MouseEvent):void
{
/*
krpano.call("onclick=if(plugin[video-fb].visible == false , action(openaction), action(closeaction) );");
krpano.set("plugin(video-fb).visible",true)
krpano.set("addplugin[video-fb]")*/
krpano.call("action(openaction)");
}
/*Code in xml file */
addplugin(video-fb);
<plugin name="video-fb"
url="preview.swf"
keep="false"
ath="2.9395175792121506" atv="-8.489145343089376"
zoom="false" distorted="false"
width="880" height="480"
state="opened"
scale="1" scale9grid="" scalechildren="false" rotate="0"
crop="" ondowncrop="" onovercrop=""
visible="true" enabled="true" handcursor="false" capture="true" children="true"
zorder="1"
alpha="1.00" blendmode="normal" smoothing="true"
refreshrate="auto"
details="8"
effect=""
flying="0"
inverserotation="false"
usecontentsize="false"
/>
addplugin(video-fb);
set(plugin[video-fb].url,preview.swf
set(plugin[video-fb].visible,true);
removeplugin(video-fb);
set(plugin[video-fb].visible,false);
/*Code on exit button located in preview.swf */
button_close.addEventListener(MouseEvent.CLICK, close_clicked);
function close_clicked(mouseevent:MouseEvent):void
{
krpano.call("removeplugin(video-fb);")
}
Any ideas? Also, the Exit Video button does not dissapear when the video is in full screen. It is located on the same swf as the videoplayer. Does anyone know how to make it go away during fullscreen and then come back when the user returns to normal screen? Thanks for your help.