Let's all thank Yegor for offering up his homework as an example. Remember the interesting / important parts of the code here:
- Using addChild to add one displayObject (MovieClips are a kind of displayObjects remember) to another allowing us to set the properties for the "parent" displayObject to affect the child
- Yegor's use of the timer class was also commendable. It's not something we covered in class but it shows that you can go out on your own, and with a little googling, get the effect you want.
- Coupling all of the property changes into a single event. Remember - Yegor had a different listener set up for each heart. During class we combined all of those into one single listener.
I saved the file as a CS4 doc. Not sure what you are all working with at home. Get the file here
Happy coding!
Jester said...
ReplyDeleteThink this might be the place to actually help get this stuff through my thick skull:
The Moron's Guide to Actionscript
http://www.actionscriptmoron.com/