Programmatic tweens, optimization, and XML
Programmed tweens are excellent not only for saving on file size, but also for handling all sorts of dynamic interactions where a reaction to an event may require an item on the screen to move in a number of unspecified directions.
These next steps will only cover a very basic use of tweens. Keep in mind that if you move on to advanced actionscripting, it may be helpful to look into more advanced ways of tweening, as Adobe's own tweening engine is quite slow.
and that you are loading in external swfs in logical places, Optimization is a simple matter of tweaking final export settings on the file. These next steps will show you how to optimized our current file.
Some ways to cut down on other size problems are detailed in the lecture material. Pay attention to the settings applied to your images and sounds - these can have a huge effect on the final size of your file, and can usually be tweaked to smaller sizes without a huge loss in quality.
XML is a great way to pass data into flash. Thankfully getting it into flash is just as easy as loading in an external file ( although some extra parsing is needed ), so here is an example of how to load in some XML info for your about page.
Taking what you know from this lab, load in your image information from an XML file in imageBox.swf. This data will replace the information contained within stuffArr in imageMain.as. In addition, when the image is loaded, tween it onto the stage via actionscript.
This task is rather easy, but there are some pieces of information I have not provided. As many heads are ( in some ways ) better than one, group work is allowed and encouraged. Blatant code copy is not, so make some effort to understand the process and re-write the code.
Submit your final lab 8 files on Friday.