웹사이트 관련 팁들을 모아놓은 곳입니다. 좋은팁 공유 합시다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 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/487/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

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

List of Articles
번호 제목 글쓴이 날짜 추천 수sort 조회 수
46 best of best 타겟(target) 이란? [1] title: [ani]깜빡이는 표정빽짱구 2004-07-09 20 2721
45 best of best xp를 빠르게 하자!! file [1] 신념 2005-03-14 20 5570
44 best of best 셀렉트박스 [5] title: [ani]깜빡이는 표정빽짱구 2005-08-12 20 8628
43 best of best Html 이란 무엇인가 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-08 23 2865
42 best of best html과 tag의 개념 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-17 23 2557
41 best of best 글쓰기창 마우스오버시 늘었다 원래대로... title: [ani]깜빡이는 표정빽짱구 2004-02-29 23 3071
40 best of best 아이프레임 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 24 3009
39 best of best 링크점선 없애기 [2] title: [ani]깜빡이는 표정빽짱구 2004-04-18 24 3662
38 best of best 클릭해서 윈도우창 최소화 하기 [1] title: [ani]깜빡이는 표정빽짱구 2004-04-22 24 3652
37 best of best 프레임 고정시키기 title: [ani]깜빡이는 표정빽짱구 2004-05-02 24 3801
36 best of best 제홈피 메인페이지 테이블모습 [2] title: [ani]깜빡이는 표정빽짱구 2004-05-03 24 3304
35 best of best 최근게시물 설치 [3] title: [ani]깜빡이는 표정빽짱구 2004-02-12 25 2477
34 best of best html 색상표 title: [ani]깜빡이는 표정빽짱구 2004-04-11 25 3724
33 best of best 따라다니는 탑메뉴 [1] title: [ani]깜빡이는 표정빽짱구 2004-03-05 26 2397
32 best of best 홈페이지,제로보드 성공담 [12] title: [ani]깜빡이는 표정빽짱구 2004-02-09 27 4880
31 best of best 무료 도매인 포워딩 사이트 (100개) [1] title: [ani]깜빡이는 표정빽짱구 2004-02-19 27 3029
30 best of best 휠을 움직이면 배경색이 바뀌고 클릭하면 원래색으로 title: [ani]깜빡이는 표정빽짱구 2004-02-29 27 2175
29 best of best copyright 자동으로 날짜 업데이트 title: [ani]깜빡이는 표정빽짱구 2004-08-19 27 2668
28 best of best 웹디자인..할때 필요할듯. [2] 맑은숲 2005-03-12 27 5894
27 best of best 이미지 & 파일 무단링크 막기 [1] title: [ani]깜빡이는 표정빽짱구 2004-02-22 28 2971