[질문] loadMovie를 for문으로 묶을수 있나요?
회전력
this.m01.n01.loadMovie(../photo/s001/01.jpg);
this.m01.n02.loadMovie(../photo/s001/02.jpg);
this.m01.n03.loadMovie(../photo/s001/03.jpg);
this.m01.n04.loadMovie(../photo/s001/04.jpg);
this.m01.n05.loadMovie(../photo/s001/05.jpg);
this.m01.n06.loadMovie(../photo/s001/06.jpg);
this.m01.n07.loadMovie(../photo/s001/07.jpg);
this.m01.n08.loadMovie(../photo/s001/08.jpg);
this.m01.n09.loadMovie(../photo/s001/09.jpg);
this.m01.n10.loadMovie(../photo/s001/10.jpg);
this.m01.n11.loadMovie(../photo/s001/11.jpg);
this.m01.n12.loadMovie(../photo/s001/12.jpg);
this.m01.n13.loadMovie(../photo/s001/13.jpg);
this.m01.n14.loadMovie(../photo/s001/14.jpg);
this.m01.n15.loadMovie(../photo/s001/15.jpg);
this.m01.n16.loadMovie(../photo/s001/16.jpg);
this.m01.n17.loadMovie(../photo/s001/17.jpg);
this.m01.n18.loadMovie(../photo/s001/18.jpg);
this.m01.n19.loadMovie(../photo/s001/19.jpg);
this.m01.n20.loadMovie(../photo/s001/20.jpg);
this.m01.n21.loadMovie(../photo/s001/21.jpg);
this.m01.n22.loadMovie(../photo/s001/22.jpg);
this.m01.n23.loadMovie(../photo/s001/23.jpg);
this.m01.n24.loadMovie(../photo/s001/24.jpg);
this.m01.n25.loadMovie(../photo/s001/25.jpg);
this.m01.n26.loadMovie(../photo/s001/26.jpg);
this.m01.n27.loadMovie(../photo/s001/27.jpg);
this.m01.n28.loadMovie(../photo/s001/28.jpg);
이렇게 붉은 블록이 하나씩 늘어납니다.
이걸 for문으로 묶을수 있을까요?
-
해가빛
이런 좋은 방법이 ^^ 감사
-
아이돌
수다님 감사합니다 for문에 대해 좀 알것같습니다^^
-
미나
for (var i = 0; i29; i++) {
for (var j = 0; j29; j++) {
this[\m\+i][\n\+j].loadMovie(\../photo/s\+i+\/\+j+\.jpg\);
};
};
입니다. for 설정에서 변수 잘못쓰면 무한으로 돌아가요 조심~
[\문자\+변수] 앞에는 . 를 안써요. -
과꽃
2중 for문이 이런식인가요?
for (var i = 0; i29; i++) {
for (var j = 0; i29; i++) {
this.[\m\+i].[\n\+j].loadMovie(\../photo/s\+i+\/\+j+\.jpg\);
};
}; -
해찬나래
감사합니다 한번 해볼께요^^
-
사이
for(var i=0;i29;i++){
this.m01[\n\+i].loadMovie(\../photo/s001/\+i+\.jpg\);
}
시작값과 끝값 은 알맞게 설정하시구요
그리고 m01 도 순차적으로 변한다면 2중for 문으루 하세요.