Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

All Eyes Follow Target Rotation Tutorial

Learn a very efficient method of rotating multiple objects on stage. We are using Flash Actionsctipt 3.0 in this lesson which is suitable for online game programming and cool user interactive animations. var eyeArray:Array = [eye1, eye2, eye3, eye4, eye5, eye6]; stage.addEventListener(MouseEvent.MOUSE_MOVE, allEyesOnMe); function allEyesOnMe(event:MouseEvent):void { for(var eye:String in eyeArray){ var mousdiff_a:Number = mouseY - eyeArray[eye].y; var mousdiff_b:Number = mouseX - eyeArray[eye].x; var radians = Math.atan2(mousdiff_a,mousdiff_b); var degrees = radians / (Math.PI / 180); eyeArray[eye].rotation = degrees; } }
thumb

Flash Videos

Animation Techniques

Animated MovieClip ButtonsFrame Rate Tutorial Script Flash SpeedMultiplane Parallax Easing Effects AnimationHalloween Holiday Scene Animation Flying BatsColor and Shape TweeningHalloween Holiday Scene Flying Broom WitchReverse or Rewind Timeline AnimationsGravity String Animation TutorialTwinkling Animated StarfieldAnimated Electric Storm Lightning Effects3D Spirographs DNA Wormholes Spirals TubesSliding Doors Animation TutorialMilitary Radar Screen Animation TutorialParticle Effect Basic Fireworks ExplosionsPlanet Orbit AnimationLearn Transition Effect AnimationsKeyframe MaskingGuide LayersTrue 3D Object Interactive AnimationsSparkle Glimmer Twinkle AnimationsCustom 3D Model AnimationsImport Animations from FireworksGlint Effect Tutorial Intermediate MaskingContinuous Wave TutorialHover Clip Tween Animation Follow Mouse TutorialAnimate Bones Armeture LayerRotate and Accelerate MovieclipsAnimate Helicopter Lights and Blades All Eyes Follow Target Rotation Tutorial