조회 수 158 추천 수 0 댓글 4
Atachment
첨부 '2'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

+_+??





?
  • profile
    후루룹쩝쩝 2015.03.16 18:57
    그 반대 입니다..... 까여나가는 거죠
  • profile
    사람님 2015.03.16 18:59

    코드


    package {

    import flash.display.MovieClip;
    import flash.geom.Point;
    import flash.events.Event;


       public class Main extends MovieClip {

          private var p1: Point;
          private var p2: Point;
          private var progress: Number = 0;

          private var points: Array;
          private var index: int = 0;

          // 생성자
          public function Main() {
             addEventListener(Event.ADDED_TO_STAGE, Start);
          }

          // 초기화합니다.
          private function Start(e: Event): void {
             removeEventListener(Event.ADDED_TO_STAGE, Start);

             // 드로잉에 필요한 꼭지점들을 배열로 가지고 있습니다.
             points = new Array();
             points.push(new Point(stage.stageWidth / 2, 0));
             points.push(new Point(stage.stageWidth, 0));
             points.push(new Point(stage.stageWidth, stage.stageHeight / 2));
             points.push(new Point(stage.stageWidth, stage.stageHeight));
             points.push(new Point(stage.stageWidth / 2, stage.stageHeight));
             points.push(new Point(0, stage.stageHeight));
             points.push(new Point(0, stage.stageHeight / 2));
             points.push(new Point(0, 0));
             points.push(new Point(stage.stageWidth / 2, 0));

             // 0번째 점이 시작점입니다.

             // 다음 점을 구하는 함수를 만듭니다.

             // 다음 점을 구할 때마다 인덱스를 1씩 증가시킵니다.
             p1 = points[0];
             p2 = nextPoint();

             addEventListener(Event.ENTER_FRAME, Update);
          }

          // 시간이 업데이트될 때마다 호출됩니다.
          private function Update(e: Event): void {

             // 진행도를 0.01 늘립니다. 진행도는 매 꼭지점마다 0~1사이의 값이 됩니다.
             progress += 0.01;

             // 이전프레임에서 그린 그래픽을 제거합니다.
             graphics.clear();

             graphics.beginFill(0xff0000, 0.5);

             // 스테이지 중심점에서 그리기시작합니다.
             graphics.moveTo(stage.stageWidth / 2, stage.stageHeight / 2);

             // index까지 그려줍니다.
             for (var i: int = 0; i < index; i++) {
                graphics.lineTo(points[i].x, points[i].y);
             }

             // 진행도만큼 그려줍니다.
             graphics.lineTo(p1.x, p1.y);
             graphics.lineTo(p2.x * progress + p1.x * (1 - progress), p2.y * progress + p1.y * (1 - progress));

            // 진행도가 1 이상이 되면 0으로 바꾸어주고 드로잉할 다음 점을 구합니다.

            // 전체의 진행도는 (index+progress)/점 배열 길이로 구할 수 있습니다.
             if (progress >= 1) {
                progress = 0;
                p1 = p2;
                p2 = nextPoint();
                if (p2 == null) {
                   removeEventListener(Event.ENTER_FRAME, Update);

                  // 다음 점이 없으면 쿨 타임이 완료된 것입니다.
                   // DO SOMETHING !
                }
             }
          }

          // 인덱스를 1 늘리고 다음 점을 구합니다.
          private function nextPoint(): Point {
             index++;

             if (index == points.length) {
                return null;
             }

             return points[index];
          }

       }

    }

  • profile
    사람님 2015.03.16 19:02
    헐 탭 다 날라가버리네;;
  • profile
    후루룹쩝쩝 2015.03.16 20:31

    이해를 못하셨나보군.... 역시..;;


    그냥 제가 될 때까지 해보죠 뭐;


  1. 제2회 인디사이드 게임제작대회 출품작 리스트.

    Date2016.10.24 By인디사이드운영자 Views27984 Votes0
    read more
  2. 인디사이드 활동 규정.(ver.20160119)

    Date2015.02.16 By천무 Views29745 Votes1
    read more
  3. 혹시 '이터니티' 라는게임 갖고 계시는분 있을까요?

    Date2026.02.01 ByDoingDogu Views441 Votes0
    Read More
  4. [스마일게이트 퓨처랩] 비버롹스 2025 온라인 전시관 오픈! (12/1~12/14)

    Date2025.12.01 By스마일게이트퓨처랩 Views387 Votes0
    Read More
  5. [스마일게이트 퓨처랩] 비버롹스 with 산나비! 게임 시연과 함께 굿즈 스토어까지!

    Date2025.11.26 By스마일게이트퓨처랩 Views371 Votes0
    Read More
  6. [스마일게이트 퓨처랩] 놓치면 후회! 비버롹스 2차 얼리버드 티켓 절찬 판매중!

    Date2025.11.20 By스마일게이트퓨처랩 Views393 Votes0
    Read More
  7. 코리아 인디게임 쇼케이스가 떴다

    Date2025.10.20 Bygls2024 Views432 Votes0
    Read More
  8. GGDC 2025 글로벌게임개발자컨퍼런스 2차 공개!

    Date2025.10.18 Byggdc Views399 Votes0
    Read More
  9. BEAVER ROCKS 2025 슈퍼 얼리버드 티켓 오픈!

    Date2025.10.17 By스마일게이트퓨처랩 Views385 Votes0
    Read More
  10. 이제 여기 다운로드는 다 막힌건가

    Date2025.10.12 ByRedgm Views663 Votes0
    Read More
  11. 안녕하세요

    Date2025.09.30 By우사준 Views432 Votes0
    Read More
  12. 혹시 이 사이트의 등업관련해서 질문이있는데요

    Date2025.09.23 By이드냐 Views604 Votes0
    Read More
  13. GGDC 2025 글로벌 게임 개발자 컨퍼런스

    Date2025.09.18 Byggdc Views849 Votes0
    Read More
  14. NGC2025 사전등록 이벤트 소식~ ^^

    Date2025.09.18 By태사자 Views365 Votes0
    Read More
  15. [대구디지털혁신진흥원] (NGC2025) NEXT GAME CONFERENCE 2025

    Date2025.09.12 By태사자 Views410 Votes0
    Read More
  16. [스마일게이트 퓨처랩]BEAVER ROCKS 인디게임&컬처 페스티벌, 2025 전시팀 모집

    Date2025.08.04 By스마일게이트퓨처랩 Views451 Votes0
    Read More
  17. [전남정보문화산업진흥원] 게임개발 취업 부트캠프

    Date2025.07.31 By유니버스 Views410 Votes0
    Read More
  18. 충청권 인디게임 공모전<인디유>

    Date2025.07.24 ByCBGC Views453 Votes0
    Read More
  19. 인디게임에 대한 간단한 생각

    Date2025.07.18 By철수와미애 Views760 Votes0
    Read More
  20. [스마일게이트 퓨처랩]스마일게이트 인디게임 프로토타이핑 챌린지 모집 (~7/31)

    Date2025.07.17 By스마일게이트퓨처랩 Views437 Votes0
    Read More
  21. 2025 충북글로벌게임센터 게임기업 신규 입주 모집(~7. 25.)

    Date2025.07.07 ByCBGC Views452 Votes0
    Read More
  22. 2025 충북글로벌게임센터 [충북게임아카데미] 교육생 모집(~6. 26.)

    Date2025.06.17 ByCBGC Views455 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 1177 Next
/ 1177


[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)