The Dash Player was written to be completely customized. One great feature that I added to this player is the ability to add your very own custom fields to the player using CCK. This allows you to add your own data to the player and show that information anytime that someone clicks on a teaser in the playlist. Below you will find the steps you need to add your very own fields to the Dash Media Player.
Adding a field using CCK
This step is fairly trivial. Let us suppose that we wish to not only show the title in the Dash Player, but would also like to have a description as well. To do this, let us first create a description field using CCK. Follow these steps to do this...
- Go to Administer >> Content Types
- Select the node type that you are using with your player and click on the Edit link
- Next you will want to click on the Add Field in the links above.
- For the field name, we will just type description, then select the Text Field for the field type.
- If you are using Drupal 6, you will also need to type the Label which can just be Description
- Go ahead and move onto the next step by pressing the Continue button.
- In the next section, you can just keep all of the defaults the way that they are... so go ahead and press Save field settings button
- Now, when you add a new video, you should see a new field called Description where you can add the video description
Adding the field to your skin
Our next task is to let the player load this data... we do this by simply creating a new text field in our skin file. To do this we will need to have Flash CS3 Professional
so that we can edit the skin provided in the download. Once you have Flash CS3, you are ready to start editing the Dash Media Player skin...
The first thing that you will need to do here is follow the tutorial at http://www.tmtdigital.com/node/140. Here it describes the steps to create your own skin. Once you have done that, you can do the following to add your custom CCK field to the player...
- With the skin open in Flash CS3, you will need to navigate to the Movie Clip that holds the title of the main node or a teaser. The path to this is the following... dash/node/fields/values
- Once you are in this Movie Clip (next to the title text field), you can then add ANY other text field and name the instance name after the field you just created using CCK. For our example, you would create a new Text Field, set the type as Dynamic Text, and then give it an instance of field_description. And that is it!!! Pretty easy, huh?