Working with SWFObject / SWFObject & JW Player pt. 3
Subtitles of the Movie
In previous tutorials we deployed a video using SWFObject and JW Player and added some non-video content to that Web page. Now we're going to configure and customize the player, primarily using Flashvars, but also using a custom skin. So, here's our project, and we actually already used some Flashvars in it, but we're going to add a couple of other Flashvars and specifically we're going to add this flashvars. autostart equals true. I'll just Control C that. First, let's test this in its current state. So here we have a Play button and I have to click that Play button in order to start the video. And by the way when I do this watch for a very quick little Buffering Icon there. Did you see that? It's kind of circular there. So in that position both the Play button and the Buffering Icon appear. So now I'm going to add Autostart, and let's test that, and it just starts playing. There's no Play button there. Now if I pause this, the Play button will appear, but initially no Play button, the video just starts to play. Now let's look at Icons. I'll Control C that and copy that in and test. Now when I pause, no Icon appears there, so there'll be no Play button there and also no Buffering Icon. And that's flashvars. icons. Now, let's take another look at this. We have a Fullscreen button here. Let's try clicking that. It gives an error. Not the behavior that we want. So, let's get out of that, and first let's see about curing that error. I can do that using this parameter: Params Allow Fullscreen by setting that to true. So I'm going to do that below the params here. So now Allow fullscreen equals true. Let's test that. And it does go fullscreen. And I'll hit Escape to get out of that. So, if the behavior that we want is to have the Fullscreen button and have it work, Allow Fullscreen equals true does that. But let's try Allow Fullscreen equals false, and test. We still have the Fullscreen button, but it gives us this error. Not really the behavior that we want. So, Allow Fullscreen equals false is basically the same as not having that parameter there at all. What if we don't want the Fullscreen button there, and also, of course, wouldn't want it to be enabled? Right now it appears there's no way to do that with Flashvars or params and so on. The only way to do that in Version 4.2 is to use a custom skin. And by the way, there used to be a Flashvars for that: Use Fullscreen equals false, used to both hide the Fullscreen button and disable it. Maybe that will come back in a future version, however, for right now we're going to look at this Skin Flash vars. The creator of the JW Player has also created a skin which does not have a full screen button it. So let's just Control C that, bring that in here and by the way for this to work that simple.swf which is the skin has to be in that same directory as our player and our FLV and so on. And by the way this is the file included with that on implementing skins if you want to get into that and you can get that right here, long tail video add on skins, 51 simple. So this is where you can download that skin as well as the read me file explaining how to create skins and so on. So here we have that skin implemented and let's test. No full screen button and nothing happening in that area of the world. In addition let me show you the page for finding out about all the Flashvars, this is it right here. At the developer.longtailvideo.com you can read all about the different Flashvars here and experiement with them and that concludes this tutorial on configuring and customizing a player using Flashvars.
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 