Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Knowledgebase
Basic Orbit II  

Download .fla

Actionscript

var radius = 120;
var degrees = 0;

onEnterFrame = function (){
angle = degrees * (Math.PI/180);
degrees += 2;

xposition = radius * Math.cos(angle);
yposition = radius * Math.sin(angle);

moon_mc._x = xposition + earth_mc._x
moon_mc._y = yposition + earth_mc._y

updateAfterEvent();
}


© 2007 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us