I am working on the portfolio section of a flash site. The page will have buttons (print ads, billboards, etc) and when the button is clicked, the jpg's corresponding to that button (anywhere from 8 to 23 jpgs somewhere between 10 to 30 KB's each) will come on screen. Each entrance will be different. What I want to do is make sure that even if a little time needs to be taken for loading something is still going on. Meaning, if I'm having 8 pictures swoop in from the top of the screen I don't want to have to wait until an individual jpeg is loaded before that picture can swoop and I especially don't want to have to wait for all the jpegs are loaded before any of them can swoop. What I am trying to figure out is what is the best combination of movie clips nested within movie clips, the "loadMovie" command, animation on the main timeline, and movie clips with a "loading" animation (used within the movieclip that would load the jpg - not as something that would take up the whole screen before any animation occurred) in order to make this puppy run smoothly. Make any sense? Thanks. DKnighte
The best way is to save all the images you want to show in a separate folder outside the folder that the main .fla file is in. For example, the images for "print ads" are all in the "print ads" folder. So you won't get cluttered in there, it's better to name them like "print ads1.jpg, print ads2.jpg..." In this way, you're not using scenes to load images, in another words, the images are not imbedded, so whe you open the site, it's not going to load any .jpgs. Only when the specific .jpg is called, as in when the button is clicked within the movie. Say the first image in the list is called Exhibition. First create a movie clip, which is where the images are going to show, say you called it "display", then in the list of the print ads, you create a static text field and type Exhibition in there, and on top of it you create a button, with alpha set to "0" so it'll be transperant, say that button is called "print ads1", (you must set that for the variable name also). For that button you set an action for it that goes something like: on (press) { loadMovie ("../print ads/print ad1.jpg", display) "print ads" is the name of the folder which all "print ads#.jpg" are in. "print ad1.jpg" is the image of the Exhibition. "display" is the name of the movie clip you created, and where the images are going to show. Thats it. Then for ever other image, you create a button and a text field. And set the action for each button in a series like ("../print ads/print ad1.jpg", display), ("../print ads/print ad2.jpg", display), ("../print ads/print ad3.jpg", display), and so on. You don't need to create another movie clip. Remember, movie clips, buttons and graphic objects you create get stored in the library, so if you deleted from the stage and you know you don't want to use it again, make sure you delete it from the library as well, or the library gets cluttered too.
Don't see what you're looking for? Try a search.
|