- Feedback assignment: Email
note you probably already read. Preview class14.html.
Send email to jacobson@cs.uni.edu if you have feedback or preferences
or questions. A L I C E and the K O A L A bear. Puzzled? Do the
preview of class14.html Friday page.
- More changes made to the Chapter 5 Modified Program to help you
understand the chapter 5 example and ActionScript.
The hovercraft object was a big topic for today's class.
- How did we make the hovercraft go all the way across the stage?
This was demonstrated in class.
We changed the KEYFRAMES of the hovercraft symbol so that there was
a great change of location
and a greater distance between
the position of the hovercraft in Keyframe #1 and Keyframe #50.
Then the Motion Tween built into the hovercraft symbol will move farther
and we can have the hovercraft disappear off the right side of the stage
and arrive by flying onto the left side of the stage.
Problem solved! Try it with the book CD chapter 5 example, for practice.
- In the chapter 5 example, why did the hovercraft instance not have a
name? Why wasn't it even EXPORTed for ActionScript?
- The Flash stage has the following coordinate system:
x == 0 x == 550
--------------------------------------------------------- y == 0
| |
| |
| |
| |
| x == 275 |
| y == 200 |
| |
| |
| |
| |
--------------------------------------------------------- y == 400
x == 0
y == 400
When you do the following, the box will move DOWN the stage.
----
box.y = box.y + 20;
When you do the following statement, box2 would move UPWARD on the stage.
box.y = box.y - 8;
y goes from 0 to 400 on the default stage with height == 550
and width == 400.
- Please look at this day #1 application and note the X and
Y coordinates
of various locations on the Flash stage!!!
- Where is the
red
ball as you move it around the stage???
- Note .x and .y are the same
as mouseX and mouseY.
- When is X closest to 0? When is X closest to
800?
- When is Y closest to 0? When is Y closest to 600?
- What would you have to do to make the hovercraft part of the game,
and allow the player to shoot at and hit it? What would you have to do
so the hovercraft didn't always come into existence at the save .x and
.y location on the stage?
- Handout on the two different ways to ANIMATE in Flash using
ActionScript. Event.ENTER_FRAME is one approach. TimerEvent.TIMER is
the
other approach. Timer is an object.
Can you name at least two Properties, one Event, and two Methods for the Timer object?
Properties Methods Events