DOM OBJECT and EMBED syntax

황제낙엽 2011.03.02 16:27 조회 수 : 624

sitelink1 http://kb2.adobe.com/cps/415/tn_4150.html 
sitelink3 http://1 
sitelink4 http://ko 
extra_vars6 sitelink1 

Introduction

An HTML page is required to correctly display a Macromedia Flash movie in a browser. This HTML page must contain tags that reference the actual Macromedia Flash movie file to be opened and played. These tags are the OBJECT and EMBED tags. The OBJECT tag is used by Internet Explorer on Windows and the EMBED is used by Netscape Navigator (Macintosh and Windows) and Internet Explorer (Macintosh) to direct the browser to load the Macromedia Flash Player. Internet Explorer on Windows uses an ActiveX control to play Macromedia Flash content while all other browser and platform combinations use the Netscape plugin technology to play Macromedia Flash content. This explains the need for two tags.

Note: Hand coding HTML pages with OBJECT and EMBED tags is not necessary when using Macromedia Flash 4 or later. The Publish feature present in those versions of Macromedia Flash will automatically create an HTML document that contains the required HTML tags for browsers to access a Flash movie on the web. There are also several different HTML publishing templates to choose from. To use the Publish feature choose File > Publish Settings. For more information on using the feature see the Using Flash manual or online help.

Also note: Dreamweaver, Macromedia's HTML authoring tool, can easily embed a SWF movie into an HTML document. Dreamweaver also provides more control over layout and design of the page that contains the Macromedia Flash movie than the Publish feature in Flash. For more information on Dreamweaver or to download a free trial version visit the Dreamweaver product page.

Adding <OBJECT> and <EMBED> tags manually

It's simple to create the tags required to display a Flash movie in a browser.

To add OBJECT and EMBED tags manually:

  1. Copy the HTML code below and paste it into your HTML.
    <OBJECT 
    	classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
    	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" 
    	WIDTH="550" 
    	HEIGHT="400" 
    	id="myMovieName">
    
      <PARAM NAME=movie VALUE="myFlashMovie.swf">
      <PARAM NAME=quality VALUE=high>
      <PARAM NAME=bgcolor VALUE=#FFFFFF>
    
      <EMBED 
    	  href="/support/flash/ts/documents/myFlashMovie.swf" quality=high 
    	  bgcolor=#FFFFFF 
    	  WIDTH="550" 
    	  HEIGHT="400" 
    	  NAME="myMovieName" 
    	  ALIGN="" 
    	  TYPE="application/x-shockwave-flash" 
    	  PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
      </EMBED>
    </OBJECT> 
  2. Edit the attributes of the tags for the movie.
    • Change the HEIGHT and WIDTH parameters to match the height and width of the movie dimensions or use percentage values, if desired.
    • Change "moviename.swf" where it appears in the OBJECT and EMBED tags to the name of movie to be played.

Why use these all these HTML tags? What do they do?

The OBJECT tag is for Internet Explorer 3.0 or later on Windows 9x/2000/NT/ME/XP platforms or any browser that supports the use of the Flash ActiveX control. The "classid" must appear exactly as it does in this example. The "codebase" attribute must also appear exactly as it does in this example; it tells the browser where to find Flash Player for automatic download. Internet Explorer 3.0 or later on Windows 9x/2000/NT/ME/XP will prompt the user with a dialog asking if they would like to auto-install the Flash Player if it's not already installed. This process can occur without the user having to restart the browser.

The EMBED tag is for Netscape Navigator 2.0 or later, or browsers that support the use of the Netscape-compatible plugin version of Flash Player. The "pluginspage" attribute tells the browser where to direct the user to find Flash Player for download if the Player is not already installed. The user would then need to download and run the installer and restart their browser.

To ensure that the most browsers will play your Flash Player movies, you should place the EMBED tag nested within the OBJECT tag as shown in the above example. ActiveX-enabled browsers will"ignore" the EMBED tag inside the OBJECT tag. Netscape and Microsoft browsers using the Flash Plugin will not recognize the OBJECT tag and will read only the EMBED tag.

Note: Some visual HTML editors such as Dreamweaver support the insertion of ActiveX objects or Netscape plugin content. Except when using Dreamweaver, it may be necessary to interpret the HTML code above to determine what to enter and where into your editor's dialog box or configuration prompts. You may also have to edit the HTML source code directly to achieve the nested OBJECT/EMBED tag structure described above. Although some editors allow you to preview the content after you've placed it, test your pages in Internet Explorer or Netscape Navigator to see them as your users will when they are downloaded. Flash 4, Flash 5, and Flash MX users can easily obtain the correct code by using Flash's Publish feature, and opening this Flash-created HTML page in an HTML editor.

This code is the minimum required HTML to provide Flash Player content in your web pages. There are other attributes that you can use in your OBJECT and EMBED tags to help control your movie. To learn more about these review Flash OBJECT and EMBED tag attributes (TechNote 12701).

번호 제목 글쓴이 날짜 조회 수
128 Web Speech API Example (HTML5 STT & TTS) file 황제낙엽 2025.04.14 731
127 모바일과 데스크톱을 포괄하는 사용자의 터치 이벤트(onPointerTap) 황제낙엽 2025.04.09 648
126 Web RTC 에 관하여 황제낙엽 2024.11.20 626
125 div와 span의 차이점 (from Bing) 황제낙엽 2023.06.16 685
124 flexbox (flexible box layout) 황제낙엽 2023.02.27 641
123 characters from ISO 8859-1 황제낙엽 2020.11.10 36946
122 HTML FRAMESET 태그 예제 황제낙엽 2020.11.06 718
121 스마트 기기에서 여러 단말기의 해상도에 대응하기 위해 사용하는 HTML viewport meta tag 황제낙엽 2020.11.06 644
120 네이버의 무료 나눔 글꼴 황제낙엽 2020.05.06 1762
119 서버의 이미지나 txt 파일을 웹브라우저에서 다운로드하기 황제낙엽 2019.05.13 867
118 When to encode space to plus (+) or %20? (application/x-www-form-urlencoded) 황제낙엽 2019.04.15 917
117 HTTP/2 소개 황제낙엽 2018.10.12 693
116 글자, 문자, 텍스트, 글꼴, 서체, 폰트와 관련한 속성들 / font-size , 크기 단위(em, px, pt, rem), 절대 단위, 상대 단위 황제낙엽 2018.04.18 842
115 Pragma와 Cache-Control 황제낙엽 2018.03.28 845
114 로드밸런싱(L4)+아파치를 운영시 etag제거로 캐시 성능 최적화 file 황제낙엽 2018.03.28 944
113 HTTP 요청 헤더 III - If-Match, If-Modified-Since, If-None-Match file 황제낙엽 2018.03.27 726
112 재미난 로그인 페이지 만들기 file 황제낙엽 2018.03.26 1592
111 HTTP Cache-Control 요청 지시어 황제낙엽 2018.03.09 713
110 내 웹사이트의 속도를 빠르게! file 황제낙엽 2018.03.07 859
109 성능을 위한 초간단 HTTP 304 Not Modified 구현 방법 file 황제낙엽 2018.03.07 816