google-site-verification=rELuVVyS5Y8o0Ezst8ITY3su3PIT5khzDgo-anRp4o8 All About Drupal SWF Tools: Installation And Embedding ~ Tech Senser - Technology and General Guide

1 Jul 2013

All About Drupal SWF Tools: Installation And Embedding

SWFTools is an open source tool suit that allows you to embed Flash content (.swf files) on your web Drupal page. The basic idea behind this tool is to allow developers to focus on displaying media on their website without having to do any coding work to achieve this functionality.

It had been a while that Drupal developers wanted such a tool was most of them regularly make use of Flash files to make their websites attractive to the visitors. This SWF tool can be used to place a simple .swf file on the page.

Another advantage is the fact that this module can be easily extended with other components to enhance its capabilities. There are different modules are available that assist play back of audio, video and image based content using a variety of Flash based media players.

This tool is highly user-friendly and allows developers to embed Flash by making use of the CCK filefields, using an input filter with [swf file="example.swf"] or by using PHP and call print swf('example.swf'). 

This tool is usually used when developers want to use Flash to play a video or audio file in the site. SWF tools are finding their way into various aspects of managing Flash media on a websites such as streaming videos from a third-part server or offering a playlist to the visitors. 

For example you can easily stream a file using the SWF filter syntax [swf file="movie.flv" stream="rtmp://server/application"]. There are a number of modules such as the Wijering 4 and FlowPlayer 3 that support streaming.

Insert Image: Drupal SWF Upload.png

It might so happen that don’t like to make use of the CCK filefields and the PHP script to embed Flash media in your website. In that case you can make use of Flash Node module that allows you to add Flash content to nodes without having to worry about writing any HTML or PHP codes. 

This module also allows you to re-use your flash content in other nodes. Let us now learn the steps involved in installing SWFTools and embedding Flash files on a Drupal webpage using these tools. Though it is not a very difficult module to set up it does take some careful bit of installation procedure to get it right.

[Image Cresits: Royalty free Image]

Installation of SWFTools

      To install the SWF Tools into your site you will need to download SWF Tools package from the Drupal website. Unzip the files and start installation of the module by following sites>all>modules>swftools.
    • In the next stage log on to Drupal backend using your admin username and password. Here you should choose ‘Site Building’ and then ‘Modules’ where you will all your modules including a few SWFTools will be grouped. Enable the core module and save the configuration.
    • Now download Flash Media Player in sites>all>modules>swftools folder. Flash Media Player plays the Flash files in the Drupal webpage. If you don’t want to make use of the Flash player you can try out alternatives such as FlowPlayer 3.
    • To configure the Media Player for audio and video files go to Drupal backend and go to ‘file handling’. Here you must choose Flash Media Player as the default player for .flv and other files. Also do the same for .mp3 files and save the configuration.
    • Now you must choose integration where and select all types of media files under "Render Attachment". Doing so will make Flash Media Player play all kinds of media files by default.
    • If you are using the Flash Media Player to get started with it you need to click "Create Content" and then choose "story." Here you need to enter a title for the story in the "Title" box. Once done click on ‘File Attachment’ to upload a *.flv file in the body part. Next click on 'Content Management' to view your created story. Click on the story to view or play your uploaded media file.
Once you are done with the SWFTools installation in your Drupal website it is time you embed some Flash files to play on your website. Here are the steps involved in embedding flash file in your website.
          To start with log into the Drupal CMS using the user name and the password.
        • In the next step you will need to select the page where you want to embed the Flash content from the list of pages.
        • Click on ‘Code View’ to open the webpage’s code in the text box. Scroll down till you come to the point where you want to embed the Flash file.
        • In the next step you will need to paste the embed code where the dimensions of the Flash player will also need to be set.

Here we have used 'video.swf' for the Flash file. You can replace that with your file name. Also you can change the height and width values to meet your needs.
        • Save the code and you are done with the embedding.
A SWF tool is a revolutionary feature which has come into Drupal and is helping developers create attractive websites.

  Mark Wilston

About the Author:

Mark Wilston is a Content Writer and marketing professional working with PixelCrayons (a reputed Web & Mobile Application development company). He loves to read and write different blogs related to web design and technologies. Contributing in a blog post aids him spreading the words online with a new set of people.