Home
Username:
Password:
Adobe Flash CS4 Video Tutorials

Working with SWFObject / SWFObject Generator

Subtitles of the Movie

In this tutorial we're going to look at SWF Object Generator and this is a code generator for a SWF Object. It automatically creates the HTML in JavaScript required to implement SWFObject. To find the SWF Object Generator, go to this URL and you have links to two generators, the online version and one you can download. I've got the online version loaded right here. So, in SWF Object Generator you just choose various options and then the generator generates the code, right here. So, swfobject. js is the name of our SWFObject JavaScript file. We're going to use Dynamic publishing; Flash version 9.0 is good. We will use expressInstall, the ID for the alternative content, that's fine. The name of the SWF Ð we're going to use JW Player here Ð so we'll call that Player SWF and the dimensions of the player. Let's go in and take a look at our previous project. The player, we had it at 364 by 225 so that's what I'll put here, and we don't need a Flash Content ID in this case, but we do want some flashvars because we're using JW Player, so let's click More here. So this is where you would set all your params and your flashvars and your attributes. Let's go ahead and choose Allow fullscreen here so that we don't get that fullscreen bug that we saw before. Now you'll notice it doesn't specify any flashvars because SWFObject does not specify how you use the flashvars. JW Player has its own specific flashvars, but in SWFObject there's no way to know what kind of flashvars might be used by the SWF that's going to be loaded. So I'm going to click Add and it comes up with two openings there. So, let's go back and take a look at our flashvars here: it's File, Width, Height, and I won't use Autostart and Icons for this one. I'll just do File, Width, and Height. So, that's 364 by 200 and nuthatch.flv. So, the first one is File, and the value is nuthatch.flv. The second one is Width, and that's 364. And then I'll add another one, Height, and that's 200. And let's just take a look here to see if there's anything that we've forgotten that we really want. I think that covers everything. It doesn't have the non-video content. We'd have to add that in manually. So, let's go ahead and Generate. I'll just pull this up so we can perhaps see this as it pops in. It pops in very quickly and there it is. So, I'll just select all of that, Control C, and go into Dreamweaver. Open a new HTML. I'll just highlight all this, delete that, and Control V to bring that in and now I'll save that. So, I'll call this SWFObject Generator Test. And let's just take a look at it, see if it all looks good. There's our flashvars, the params, allow fullscreen, here's the embed, all of this is looking exactly the same way that this looked. So, let's give this a test. And there it is. And let's try the Fullscreen, and that works fine, too. And I'll hit Escape and that concludes this tutorial on the SWFObject Generator.

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