Home Web Front-end HTML Tutorial Introduction to the difference between OBJECT and EMBED tags used when displaying flash content_HTML/Xhtml_Web page production

Introduction to the difference between OBJECT and EMBED tags used when displaying flash content_HTML/Xhtml_Web page production

May 16, 2016 pm 04:37 PM
embed object

1. Introduction:

If we want to display flash content normally in a web page, there must be a tag specifying the flash path in the page. That is, the OBJECT and EMBED tags. The OBJECT tag is used for the IE browser on the Windows platform, while EMBED is used on the Netscape Navigator browser on the Windows and Macintosh platforms and the IE browser on the Macintosh platform. IE on the windows platform uses Activex controls to play flash, while other browsers use Netscape plug-in technology to play flash.

The following is a simple code example for inserting flash into a web page:

Code:

Copy code
The code is as follows:

codebase="http://download.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName">



NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">



2. Why use all the above tags? Can some tags be omitted?

OBJECT tag is used in windows IE3.0 and later browsers or other browsers that support Activex controls. The "classid" and "codebase" attributes must be written exactly as shown in the above example. They tell the browser the address to automatically download the flash player. If you have not installed flash player, browsers after IE3.0 will pop up a prompt box asking whether you want to automatically install flash player. Of course, if you don't want users who don't have flash player installed to automatically download the player, maybe you can omit these codes.
EMBED tag is used in Netscape Navigator 2.0 and later browsers or other browsers that support Netscape plug-ins. The "pluginspage" attribute tells the browser the address to download the flash player. If the flash player has not been installed, the user needs to restart the browser after installation to use it normally.
To ensure that most browsers can display flash normally, you need to nest the EMBED tag within the OBJECT tag, just like the above code example. Browsers that support Activex controls will ignore the EMBED tag within the OBJECT tag. Netscape and IE browsers using plug-ins will only read the EMBED tag and will not recognize the OBJECT tag. In other words, if you omit the EMBED tag, then Firefox will not be able to recognize your flash (but what is surprising is that if you omit object and only write embed, IE can display flash normally, haha, let’s take a closer look) .

Listed below are the required and optional attributes of the OBJECT and EMBED tags used to publish videos.

1. Required attributes:

·CLASSID - Sets the browser's Activex control, only used for OBJECT tags.
·CODEBASE-Set the location of the flash Activex control, so that if the browser is not installed, it can be automatically downloaded and installed. Only used for OBJECT tags.
·WIDTH-Specify the width of the flash video in percentage or pixels.
·HEIGHT-Specify the height of the flash video in percentage or pixels.
·SRC-Specify the download address of the video. Only for EMBED tags.
·PLUGINSPAGE-Set the location of the flash plug-in, so that if the browser does not have it installed, it can be automatically downloaded and installed. Only for EMBED tags.
·MOVIE-Specify the download address of the video. Only used for OBJECT tags.

2. Optional attributes and available values:

