How to embed an FLV inside an SWF – Web Design Tutorial

Posted on Friday 15th Jul 2011 by James Bavington 1 Comment

The example clip from the video

Struggling to see the detail in the video? Click here to watch in HD on YouTube.

In this week’s video, I demonstrate a quick and simple way of embedding FLV (Flash Videos) onto your web pages. Starting in Flash, and using Actionscript 2, we import the video file and proceed to make our own basic Play/Pause function to control the video.

As mentioned in the web design video, embedding your FLV’s through Flash also gives you access to a wide selection of built-in skins that you can use to help viewers contol the clip. However in the video tutorial, we skip past this and create our own basic play and pause feature.

Below you can find all the coding that is used in the video above:

Play Button ActionScript

on (release) {
	video.play();
	gotoAndStop(2);
}

Pause Button ActionScript

on (release) {
	video.pause();
	gotoAndStop(1);
}

Google’s SWF Object Flash Embedding Code

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="256" height="144">
     <param name="movie" value="video.swf" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="video.swf" width="256" height="144">
        <!--<![endif]-->
          <p>Alternative content</p>
        <!--[if !IE]>-->
        </object>
     <!--<![endif]-->
</object>

For more information about embedding your SWF on the page, we recommend using Google’s SWF Object method, for-which more information can be found at the following address: code.google.com/p/swfobject/

About James Bavington

Away from computers, James enjoys mountains, military history and has an insatiable appetite for film - particularly 90's classics.

See all of posts.

Add on James Bavington Google+

James Bavington's Tweet's

This entry was posted in Flash Tutorials, Web Design Videos and tagged , , . Bookmark the permalink.

One Response to How to embed an FLV inside an SWF – Web Design Tutorial

  1. Tracy says:
    November 10, 2011 at 2:19 am

    How do I make an FLV video preloader to go with this?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>