home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- bgnum = random(5) + 1;
- hitnum = 0;
- swnum = 1;
- name = id;
- womannum = 0;
- womanposinit = 510;
- womanypos = 280;
- showwomannum = 4;
- showaction = [];
- swomanarr = [];
- var k = 1;
- while(k <= showwomannum)
- {
- this["cloth" + k] = [];
- this["xcloth" + k] = [];
- this["ycloth" + k] = [];
- this["depcloth" + k] = [];
- this["i_cloth" + k] = [];
- this["i_xcloth" + k] = [];
- this["i_ycloth" + k] = [];
- this["i_depcloth" + k] = [];
- k++;
- }
- }
- function sndattach(sndname)
- {
- snd = new Sound();
- snd.attachSound(sndname);
- snd.start();
- }
- function clothposinit()
- {
- xclothinit = [];
- yclothinit = [];
- depclothinit = [];
- var k = 1;
- while(k <= clothnum)
- {
- if(k < 10)
- {
- cnt = "0" + k;
- }
- else
- {
- cnt = k;
- }
- xclothinit[k] = eval("cloth_" + cnt)._x;
- yclothinit[k] = eval("cloth_" + cnt)._y;
- depclothinit[k] = this["cloth_" + cnt].getDepth();
- k++;
- }
- }
- function clothinit()
- {
- var k = 1;
- while(k <= clothnum)
- {
- if(k < 10)
- {
- cnt = "0" + k;
- }
- else
- {
- cnt = k;
- }
- this["cloth_" + cnt].clicknum = 0;
- this["cloth_" + cnt]._x = xclothinit[k];
- this["cloth_" + cnt]._y = yclothinit[k];
- this["cloth_" + cnt].swapDepths(depclothinit[k] + 5000);
- k++;
- }
- womanx = woman._x;
- womany = woman._y;
- }
- function hitwoman()
- {
- womannum++;
- hitnum = 0;
- var k = 1;
- while(k <= clothnum)
- {
- if(k < 10)
- {
- k = "0" + k;
- }
- clothnm = "cloth_" + k;
- if(woman.hitTest(eval(clothnm)) and eval(clothnm).clicknum == 1)
- {
- hitnum++;
- eval("cloth" + womannum)[hitnum] = clothnm;
- pt = new Object();
- pt.x = eval(clothnm)._x;
- pt.y = eval(clothnm)._y;
- woman.globalToLocal(pt);
- eval("xcloth" + womannum)[hitnum] = pt.x;
- eval("ycloth" + womannum)[hitnum] = pt.y;
- eval("depcloth" + womannum)[hitnum] = eval(clothnm).depth;
- }
- k++;
- }
- clothinit();
- }
- function poscloth()
- {
- womanpos = womanposinit - (womannum - 1) * 75;
- var k = 1;
- while(k <= womannum)
- {
- attachMovie("woman","swoman" + k,k - 10);
- var j = 1;
- while(j <= eval("cloth" + k).length)
- {
- this["swoman" + k].attachMovie(eval("cloth" + k)[j],eval("cloth" + k)[j],eval("depcloth" + k)[j]);
- this["swoman" + k][eval("cloth" + k)[j]]._x = eval("xcloth" + k)[j];
- this["swoman" + k][eval("cloth" + k)[j]]._y = eval("ycloth" + k)[j];
- j++;
- }
- setProperty("swoman" + k, _X, womanpos + k * 150);
- setProperty("swoman" + k, _Y, womanypos);
- setProperty("swoman" + k, _xscale, showscale);
- setProperty("swoman" + k, _yscale, showscale);
- swomandrag("swoman" + k);
- k++;
- }
- k = 1;
- while(k <= clothnum)
- {
- if(k < 10)
- {
- k = "0" + k;
- }
- this["cloth_" + k]._y -= 800;
- k++;
- }
- womanshow(1);
- }
- function attachbtn()
- {
- womanpos = womanposinit - (womannum - 1) * 75;
- var k = 1;
- while(k <= womannum)
- {
- attachMovie("actioncomp","actionbtn" + k,k - 25);
- attachMovie("delbtn_mc","delbtn" + k,k - 20);
- setProperty("delbtn" + k, _X, womanpos + k * 150);
- setProperty("delbtn" + k, _Y, 530);
- this["delbtn" + k].num = k;
- setProperty("actionbtn" + k, _X, womanpos + k * 150);
- setProperty("actionbtn" + k, _Y, 500);
- this["actionbtn" + k].num = k;
- k++;
- }
- }
- function swomandrag(mvname)
- {
- this[mvname].onPress = function()
- {
- this.startDrag("");
- };
- this[mvname].onRelease = function()
- {
- this.stopDrag();
- if(womannum == 1)
- {
- swoman1._x = womanposinit + 150;
- swoman1._y = womanypos;
- }
- if(womannum >= 2)
- {
- _root.reposition();
- }
- };
- }
- function reposition()
- {
- var k = 1;
- while(k <= womannum)
- {
- swomanarr[k] = "swoman" + k;
- k++;
- }
- k = womannum;
- while(k >= 1)
- {
- maxwoman = choosemax(k);
- this[maxwoman].order = k;
- k--;
- }
- k = 1;
- while(k <= womannum)
- {
- this["swoman" + k]._name = "sw" + k;
- this["i_cloth" + k] = eval("cloth" + k);
- this["i_xcloth" + k] = eval("xcloth" + k);
- this["i_ycloth" + k] = eval("ycloth" + k);
- this["i_depcloth" + k] = eval("depcloth" + k);
- k++;
- }
- k = 1;
- while(k <= womannum)
- {
- ordernum = this["sw" + k].order;
- this["sw" + k].orinum = k;
- this["sw" + k]._name = "swoman" + ordernum;
- k++;
- }
- k = 1;
- while(k <= womannum)
- {
- ordernum = this["swoman" + k].orinum;
- this["cloth" + k] = eval("i_cloth" + ordernum);
- this["xcloth" + k] = eval("i_xcloth" + ordernum);
- this["ycloth" + k] = eval("i_ycloth" + ordernum);
- this["depcloth" + k] = eval("i_depcloth" + ordernum);
- k++;
- }
- k = 1;
- while(k <= womannum)
- {
- setProperty("swoman" + k, _X, womanpos + k * 150);
- setProperty("swoman" + k, _Y, womanypos);
- k++;
- }
- womanshow(1);
- }
- function choosemax(lnum)
- {
- maxval = -500;
- var k = 1;
- while(k <= lnum)
- {
- maxval = Math.max(eval(swomanarr[k])._x,maxval);
- k++;
- }
- k = 1;
- while(k <= lnum)
- {
- if(eval(swomanarr[k])._x == maxval)
- {
- returnval = swomanarr[k];
- swomanarr.splice(k,1);
- return returnval;
- }
- k++;
- }
- }
- function removeswoman(dnum)
- {
- removeMovieClip("actionbtn" + dnum);
- var k = dnum;
- while(k < womannum)
- {
- this["cloth" + k] = [];
- this["xcloth" + k] = [];
- this["ycloth" + k] = [];
- this["depcloth" + k] = [];
- var j = 1;
- while(j < eval("cloth" + (k + 1)).length)
- {
- this["cloth" + k][j] = this["cloth" + (k + 1)][j];
- this["xcloth" + k][j] = this["xcloth" + (k + 1)][j];
- this["ycloth" + k][j] = this["ycloth" + (k + 1)][j];
- this["depcloth" + k][j] = this["depcloth" + (k + 1)][j];
- j++;
- }
- showaction[k] = showaction[k + 1];
- k++;
- }
- this["cloth" + womannum] = [];
- this["xcloth" + womannum] = [];
- this["ycloth" + womannum] = [];
- this["depcloth" + womannum] = [];
- showaction.pop();
- womannum--;
- removeMovieClip("swoman" + dnum);
- swnumbd.gotoAndPlay(2);
- }
- function womanshow(shownum)
- {
- att_actionwoman(shownum);
- 0;
- if(showaction[shownum] != undefined)
- {
- rndnum = showaction[shownum];
- if(rndnum == 0)
- {
- rndnum = 9;
- }
- }
- else
- {
- rndnum = 9;
- }
- showinit(rndnum);
- mirror_mc.onEnterFrame = function()
- {
- if(show(rndnum) == 1)
- {
- shownum++;
- if(shownum > womannum)
- {
- shownum = 1;
- }
- att_actionwoman(shownum);
- 0;
- if(showaction[shownum] != undefined)
- {
- rndnum = showaction[shownum];
- if(rndnum == 0)
- {
- rndnum = 9;
- }
- }
- else
- {
- rndnum = 9;
- }
- showinit(rndnum);
- }
- };
- }
- function att_actionwoman(number)
- {
- attachMovie("woman","shwoman",0);
- var j = 1;
- while(j <= eval("cloth" + number).length)
- {
- shwoman.attachMovie(eval("cloth" + number)[j],eval("cloth" + number)[j],eval("depcloth" + number)[j]);
- shwoman[eval("cloth" + number)[j]]._x = eval("xcloth" + number)[j];
- shwoman[eval("cloth" + number)[j]]._y = eval("ycloth" + number)[j];
- j++;
- }
- shwoman._x = mirror_mc._x;
- shwoman._y = mirror_mc._y;
- setProperty("shwoman", _xscale, showscale);
- setProperty("shwoman", _yscale, showscale);
- shwoman.setMask(_root.mirror_mc);
- }
- function showinit(n)
- {
- if(n == 1)
- {
- shwoman._xscale = 5;
- shwoman._yscale = 5;
- }
- else if(n == 2)
- {
- shwoman._y -= 360;
- }
- else if(n == 3)
- {
- shwoman._y += 360;
- }
- else if(n == 4)
- {
- shwoman._x -= 180;
- }
- else if(n == 5)
- {
- shwoman._x += 180;
- }
- else if(n == 6)
- {
- shwoman._xscale = 1;
- shwoman._yscale = 1;
- shwoman._alpha = 5;
- shwoman._rotation = 20;
- }
- else if(n == 7)
- {
- shwoman._alpha = 0;
- }
- else if(n == 8)
- {
- shwoman._xscale = showscale;
- addnum = 8;
- }
- else if(n == 9)
- {
- shwoman._alpha = 80;
- }
- }
- function show(n)
- {
- if(stopsignnum == 1)
- {
- return 0;
- }
- if(n == 1)
- {
- if(shwoman._xscale < showscale)
- {
- shwoman._xscale += 5;
- shwoman._yscale += 5;
- }
- else
- {
- shwoman._xscale = showscale;
- shwoman._yscale = showscale;
- shwoman._alpha += 5;
- }
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- else if(n == 2)
- {
- if(shwoman._y < mirror_mc._y)
- {
- shwoman._y += 20;
- }
- else
- {
- shwoman._alpha += 5;
- }
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- else if(n == 3)
- {
- if(shwoman._y > mirror_mc._y)
- {
- shwoman._y -= 20;
- }
- else
- {
- shwoman._alpha += 5;
- }
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- else if(n == 4)
- {
- if(shwoman._x < mirror_mc._x)
- {
- shwoman._x += 20;
- }
- else
- {
- shwoman._alpha += 5;
- }
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- else if(n == 5)
- {
- if(shwoman._x > mirror_mc._x)
- {
- shwoman._x -= 20;
- }
- else
- {
- shwoman._alpha += 5;
- }
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- else if(n == 6)
- {
- if(shwoman._xscale < showscale)
- {
- shwoman._xscale += 3;
- shwoman._yscale += 3;
- }
- shwoman._alpha += 5;
- if(shwoman._rotation != 0)
- {
- shwoman._rotation += 20;
- }
- if(shwoman._alpha > 200)
- {
- return 1;
- }
- }
- else if(n == 7)
- {
- shwoman._alpha += 5;
- if(shwoman._alpha >= 180)
- {
- return 1;
- }
- }
- else if(n == 8)
- {
- if(shwoman._xscale <= showscale * -1)
- {
- addnum = -8;
- }
- shwoman._xscale -= addnum;
- if(shwoman._xscale >= showscale)
- {
- shwoman._xscale = showscale;
- shwoman._alpha += 5;
- if(shwoman._alpha > 180)
- {
- return 1;
- }
- }
- }
- else if(n == 9)
- {
- shwoman._alpha += 5;
- if(shwoman._alpha >= 200)
- {
- return 1;
- }
- }
- }
- function clothexe()
- {
- var k = 1;
- while(k <= clothnum)
- {
- if(k < 10)
- {
- k = "0" + k;
- }
- _root["cloth_" + k].onPress = function()
- {
- btdown(this._name);
- };
- _root["cloth_" + k].onRelease = function()
- {
- btup(this._name);
- };
- k++;
- }
- }
- function btdown(name)
- {
- eval(name).clicknum = 1;
- startDrag(name,0);
- swnum++;
- this[name].swapDepths(swnum);
- this[name].depth = swnum;
- clothname = name;
- }
- function btup(name)
- {
- stopDrag();
- if(styleon == 1)
- {
- stylecheck(name);
- }
- }
- function stylecheck(name)
- {
- var k = 0;
- while(k <= stylecloth.length)
- {
- if(name == stylecloth[k])
- {
- stylename = "stylewoman." + name;
- pt = new Object();
- pt.x = eval(stylename)._x + eval(stylewoman)._x;
- pt.y = eval(stylename)._y + eval(stylewoman)._y;
- if(Math.abs(this[name]._x - pt.x) < 10 and Math.abs(this[name]._y - pt.y) < 10)
- {
- this[name]._x = pt.x;
- this[name]._y = pt.y;
- if(eval(stylename).righton != 1)
- {
- sndattach("dingdong");
- strightnum++;
- eval(stylename).righton = 1;
- }
- if(strightnum == stylecloth.length - 1)
- {
- sndattach("sucwav");
- resultattmv("sucess");
- st_sucesson = 1;
- }
- }
- else if(eval(stylename).righton == 1)
- {
- strightnum--;
- eval(stylename).righton = 0;
- }
- }
- k++;
- }
- }
- function attachtip()
- {
- attachMovie("tip","tip",10001);
- setProperty("tip", _X, 485);
- setProperty("tip", _Y, 345);
- }
- function replay()
- {
- var i = 1;
- while(i <= womannum)
- {
- removeMovieClip("swoman" + i);
- i++;
- }
- removeMovieClip("shwoman");
- gotoAndPlay(4);
- }
- function textfocus()
- {
- var k = 1;
- while(k <= 3)
- {
- this["t" + k].tabIndex = k;
- k++;
- }
- selection.setFocus("t1");
- }
- function etextfocus()
- {
- var k = 1;
- while(k <= 7)
- {
- this["e" + k].tabIndex = k;
- k++;
- }
- }
- function storysend()
- {
- var k = 0;
- while(k < cmt.length)
- {
- if(cmt.charCodeAt(k) == 13)
- {
- c += "<br>";
- }
- else
- {
- c += cmt.charAt(k);
- }
- k++;
- }
- comment = c;
- 0;
- if(title == undefined or title == "")
- {
- getUrl("javascript:alert(\'제목 입력은 필수입력사항입니다\')", "");
- return 0;
- }
- 0;
- if(secret == undefined or secret == "")
- {
- getUrl("javascript:alert(\'나중에 수정/삭제를 위하여 비밀번호를 입력해 주세요\')", "");
- return 0;
- }
- 0;
- if(comment == undefined or cmt == "")
- {
- getUrl("javascript:alert(\'작품의 내용을 간단히 입력해 주세요\')", "");
- return 0;
- }
- return 1;
- }
- function emailsend()
- {
- 0;
- if(toemail == undefined or toemail == "" or toemail == "Email")
- {
- getUrl("javascript:alert(\'받으시는 분의 이메일 주소를 입력해 주셔야 편지를 보내드리죠\')", "");
- return 0;
- }
- if(toemail.lastIndexof("@") < 0)
- {
- getUrl("javascript:alert(\'받으시는 분의 메일 주소형식이 맞지 않습니다. 다시 입력해 주세요\')", "");
- return 0;
- }
- 0;
- if(title == undefined or title == "")
- {
- getUrl("javascript:alert(\'제목을 입력해 주셔야만 합니다\')", "");
- return 0;
- }
- 0;
- if(comment == undefined or comment == "")
- {
- getUrl("javascript:alert(\'아무런 내용없이 편지를 보내시려구요?\')", "");
- return 0;
- }
- if(frommail.lastIndexof("@") < 0)
- {
- getUrl("javascript:alert(\'보내시는 분의 메일주소를 입력해 주세요\')", "");
- return 0;
- }
- return 1;
- }
- function stylestart()
- {
- styleon = 1;
- strightnum = 0;
- st_sucesson = 0;
- st_startTime = getTimer();
- clothexe();
- attachMovie(style,"stylewoman",-100);
- setProperty("stylewoman", _X, woman._x);
- setProperty("stylewoman", _Y, woman._y);
- pt = new Object();
- pt.x = stylewoman.woman._x;
- pt.y = stylewoman.woman._y;
- stylewoman.localToglobal(pt);
- stylewoman._x += woman._x - pt.x;
- stylewoman._y += woman._y - pt.y;
- setProperty("stylewoman", _alpha, 0);
- stylecloth = [];
- for(mm in stylewoman)
- {
- stylecloth.push(mm);
- }
- }
- function resultattmv(filename)
- {
- attachMovie(filename,"result",12000);
- setProperty("result", _X, 480);
- setProperty("result", _Y, 350);
- }
- function attachbg(bgnum)
- {
- attfile = "bg" + bgnum;
- attachMovie(attfile,"bgfile",-50);
- setProperty("bgfile", _X, 659.3);
- setProperty("bgfile", _Y, 440);
- }
- system.usecodepage = true;
- moviename = "bbddi336";
- clothnum = 52;
- showscale = 60;
- init();
-