·ID-Set variable name for reference in script code. For OBJECT only.
·NAME - Set the variable name for reference in script code (such as javascript). For EMBED only.
·SWLIVECONNECT - (true or false) specifies whether to enable java when the flash player is downloaded for the first time. If these attributes are omitted, the default value is false. If you use javascript and flash on the same page, java must use FSCommand to work.
·PLAY - (true or false) specifies whether the flash movie will automatically play after the download is completed. If this attribute is omitted, the default is true.
·LOOP - (true or false) specifies whether to stop or continue looping after the last frame of the video. If this attribute is omitted, it defaults to true.
·MENU - (true or false)
·True displays all menus, allowing users to zoom in, zoom out, etc. to control video playback and other operations.
·False displays only the menu containing setting options and about flash.
·QUALITY - (low, high, autolow, autohigh, best)
·Low is faster than beautiful and does not apply anti-aliasing.
·Autolow focuses on speed at first, but can always improve the beauty when needed.
·Autohigh focuses on both playback speed and aesthetics, but sacrifices aesthetics to ensure playback speed when necessary.
·Medium applies some anti-aliasing without smoothing the bitmap. Its quality is higher than the low setting and lower than the high setting.
·High Beauty is better than playback speed, and anti-aliasing is always applied. If the movie does not contain animation, the bitmap will be smoothed; if the movie contains animation, the bitmap will not be smoothed.
·Best provides the best display quality regardless of playback speed. All output has anti-aliasing applied and all bitmaps smoothed.
·SCALE - (showall, noborder, exactfit)
·Default (Show all) The video is displayed in the specified area but maintains the original proportion. Borders will appear on both sides of the video.
·No Boder shrinks the video to fit the specified area, keeping the video undistorted, but part of the video may be cropped. However the original proportions of the film are maintained.
·Exact Fit causes the entire video to be displayed within a specified area. The video may be deformed and distorted, and the original proportions may not be maintained.
·ALIGN - (l, t, r, b)
·The default is centered. When the browser window is smaller than the video, the edges will be cropped.
·Left, Right, Top, Bottom are aligned along the edge of the browser according to the corresponding settings. If necessary, the other three sides will be trimmed.
·SALIGN - (l, t, r, b, tl, tr, bl, br)
·L,R,T,B
·TL,TR
·BL,BR
·WMODE- (window, opaque, transparent) Set the window mode attribute of the flash movie and specify the transparency, cascading and position of the flash in the browser.
·Window The video plays in its own rectangular window in the browser.
·Opaque video hides everything behind it.
·Transparent makes the flash video transparent and displays the web content behind the transparent video. This will reduce animation performance. And this property is not available in all browsers.
·BGCOLOR - (#RRGGBB, hexadecimal RGB value.) Specifies the background color of the video. Use this attribute to override the background color set in flash.
·BASE - Set the base directory or URL to resolve all relative paths in flash. Similar to the tag in web pages.
·FLASHVARS transfers variables to flash player, which requires flash player 6 and later versions.
·Pass root-level variables to the video. The format of the string is a name=value set separated by "&".
·Browser supports 64kB string length.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the function of embed? What is the function of embed? Dec 14, 2020 am 09:42 AM

embed is a function used in Excel to insert objects. Its syntax is "{ EMBED ClassName [Switches] }". The parameter ClassName represents the name of the container application.

What are the methods of converting java Object to byte and byte to Object? What are the methods of converting java Object to byte and byte to Object? Apr 20, 2023 am 11:37 AM

Object to byte and byte to Object Today we will realize how to convert from Object to byte and how to convert from byte to Object. First, define a class student: packagecom.byteToObject;importjava.io.Serializable;publicclassstudentimplementsSerializable{privateintsid;privateStringname;publicintgetSid(){returnsid;}publicvoidsetSid(in

How to use methods in Java Object class How to use methods in Java Object class Apr 18, 2023 pm 06:13 PM

1. Introduction to the Object class Object is a class provided by Java by default. Except for the Object class, all classes in Java have inheritance relationships. By default, it will inherit the Object parent class. That is, objects of all classes can be received using the reference of Object. Example: Use Object to receive objects of all classes classPerson{}classStudent{}publicclassTest{publicstaticvoidmain(String[]args){function(newPerson());function(newStudent());}public

Java uses the getClass() function of the Object class to obtain the runtime class of the object Java uses the getClass() function of the Object class to obtain the runtime class of the object Jul 24, 2023 am 11:37 AM

Java uses the getClass() function of the Object class to obtain the runtime class of the object. In Java, each object has a class, which defines the properties and methods of the object. We can use the getClass() function to get the runtime class of an object. The getClass() function is a member function of the Object class, so all Java objects can call this function. This article will introduce how to use the getClass() function and give some code examples. use get

What is the relationship between basic data types and Object in java What is the relationship between basic data types and Object in java May 01, 2023 pm 04:04 PM

The relationship between basic data types and Object. I know everyone has heard that Object is the base class of all types, but this sentence is actually not correct, because the basic data types in Java have nothing to do with Object. Here are some examples For example, when calling the swap method, you cannot directly pass the int type to the swap(Objectobj) method, because Object actually has nothing to do with the basic data type. At this time, a finds that our types do not match, so it automatically wraps it. It has become an Integer type. At this time, it can be contacted with Object and the swap method can be successfully called. Object, a wrapper class of basic data types

PHP Notice: Trying to get property of non-object solution PHP Notice: Trying to get property of non-object solution Jun 24, 2023 pm 09:34 PM

PHPNotice: Tryingtogetpropertyofnon-object Solution When you are developing in PHP, you may encounter this error message: "Notice: Tryingtogetpropertyofnon-object." This error message is usually due to you using an uninitialized object, or It's because your object has lost its reference in a certain piece of code and cannot access the properties correctly.

How to define the Object structure of redis How to define the Object structure of redis May 28, 2023 pm 05:20 PM

Introduction to the two-tier data structure of Redis. One of the reasons for the high performance of redis is that each of its data structures is specially designed and supported by one or more data structures. These flexible data structures are relied upon to improve reading performance. Fetch and write performance. If you want to understand the data structure of redis, you can discuss it from two different levels: The first level is from the user's perspective. This level is also the calling interface that Redis exposes to the outside, such as: string, list, hash ,set,sortedset. The second level is from the perspective of internal implementation, which belongs to the lower level implementation, such as: dict, sds, ziplist, quicklist, skiplis

Solution to PHP Notice: Trying to get property of non-object Solution to PHP Notice: Trying to get property of non-object Jun 22, 2023 pm 02:43 PM

Solution to PHPNotice: Tryingtogetpropertyofnon-object In the process of writing code in PHP, we may encounter the error message "Tryingtogetpropertyofnon-object". This error message usually occurs because we are trying to access a non-existent object property, causing an error in the code. This error message usually appears in the following situations: The object does not exist

See all articles