수양 지덕 겸양 門/플래시영상 글

[스크랩] change up gallery(전후btn추가) 개선

항상1004님과함께 2017. 8. 3. 06:37







첨부파일 changUp gallery (전후btn추가) 개선.swi




<br><br><br>
<p><embed src="https://t1.daumcdn.net/cfile/cafe/993834335981F4312B?original" width="1024" height="576" scale="exactfit" allowFullScreen="true"></p>
<br><br><br>


[ 음원 ]

로이킴 - 봄 봄 봄


"https://archive.org/download/20170802_2/Roy Kim - BOM BOM BOM.flv"


"https://archive.org/download/20170802_2/Roy Kim - BOM BOM BOM.mp3"


"https://archive.org/download/20170802_2/Roy Kim - BOM BOM BOM.mp4"



// A

function goBtn() {
 v = mode ? (v==tot ? 1 : ++v) : (v==1 ? tot : --v);
 imgGo();

function imgGo() {
 gotoAndPlay(1);
 for (i=1; i<=tot; i++) aa["a"+i].show = i == v ;
 index = ("0"+v).slice(-2) + " : " + ("0"+tot).slice(-2);
}
onSelfEvent (load) {
 var mode = 1;
 var tot = 21;
 var v = random(tot)+1;
 for (i=1; i<=tot; i++) {
  mc = aa["a"+i];
  mc.show = 0;
  mc.tgx = mc._x;
  mc.tgy = mc._y;
  mc.tgw = mc._width;
  mc.tgh = mc._height;
  ds = new flash.filters.DropShadowFilter(10,45,0x000000,0.50,6,6,1.5,2,0,0,0);
  mc.filters =[ds]; // 그림자필터 적용하기
  mc.onEnterFrame = function() {
   with (this) {
    if (show==0) easy(tgx, tgy, tgw , tgh, 0.2);
    else easy(512, 288, 964, 516, 0.2);
   }
  }
  mc.onPress = function() {
   v = this._name.slice(1);
   imgGo();
  }
 }
 nextBtn.onPress = function() {
  mode = 1;
  gotoAndPlay(100);
 }
 prevBtn.onPress = function() {
  mode = 0;
  gotoAndPlay(100);
 }
 MovieClip.prototype.easy = function(x, y , w, h, s) {
  with (this) {
   _x += (x - _x) * s;
         _y += (y - _y) * s;
         _width  += (w - _width ) * s;
         _height += (h - _height) * s;
  }
 }
 imgGo();
}
onFrame (25) {
 for (i=1; i<=tot; i++) ww.aa["a"+i]._visible = i == v ;
}
onFrame (100) {
 goBtn();
}











출처 : 스윗터
글쓴이 : 영수 원글보기
메모 :