The following code worked for me perfectly: ************************************************************************ ************************************************************************ ********
onClipEvent (load) { speed = 5; radius = 100; xcenter = 250; ycenter = 200; ellipticalOrbitX = 2; ellipticalOrbitY = 1; angle =120; _root.lineStyle (2); } onClipEvent (enterFrame) { _x = Math.cos (angle * Math.PI / 180) * radius * ellipticalOrbitX + xcenter; _y = Math.sin (angle * Math.PI / 180) * radius * ellipticalOrbitY + ycenter; _root.lineTo (_x, _y); angle += speed; if (angle > 359) { angle -= 360; } } ************************************************************************ ************************************************************************ ******** u can write the same code on the 1st[onClipEvent (load)] and 2nd frames [onClipEvent (enterFrame)] and write ************************************************************************ **** gotoandplay(2) ************************************************************************ **** on 3rd frame... if u 10 objects then all u hav to do is ************************************************************************ **** angle=0; angleShift=360/10; ************************************************************************ **** and in each object, ************************************************************************ **** angle=angle+angleShift; ************************************************************************ **** this will keep the objects at a perfect distance in the orbit... hope it'll be helpful 4 u... best regards RaviKiran Marella -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rutul Patel Sent: Thursday, August 10, 2006 9:01 PM To: Flashcoders mailing list Subject: [Flashcoders] need help in drawing arrow Hi people, anybody know how to write AS of drawing arrow. if anybody has can anybody tell me how?. thanks Rutul Patel _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com best regards RaviKiran Marella -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Stone Sent: Thursday, August 10, 2006 7:04 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Movement in an oval shape You can fake in with _xscale/_yscale changes... var inc = 3; _root.onEnterFrame = function() { vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center X; vStar_Object._y = (Math.sin((vStar_Object.circlePos/180)*Math.PI))*160+vStar_Object.center Y; vStar_Object.circlePos = vStar_Object.circlePos+vStar_Object.speed; // if (vStar_Object.circlePos<180) { vStar_Object._xscale -= inc; vStar_Object._yscale = vStar_Object._xscale; } else { vStar_Object._xscale += inc; vStar_Object._yscale = vStar_Object._xscale; } if (vStar_Object.circlePos == 360) { vStar_Object.circlePos = 0; } if (vStar_Object._alpha<100) { vStar_Object._alpha += 1; } }; -Andy -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Steven Sent: Thursday, August 10, 2006 9:06 AM To: 'Flashcoders mailing list' Subject: [Flashcoders] Movement in an oval shape I have written some code to move some stars in a circle. This is a snippet of the code: vStar_Object._x = (Math.cos((vStar_Object.circlePos/180)*Math.PI))*160 + vStar_Object.centerX; vStar_Object._y = (Math.sin((vStar_Object.circlePos/180)*Math.PI))*160 + vStar_Object.centerY; vStar_Object.circlePos = vStar_Object.circlePos + vStar_Object.speed; if (vStar_Object.circlePos == 360) { vStar_Object.circlePos = 0; } if (vStar_Object._alpha < 100) { vStar_Object._alpha +=1; } This seems to work just fine. Anyway I need to change this so they move in an oval shape (like an egg on its side) Not being a mathematics expert I wondered if anyone can suggest how I can amend my code to do so. Thanks Paul _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com