Date: Fri, 22 Feb 2008 18:33:12 -0600 (CST) From: Mark Jacobson To: 810-088-09-spring@uni.edu Subject: Quiz THREE on Wednesday February 27th... Cars, Wheels, Hi 088 students, Quiz 3 will be next Wednesday. I will review for the quiz three some on Monday and probably have a handout too. Quiz three will focus mainly on the Cars and the WheelImage and the RotatingWheelSymbol. ---- ---------- ------------------- theCarSymbol is a Library reusable asset. theCarSymbol contains two instances of RotatingWheelSymbol. theCarSymbol consists of or is composed of at least 3 things: 1. an instance of RotatingWheelSymbol that you have given the name rearWheel or rearTire for its instance name. 2. an instance of RotatingWheelSymbol that you have given the name frontWheel or frontTire for the instance name of this 2nd instantiation of the RotatingWheelSymbol Library blueprint for possibly 100s of animated wheels. 3. some graphics drawing with pencil or brush or using ovals and rectangles to make some vehicle frame besides just the two wheels. theCarSymbol consists of or is composed of at least 3 things: theCarSymbol contains two instances of RotatingWheelSymbol. 1. rearWheel is the name of one of them, and 2. frontWheel might be the name of the other one. 3. the rest of theCarSymbol is unnamed, bumpers or windows or whatever you draw around and on top of those two instances of RotatingWheelSymbol. You put an instance of theCarSymbol on the Stage in a Keyframe, and the first thing you do is give it a name. theCar might be a great instance name for your instance of theCarSymbol Library reusable asset. You do NOT EVER PUT ANY WHEELS on the stage in a layer. Guess what. The car has wheels. They are part of theCarSymbol. Put a car on the stage. That car has wheels as PART OF IT. on (release) { this.theCar.frontWheel.play(); this.theCar.backWheel.play(); play(); } on (release) { this.theCar.frontWheel.stop(); this.theCar.backWheel.stop(); stop(); } Why do we have to give a name to theCarSymbol? So we can talk to it, so we can refer to it, so we can control it with our ActionScript 2.0 code! And so we can also get inside theCar and reference its frontWheel and backWheel or maybe we named them frontTire and backTire. The instances of RotatingWheelSymbol contained in theCarSymbol have to have names! They are NESTED INSIDE of theCarSymbol, as the handouts explain. The instance of theCarSymbol: 1. it HAS an unnamed body and frame of some sort, with perhaps bumpers and/or windows and even door handles, and 2. it HAS a rearWheel, and 3. it HAS a frontWheel. My examples are use the name theCar as the instance name for theCarSymbol. Everyone in my class is an instance of human being. You HAVE two eyes, two arms, two legs. You have been given an INSTANCE NAME that I will use when I hand back quiz two on Monday. This review of the car assignment handouts and concepts should be very helpful in preparing for quiz two and consolidating your understanding of some challenging Flash concepts. http://www.cs.uni.edu/~jacobson/flash/ Mark