Flash Tutorials - Herong's Tutorial Examples - v3.03, by Dr. Herong Yang
Using Flash to Provide Multimedia
This section provides a flash video example from YouTube.com. It shows how Flash can be used to provide multimedia information to Web pages.
Flash technology is also widely used to provide multimedia information to Web pages like on-line audio and video players. Here is an example of a Web page using Flash technology to play video online at YouTube.com:
By looking at the page source code, you can see how Adobe Flash Player is invoked as a <object> tag to run the video file, watch_as3-vflPSj_0h.swf:
... <div id="watch-player" class="flash-player"> <script> (function() { var isIE = /*@cc_on!@*/false; var swfHTML = (isIE) ? "<object height=\"38" + "5\" width=\"64" + "0\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"movie_player\" > <param name=\"movie\" value=\"http:\/\/s.ytimg.com\/yt\/swf\/watch_as3-vflPSj_0h.swf\"> <param name=\"flashvars\" value=\"rv.7.length_seconds=27 &rv.2.thumbnailUrl=http%3A%2F%2Fi2.ytimg.com%2Fvi%2FYH9xhpEaBdo%... &rv.0.url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4bPdaNgYBaI &rv.0.view_count=669338&enablecsi=1 &rv.2.title=Employee+Office+Fail &rv.6.author=break &rv.3.view_count=28952 &is_doubleclick_tracked=1 &rv.4.thumbnailUrl=http%3A%2F%2Fi2.ytimg.com%2Fvi%2F5XA4AioHMeA%... &fmt_url_map=34%7Chttp%3A%2F%2Fv7.lscache1.c.youtube.com%2Fvideo... ... allowscriptaccess=\"always\" allowfullscreen=\"true\" bgcolor=\"#000000\" \/> <noembed>\n\n\n\n <div class=\"yt-alert yt-alert-error yt-alert-player yt-rounded\"> <img src=\"http:\/\/s.ytimg.com\/yt\/img\/pixel-vfl3z5WfW.gif\" ... <div class=\"yt-alert-content\">\n You need Adobe Flash Player to watch this video. <br> <a href=\"http:\/\/get.adobe.com\/flashplayer\/\"> Download it from Adobe.<\/a>\n <\/div>\n\n <\/div>\n <\/noembed>"; document.write(swfHTML); })(); </script> </div> ...
Notice that the <object> tag is generated from a script code.
Table of Contents
Using Flash to Provide Interactivity
►Using Flash to Provide Multimedia
Adobe Flash Player Plugin for Firefox
Adobe Flash Player Plugin for Chrome
Adobe Flash Player Plugin for Safari
Adobe Flash Player ActiveX for IE
Using "object" Elements for Flash Files
Using "embed" Elements for Flash Files
"mp3player" - MP3 Music Player
SWFObject - Hidding "object" behind JavaScript
SWFTools - SWF File Manipulation Tools
SWFC Script to Generate Flash SWF Files
ActionScript Embedded in SWFC Script
AS3Compile - ActionScript 3 Compiler