Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

elipse as a motion guide 1

Status
Not open for further replies.

boyfromoz

Technical User
Feb 1, 2001
469
AU
I'm trying to have make some objects float around a screen on an elyptical path. I can get objects to move on a motion guide, but I can't work out how to use an elipse as a motion guide.

How?
 
I'd forget about motion guides for this and adapt your javascript to actionScript to achieve the same result.

I set up four clips ("circle1" thru "circle4") and added this to a dummy clip...


onClipEvent (load) {
xOffset = 250;
yOffset = 200;
xSize = 150;
ySize = 100;
degrees = 0;
}
onClipEvent (enterFrame) {
for (i=1; i<=4; i++) {
_root[&quot;circle&quot;+i]._x = (xSize*Math.cos((degrees+((i-1)*90))/180*Math.PI))+xOffset;
_root[&quot;circle&quot;+i]._y = (ySize*Math.sin((degrees+((i-1)*90))/180*Math.PI))+yOffset;
}
degrees++;
}
 
Wangbar,
Can you post that fla somewhere, please....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top