We launched a new IT training category! Check out the 140+ courses now.

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

Setting up a portfolio

From: Creating a Portfolio Web Site Using Flash CS4 Professional

Video: Setting up a portfolio

The first thing you want to do when creating a portfolio is to figure out the design and how it will function. Then you can focus on the best way to execute it. So I'm going to go to the Portfolio section. And as you can see, there is a large image in the center and then supporting text just beneath it. There is also the thumbnails, the small images below that as well, and when you select a thumbnail, it will load in the upper area and so will that text. So that's what I want to do, but I want to be smart about how I develop this, because I want all of these images to be outside of the SWF file, because if they are embedded, then this file is going to be really large.

Setting up a portfolio

The first thing you want to do when creating a portfolio is to figure out the design and how it will function. Then you can focus on the best way to execute it. So I'm going to go to the Portfolio section. And as you can see, there is a large image in the center and then supporting text just beneath it. There is also the thumbnails, the small images below that as well, and when you select a thumbnail, it will load in the upper area and so will that text. So that's what I want to do, but I want to be smart about how I develop this, because I want all of these images to be outside of the SWF file, because if they are embedded, then this file is going to be really large.

So what I want to do is make sure,all of these images are outside of the SWF and then they get loaded in. So what I'm going to do is I'm going to have a UILoader component that's going to load in the large image and then write some code to load in the small images. All right. So the first thing I need to do is identify the images I want to use. So I'm going into these Exercise Files/Assets, into the design folder, into portfolio and I'm going to take a look at the large folder and the thumbs folder.

And these are the images I want to use. I have large JPEGs in here, and then thumbs that match up perfectly in the thumbs folder. So all I need to do is copy those folders and put them in the current folder I'm working in. 05/01 begin and I'm going to create a new folder called portfolio. And I'm going to paste both of those folders in there. All right.

I'm going to start with the UILoader component. That's going to load in this basketball.jpg. So I'm going to go to my portfolio.fla file and here is my large image that I want to replace, so I'm just going to delete that image and what I want to do is replace it with a component. So Window>Components and I want to select the UILoader component and just drag it right on to the stage. Now I can go ahead and resize it.

So I'm going to just zoom out by holding down the Command+Minus to zoom out and now I can start to scale this out. So what I've done there is I've hit the Q key. If you hit Q, that will select your Free Transform tool, allowing you to scale and adjust the size of this item. Another way to do it is just to use, of course, your Properties panel. So the height I want to be about 400 pixels and then the width can be wider.

But I definitely don't want my UILoader component to be too large, as far as the height, because it does say portfolio here at the top. So I'll just kind of position it right there and then make sure this text, if I select my Selection tool, and this text is underneath that UILoader component. And I'll just use my arrow keys to fine tune it. So, it looks good so far. Here is my UILoader component, and what I want to do is I want to load in that basketball.jpg.

So I'm going to go to Window down to Component Inspector and in the source panel, I'm going to type in portfolio, because inside of that portfolio is a large folder and inside of there is the basketball.jpg, just like that. I have mapped it directly to that source. And I do want to scale the content and that's why I like the UILoader component, because regardless of the size of your portfolio piece, it will always scale it down so it fits within this area.

I made it extra wide in case, I have sort of more of a panoramic image, but that should do the trick. In fact, I'll just do a Test Movie, and yup, just like I expected, the image loads in and everything is looking great. Okay, so the next thing I want to tackle are these thumbnails. So I'm going to create an all thumb thumbnails movie clip and inside of that movie clip, I want to start loading in the different little thumbnails. I'm only going to do two right now, but in general, that's what I want to pull off.

I'm going to close that SWF file, close that Component Inspector and Command+Plus will allow you to zoom in. So I really want to focus in on this. And this is going to be my all thumbs movie clip. So I'm just going to click and drag that into the Library, and I'm going to call this allThumbnails, because it's going to contain all of the thumbnails. And I'm just going to make it a Movie Clip for the Type and select OK.

And I'll even give it an instance name, allThumbnails, which I will use in a second. Now what I'm going to do is I'm going to double-click on this, and this large graphic, you know what? I don't need it. In fact, I'm going to load in all these images. So I'm just going to delete that altogether. Now let's go back to Scene 1, and now what this serves as is a positioning item for all of my thumbnails. So wherever I move this is where all my thumbnails will appear.

Okay, now I can go ahead and write some code that will pull in a thumbnail. So I'm going to take a look at my Timeline panel. I do see this layer 1, which I just don't need. I'll hit the Trash can to throw it away and create a new layer at the top and I'll just call it AS, for ActionScript. I'm going to select that first frame and I'm going to go Window down to Actions. All right. I am going to pin my code. I want you to get in the habit of pinning your code, so it doesn't move, regardless of what you have selected.

And now, I can go ahead and type in what I need to type in, because I want to go ahead and create a new Loader from the Loader Class. So, in fact, I'll type in a comment, LOAD THE THUMBNAILS. All right. That's just a comment for me, so I know what I'm going to do. var, I am going to create a variable or a box, if you will, called thumbLoader. It's of the type, Loader.

It's using the Loader class. So it's basically creating an instance of this Loader class. So there is functionality in here that I can use now. I'll show you what I mean in a second, because with the thumbLoader, I want to go ahead and load in the request. So new URLRequest. That turns blue. That's a good sign, because I'm typing that correctly, portfolio and inside of that portfolio folder is the thumbs folder and then, in there is the basketball.jpg, the small version.

