'플래쉬'에 해당되는 글 1건

  1. flash 대체 컨텐츠 처리하기.

flash 대체 컨텐츠 처리하기.

브라우져 또는 기기에 따라서 플래쉬가 실행되지 않을때가 있다.
이때, 플래쉬를 대체할만한 컨텐츠를 추가해주면, 접근성이 향상이 된다.

아래 flash를 삽입해주는 스크립트를 참고한다.
function embedFlash(id, url, width, height, altText, flashVars, wmode) {
	if (!flashVars) flashVars = '';
	if (!wmode) wmode = 'window';
	if (!altText) altText = '';

	var str = '' +
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" width="' + width + '" height="' + height + '" id="' + id + '">' +
		'<param name="movie" value="' + url + '" />' +
		'<param name="wmode" value="' + wmode + '" />' +
		'<param name="FlashVars" value="' + flashVars + '" />' +
		'<!--[if !IE]>-->' +
		'<object type="application/x-shockwave-flash" data="' + url + '" width="' + width + '" height="' + height + '" name="' + id + '">' +
			'<param name="wmode" value="' + wmode + '" />' +
			'<param name="FlashVars" value="' + flashVars + '" />' +
		'<!--<![endif]-->' +
			'<div class="alt-content alt-' + id + '">' + altText + '</div>' +
		'<!--[if !IE]>-->' +
		'</object>' +
		'<!--<![endif]-->' +
	'</object>';
	document.write(str); 
} 

아래 블로그주소에서 더 자세한 설명과 여러가 대체방법에 대해서 설명이 되어 있다.
http://blog.wystan.net/2008/03/25/flash-alternative-content-and-noscript