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

Creating a First Web Site with Flash CS4 Professional

Linking to external web sites


From:

Creating a First Web Site with Flash CS4 Professional

with Paul Trani

Video: Linking to external web sites

Since this is a web site, chances are you are going to want to link out to other web sites. So that's what I want to do here. I want to add a logo and I want to link out to that site. I'm going to do that to this Home section. So, I'm going to go ahead and double- click on this content_mc and double-click again to enter this Home movie clip. And in here this is where I'm going to add a logo. So I'm going to add a new layer, first of all and I'm going to go ahead and call it lynda.com and that's the logo that I'm going to add. And I'm going to go ahead and go to File > Import and Import to Stage.

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 CS4 Professional
3h 8m Beginner Apr 15, 2009

Viewers: in countries Watching now:

Information on how to learn Flash is prevalent, but it can be frustrating to understand how to make an entire working web site using this unique technology. Here's a course that cuts through the clutter and offers practical tools for creating a dynamic web site, even for first-time developers. In Creating a First Web Site with Flash CS4 Professional, veteran Flash instructor Paul Trani simplifies the process of integrating animation, video, audio, and user interactivity to create a site that is dynamic and appealing. The goal of this hands-on workshop is to teach web site-building skills for today's demanding interactive industry. Exercise files accompany the course.

Topics include:
  • Manipulating images for the best results
  • Integrating assets from other Adobe products
  • Creating buttons with ActionScript
  • Embedding links to external web sites
  • Exploring text layouts
  • Customizing interactive contact forms
Subjects:
Web Web Design Projects
Software:
Flash Professional
Author:
Paul Trani

Linking to external web sites

Since this is a web site, chances are you are going to want to link out to other web sites. So that's what I want to do here. I want to add a logo and I want to link out to that site. I'm going to do that to this Home section. So, I'm going to go ahead and double- click on this content_mc and double-click again to enter this Home movie clip. And in here this is where I'm going to add a logo. So I'm going to add a new layer, first of all and I'm going to go ahead and call it lynda.com and that's the logo that I'm going to add. And I'm going to go ahead and go to File > Import and Import to Stage.

Now I need to navigate in our Exercise Files to our Assets folder into the design folder. Now notice that says No items your search. Well, because I'm not showing All Formats. And I can easily show All Formats and there is my LyndaLogo. So I can select that logo and select Open and it pastes my logo in and there it is, lynda.com. So now that my logo is imported, I can go ahead and turn this into a button. So with that graphic selected, I'm going to do to Modify > Convert to Symbol.

I'm going to make sure the Type is a button and I'm just going to call this Lynda button. All right, now I'm going to double-click this button and I'm going to give it some different states. For instance, I'm going to insert a keyframe and in this case all I'm going to do is move it a touch. So I'm going to move it up using my arrow keys, just so there is a little bit of an indication that it's an active button. So when you roll over it, it will pop-up a touch.

All right, that's all I need to do there inside of that button. Now what I want to do is I want to have this button selected and I want to give it an instance name. I'm going to call it lynda_btn, lynda_btn. Now I need to add code to it. So I'm going to add a new layer and this layer is going to be called ActionScript, it's going to be at the very top and in that first frame. I'm going to go to Window, down to Actions to open up my Actions panel.

And my comment, Go to the lynda.com web site. That's what this event listener is going to do and so will the function. The name of the button is lynda_btn. We are going to add an event listener for it and this event listener is going to listen for a mouse event and it's going to listen for the CLICK. All right, add a comma. At this point, gotoLynda, that's going to be the function that is called.

So let's make that function now, function gotoLynda. It's an Event. I don't want it to return anything so I'm just going to type in void, a common practice, and then I need to add my opening curly brace and my closing curly brace. Now within those curly braces I want to add the call to the web site. So what I need to do first is create a variable and this variable is going to be called theSite. It could be called anything but I do need to make sure this is an URLRequest. As soon as I start typing it in, I get my hint. I can hit Enter to select it. It's going to be a URLRequest, it's going to equal to a new URLRequest and within these two parenthesis that's where I'm going to put the web site. So right in here, I'm going to go ahead in quotes, type in http://www.lynda.com the URL.

All right. So the URLRequest has been established and now I need to go ahead and use it. So I'm going to add a navigateToURL and I need to type in the variable for that URLRequest which is theSite. Now notice I can also add another parameter. So if I add a comma there, I can open up a new window and that's exactly what I want to do. I want to open up a blank window. So I don't want them to navigate away from my site, I just want it to open up a new window. So it's looking really good. And that's how I jump to another site.

Let me check the syntax and it doesn't return any errors, which is really good to see. I'm going to go to Control and Test Movie. Now I'm on the Home page, when I roll over this button, sure enough, it pops up and then when I click it jumps out to lynda.com. Perfect, new browser window and everything. Exactly the URL I asked it to. Flash makes it easy to add this essential functionality to your web site.

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


Expand all | Collapse all
Please wait...
Q: If I create a website using Flash CS4 on a Mac, can I edit it on a PC using Flash CS4?
A: As long the file is saved as a .FLA file with the extention ".fla" typed at the end of the filename when saving on a Mac, it should open with no problem on a PC.
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 CS4 Professional.

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


OK

Course retiring soon

Creating a First Web Site with Flash CS4 Professional will be retired from the lynda.com library on April 24, 2014. Training videos and exercise files will no longer be available, but the course will still appear in your course history and certificates of completion.


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