Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Knowledgebase
Trig Orbit With Perspective  

Download this .fla

Actionscript

nClipEvent(load){
radius=100;
perspective=100;
degrees=0;
}

onClipEvent(enterFrame){
angle=degrees * (Math.PI/180);
degrees=degrees + 2;

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

distance = 1 / (1-(zposition/perspective));

this._x=(xposition*distance) + 150
this._y=yposition + 100

this._xscale =distance*100;
this._yscale =distance*100;
}


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