Lesson 4 - Inline Frames (iframe)
Inline Frames Inline or "floating" frames are an implementation of frames which allow new pages to be opened within another page. They may be placed anywhere on the page and there may be more than one. The <iframe> tag has several properties that must be set. The src property assigns an html file that is to be shown when the page is displayed. To change the contents dynamically the name property must be set because that becomes the target when a link is used. I am going to create a page that will have a list of movie clips that, when selected, will play in the iframe. To create an iframe I go to the file menu and select Insert>HTML>Frames>IFrame.
Next, I go to the Code view and click next to the iframe, within the tag, and then hit the spacebar to bring up the list of properties associated with iframes.
I select the src property and set it to an image that will be shown when the page is first brought up. I don't want to load a video clip because it takes takes longer to load the page. Next, I set the name that will be used as the target by the links. I set a width and height that is larger than any of the clips and I set the allowtransparency so that the background color of the body will show through thereby blending in the iframe. This is essential for IE. I create the links and select the pages that have the embedded video code and assign the target to the name of the iframe.
Try out the iframe Demo.
|
Copyright © 2008 - 2009 Robert D. Cormia - October 7, 2008