자바스크립트로 플래시 삽입(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,505
19년 전 조회 2,424
19년 전 조회 2,446
19년 전 조회 3,482
19년 전 조회 3,154
19년 전 조회 2,805
19년 전 조회 2,047
19년 전 조회 1,776
19년 전 조회 2,878
19년 전 조회 1,721
19년 전 조회 2,312
19년 전 조회 3,953
19년 전 조회 3,733
19년 전 조회 3,452
19년 전 조회 3,404
19년 전 조회 1,566
19년 전 조회 1,933
19년 전 조회 1,858
19년 전 조회 2,524
19년 전 조회 4,620
19년 전 조회 2,754
19년 전 조회 1,918
19년 전 조회 1,928
19년 전 조회 1,816
19년 전 조회 2,557
19년 전 조회 8,176
19년 전 조회 2,726
19년 전 조회 2,793
19년 전 조회 3,041
19년 전 조회 2,197
19년 전 조회 2,213
19년 전 조회 2,175
19년 전 조회 2,069
19년 전 조회 2,259
19년 전 조회 2,516
19년 전 조회 3,083
19년 전 조회 2,332
19년 전 조회 1,907
19년 전 조회 2,832
19년 전 조회 4,999
19년 전 조회 3,497
19년 전 조회 3,454
19년 전 조회 2,975
19년 전 조회 2,397
19년 전 조회 1,489
19년 전 조회 3,135
19년 전 조회 2,010
19년 전 조회 5,372
19년 전 조회 2,431
19년 전 조회 3,432
19년 전 조회 2,855
19년 전 조회 1,764
19년 전 조회 3,880
19년 전 조회 2,417
19년 전 조회 2,297
19년 전 조회 3,021
19년 전 조회 3,295
19년 전 조회 2,497
19년 전 조회 2,262
19년 전 조회 2,328
19년 전 조회 2,001
19년 전 조회 3,091
19년 전 조회 2,013
19년 전 조회 2,049
19년 전 조회 1,705
19년 전 조회 2,213
19년 전 조회 2,187
19년 전 조회 2,482
19년 전 조회 2,876
19년 전 조회 2,387
19년 전 조회 2,454
19년 전 조회 3,504
19년 전 조회 3,220
19년 전 조회 3,207
19년 전 조회 3,019
19년 전 조회 2,031
19년 전 조회 2,343
19년 전 조회 2,233
19년 전 조회 2,060
19년 전 조회 2,499
19년 전 조회 2,413
19년 전 조회 2,798
19년 전 조회 2,176
19년 전 조회 3,503
19년 전 조회 1,969
19년 전 조회 2,575
19년 전 조회 1,596
19년 전 조회 2,827
19년 전 조회 3,067
19년 전 조회 2,151
19년 전 조회 1,990
19년 전 조회 2,465
19년 전 조회 2,380
19년 전 조회 3,072
19년 전 조회 6,754
19년 전 조회 2,706
19년 전 조회 3,175
19년 전 조회 3,077
19년 전 조회 1,914
19년 전 조회 3,352
🐛 버그신고