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

Creating a Portfolio Web Site Using Flash CS4 Professional

Displaying content with thumbnails


From:

Creating a Portfolio Web Site Using Flash CS4 Professional

with Paul Trani

Video: Displaying content with thumbnails

I'm now going to display the appropriate content from the thumbnails and I want to make everything XML-driven, because currently how this is set up is this image is hardcoded in the Flash file, so is this text, as well as the description. So I want to take care of that first. Also notice, as I come down here over these thumbnails, I need to implement the hand cursor, just so users know that these are buttons. So I need to make these movie clips work like buttons.
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

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 Portfolio Web Site Using Flash CS4 Professional
4h 4m Intermediate Feb 17, 2010

Viewers: in countries Watching now:

Flash and ActionScript are ideal for creating flexible, easily updatable web sites that are both unique in design and small in file size. In Creating a Portfolio Web Site Using Flash CS4 Professional, Adobe Certified Instructor Paul Trani shows how to exploit Flash to create a web site that showcases work to clients and prospective employers. Find out how to add dynamic navigation, animation, and video to a page, and how to load, sort and display XML that enables portfolio content to be updated without opening Flash. This course is designed to take your existing tweening skills and gotoAndPlay code and walk away with a fully functional Flash site. Exercise files accompany the course.

Topics include:
  • Optimizing and publishing a Flash web site
  • Designing a professional photo or video portfolio
  • Adding button interactivity
  • Adding functionality to portfolio thumbnails
  • Displaying content with XML
  • Adding audio to portfolio presentations
Subjects:
Web Web Design Projects
Software:
Flash Professional
Author:
Paul Trani

Displaying content with thumbnails

I'm now going to display the appropriate content from the thumbnails and I want to make everything XML-driven, because currently how this is set up is this image is hardcoded in the Flash file, so is this text, as well as the description. So I want to take care of that first. Also notice, as I come down here over these thumbnails, I need to implement the hand cursor, just so users know that these are buttons. So I need to make these movie clips work like buttons.

Now, if I do select one of these or any one of these, notice how it displays content from this very first image. So, I need to make sure all this information is being pulled from the correct XML and it's not hardcoded, because believe it or not, this information, as you click, is all hardcoded, pointing to that first image and its related text. Let me close that. I'm going to go into my portfolio file.

The first thing I'm going to do is I'm going to make sure this UILoader does not reference that basketball image. So I'm going to go to Window, down to Component Inspector, and right in here, this is what I mean by hardcoded. I would have to actually open up Flash and type in a new name, if I wanted to change this. That's what's meant by hardcoded, but just, all I need to do is get rid of that and that's no longer an issue now, because I don't want it to display anything when you first go to the Portfolio section.

Next thing I need to do is delete the text in these text fields, right here and right here. I do want to make sure that this text, in the Properties panel, that the Behavior is Multiline, because since I'm going to be loading in XML, I could have multiple lines of XML content. So I want to make sure this is set to Multiline. So, another thing I need to do is make sure this button is pressed as well. So I want to render text as HTML. All right! So that's looking pretty good.

Those two have been cleared out, as well as the image, and of course, that information doesn't show up. Okay, now I'm going to go ahead and fix this issue. Those movie clips, well, I want them to look like buttons or at least act like buttons. So, I'm going to select the first frame in the AS layer and I'm going to go to Window, down to Actions to open up my Actions panel and I'm going to pin my code, just so it doesn't move if I select something else. All right.

So right in here, in this loadThumbnail function, this loadThumbnail function gets called many, many times, each time where the thumbnail that gets loaded in. What I want to do is I want to make my all thumbnails act like a button. That's as easy as typing allThumbnails.buttonMode, capital M, = true. So, I'm saying, "Hey, you know what? I know you're a movie clip, but work like a button." So, give me the hand cursor and everything should be okay.

So I'll do a Test Movie. Now when I roll over these, sure enough, I get that hand and it's looking good, but I still have this issue of all of these thumbnails displaying wrong content. So let's take a look at that. Right in my loadThumbnail function, right down in here, when you click on the image, this is the hardcoded part. So it's pointing to the array, but it's taking the very first element and displaying it. So, this stuff has to go.

So what I want to do is I want to create some variables, and I'm going to create some variables right in here. So not inside of the Event.COMPLETE, EventListener or anything, but I want to write this code just above that and they are going to be variables. So these variables are going to hold the specific array information. So var thisLargeImage is going to be a String, and it's going to be equal to the largeImageArray, and then I do my two brackets.

Since this is an array, I'm going to do these two brackets, and just like I'm getting the thumbnail image array, the appropriate image number, I want to do the same thing right here. So it's just a matter of copying that line and pasting it right in here. I also want you to confirm that this LargeImageArray is spelled correctly, so up at the top of the code, largeImageArray is right there. So I want to do the same thing for the titleArray. So I'll just copy that, scroll down and create another variable.

This title is also a String and it's going to be equal to, and I'm just going to paste in what I just copied, titleArray. I want to do my brackets and within my brackets, I'm going to copy and paste in imageNum. Next up, I have, at the very top, if I scroll up to the top, descriptionArray. So I'm going to copy that again, scroll back down and type in thisDescription, and it's a String, and it's going to be equal to, add descriptionArray, my brackets, and then that image number as I copy and paste it.

So this actually stores the appropriate info for the thumbnail, regardless of what number thumbnail it is. So these variables store that information. Now, I need to use these variables. So thisLargeImage, I'm going to copy that, and where I want to put it is right down in here, for the source of the largeUILoader. So right in there, I'm going to go ahead and paste thisLargeImage.

Same thing for the title. I'll just do a Command+C and for the selected title, I'm going to make the text equal to thisTitle. Same thing for the description. I'm going to copy that variable and paste it for the text property for the selected description. All right! Test the movie. So, I'll just go ahead and click on one of these and it displays the appropriate image. So it's working great now. All of this content is coming from the XML.

There are a couple issues, it looks like. If you take, for instance, this description right here, notice that there is some HTML in there, some HTML code. I point that out, because you can have HTML code in your XML file, some basic HTML 1.1 code. So links, making a word Bold, things like that, but it's really appropriate for this because you might make a website design have an image of it in the center area. You want to give the user the ability to click out to that specific website.

So I need to render this HTML in Flash. So I'm going to close this file, and again, I'm going to just minimize that Actions panel by clicking that gray bar and I'm going to select this text box, because I want to point out that I need to make sure this is set to Render text as HTML. I'm going to open up my Actions panel again. The last thing I need to do is type in htmlText. It changes colors, confirms that it's typed correctly, and now Flash will render out this text as HTML text.

So let's run this, Test Movie. Now if I go into this take flight image, I can see the HTML code is gone and it gives me a link. So I have a hand cursor, and if I click on it, it's going to take me out to that specific site. So again, all of this content is coming from the XML. I can easily add to the XML, all I want to remove from it, edit any of this text. It's all XML-driven. I no longer have to open up Flash to update my site. Everything is external, really making my site flexible.

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


Expand all | Collapse all
Please wait...
Q: While following along with the course, I encountered the following error in Flash CS4: 
1120: Access of undefined property content_mc.
What is causing this error?
A: Flash is looking for something (the content movieclip) with the instance name “content_mc” but it is not finding it. Select the content movieclip on the stage. In the Properties panel give it an instance name of “content_mc”. Make sure there are no spaces before or after. That should resolve the error.
Q: What is the best strategy for integrating 720/60P HD video into a website? Would creating a blank page that opens in full HD resolution be the best way to view the full quality of the HD video file?
A: A video file that large would just be unreasonable for most users to open.  These settings are a good place to start: 600x400is
24-25fps
Audio: 128kbps
Codec: On2VP6
Bitrate level: 1,000kbps
Bitrate Encoding: VBR These are just recommendations, and can be modified to preference. Also keep in mind that in Flash, one of the buttons that can be added is a full screen button, which is part of the skins.
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 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 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