PDA

View Full Version : Load Movie.flv In A Panorama


robrockyeah13
11-21-2007, 11:26 AM
How can i load a movie into my panorama???
I have this in my .xml file:

<?xml version="1.0" ?>
<panorama>
<parameters>
layer_2 = hotspots.swf
layer_3 = flvplayer.swf
segments=10

</parameters>
<hotspots>
<global >
<spot id="sanAntonio" url="a_sanantonio.png" pan="82" tilt="0" linked="piazza"
onClick="loadPano(sanantonio.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />
<spot id="piazza" url="a_piazza.png" pan="-115" tilt="0" linked="sanantonio"
onClick="loadPano(piazza.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />
<box id="video01"
url="video01.png"
pan="0"
tilt="0"
linked="piazza"
distance="1.03"
rotationX="23.00"
rotationY="-1.00"
rotationZ="-1.00"
depth="-12"
scale="0.58"
alpha="0.84"
refreshRate="20"
enableSoundPanning="1"
soundRadius="150"
onClick="?????????????????????????"
/>
</global>
</hotspots>
</panorama>

What should i write in onClick to load my video01.flv file???

zleifr
11-21-2007, 07:28 PM
Wrong approach. You need to use the flvplayer.swf smart plugin, which is to say it gets loaded into the hotspot. So the spot should be something like this:
<box id="video01"
url="flvplayer.swf?file=path/to/video"
pan="0"
tilt="0"
linked="piazza"
distance="1.03"
rotationX="23.00"
rotationY="-1.00"
rotationZ="-1.00"
depth="-12"
scale="0.58"
alpha="0.84"
refreshRate="20"
enableSoundPanning="1"
soundRadius="150"
/>

There is a txt file that comes with it in the plugins that might have a bit more info, and then check the blog a few posts back denis has an explanation of how to use hotspots with video examples in more detail.

robrockyeah13
11-22-2007, 08:14 AM
I read the txt file with instructions, but it doesn't help me so much.
Should i put my video in some folder?
'Cause i have it in the main folder with all the swf files, all the jpeg files, all the plugins ecc...

I didn't understand this: =path/to/video

zleifr
11-22-2007, 01:35 PM
if it is in the SAME folder as flvplayer.swf then you don't need to give a path to it, just name.flv
and if it is elsewhere in a folder, put folder/name.flv

robrockyeah13
11-26-2007, 10:09 AM
I understood your way, but if i want that my video starts only if i click on it, is it good this way?:

<?xml version="1.0" ?>
<panorama>
<parameters>
layer_2 = hotspots.swf
layer_3 = flvplayer.swf
segments=10

</parameters>
<hotspots>
<global >

<spot id="sanantonio" url="a_sanantonio.png" pan="82" tilt="0" linked="piazza"
onClick="loadPano(sanantonio.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />
<spot id="piazza" url="a_piazza.png" pan="-115" tilt="0" linked="sanantonio"
onClick="loadPano(piazza.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />

<box id="video01"
url="flvplayer.swf?file=video01.flv"
onClick="flvplayer.swf?file=video01.flv"
refreshRate="20"
pan="0"
tilt="0"
/>

</global>
</hotspots>
</panorama>

'Cause i don't see any video!!!

zleifr
11-26-2007, 04:08 PM
flvplayer is designed to require you to click, but this simple modification SHOULD fix that. You'll have to test it though.

Just load it like normal.

zleifr
11-26-2007, 04:09 PM
Oh, and if that works, you better build me that statue you promised ;)

