Home -> VRSmarty plugins page -> moviebox.swf
This plugin is completely free for use in any context or connection.
moviebox.swf
VRSmarty hotspot plugin for showing flv video files. A mask can be used to select what parts of the movie that will be shown, and with an overlay image to give the movie a suitable framing. You can also set up a program with a sequence of videos that will be shown with a selectable pause between, or start a single video at any time.

VRSmarty commands can be executed at embedded or ActionScript cue points.

The following parameters are supported:

In VRSmarty xml file:
xmlFilexmlFile='myvideos.xml'plugin control XML file, default=moviebox.xml



Plugin attributes:set with spot_id.content.name=value
xmlFilexmlFile='movies2.xml'load new XML file
autoPlayautoPlay=trueturn on/off autoPlay mode
volumevolume=20set player volume level
volume='+'increase player volume level
volume='-'decrease player volume level


Plugin methods: call with spot_id.content.name(value)
play(id)play('video3')start playing video with specified id
or
play()play()continue playing
pause()pause()pause video
rewind()rewind()rewind video
stop()stop()stop video
next()next()play next video
seek(cuepoint)seek('cp2')seek cue point and continue playing from there
or
seek(time)seek(53.5)seek time point and continue playing from there
execute()execute()execute current video onClick command



Plugin external xml file:

The top tag is named <moviebox> and it has no attributes.

Child tags are:
<masks>where mask images are defined and loaded
<overlays>where overlay images are defined and loaded
<program>where you specify movie files to be shown


In the <masks> tag you can specify a number of <mask> childtags, where the following attributes are supported:
idid="lion"mask id
urlurl="img/lion_mask.png"url of mask file
In the <overlays> tag you can specify a number of <overlay> childtags, where the following attributes are supported:
idid="leaves"overlay id
urlurl="img/leaves_over.png"url of overlay file
The <program> tag supports the following attributes:
autoplayautoplay="0"autoplay="1" will start playing the movie
program automatically, default=1
autorewindautorewind="1"1=rewinds movie when stopped, default=0
repeatrepeat="5"number of program repetitions, default=1 (0=forever)
onCompleteonComplete="global.endProg()"VRSmarty command to be executed at end of program
clickModeclickMode="pause"defines action when a movie is clicked:
"pause": movie pause/play
"command": <movie> command is executed
default: movie pause/play if no <movie> command is present
In the <program> tag you can specify a number of <movie> childtags, where the following attributes are supported:
pausepause="3.5"pause before movie starts
idid="Sam"movie id (as reference for "goto(id)" command)
urlurl="/panos/video/Sam.flv"movie url - see info below
repeatrepeat="2"number of movie repetitions, default=1 (0=forever)
scalescale="0.75"hotspot scale for this movie
maskmask="lion"choose mask for this movie
mScalemScale="0.9"mask scale
overlayoverlay="leaves"choose overlay for this movie
oScaleoScale="0.8"overlay scale
tooltiptooltip="Hotel Bellevue"movie mouse-over tooltip
shadowshadow="1"show drop-down shadow (default 0)
command or
onClickonClick="pano.pan=0,3000"command to execute when movie is clicked
onCompleteonComplete="global.endMovie()"VRSmarty command to be executed at end of movie
(see clickMode attribute above)
The <movie> tag can also contain the childtag <cuepoints>, in which you can specify a number of <cuepoint> tags.
The <cuepoint> tags can have the following attributes:
namename="CP1"cue point name, optional - see embedded cue points below
timetime="36.3"cue point time in seconds
commandcommand="pano.pan=0,3000"command to execute when cue point is reached



NOTES:

All tag names must be written in lower case, but attribute names are case independent (bgColor is equal to bgcolor).


When specifying the video url, please note that you either have to specify a path from the directory where pano.swf is stored, or an absolute path (beginning with a "/"). This is due to the way the Flash component FLVPlayback in this plugin uses the "source" property.


Mask and overlay path is specified as usual - i.e. from the current directory (where your html file is stored).


If the "autoplay" attribute in the <program> tag is set to autoplay="0" the movie program will not start playing automatically. Individual movies can then be played with the "goto(id)" or the "next" commands. Default is autoplay="1".


When a video is shown without mask and overlay the size will be the original video size, unless the scale parameter is set.


As scale can be set individually for each video, the plugin will always send a scale="nn" command to VRSmarty before each video starts. This of course means that any scale value set in your hotspot will be overwritten.


If a mask is used, the video will be resized to fill the width or height of the mask.


If an overlay is used, the video (and the mask) will be repositioned to the center of the overlay.


If you want a video to repeat itself endlessly, just set its repeat="0". The pause="n" will NOT be executed between repetitions.


Cue points:

If your video has embedded cue points to which you want to add VRSmarty commands, just specify a <cuepoint> tag with the name of the embedded cue point but without the time="..." attribute. Or - if you can edit the embedded cue points directly - add a "cmd=VRSmarty-command" name-value pair to the cue point parameters.

There are two kinds of embedded cue points: "Event", that are supposed to trigger an action, and "Navigation" that are inserted for navigation purposes. The "seek(cp)" command only works with "Navigation" type cue points, but if you are not able to insert your own cue points, you can always use the "seek(time)" command instead.

If you're using the seek(cp) command to a cue point added in the xml (not embedded), be sure to name it with the name="..." attribute.

A video can have as many cue points as you like, and the time specified for a cue point always refers to that particular place in the movie. So if the movie is paused, then the cue point will be pushed forwards in elapsed time.


Example plugin external xml file:

<?xml version = '1.0'?>
<moviebox>
   <masks>
      <mask id="heart2" url="images/heart2_mask.png" />
      <mask id="lion" url="images/lion2.png" />
      <mask id="leaves" url="images/leaves2S_mask.png" />
   </masks>
   <overlays>
      <overlay id="heart2" url="images/heart22_over.png" />
      <overlay id="leaves" url="images/leaves2_over.png" />
   </overlays>
   <program repeat="0" autoplay="1" clickMode="" onComplete="showMsgP()">
      <movie 
         pause="2"
         url="/panos/images/video/Mio.flv" 
         mask="leaves" 
         overlay="leaves" 
         position="0:30"
         scale="0.7"
         tooltip="This movie uses a mask and an overlay"
         shadow="1"
         onClick="panAway1()"
         onComplete="showMsg()"
      />
      <movie 
         pause="3"
         url="/panos/images/video/Basshunter.flv" 
         mask="lion" 
         tooltip="Here I am using a mask only"
         onClick="panAway2()"
         onComplete="showMsg()"
      />
      <movie 
         pause="3"
         url="/panos/images/video/Toto.flv" 
         mask="heart2" 
         overlay="heart2" 
         mscale="" 
         oscale="" 
         tooltip="This movie uses a mask and an overlay"
         shadow="1"
         onComplete="showMsg()"
      />
   </program>
</moviebox>
					


Version history: