페이지 양쪽이 대칭으로 배치된 커플렛 스타일의 플래시 광고는 매우 일반적입니다. 오늘은 플래시 광고의 작은 “×”(닫기 버튼) 코드에 대해 주로 이야기하겠습니다. 외부 웹페이지 환경과의 연결입니다. 이 닫기 버튼을 제작하려면 약간의 지식이 필요합니다.
구체적인 단계는 다음과 같습니다. 작은 “×” 모양을 그려서 버튼을 닫으면 어렵지 않겠죠? 모두 선택한 후 F8 키를 눌러 "버튼" 구성 요소로 변환합니다. 이 작은 버튼을 클릭하여 선택한 후 F9 키를 눌러 액션 패널을 열고 다음 코드를 추가합니다.
<STRONG>以下为程序代码:</STRONG><BR>on (release)<BR>{<BR> getURL("FSCommand:", "");<BR>}
<STRONG>以下为程序代码:</STRONG><BR><!-- 对联开始 --><BR><SCRIPT language=JavaScript event=FSCommand() for=dl> <BR>duilian2.style.visibility='hidden'; <BR>duilian3.style.visibility='hidden'; <BR></SCRIPT><P><SCRIPT language=JavaScript> <BR>function winload() <BR>{ <BR> duilian2.style.top=20; <BR> duilian2.style.left=5; <BR> duilian3.style.top=20; <BR> duilian3.style.right=5; <BR>} <BR>//if(document.body.offsetWidth>800){ <BR>{ <BR> document.write("<div id=duilian2 style='position: absolute;visibility:visible;z-index:1'><EMBED src='/images/banner.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>" <BR>+"<div id=duilian3 style='position: absolute;visibility:visible;z-index:1'><EMBED src='/images/banner.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>"); <BR>} <BR>winload() <BR>//} <BR></SCRIPT><BR><!-- 对联结束 --></P>
위의 코드를 임의의 웹페이지에 삽입한 후 해당 웹페이지와 동일한 디렉토리에 Flash 커플릿을 복사하면 탐색 시 볼 수 있습니다. 다시 한 번 요령을 배운 것 같나요?