Part of Lesson Plan: Animating Objects Programmatically-Animating an Analog Clock face: Part1
Activity Overview / Details
- Explain to students that before an animator animates objects via script, the animator must first have a basic foundation of the scripting language.
- Explain that the students will learn some basic aspects of objects in actionscript 3.0, which marks the beginning of their unit: "Animating Objects Programmatically-Animating an Analog Clockface".
The teacher will begin by explaining object instantiation…
- An object is a “thing” like a car is a “thing”
- Objects have the ability to “do” and to “know”
- An object comes from a class (kind of like a blueprint)
- So, if your car is the object, then its “class” is of type “Car”
- The class describes the characteristics of an object including the object’s ability to “do” and to “know”
- What an object can "do" are its "functions". So if your object is a car, one function it may have would be to accelerate.
- Objects also have properties, which describe the object’s attributes. In our case, our “car” object may have a property that describes its “year”, “make” or “model”
- In order for us to even “use” an object, we need to first Instantiate it.
- Object instantiation can be best described using a car as an analogy...
Yes, your car might be the same year, make and model as your friend’s car, but your car may have more miles on it or less tread on its tires. So for us to “use” our specific object (such as myCar, and instance of the “car” class), we need to first give it a unique name, such as myCar. Lets say your friend has the same car from the same car class…In order to “use” her car to do something with it to change it in some way, we must give it a unique name such as “suesCar” (which again, is an instance of the car class).
Think of object instantiation as asking the "Car" factory to produce you a new car with a specific set of properties based on one a pre-defined blueprint (class).
Materials / Resource
No resources are included, yet.