Integrating loaders, loading external SWFs, adding video [ 7-1 ] * External swfs and preloaders * 1. Open up your finished file from part 2 of lab 6. Name it xxx_Lab7_1.fla, with the XXX being your initials. 2. Create a new flash file. Name it "imageBox.fla". Save it in the same folder as your lab 7 file and open it up. 3. Transfer the btnBox and nextb items from the lab 7 flash file to the imageBox file. ( One way to do this is to open up two library windows using the blue two-windows-and-an-arrow button in the upper right hand corner of the library window, then drag the items from one library to the other. ) 4. Go into the image box clip in the lab 7 library, and copy all of the frames contained within. 5. Paste these frames into the main timeline of the new imageBox file. 6. Create a new loading bar the same way you did in lab 3 named "loadingClip" in the library. For the actual loading bar within loadingClip, name it "lbar" in the properties panel. 7. Rightclick on loadingClip andn select "linkage". Select "export for actionscript". 8. Enter actions window for the first frame on the actions layer and edit the code to look like this. 9. Open up the lab 7 file again. Make sure imageBox, btnBox, and nextb are deleted from the libary. Also delete the images layer. 10. Create a keyframe on the actions layer on the same frame as the "page 2" flag. 11. Add this code ( it can be modified from the code from imageBox.fla, if it saves you trouble ). - Save and test the file. * Adding video * 1. Create a new button similar to the page 1 and page 2 buttons currently in the lab 7 file. Name it "btn3" in the properties panel. 2. Make a page3 flag after the page2 stuff. Add a keyframe for the actions layer beneath it, and add frames for the buttons so they appear on this frame as well. 3. Make 3 buttons for the eventual movie: a play button, pause button, and stop button. 4. Create a new layer named "playback buttons" and add a keyframe beneath the page3 flag. Add yoru three playback buttons and name them "stopBtn", "playBtn", and "pauseBtn". 5. Open up the flash video encoder. ( It will be in the same windows start folder as flash ) 6. Download this file and add it to the video queue. Click "start cue". This will take some time, but it will transfer the video file into a .flv format, one that flash can use. ( The video encoder can do a lot more. If you're into video, play around with it some more ). 8. Make sure the video.flv file is in the same folder as your lab7 file. 7. Open up the actions panel for the frame beneath the "page3" flag, and add this code - Save the file. This video format can be done in a similar way to how you created the imageBox clip to allow you to load several different movies. * Cleanup * 1. In your lab 7 file go to the actions frame that has the code for your page buttons. Change the code to look like this. - Save and test the file. Your movie should be working, and when you click on another page button, nothing from the current page should be left over. * External Scripting * 1. Open up the imageBox.fla file again. Remove all but the first frame for the three layers 2. Click on the stage so you get the document info. In the properties panel, name the document class "imageMain". 3. Create a new file in the same folder named "imageMain.as". Double click this file to open it up in flash. 4. Cut out the script you have on the actions layer and paste it into the imageMain.as pane. 5. Edit it to look like this 6. Finally, select the btnBox on the stage and set its alpha value to 100% - Save and test the file. We have lost some of the animations for now, but that will be fixed with the next lab using programmatic tweens. * Final task * 1. Integrate a preloader for the whole site. I would advise taking a look at the actionscript 3 part of lab 4, or doing some google searching for your answer.