|
Animation class uses Algebra,Geometry,Trigonometry,Calculus, Biology, Chemistry and Physics.
Creating the animations above leads to knowledge of vectors.
circle_mc.startDrag(true); _root.onEnterFrame = function() { var myRadians:Number = Math.atan2((circle_mc._y - myReferencePoint_mc._y), (circle_mc._x - myReferencePoint_mc._x)); myDegrees_txt.text = Math.round(myRadians * 180 / Math.PI) + " degrees"; // // draw line to show angle // _root.clear(); _root.lineStyle(1, 0x000000, 100); _root.moveTo(myReferencePoint_mc._x, myReferencePoint_mc._y); _root.lineTo(circle_mc._x, circle_mc._y); };
Do you want to win an X Box 360?
Create the best computer game in class.
Austin Kline's Fish Game
X Box 360 Winner 2010
Control the game with the arrow keys.
Up and Down use Alt with the arrow keys.
A coin is needed for your score total to show at the end of the game.
Jennifer Opel - Argyle H.S. - Runner Up
Refresh - F5
Algebra: Temperature Conversions
function changeTemp() { boilingPoint=212; absoluteZero=-460; if (temperature.text>boilingPoint) { temperature.text=boilingPoint; } else if (temperature.text temperature.text=absoluteZero; } fahrenheit.text=temperature.text; celsius.text=Math.round((5/9)*fahrenheit.text-17.777); scalePercent=(Math.abs(absoluteZero-fahrenheit.text)/ Math.abs(absoluteZero-boilingPoint))*100; mercury._yScale = scalePercent; }Trigonometry:Start- Press F5. Use your arrow keys to turn the car.
_root.onEnterFrame = function() { if (Key.isDown(Key.LEFT)) { car_mc._rotation -= 10; } else if (Key.isDown(Key.RIGHT)) { car_mc._rotation += 10; }
// trigonometry instructions follow
var myAngle:Number = 90 - car_mc._rotation; var xchange:Number = Math.cos(Math.PI / 180 * myAngle) * 5; var ychange:Number = -Math.sin(Math.PI / 180 * myAngle) * 5;
car_mc._x += xchange; car_mc._y += ychange; };
| Physics: Press Button |
Use your arrow keys to move the spaceship. |
stop();
function startGame() { gameLevel = 1; startLevel(); }
function startLevel() { gotoAndStop("level"+gameLevel);
// start ship still ship._x = 275; ship._y = 25;
// start ship still ship.dx = 0; ship.dy = 0;
// init gravity gravity = .1;
// init fuel fuel = 100; showFuel();
// set collision points hitPoints = new Array(); hitPoints.push({x:-9,y:13}); hitPoints.push({x:9,y:13}); hitPoints.push({x:0,y:-10}); hitPoints.push({x:-8,y:-7}); hitPoints.push({x:8,y:-7});
// set landing points footPoints = new Array(); footPoints.push({x:-9,y:13}); footPoints.push({x:9,y:13});
// make array from pad clips pads = new Array(); for(i=0;i<3;i++) { pads.push(_root["pad"+i]); } }
function moveShip() { shipThrusters(); shipMovement(); checkForLand(); checkForCrash(); }
function shipThrusters() { // check thrusters and adjust speed if (fuel < 0) { ship.gotoAndStop("normal"); } else if (Key.isDown(Key.UP)) { ship.dy -= .4; ship.gotoAndStop("up"); fuel -= 2; showFuel(); } else if (Key.isDown(Key.LEFT)) { ship.dx -= .2; ship.gotoAndStop("left"); fuel -= 1; showFuel(); } else if (Key.isDown(Key.RIGHT)) { ship.dx += .2; ship.gotoAndStop("right"); fuel -= 1; showFuel(); } else {
// no thruster at all ship.gotoAndStop("normal"); } }
function shipMovement() { // gravity pulls ship down ship.dy += gravity;
// move ship ship._x += ship.dx; ship._y += ship.dy; }
function checkForLand() { // check to see whether both feet are on a pad // loop through both feet landed = true; for(i=0;i
// loop through all pads footDown = false; for(j=0;j
// see whether foot is on a pad if (pads[j].hitTest(ship._x+footPoints[i].x,ship._y+footPoints[i].y,true)) { footDown = true; break; } }
// if a foot in not down, then the ship has not landed if (!footDown) { landed = false; break; } }
// see whether the ship is going too fast if (ship.dy > 3.0) landed = false;
if (landed) { // made it gotoAndPlay(_currentFrame+1); gameLevel++; } }
function checkForCrash() { // not landed, so check for crash if (!landed) {
// loop through all hit points for(i=0;i
// check hit point against the ground if (activeground.hitTest(ship._x+hitPoints[i].x,ship._y+hitPoints[i].y,true)) { ship.gotoAndPlay("explode");
// lost life, or game over gotoAndPlay("lost ship"); break; } } } }
function showFuel() { gauge.meter._xscale = fuel; }
berg_bone_hand_2.jpg
For example, a man walking will require a body that was created with knowledge
of anatomy. Students render the bones, muscles and body movement
daily upon entering class.
|