panzerhund

02-28-2008, 12:49 PM

Hello Everyone

I got two movie clips (mc1 and mc2 ) and two looping frames, on a first frame simple code:

speed = 4

x1 = getProperty("mc1",_x)

y1 = getProperty("mc1",_y)

x2 = getProperty("mc2",_x)

y2 = getProperty("mc2",_y)

dx = x1-x2;

dy = y1-y2;

aa = Math.atan2(dx, dy);

mc_x = x1 + Math.cos(aa)* speed

mc_y = y1 + Math.sin(-aa) * speed

setProperty("mc1",_x,mc_x)

setProperty("mc1",_y,mc_y)

when testing in a flash player 5 this code makes mc1 rotating around mc2 in a flash lite player 1.x mc1 is just stuck? anybondy knows what's wrong here?:confused:

I got two movie clips (mc1 and mc2 ) and two looping frames, on a first frame simple code:

speed = 4

x1 = getProperty("mc1",_x)

y1 = getProperty("mc1",_y)

x2 = getProperty("mc2",_x)

y2 = getProperty("mc2",_y)

dx = x1-x2;

dy = y1-y2;

aa = Math.atan2(dx, dy);

mc_x = x1 + Math.cos(aa)* speed

mc_y = y1 + Math.sin(-aa) * speed

setProperty("mc1",_x,mc_x)

setProperty("mc1",_y,mc_y)

when testing in a flash player 5 this code makes mc1 rotating around mc2 in a flash lite player 1.x mc1 is just stuck? anybondy knows what's wrong here?:confused: