473,738 Members | 11,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flash OBJECT and EMBED tag (Part one)

dream party
4 New Member
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I wrote this article.
This article includes two parts:
1. General introduction to the two tags.
2. Why do we use all the tags above? Is there any tag that can be left out?

1. General introduction to the two tags.

To display Flash correctly on web page, HTML tags which indicate the path of the Flash file is needed in the web page. These HTML tags are OBJECT tag and EMBED tag. OBJECT tag is used for IE on Windows, while EMBED tag is for Netscape Navigator on Windows and Macintosh and IE on Macintosh. IE on Windows play Flash with ActiveX component while other web browsers play Flash with Netscape plug-in technique. The code below is an example used to embed Flash file to web page.
Example HTML Code:
Expand|Select|Wrap|Line Numbers
  1. <OBJECT classid="clasid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
  2. WIDTH="432" HEIGHT="330" id="myMovieName" >
  3. <PARAM NAME="movie" VALUE="myMovieName.swf" />
  4. <PARAM NAME="quality" VALUE="high" />
  5. <PARAM NAME=bgcolor VALUE=#FFFFFF>
  6. <EMBED src="/flash/ myMovieName.swf" quality="high" bgcolor=#FFFFFF WIDTH="432" HEIGHT="330" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
  7. </EMBED>
  8. </OBJECT>
Part 2 "Why do we use all the tags above? Is there any tag that can be left out?" will be continued soon enough:)


[removed links]

Related articles
[removed links]
Apr 24 '09 #1
2 8082
dream party
4 New Member
Now part two is finished.

Why do we use all the tags above? Is there any tag that can be left out?

OBJECT tag is used for IE 3.0 on Windows & later version of IE and other web browsers that supports ActiveX component. Value of attribute “classid” and “codebase” must be accurate the same as the example code above. These two attributes tell web browsers the download URL address of Adobe Flash Player automatically. If you haven’t installed Adobe Flash Player, IE 3.0 and later version of IE will pop up a dialog box that asks if you want to install Adobe Flash Player automatically. If you don’t want to enable the users that haven’t installed Adobe Flash Player to automatically install it, you can leave out these two attributes.

Embed tag is used for Netscape Navigator2.0 and later version and other web browsers that supports Netscape plug-ins technique. Attribute “PLUGINSPA GE” indicates the download address of Adobe Flash Player to web browser. If Internet users haven’t installed Adobe Flash player, after the installation, they have to reboot their web browsers.

To ensure displaying Flash correctly on most web browsers, you have to nest the EMBED tag in the OBJECT tag, just like the example code above. Web browsers supports ActiveX component will automatically ignore the EMBED tag nested in the OBJECT tag. Netscape browser and Netscape plug-in supported browsers will only read EMBED tag neglected OBJECT tag. i.e. if you leave out the EMBED tag, Firefox will not identify your Flash file. (For a wonder, if OBJECT tag is left out but only with EMBED tag, IE also can display Flash correctly LOL. More discussion on this issue will be continued)

Required and optional attributes of OBEJCT tag and EMBED tag for publishing videos to the Internet are as follow:

(1). Required attributes

•CLASSID - Used to set the ActiveX component. It is only used in OBJECT tag.
•CODEBASE - Used to indicates the URL of the ActiveX component, so if the ActiveX component is not installed in web browser, it will automatically download it. It is only used in OBJECT tag.
•WIDTH - Indicates the width of the video with percentage or pixel.
•HEIGHT - Indicates the height of the video with percentage or pixel.
•SRC - Indicates the URL of the video (relative or absolute path). For EMBED tag only.
•PLUGINSPA GE - Used to indicates the location of plug-in Adobe Flash Player, so if this plug-in is not installed, it enables the page automatically install it. For EMBED tag only.
•MOVIE - Indicates the location of the video. For OBJECT tag only.

(2). Optional attributes and their available value

•ID - Identifies the reference name of the flash movie, so that it can be referenced by scripting language such as JavaScript or VBScript. (attribute for OBJECT tag only)
•NAME - Identifies the reference name of the flash movie, so that it can be referenced by scripting language. (attribute for EMBED tag only)
•SWLIVECON NECT - (true or false) Specifies whether the web browser should start Java when loading the Adobe Flash Player for the first time. The default value is false if this attribute is omitted. If you use JavaScript and Flash on the same web page, Java must use FSCommand to work.
•PLAY - (true or false) The default value is true if this attribute is omitted. Specifies whether the flash movie should plays automatically while loading in the web browser.
•LOOP - (true or false) Specifies whether the flash video should replay or stops when it comes to the last frame.
•MENU - (true or false)

* true - display the full menu, allowing the Internet users a wide range of options to zoom, enhance, etc.

* false - display the menu that contains only the Settings option and About Flash option.

•QUALITY - (low, high, autolow, autohigh, best)

* low - prefers playback speed other than appearance and never uses anti-aliasing.

* high - prefers appearance other than playback speed and always uses anti-aliasing. If the movie does not contain animation, bitmaps are smoothed; if the movie has animation, bitmaps are not smoothed.

