Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Syncing graphics with video

From: Creating a First Web Site with Flash Professional CS5

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.

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.

Show transcript

This video is part of

Image for Creating a First Web Site with Flash Professional CS5
Creating a First Web Site with Flash Professional CS5

34 video lessons · 28191 viewers

Paul Trani
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.


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.

Join now "Already a member? Log in

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
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.