# this example is adapted from http://mxprototypes.free.fr .flash bbox=600x500 version=6 fps=10 name="helice.swf" compress background=#333333 .circle rouge r=2 color=blue fill=red .edittext log width=480 height=600 text="Merci http://mxprototypes.free.fr" .put log 6 5 .circle red r=8 blue fill=red .sprite sp .put red .end .put sp 60 60 .action: var m=_root; function helice(speed,pales,xAmp,yAmp,centreX,centreY) { if (m.sp.i_helice == null) m.sp.i_helice = 0; if (m.sp.i_helice >= 360) m.sp.i_helice = 0; else m.sp.i_helice += speed; m.sp._x = Math.sin(m.sp.i_helice * Math.PI/180)* xAmp * Math.sin(pales * m.sp.i_helice * Math.PI/180)+centreX; m.sp._y = Math.cos(m.sp.i_helice * Math.PI/180)* yAmp * Math.sin(pales * m.sp.i_helice * Math.PI/180)+centreY; } _root.onEnterFrame=function(){ helice(4,3,200,200,m._xmouse, m._ymouse); }; .end .end # end .flash