오브젝트 패치

01 14, 2007 02:18
JS 부분 ------------------------
// Arguments : flashMovie(출력영역ID,플레쉬파일경로,WIDTH,HEIGHT[,FLASHVARS[,WMOD]])

function flashMovie(fid,src,wid,hei,fvs,wmd) {
  this.fPrint = '';
  this.Id = document.getElementById(fid);
  this.Src = src;
  this.Width = wid;
  this.Height = hei;
  this.FlashVars = (fvs != undefined)? fvs :'';
  this.Wmod = (wmd != undefined)? wmd :'';
  if(isObject(Id)) {
    fPrint = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'">';
    fPrint += '<param name="movie" value="'+Src+'">';
    fPrint += '<param name="quality" value="high">';
    fPrint += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    fPrint += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : '';
    fPrint += '<embed';
    fPrint += fPrint + ' src="'+Src+'"';
    fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
    fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
    fPrint += ' quality="high"';
    fPrint += ' pluginspage="http://www.macromedia.com/go/getflashplayer"';
    fPrint += ' type="application/x-shockwave-flash"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'"';
    fPrint += '></embed>';
    fPrint += '</object>';
    Id.innerHTML = fPrint;
  }
}

function isObject(a) {
    return (a && typeof a == 'object');
}

--------------------  이상 JS 부분

사용시

<table>
  <tr>
    <td id="flashArea1"></td>
  </tr>
  <tr>
    <td id="flashArea2"></td>
  </tr>
</table>


<script lanaugae="javascript">
flashMovie('flashArea1','flashmovie1.swf',300,200);
flashMovie('flashArea2','flashmovie2.swf',300,200,'a=1&b=2','opaque');
</script>

// [06/02/17 22:20 경 수정됨] 

브니 Programs/Web Programs

01 14, 2007 02:18 01 14, 2007 02:18
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다