Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
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.
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.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.