• BU Home | 
  • News | 
  • Events | 
  •  | 
  •  

Web Services Wiki

Welcome Guest: Login

Adding Parameters to Silva Flash

Wiki Tools

Created on: Dec 14, 2007
Revision: 1 (public)
Rev Published: Jul 17, 2009
New & Updated (3)

Abstract: You have a Flash movie that can take extra configuration settings via the "flashvars" parameter, and need to make these settings available within the external source tool.

Let's take the Flash Video Player (Progressive) movie as an example.    This movie has two extra settings: the Flash video to play, and the skin (look) of the movie controls.  We need to add parameters for these to the external source tool.  

Note: you need to have access to the Zope Management Interface (ZMI) to add these settings.

  1. Add the flash movie to Silva as a Silva Flash Asset.
  2. Go to the ZMI for the flash movie.  Click the link to edit the parameters.
  3. The Flash video is going to be located within Silva.  So, add a "ReferenceLookupWindowField" to the parameters form.  Call it "streamName".
  4. The skins are flash movies (.swf extension).  These will be added within the Silva  Flash Asset, and a list of skin choices will be presented in the external source tool.

    1. In the "Contents" tab of the Silva Flash Asset, add each skin as a "File".  This is a different type from "Silva File".
    2. Edit the form parameters.  Add a "ListField" with an id of skinName.  In the TALES tab of skinName, add the following to "Items":

      python:map(lambda x: (x,x), form.aq_parent.objectIds(['File']))
      

      The above line retrieves the ids of all objects of type File from within the Silva Flash Asset, and returns a list of (id,id), which is used in the skin name list.