Deploying Flash Video / Deploying with SWFObject pt. 2
Subtitles of the Movie
Continuing with deploying a Flash video using SWFObject, we've downloaded the SWFObject files. We have two examples here, one of Static publishing, one of Dynamic publishing, and in this tutorial I'm going to modify these files a little bit to load my own SWF, which will, in turn, load my own FLV. Right now they're loading Test swf, which just displays the Flash Player version. So, I'm going to substitute a different SWF for Test swf, which is going to load my own FLV. Let's take a look at this. The SWF I'm going to load is 0209. swf, which is going to load 0207.flv, and notice, by the way, that I have SWFObject js in this directory, and ClearOverPlaySeekMute. swf in this directory as well. This is the Skin swf, so this SWF, which loads this FLV is expecting this Skin. We saw how we created this on the tutorial on deploying video with Flash. If this SkinSWF is not here, this won't work. SWFObject. js, actually the static publishing will work, but it may not be quite as fully functional, but the video will play, even with swfobject. js. The dynamic publishing absolutely requires this swfobject. js to work, so you really should have swfobject js and the Skin file in the same directory as the SWF and the FLV in order for this example to work. So, now let's go take a look at index. HTML in Dreamweaver, and here it is. And here we have that test. swf and here we have it again, and this is one of the disadvantages of static publishing, that each parameter has to be repeated twice, so here's the filename and here it is again. Here's the width, here it is again. Here's the height, here it is again. Now, in a simple case like this, even if you had to change one of these it's not a big deal, you change it twice. But if you have a lot of parameters Ð let's go back and take a look at this example, which was created using Dreamweaver's Insert Media FLV function Ð there can be a lot of parameters: Quality, WMode, Scale, SAlign, and here they all are again: Quality, WMode, Scale, SAlign. So if you have to start changing things very much having to do everything twice can be laborious. So, now I'm going to go and change the Filename, the Width and the Height. Everything else is going to remain the same, and that becomes 0209 Static. I just put in my SWF, which is going to load my FLV, and this is the same SWF that was created on the tutorial on deploying video with Flash. So, now let's take a look at this, 0209 Static. Here it is, just double-click on that, right-click, Allow Blocked Content, and there's my video. So, let's take a look at 0209 dynamic. Here's index dynamic. Now in this case we only have to give our parameters once in the Embed SWF line. So, here's the file, width, and height and here I have 0209 dynamic and here's my file and my width, and my height. Other than that, everything remains the same. And notice here, by the way, swfobject. js, so it's expecting it in the same directory because there's no path there, and the static has the same thing. So, again, that's why it's important to have that swfobject. js in the same directory for this particular example. 0209 html, let's go out and take a look at that. Right-click, Allow Blocked Content, and there's my video. So, that's how simple it can be to deploy video using SWFObject. Just download your SWFObject files, bring up the examples, make sure that they work, and then modify them to put in your filename and your dimensions, and that's the dynamic example, and here's the static example. Just don't forget to do it twice because that's what's necessary to support various different browsers. And that concludes this tutorial on Deploying Video using SWFObject.
Tutorial Information
| Course: | Adobe Flash CS4 Video |
| Author: | Michael Hurwicz |
| SKU: | 33967 |
| ISBN: | 1-935320-32-7 |
| Release Date: | 2009-02-17 |
| Duration: | 8.5 hrs / 121 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 81,350 Video Tutorials (20,800 free)
- Video Available as Flash or QuickTime
- Over 782 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 