웹사이트 관련 팁들을 모아놓은 곳입니다. 좋은팁 공유 합시다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 186

0

조회 수 : 1225 신고 : 0

profile
작성자 : title: [ani]방울UI
포인트 : 4526 | 레벨 : 7

1. 먼저 플래쉬용 js파일을 하나 만든다.

 

function insertFlash(path, id, width, height, bgcolor, wmode, scale, quality, flashvars){
   
   var params = {};
   params.width = width;
   params.height = height;
   params.bgcolor = bgcolor?bgcolor:"#FFFFFF";
   params.quality = quality?quality:"high";    // low | medium | high | autolow | autohigh | best
   params.scale = scale?scale:"noscale";   // noscale | showall | noborder | exactfit
   params.wmode = wmode?wmode:"transparent"; // window | opaque | transparent | direct | gpu
   params.allowScriptAccess = "always";
   params.flashvars = flashvars;
  
  var tag = "";
  if (navigator.userAgent.toUpperCase().indexOf("MSIE") != -1){
   tag += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'";
   tag += " codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'";
   tag += " id='"+ id +"' width='"+ width +"' height='"+ height +"'>";
   tag += " <param name='movie' value='"+ path +"'/>";  
   tag += "  <param name='wmode' value='transparent' />";
   for(var n in params)
    tag += "  <param name='"+ n +"' value='"+ params[n] +"'/>";
   tag += "</object>";
  }else{
   tag += "<embed src=" + path + ";
   tag += "  name='"+ id +"'";
   tag += "  type='application/x-shockwave-flash'";
   tag += "  pluginspage='http://www.macromedia.com/go/getflashplayer'";
   tag += "  wmode='transparent'";
   for(var n in params)
    tag += "  "+ n +"='"+ params[n] +"'";
      tag += "/>";
  }
  document.write(tag);
 }

 

2. 만든js파일을 플래쉬 삽입하는 페이지에서 호출한다.

<script type="text/javascript" src="js/flashObject.js"></script>

 

3. 플래쉬가 들어갈 곳에 아래 소스를 삽입한다.

<script type="text/javascript">insertFlash("플래쉬경로.swf", "objFlash", "940", "300");</script>

 

여기서 940은 플래쉬의 가로사이즈, 300은 세로사이즈 이다.

태그
profile 글쓴이 UI

하루에 방구 1번

엮인글 :
https://web.webmini.net/webtip/386327/f04/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

첫번째 댓글을 남겨주세요!

List of Articles
번호 제목 글쓴이 날짜sort 추천 수 조회 수
186 트래픽이란? [4] title: [ani]깜빡이는 표정빽짱구 2004-02-07 19 3643
185 best of best FTP없이 자신의 계정없이 내용확인하기 [5] title: [ani]깜빡이는 표정빽짱구 2004-02-07 33 3395
184 잘못된 html코딩습관 몇가지 [5] title: [ani]깜빡이는 표정빽짱구 2004-02-07 17 3626
183 배너광고 효과 높이기 [4] title: [ani]깜빡이는 표정빽짱구 2004-02-07 17 3439
182 프레임과 노프레임 [4] title: [ani]깜빡이는 표정빽짱구 2004-02-07 14 4154
181 포토샵에서 폰트복구 확실한 방법 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 15 3355
180 PHP만 지원되도 제로보드를 설치할수있다 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 13 2630
179 이쁜 올라오는 글자 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 11 2640
178 best of best 아이프레임 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 24 3009
177 상태표시줄 바꿔보자3 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 13 2628
176 데이터베이스 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 11 2474
175 폰트설치법 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 9 3305
174 홈페이지란 무엇인가? [1] title: [ani]깜빡이는 표정빽짱구 2004-02-08 17 2606
173 best of best Html 이란 무엇인가 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-08 23 2865
172 http ? [1] title: [ani]깜빡이는 표정빽짱구 2004-02-08 18 2491
171 리눅스 [Linux] [1] title: [ani]깜빡이는 표정빽짱구 2004-02-08 13 2341
170 메타태그란? [3] title: [ani]깜빡이는 표정빽짱구 2004-02-08 18 3322
169 자동으로 페이지 전환 [3] title: [ani]깜빡이는 표정빽짱구 2004-02-08 18 3340
168 뒤,앞,새로고침,창닫기 [4] title: [ani]깜빡이는 표정빽짱구 2004-02-08 14 3525
167 즐겨찾기 추가 버튼이나 텍스트 만들기. [3] title: [ani]깜빡이는 표정빽짱구 2004-02-08 11 3414