robrockyeah13
11-27-2007, 05:41 PM
Ok, i appreciate your example (anyway it doesn't work) but i think i have a problem in some previous steps.

So...
1 - should i put flvplayer.swf in the same folder of the pano?

2 - <?xml version="1.0" ?>
<panorama>
<parameters>
layer_2 = hotspots.swf
layer_3 = flvplayer.swf <--------- should i write this?
segments=10

</parameters>
<hotspots>
<global >

3 - <spot id="sanantonio" url="a_sanantonio.png" pan="82" tilt="0" linked="piazza"
onClick="loadPano(sanantonio.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />
<spot id="piazza" url="a_piazza.png" pan="-115" tilt="0" linked="sanantonio"
onClick="loadPano(piazza.swf)" onLoad="alpha=0" onOver="alpha=1,100" onOut="alpha=0,100" />

<box id="video01"
url="flvplayer.swf?file=video01.flv" <-----------------if i have also the video in the same folder of the pano, is this correct?
refreshRate="20"
pan="0"
tilt="0"
/>

</global>
</hotspots>
</panorama>

did i miss something to make it work, just work basically?

steve
11-27-2007, 10:09 PM
@robrockyeah

1 - Store flvplayer.swf in the same directory as the other plugins, in my example "files"

2 - Don`t write flvplayer.swf in the layers list, you will call it at the box/spot tag

3 - doesn`t matter where you stored your videos, could be a extra folder, in my example "video". The path is important!

Here is the example:

<box id="video" url="files/flvplayer.swf?file=../video/my_video.flv"
// first you call the flvplayer at the folder where it is, from that .swf file you have the path where your video is
pan="-169.00"
tilt="6.00"
distance="1.83"
distorted="1"
refreshRate="20"
linked="panos/my pano"
// if you have more panos to show tell FPP in which pano your video should be played
/>

That`s all...

Steve

robrockyeah13
11-28-2007, 10:46 AM
It doesn't work!!! I see nothing!!!
I tried all the ways you guys told me!!!
At the end i think that maybe my flvplayer.swf doen't work correctly.
Maybe the problem is there, or in the flv video... but i tried with a lot of videos.
I really cannot understand.

clustar
11-28-2007, 05:45 PM
Hello,

I had the same problems. The solution, the correct pathname:

Don`t use д,ь,ц or _()/&%......!!!
Don`t use capital letters JFASKLFJASLJFLASJDFJ !!!!!!!!!!!!

robrockyeah13
11-28-2007, 09:11 PM
I never used those letters...
Anyway trying and trying i found that if i write this, something happens:

<box id="myvideo"
url="flvplayer.swf" file="myvideo.flv" <---------this!!! (and not what everybody wrote me before)
pan="0"
tilt="0"
distorted="1"
refreshRate="20"
linked="piazza" />

At least i see my mouse cursor changing in the hand of the spot in his area, but i still don't see any video also if i click on it.
Like this it seems to load the player but not the video.

invokeme
12-24-2007, 03:34 PM
I have used flvplayer for the first time, and I think I see what is confusing...
when typing path for flwplayer.swf you type it from the scope of your HTML file, and for your FLV file you must type it from the scope of your flvplayer.swf file:
Example.
/files
/images
pano.html
pano.xml

this is the folder structure.
flvplayer.swf is inside files folder.
panoflv.flv is inside images folder.

xml line for loading flv should look like this:

<spot id="pano" url="files/flvplayer.swf?file=../images/panoflv.flv" pan="127.00" tilt="-1.00" depth="0" scale="0.75" />

LOOK CAREFULLY!!! ../images/rgirl.flv !!!!
there is ../ in front of images folder.
../ tels the flvplayer.swf file that panoflv.flv is located one step out of the files folder, and then inside images folder.

This was alredy in previous answer, but I guess you didn`t notice.

Cameleer
12-26-2007, 06:47 AM
I just setup a video in one of my panos using the code as shown above, here it is where I only changed the get video to my video folder, and it works.

<spot id="dance" url="files/flvplayer.swf?file=../video/horse_dance.flv" pan="127.00" tilt="-1.00" depth="0" scale="0.75" />

But the problem is when I click on open full screen the video opens full screen, not the pano. It would also be nice if the video didn’t load and play until a hotspot button is pushed.
http://www.indiavrtours.com/pushkar/horse_dance4.html

Cheers,
Cameleer

invokeme
12-26-2007, 09:15 AM
Hi Cameleer,

When loaded FLV automatically plays one time, and then awaits a mouse click to play again.
Only way to change this behaviour is to reprogram the flvplayer.swf.

For FLV opens in full screen problem, I suggest you debug your horse_dance4.xml file.

Cheers.

Cameleer
12-27-2007, 05:24 AM
Hi Cameleer,

For FLV opens in full screen problem, I suggest you debug your horse_dance4.xml file.

Cheers.

Ok it looks like when using this command to open a pano full screen
onClick="fullscreen(-)
you need to use “box object” instead of “spot object” for videos or the video will open full screen instead of the pano.

<box id="dance" url="files/flvplayer.swf?file=../video/horse_dance.flv"
distance="1.30"
rotationX="24.00"
rotationY="-1.00"
rotationZ="-1.00"
refreshRate="20"
depth="-12"
scale="0.80"
enableSoundPanning="1"
soundRadius="220"
pan="25.00" tilt="5.00" />

Now if I can just get the video not to atomically start when the pano opens.
http://www.indiavrtours.com/pushkar/horse_dance4.html

Cheers,
Cameleer

BillWard
12-27-2007, 08:05 PM
Hi

I think you'll have to modify the flvplayer.swf to require it to be clicked to start playing, i.e. remove the autoplay from it in Flash. I did this for my page at
http://www.billward.org/pages_glw_rad/rad1.html
I also added a frame at the start and end of the video "click to play/pause"

I think there are interesting possibilities with adding video and also, as posted recently, flash files with alpha channel.

Bill