달을 드래그해서 지구주위에서 돌려보세요.




※ 저작자의 허락 없는 불펌을 금합니다..





===================================================================
코드
=======

curveTo로 원호 그리기 연구하다가 실패해서 삼각함수로 떼웠더니 많이 지저분하네요..


container.graphics.lineStyle(0,0xff0000);
 container.graphics.moveTo(sim1.x,sim1.y);
    container.graphics.lineTo(sim1.x+Math.cos(-1*angle)*20*markof(-1*angle), sim1.y+Math.sin(-1*angle)*20*markof(-1*angle));
    container.graphics.moveTo(sim1.x,sim1.y);
    container.graphics.lineTo(sim1.x+Math.cos(90/180*Math.PI*(1+markof(-1*angle)))*20, sim1.y+Math.sin(90/180*Math.PI*(1+markof(-1*angle)))*20);
 
 container.graphics.lineStyle(0,0xff0000,0);
 container.graphics.beginFill(0xffff00);
 container.graphics.moveTo(sim2.x,sim2.y+20);
 for(var lati:int = 90 ; lati>=-90 ; lati-=10) {
  container.graphics.lineTo(sim2.x+Math.cos(lati/180*Math.PI)*Math.cos(-1*angle)*20*markof(-1*angle) , sim2.y+Math.sin(lati/180*Math.PI)*20);
 }
 for(var i:int = 0 ; i<=18 ; i++) {
  container.graphics.lineTo(sim2.x+Math.cos((i*10-90)/180*Math.PI)*20*markof(angle) , sim2.y+Math.sin((i*10-90)/180*Math.PI)*20);
 }
 container.graphics.endFill();




+ Recent posts