Start learning with our library of video tutorials taught by experts. Get started

Creating a First Web Site with Flash Professional CS5
Watching:

Syncing graphics with video


From:

Creating a First Web Site with Flash Professional CS5

with Paul Trani

Video: Syncing graphics with video

One of the great things about using video in Flash is that you can sync up the video with other graphics on the site, and that's what I want to do here with this video. When Jill says certain things, I actually want to highlight some text in these paragraphs. So, I'm going to double- click on this movie clip. It's right in here, and that's where my video lives, but what I want to do is I'm going to add a new layer, and I'm going to just call it highlights.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Creating a First Web Site with Flash Professional CS5
2h 45m Beginner Jul 27, 2010

Viewers: in countries Watching now:

Creating a First Web Site with Flash Professional CS5 shows how to make a fully functional, dynamic web site in Flash Professional CS5. This course covers the fundamentals of creating and importing content, adding smooth 2D and 3D transitions, and adding button functionality that goes beyond links. This course will also show how to integrate and control video and audio as well as how to implement a gallery and a contact form. Exercise files are included with the course.

Topics include:
  • Understanding web design
  • Creating buttons and web graphics in Photoshop
  • Formatting text with the Text Layout Framework
  • Using the Timeline
  • Creating a custom looping animation
  • Loading images in a gallery
  • Creating invisible buttons
  • Adding music and video to a site
  • Customizing video playback controls
  • Optimizing and publishing a web site
Subjects:
Web Interaction Design Projects
Software:
Flash Professional Illustrator
Author:
Paul Trani

Syncing graphics with video

One of the great things about using video in Flash is that you can sync up the video with other graphics on the site, and that's what I want to do here with this video. When Jill says certain things, I actually want to highlight some text in these paragraphs. So, I'm going to double- click on this movie clip. It's right in here, and that's where my video lives, but what I want to do is I'm going to add a new layer, and I'm going to just call it highlights.

These are the highlights that I'm going to draw. So, I'm just going to use the Rectangle tool and I'm just going to go ahead and select red as my fill color and make it about 50%, and I'm just going to draw a quick box right here because when Jill says Rhode Island School of Design, I want to emphasize this information. So, let me select that graphic here, and let me just change the color and make sure that's at a bright red, and that looks pretty good, nudge it into place, and I'm going to go ahead and drag it to the Library, and I'm going to call this-- first off, it's not going to be a button.

It's going to be a movie clip, but I'm going to call this highlight1. There we are. There's my highlight1. I'm going to go ahead and draw another highlight over here that highlights the places that she's worked at, like that, all right. So, I'll select these rectangles, drag them to the Library, and I'll call them highlight2, just like that. Now, I need to give each a specific instance name.

So, the first one is going to be called highlight1, second one highlight2, like that. All right, so far, so good. There's my highlights in place. Now, I need to determine when Jill says certain items. So, I'm going to lock down some of those graphics, so I can select that video, and I'm going to open up this Properties panel and if I close up those parameters, notice that I'm given Cue Points right in here for this video.

Okay, so, the first thing I'm going to do is I'm going to give this video an instance name of jillvideo. It's the name of the video and on this video it's going to have a couple cue points, and I'm going to determine those by hitting this plus sign. So, I'm going to play this video, and I'm going to hit the plus sign to add various cue points, so. (Female speaker: Hi, my name is Jill Steinman. I'm a freelance graphic designer working in New York City.) (Female Speaker: After graduating from Rhode Island School of Design, I immediately started working for various high-profile ad agencies.) (Female Speaker: After five years, I made the move to freelancing full-time, mainly because I feel that design?) All right, so, here's my three cue points.

The first one is going to be my first highlight, which is about her schooling. So, I'll just go ahead and say highlight1, because that's what I want to highlight, second cue point is highlight2, and this third one I made is the one where I just want to make both highlights go away. So, I'll just type in end there. So, I've determined my cue points. I have my graphics in place. I know the name of this video.

Now I can add some ActionScript, and I'm going to use the Code Snippets panel to do this. I am going to go to Window, down to Code Snippets, and I'm going to open up this Audio and Video folder, and this third one down is the one I'm going to select, because On Cue Point Event, I want certain things to happen. So, I'll just double-click there and it adds that code. So, it's referencing the video because I had it selected and it's going to trace out the name of the cue point.

So, this is either going to be highlight1, highlight2 or end. So, what I want to do instead of tracing out the name of the cue points, I want to do something based on those cue points. So, I'm going to type in if the name is equal to highlight1, then do something. So, I'm going to get rid of that semicolon and add an opening curly brace and when I hit Return, it automatically adds this closing curly brace, because when the video hits this cue point name, what I want to do is I want to turn on the appropriate highlights.

So, I'll say highlight1.visible is equal to true and I'm going to make sure that that takes place at that point in time, but what I need to do initially is make sure highlight1, its visibility is equal to false. So, we turn it off initially, and then when it hits this cue point, turn on that highlight. Same thing for the second highlight, so all I need to do is copy this and paste it.

So, if the cue point is equal to highlight2, then turn off the first highlight and then turn on the second highlight, just like that. And remember, I have to make sure both of them are not visible initially. Okay, so it hits that first cue point, turns on the correct highlight. It hits the second cue point, turns off the first one, turns on that second one and remember as I checkout this video, remember that there's also this end cue point as well, and that's when I'm just going to turn off both of them.

So, let me go back to this first frame here, back into my code and right here, I can copy and paste this last if statement and if the name is equal to end, then turn both of them off, just like that. All right, the code is looking pretty good. I can also comment this code if I want to as well, but in general I know that this controls the highlights.

That's all I'll do right there. But let's go ahead and run this. I'm going to do a Control > Test Movie, and I am given an error right in here. So, let's take a look at this. Looks like there is a misspelling right in here and this will happen on occasion, and I'm glad it did because it's looking for this undefined property, and it's given in my Compiler Errors. So, all I need to do is double-click on that and that takes me right to that line of code that has the issue.

So, I can go ahead and fix that. Obviously I misspelled highlight. I can fix that by removing that extra L that's in there in both places and then I can run my code. Let's go to the About section, the video is going to play, and then now we're going to watch the highlights, highlight and then also turn off. (Female speaker: Hi, my name is Jill Steinman. I'm a freelance graphic designer working in New York City.) (After graduating from Rhode Island School of Design, I immediately started working for various high-profile ad agencies.) (Female Speaker: After five years, I made the move to freelancing full-time.) So, that was just a quick example of having graphics interact with the video, all based on these cue points, and as you can tell, it was quite easy to do in Flash.

Find answers to the most frequently asked questions about Creating a First Web Site with Flash Professional CS5.


Expand all | Collapse all
Please wait...
Q: I followed all the steps and suggestions in the "Adding a progress bar" video, but when I add the progress bar to my web site, I can’t remove it once the index.swf file loads up. The progress bar remains on the homepage and the rest of the pages. How do I make it disappear once the site loads?
A: To make it disappear, just make sure the progress bar is only in frame 1. If it’s on its own layer, then right-click on the 2nd frame in that same layer and select "Insert Blank Keyframe." That will make it disappear.
Q: Despite following the steps in the "Adding a progress bar" video, I cannot figure out how to keep the progress bar from appearing on a movie that has finished loading. How can I make the progress bar disappear?
A: Just add the red line below to the preloader.fla file. This will make the progress bar invisible: 
"function contentLoaded(evt:Event):void { //Optionally change to a clip holder and set progressbar visibility. addChild(contentLoader); progressbar.visible = false; }"
Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a First Web Site with Flash Professional CS5.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked