Join Paul Trani for an in-depth discussion in this video Loading random images, part of Creating a Portfolio Web Site Using Flash CS4 Professional.
One thing you will always want to consider is how to keep your site fresh…and visitors returning.…One easy way to do this is by loading in different content for each visit.…And that's what I want to do, in this case.…I want to load in a different background each time the page is refreshed.…Okay, and I really want to pick from a pool of about 10 backgrounds I…already have set up.…So let's go ahead and take a look at how this is currently set up.…The background is being loaded in, using this UILoader component.…
So if I go to Window down to Component Inspector, you can see that the source…says that it's pulling from images/Bkgd1.jpg.…Well, it's not realistic from you to come in here and change this every 15…minutes and then republish the file.…But I could, I guess, do that, but what you're probably thinking,…"There should be an easier way," and there is.…And this way is done in ActionScript.…Okay, so I'm going to use Flash's programming language to change this number here.…
I'm going to pick a random number from 1-10, and then replace that number.…
- 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
Skill Level Intermediate
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
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.