* autolow - emphasizes playback speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If the Flash Player detects that the processor can handle it, anti-aliasing is turned on.

* autohigh - emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the View > Antialias setting in Flash.

* best - provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.

•SCALE - (showall, noborder, exactfit)

* showall - default value. Maintaining the original aspect ratio of the movie so that the entire flash video can be visible in the specified area without distortion. Blank may appear on two sides of the video.

* noborder - Maintaining the original aspect ratio of the movie, but the flash video may possibly with some cropping without distortion while the video is scaled to fill the specified area.

* exactfit - makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.

•ALIGN - (l, t, r, b)

* l, r, t, and b - align the movie along the left, right, top or bottom edge, respectively, of the browser window and crop the remaining three sides as needed.

* tl and tr - align the movie to the top left and top right corner, respectively, of the browser window and crop the bottom and remaining right or left side as needed.

* bl and br - align the movie to the bottom left and bottom right corner, respectively, of the browser window and crop the top and remaining right or left side as needed.

•WMODE - Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.

* window - movie plays in its own rectangular window on a web page.

* opaque - the movie hides everything on the page behind it.

* transparent - the background of the HTML page shows through all transparent portions of the movie, this may slow animation performance.

•BGCOLOR - [ hexadecimal RGB value] in the format #RRGGBB . Specifies the background color of the movie. Use this attribute to override the background color setting specified in the Flash file. This attribute does not affect the background color of the HTML page.
•BASE - . or [base directory] or [url]. Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.
•FLASHVARS - Possible values: variable to pass to Flash Player. Requires Macromedia Flash Player 6 or later.

* Used to send root level variables to the movie. The format of the string is a set of name=value combinations separated by '&'.

* Browsers will support string sizes of up to 64KB (65535 bytes) in length.

* For more information on FlashVars, please refer to "Using FlashVars to pass variables to a SWF" (TechNote tn_16417).


[link removed]

Related tutorials
[removed links]
Apr 29 '09 #2
chandresh1983
1 New Member
Hello,

I am asp.net developer and using one Flash which use Images from the Xml which is Dynamically changed from the Dot net Part and we want that when the xml is changed the changes should reflect on the Flash. When I am running the application on the firefox it works fine but when I am Running my application on the IE 8 it works fine at the very first time when it reads the xml for first time but when xml is changed dynamically then flash still shows the previews data which it has read from the xml. I am using a object tag here is the tag code for this.
=============== =============== =============== ==============
Expand|Select|Wrap|Line Numbers
  1. <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" 
  2.             id="thumbnail_beta" align="middle">
  3.     <param name="allowScriptAccess" value="sameDomain" />
  4.     <param name="allowFullScreen" value="false" />
  5.     <param name="movie" value="thumbnail_beta.swf" />
  6.     <param name="quality" value="high" />
  7.     <param name="bgcolor" value="#000000" />
  8.     <param name="Refresh" value="true" />
  9.     <embed src="thumbnail_beta.swf" quality="high" bgcolor="#000000" width="940" height="700" name="thumbnail_beta" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
  10.     </object>
=============== =============== =============== =============
Please tell me what must be the Problem it behaves like That
Jan 9 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3377
by: Mirco | last post by:
Hi I have a page written with php and a MySQL Database. Now, I want to redesign the whole, but still with the Database and php. is it possible to design the page with Flash and then to put all the php commands into the source code? specially, I still need the extension *.php? Greets and thanks in advance mirco
9
8595
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). On the aspx page I have the object tag as follows:
10
29904
by: Steve Cook | last post by:
Hi, I have an upload application written in PHP and Flash. The PHP page gets the file information via $_POST. Moreover, the user never actually visits the PHP page, rather Flash sends the information to the PHP page and then loads the result, all in the background. Right now, the php page cannot access the $_SESSION. Is there anyway that I can conitnue the PHP session when doing this or does the user have to visit the PHP page?
2
3551
by: avanhalen | last post by:
To embed flash objects in my pages, I read them from a database. A script file (Filedownload.aspx) reads it from the database, and streams it to the browser. Here are two example flash objects in a page. The first 1 (a simple link to an existing swf-file on the webserver) is showing in each browser (IE & FF), while the other one (using the filedownload page) is only being shown in FF. Does it have something to do with file-extension?
5
4895
by: suresh_nsnguys | last post by:
Hi, I am facing one problem in embed flash object.i am displaying the flash (.swf file) using embed tag<embed> in IE.i want to display the alert box when user click the mouse over the flash .i am able to display the alert box only when user double click the flash .but i want alert box need to display when single mouse click over flash. my code: <script> function kiosk(){ // fn will be called when user click mouse
0
2808
by: crisscross27 | last post by:
Hi, I found a page called "myflashfetish" where you chan choose mp3 players for my space, well the problem is this, I wanted to place 2 or more players in myspace in a particular place, I read another sources how to do that, so i tried to add "position:absolute;left:525px;top:250", i succeed moving the first player but i couldn´t move the second, in change it appears besides the first one every time i move the first one, could you help me? how...
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.