End that quote. Close that with a parenthesis and I need to close it with another parenthesis and then end with a semicolon. So anytime I have an open parenthesis, I need to close it down as well. So always make sure these match up. That's a common error is sometimes you won't have, say, both of them at the end. So that's what it's going to load in and what I'm going to type next is thumbLoader.contentLoaderInfo. I'm going to add an EventListener.

It's going to listen for an Event COMPLETE. So once that image has been fully loaded in, fire off this function called thumbLoaded. Just like that, I'll create the function, thumbLoaded Event, and just be mindful that this word needs to match up with this word, but that's the type of method that we're using.

And then void, open curly brace, closing curly brace and now I can go ahead and type in what I need to type in. So I'm going to go ahead and add the thumbnail to the allThumbnails instance. So remember how I named that earlier? If I just minimize this by clinking in that gray bar, right down here this little dot if I select it allThumbnails, that's what I'm referencing. So I'll open up my Actions panel because for the allThumbnails, I want to addChild.

So I'm adding a Child and all that means is I'm just going to go ahead and attach this thumbLoader content, whatever it is, in fact, I'll just copy that word and I'm going to paste it right in here. It's going to add whatever content this has to the allThumbnails, so right where that dot is. So let me go ahead and do a Test Movie. I can see,sure enough, there is the little thumbnail. It loads in the correct spot and everything is looking great.

And I'm just going to do a little clean up now. I have plenty of spaces in here, some line breaks, I'll just go ahead and condense this down, because this loads in one thumbnail. And in essence, what I've created is my own UILoader component. So it's definitely really cool and this is actually more flexible as well, because I can control different properties of it. But if you want to load in another one, what you can do is copy that code, paste it just below and you might call this one thumbLoader2.

So thumbLoader2, I'm going to change that name everywhere, thumbLoaded2. So I just went in and changed the name of that function as well. And for thumbLoader2, I want to load in another image, cafebuena. That's another image in this folder right here. So it's going to place it right on top of my basketball image. So I really don't want that. What I want to do instead is thumbLoader change it's x position = 100.

So move it over 100 pixels, so it's not on top of this one. That's all I need to do. I can check the syntax and it says all the code looks good, and let's do a Test Movie. And as you can see, I don't see it right now. So there is obviously a problem and since it didn't throw an error, I know it's an issue with one of my instance names. And what's happening is I've change this to thumbLoader in most places, except for right here.

So right here, thumbLoader2 is where you need to add it. And I point that out because if Flash doesn't throw an error, it's probably an issue with your instance names. So if I change that to thumbLoader2, I do a Test Movie, I can see cafebuena loads in, basketball loads in right there. So they are both loading in and it looks pretty good and even right here, these are kind of changing places, but I can go ahead and type in 2 there and I will run this one more time, just by hitting Command+Return, I can see that they are in their appropriate places.

So again, all this content is now external from the Flash file, making this initial file size really small and then you'll see the content start to load in. Now I can start to add many different thumbnails down here if I want to, but all that content is external. It makes my initial file size small and it just serves up content faster to the user.

Show transcript

This video is part of

Image for Creating a Portfolio Web Site Using Flash CS4 Professional
 
Expand all | Collapse all
  1. 1m 41s
    1. Welcome
      1m 7s
    2. Using the exercise files
      34s
  2. 24m 1s
    1. Understanding web design
      2m 44s
    2. Creating a Flash file
      3m 18s
    3. Importing a design from Photoshop
      7m 45s
    4. Optimizing the design
      10m 14s
  3. 13m 59s
    1. Dynamically loading an image
      3m 37s
    2. Loading random images
      10m 22s
  4. 47m 38s
    1. Creating menu buttons
      8m 18s
    2. Adding functionality to buttons
      8m 56s
    3. Adding navigation
      9m 45s
    4. Creating transitions
      12m 0s
    5. Simplifying code
      8m 39s
  5. 26m 11s
    1. Creating web site sections
      7m 41s
    2. Dynamically loading sections
      11m 7s
    3. Linking to web sites and email addresses
      7m 23s
  6. 29m 18s
    1. Setting up a portfolio
      12m 31s
    2. Adding functionality to thumbnails
      10m 10s
    3. Allowing for unlimited thumbnails
      6m 37s
  7. 41m 17s
    1. Benefits of using XML
      4m 42s
    2. Loading XML content
      4m 34s
    3. Sorting XML content
      7m 32s
    4. Displaying XML content
      7m 35s
    5. Using XML to create thumbnails
      8m 41s
    6. Displaying content with thumbnails
      8m 13s
  8. 25m 59s
    1. Creating and importing video
      9m 47s
    2. Adding a Full Screen button
      4m 15s
    3. Creating custom video controls
      4m 50s
    4. Adding functionality to video thumbnails
      7m 7s
  9. 9m 12s
    1. Adding audio to buttons
      5m 30s
    2. Adding audio to dynamically created buttons
      3m 42s
  10. 21m 19s
    1. Applying professional transitions
      9m 26s
    2. Creating a preloader
      8m 56s
    3. Publishing a web site
      2m 57s
  11. 3m 15s
    1. Reviewing the "corporate" Flash site
      1m 40s
    2. Reviewing the "artistic" Flash site
      1m 35s
  12. 12s
    1. Goodbye
      12s

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 Portfolio Web Site Using Flash CS4 Professional.

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