자바스크립트로 플래시 삽입(IE 패치이후) 이곳만 없길래 올립니다.

자바스크립트로 플래시 삽입(IE 패치이후)

js 파일 내부



// PHPSCHOOL 로야님의 소스
function setEmbed()
{
var obj = new String;
var parameter = new String;
var embed = new String;
var html = new String;
var allParameter = new String;
var clsid = new String;
var codebase = new String;
var pluginspace = new String;
var embedType = new String;
var src = new String;
var width = new String;
var height = new String;


this.init = function( getType , s ,w , h ) {

if ( getType == "flash")
{

clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
pluginspage = "http://www.macromedia.com/go/getflashplayer";
embedType = "application/x-shockwave-flash";
}
/* type 추가
else if ( )
{
}
*/

parameter += "<param name='movie' value='"+ s + "'>\n";
parameter += "<param name='quality' value='high'>\n";

src = s;
width = w;
height = h;
}

this.parameter = function( parm , value ) {
parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
allParameter += " "+parm + "='"+ value+"'";
}

this.show = function() {
if ( clsid )
{
obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n";
}

embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n";

if ( obj )
{
embed += "</object>\n";
}

html = obj + parameter + embed;

document.write( html );
}

}



//실제 플래시가 필요한 부분에 넣는 부분

<script type="text/javascript">
setem = new setEmbed();
setem.init('flash','<?=$g_skin_link?>/image/smenu2.swf','196','134');
setem.parameter('wmode','transparent');
setem.parameter('quality','high');
setem.show();
</script>



//실제 필요한 페이지에 삽입해야 하는 js

<script language="javascript" src="my_flash.js"></script><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:50:06 Flash에서 이동 됨]</div>
|

댓글 4개

음...
꽤 유용할거 같네요...
고맙습니다...
감사합니다 ^^

이로와님 일본에 사시나봐요?
저 신길동에 사는데요...ㅋㅋ

그냥 일본하고 관계된 일을 하느라...그리 된것입니당...

이로와도 맞는데용....이로하라고 불러주시면 더욱 감사하겠습니당...
bbs 모든 파일에~~

이걸 넣어줘야해서 좀 불편합니다~~
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 4,495
19년 전 조회 2,421
19년 전 조회 2,440
19년 전 조회 3,475
19년 전 조회 3,147
19년 전 조회 2,799
19년 전 조회 2,042
19년 전 조회 1,768
19년 전 조회 2,872
19년 전 조회 1,715
19년 전 조회 2,307
19년 전 조회 3,947
19년 전 조회 3,726
19년 전 조회 3,445
19년 전 조회 3,399
19년 전 조회 1,558
19년 전 조회 1,927
19년 전 조회 1,850
19년 전 조회 2,517
19년 전 조회 4,612
19년 전 조회 2,749
19년 전 조회 1,914
19년 전 조회 1,922
19년 전 조회 1,811
19년 전 조회 2,549
19년 전 조회 8,171
19년 전 조회 2,719
19년 전 조회 2,784
19년 전 조회 3,037
19년 전 조회 2,190
19년 전 조회 2,205
19년 전 조회 2,170
19년 전 조회 2,064
19년 전 조회 2,254
19년 전 조회 2,511
19년 전 조회 3,076
19년 전 조회 2,326
19년 전 조회 1,902
19년 전 조회 2,828
19년 전 조회 4,992
19년 전 조회 3,491
19년 전 조회 3,450
19년 전 조회 2,971
19년 전 조회 2,393
19년 전 조회 1,482
19년 전 조회 3,131
19년 전 조회 2,005
19년 전 조회 5,366
19년 전 조회 2,420
19년 전 조회 3,425
19년 전 조회 2,850
19년 전 조회 1,756
19년 전 조회 3,875
19년 전 조회 2,411
19년 전 조회 2,293
19년 전 조회 3,015
19년 전 조회 3,290
19년 전 조회 2,490
19년 전 조회 2,256
19년 전 조회 2,322
19년 전 조회 1,991
19년 전 조회 3,084
19년 전 조회 2,009
19년 전 조회 2,042
19년 전 조회 1,695
19년 전 조회 2,206
19년 전 조회 2,182
19년 전 조회 2,476
19년 전 조회 2,871
19년 전 조회 2,381
19년 전 조회 2,447
19년 전 조회 3,499
19년 전 조회 3,209
19년 전 조회 3,202
19년 전 조회 3,008
19년 전 조회 2,025
19년 전 조회 2,335
19년 전 조회 2,223
19년 전 조회 2,055
19년 전 조회 2,494
19년 전 조회 2,410
19년 전 조회 2,792
19년 전 조회 2,169
19년 전 조회 3,497
19년 전 조회 1,962
19년 전 조회 2,572
19년 전 조회 1,590
19년 전 조회 2,820
19년 전 조회 3,060
19년 전 조회 2,144
19년 전 조회 1,983
19년 전 조회 2,458
19년 전 조회 2,373
19년 전 조회 3,066
19년 전 조회 6,745
19년 전 조회 2,701
19년 전 조회 3,170
19년 전 조회 3,073
19년 전 조회 1,908
19년 전 조회 3,347
🐛 버그신고