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

0

조회 수 : 1224 신고 : 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/183/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

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

List of Articles
번호 제목 글쓴이 날짜 추천 수 조회 수sort
186 hit table 이 웹표준이 아니다? [4] title: [ani]깜빡이는 표정빽짱구 2007-11-13 2 24414
185 hit 아이폰/아이패드에서 '홈화면 추가' 아이콘 변경하기 file [1] title: [ani]깜빡이는 표정빽짱구 2011-02-12 1 13003
184 hit 플래쉬 액션스크립트 3.0 getURL [1] title: [ani]깜빡이는 표정빽짱구 2008-03-06   12399
183 hit 웹표준과 저작프로그램 title: [ani]깜빡이는 표정빽짱구 2008-02-10   12356
182 hit DTD에 따른 브라우저 박스크기변화 file title: [ani]깜빡이는 표정빽짱구 2008-03-21   11600
181 hit Flash Player 9.0.115.0 ActiveX 콘트롤 문제 title: [ani]깜빡이는 표정빽짱구 2008-03-06   11017
180 hit 웹표준의 장점 [2] title: [ani]깜빡이는 표정빽짱구 2008-02-08   10618
179 hit 믹시의 추적버튼에서 &(엔퍼센트) 에러 file [1] [1] title: [ani]깜빡이는 표정빽짱구 2009-02-09   10114
178 best of best 제로보드폴더 복구와 관련한.. [1] title: [ani]깜빡이는 표정빽짱구 2005-03-17 34 9485
177 best of best 플래쉬 테두리생기는문제 코딩법 [2] title: [ani]깜빡이는 표정빽짱구 2006-04-25 33 9171
176 best of best input 태그 (검색창안에 이미지넣기) [3] title: [ani]깜빡이는 표정빽짱구 2005-03-15 30 8675
175 best of best 계정을 간단하게 옮겨보자. [7] title: [ani]깜빡이는 표정빽짱구 2005-11-15 28 8673
174 아이프레임 게시판 투명으로 불러오기 [3] title: [ani]깜빡이는 표정빽짱구 2005-09-05 18 8669
173 best of best 셀렉트박스 [5] title: [ani]깜빡이는 표정빽짱구 2005-08-12 20 8628
172 국경일에는 국기를 게양하셔야 합니다. file [9] title: [ani]깜빡이는 표정빽짱구 2005-11-11 10 8213
171 페이스북 링크의 정보를 설정하는 방법 file title: [ani]깜빡이는 표정빽짱구 2011-03-06   8148
170 플래쉬에 마우스 오른쪽 버튼 클릭시 메뉴줄이기 file [2] title: [ani]깜빡이는 표정빽짱구 2008-03-05 1 8042
169 웹 표준 개발자의 IE8 고려사항 (나라디자인) [3] title: [ani]깜빡이는 표정빽짱구 2009-10-22   7886
168 phpmyadmin을 내 계정에 설치하기 [5] title: [ani]깜빡이는 표정빽짱구 2005-09-27 15 7835
167 수평스크롤 스크립트 [5] 웹기프트 2009-10-12   7761