Unit 10. Adding Multimedia Elements


In this unit we'll learn how to insert multimedia elements. More specifically, we'll see how to insert a Flash animation, a sound and a video.

 

   

Flash Movies

Flash movies are animations that have an SWF extention, just like buttons and flash text. They are usually used in web sites as a presentation, although they can be used for any kind of animation.

These movies can be created through Flash Macromedia, and the user needs to have a plug-in installed on his/her computer to view the movies.

Flash movies can be inserted in a Page through the Insert menu, Media, Flash option, or by pressing Ctrl+Alt+F.

Also, they can be inserted by clicking the Flash option that is in the Common tab of the Insert panel, Media button.

 

The Flash movies Properties inspector is similar to the button's and flash text's, but there are two new options that makes reference to the movie view.

The Loop option sets a restart of the movie at the end of it.

The other option Autoplay, indicates that the movie flash will be started when the page loads.

If this option is unmarked, it would be shown only the first frame of the movie.

You must disable this option when you want the reproduction to be activated by any behavior.

 

Sound Files

 

Sounds are not commonly included in a web Page, because some users may be listening to their own music, and sometimes the page's music may be unwanted.

However, including a nice sound appropiate to the contents of the page can make it more attractive. Many pages that have sound offer the possibility of disabling it.

The most common sound formats used in the Internet are MP3, WAV and sometimes MIDI, although there are other different formats that can be used too. The ideal is including a light but with a good quality audio file.

To insert audio in a document you have to go to Insert menu, Media, Plugin option.

At the right side you have an example of an audio file, for which the audio controls are shown. If you want, you can play it by clicking the controls (Remember to turn on the speakers)

The audio controls will not be shown in Dreamweaver. All files inserted as plug-in are represented inside Dreamweaver by an image alike the one on the left.

In the properites inspector the height and the width of the audio controls can be established through W and H.

In case of no setting a size, it will show the controls with its default size as you can see in the example above. If you want to listen to the sound but not to see the audio controls, the field's value W and H have to be 0.

Sounds are automatically played once when the page loads. Those values cannot be changed through the properties inspector but through the code.

As an example, the previous file will appear in the code as <embed src="others/audio.MID"></embed>.

To avoid its automatic reproduction autostart="false" was added, and to keep it reproducing loop="true" was added too.

The code line of the audio file has been kept as:

<embed src="others/audio.MID" autostart="false" loop="true"></embed>

 

If you want music in a web site while hiding the audio controls, you must write this code directly in the code view.

<bgsound src="song1.wav" loop="-1">

Insert after the label </title>.

With the loop parameter you can choose how many times you want to reproduce the sound, i.e. 1, 2, 3 ... (with -1 it's continually played).

  Go to the previous page page Content  Go to the nex page  

Page 10.1