# Resolve for me this code \>\_\<

**URL:** <https://forum.kirupa.com/t/resolve-for-me-this-code--/75249>\
**Category:** flash\
**Created:** [January 7, 2005, 4:16am UTC](https://forum.kirupa.com/t/resolve-for-me-this-code--/75249 "2005-01-07T04:16:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bodoi](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@Bodoi](https://forum.kirupa.com/u/Bodoi)\
**Post date:** [January 7, 2005, 4:16am UTC](https://forum.kirupa.com/t/resolve-for-me-this-code--/75249/1 "2005-01-07T04:16:55Z")

</div>

wid=150;  
heigh=80;  
var x3,y3,x1,y1,x2,y2,x4,y4,x5,y5;  
x1=Stage.width/2-150;  
y1=Stage.width/2-150;  
x2=x1+wid;  
y2=y1;  
x3=x2+wid;  
y3=y1;  
x4=x1+wid/2;  
y4=y1+Math.sin(Math.PI/3)\*wid;  
x5=x4+wid;  
y5=y4;  
Ball1();  
function Ball1()  
{  
var ball1\_mc:MovieClip;  
ball1\_mc=\_root.createEmptyMovieClip(“newMC”,1);  
angle=0;  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x1;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y1;  
ball1\_mc.beginFill(0xCCFFCC,50);  
ball1\_mc.moveTo(x,y);

ball1\_mc.lineStyle(0,0xFF0000,90);  
angle=0;  
i=0;  
ball1\_mc.onEnterFrame=function()  
{  
if (angle\<6.2)  
{  
angle+=0.1;  
trace(angle);  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x1;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y1;  
ball1\_mc.lineTo(x,y);  
}else  
{  
delete this.onEnterFrame;  
angle=0;  
ball1\_mc.endFill();  
Ball2();  
}  
}  
}

function Ball2()  
{  
var ball2\_mc:MovieClip;  
ball2\_mc=\_root.createEmptyMovieClip(“newMC2”,2);  
angle=0;  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x2;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y2;  
ball2\_mc.moveTo(x,y);  
ball2\_mc.beginFill(0xACACAC,40);  
ball2\_mc.lineStyle(0,0xFF0000,90);  
angle=0;  
i=0;  
ball2\_mc.onEnterFrame=function()  
{  
if (angle\<6.2)  
{  
angle+=0.1;  
trace(angle);  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x2;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y2;  
ball2\_mc.lineTo(x,y);  
}else  
{  
delete this.onEnterFrame;  
angle=0;  
Ball3();  
ball2\_mc.endFill();  
}  
}  
}

function Ball3()  
{  
var ball3\_mc:MovieClip;  
ball3\_mc=\_root.createEmptyMovieClip(“newMC3”,3);  
angle=0;  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x3;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y3;  
ball3\_mc.moveTo(x,y);  
ball3\_mc.beginFill(0x0C0C0C,40);  
ball3\_mc.lineStyle(0,0xFF0000,90);  
angle=0;  
i=0;  
ball3\_mc.onEnterFrame=function()  
{  
if (angle\<6.2)  
{  
angle+=0.1;  
trace(angle);  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x3;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y3;  
ball3\_mc.lineTo(x,y);  
}else  
{  
delete this.onEnterFrame;  
angle=0;  
Ball4();  
ball3\_mc.endFill();  
}  
}  
}

function Ball4()  
{  
var ball4\_mc:MovieClip;  
ball4\_mc=\_root.createEmptyMovieClip(“newMC4”,4);  
angle=0;  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x4;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y4;  
ball4\_mc.moveTo(x,y);  
ball4\_mc.beginFill(0xF9F900,40);  
ball4\_mc.lineStyle(0,0xFF0000,90);  
angle=0;  
i=0;  
ball4\_mc.onEnterFrame=function()  
{  
if (angle\<6.2)  
{  
angle+=0.1;  
trace(angle);  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x4;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y4;  
ball4\_mc.lineTo(x,y);  
}else  
{  
delete this.onEnterFrame;  
angle=0;  
Ball5();  
ball4\_mc.endFill();  
}  
}  
}

function Ball5()  
{  
var ball5\_mc:MovieClip;  
ball5\_mc=\_root.createEmptyMovieClip(“newMC5”,5);  
angle=0;  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x5;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y5;  
ball5\_mc.moveTo(x,y);  
ball5\_mc.beginFill(0x454545,40);  
ball5\_mc.lineStyle(0,0xFF0000,90);  
angle=0;  
i=0;  
ball5\_mc.onEnterFrame=function()  
{  
if (angle\<6.2)  
{  
angle+=0.1;  
trace(angle);  
x=Math.sin(angle)\*heigh+Math.cos(angle)\*heigh+x5;  
y=Math.cos(angle)\*heigh-Math.sin(angle)\*heigh+y5;  
ball5\_mc.lineTo(x,y);  
}else  
{  
delete this.onEnterFrame;  
angle=0;  
ball5\_mc.endFill();  
}  
}  
}

wid=distance between 2 near circle.  
heigh=radius of a circle.
