Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 01-07-2006, 07:48 PM   #1 (permalink)
Junior Member
 
Join Date: 12-07-05
Location: Bloomfield Hills, Michigan
Posts: 12
iTrader: 0 / 0%
Latest Blog:
None

smartfinds is a jewel in the roughsmartfinds is a jewel in the roughsmartfinds is a jewel in the roughsmartfinds is a jewel in the roughsmartfinds is a jewel in the roughsmartfinds is a jewel in the rough
Send a message via Yahoo to smartfinds
HTML Validation and Flash Embed Tag

Hello Everyone,

We had the pleasure of learning something new today and thought this might help others as well. We had to spend quite some time searching to get the right answer.

Go to W3C http://www.w3c.org and go to the HTML Validation. If you are using Flash on a web page ask that this page be validated. Details on how to do this can be found on that page.

Most likely if you use the standard Flash tags, one of them will be the "embed" tag. Unfortunatley, W3C will not recognize this to be a valid HTML tag. Truly and absolutely amazing! Everyone uses the "embed" tag with a flash movie in their HTML code. It is the primary method that Mozilla browsers use to run the flash movie.

After some research in the "Bugs" area of the W3C website, there were others that had submitted the exact same question wondering "why". The answer to the problem can be found at this url that was recommended in one of the "bug" responses at the W3C:

http://www.alistapart.com/articles/flashsatay/

In summary, you need to remove the "embed" tag and in your "object" tag you would
- remove the CLSID and the CODEBASE within the "object" tag.
- add DATA and TYPE to your object tag.
- if you have not already, then you would also include the PARAM as an example below.

<object data="flashmoviename.swf" type="application/x-shockwave-flash" width="504" height="250">
<param name="MOVIE" value="flashmoviename.swf">
</object>

This method will not only insure that your HTML code is validated, but this will work for both IE and Mozilla browsers. We tried it today and had no difficulty with our flash movies on our site in either browser type.

Hope this helps others.
__________________
Melih ("may-lee") Oztalay, CEO
SmartFinds Internet Marketing
www.smartfindsmarketing.com
E-Mail Me
Tel: (248) 568-2241

Last edited by smartfinds; 01-07-2006 at 08:08 PM..
smartfinds is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-07-2006, 08:05 PM   #2 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,504
iTrader: 0 / 0%
kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
Nice, thanks for the info
__________________
http://www.kylevarga.com - My blog.
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-08-2006, 11:14 AM   #3 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,468
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to behold
Send a message via MSN to LazyJim
Nice
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-08-2006, 11:14 AM   #4 (permalink)
Senior Member
 
Michael Allison's Avatar
 
Join Date: 12-08-05
Location: Spokane, WA
Posts: 751
iTrader: 0 / 0%
Latest Blog:
None

Michael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web pro
Send a message via MSN to Michael Allison Send a message via Yahoo to Michael Allison Send a message via Skype™ to Michael Allison
Cool deal!!

That always bugged me, but not enough to do anything about it...

-Michael
Michael Allison is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2006, 02:57 PM   #5 (permalink)
Junior Member
 
kingpixel's Avatar
 
Join Date: 06-05-06
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

kingpixel is liked by many
i have used this method in the past, and it works great but has some drawbacks. While it is true that it passes validation, and it works in most/all browsers, it has a basic flawand that is this: it does not stream flash content to IE browsers. meaning, it waits for the entire movie to cache locally before showing a single frame. This is a result of the "data=" part of the tag. It is most inconvenient for very large flash files (like video) and requires the work-around of loading a small container .swf first that then loads your main content. and since you must pass a reference to the main content in the object tag, it makes templatizing your flash embeds more difficult.

On another note, just today I noticed that simply formatted embed tag seems to work for embedding flash in all browsers. For more than a year I've hearing the evils of the embed and how it will soon be gone, only to find that the embed turns out to be the most reliable. I'm beginning to think this whole w3c and validation biz might just be for the birds.

here's the code snippet that worked:

<embed width="320" height="240" menu="true" loop="true" play="true" src="movie.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
kingpixel is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-06-2006, 01:24 AM   #6 (permalink)
v7n Mentor
 
JamieJelly's Avatar
 
Join Date: 03-09-06
Posts: 1,250
iTrader: 0 / 0%
Latest Blog:
None

JamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest orderJamieJelly is a web professional of the highest order
this is interesting: http://www.alistapart.com/articles/flashsatay/
JamieJelly is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-06-2007, 08:01 AM   #7 (permalink)
Junior Member
 
Join Date: 10-06-07
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

TAMARA is liked by many
<div id="flashbox">
<embed src="Intro.swf" width="541px" height="368px"> </embed>
</div>
It will not validate do you have any idea?

I read about what you sayed

<object data="flashmoviename.swf" type="application/x-shockwave-flash" width="504" height="250">
<param name="MOVIE" value="flashmoviename.swf">
</object>

But it doesn’t help me
So if you have a minute please let me know
TAMARA is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-07-2007, 09:21 PM   #8 (permalink)
Member
 
Join Date: 07-12-07
Location: Nova Scotia Canada
Posts: 58
iTrader: 0 / 0%
Latest Blog:
None

kimberlybarryd is liked by many
This will validate to strict. Create a .gif the same size as your .swf and name it needplugin.gif
HTML Code:
<object type="application/x-shockwave-flash" data="images/your.swf" width="765" height="70"> <param name="movie" value="images/your.swf" /> <param name="BGCOLOR" value="#000000" /> <a title="You must install the Flash Plugin for your Browser in order to view this movie" href="http://www.macromedia.com/shockwave/download/alternates/"><img src="images/needplugin.gif" width="765" height="70" alt="placeholder for flash movie" /></a> </object>

Last edited by kimberlybarryd; 10-07-2007 at 09:38 PM..
kimberlybarryd is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-27-2007, 05:42 PM   #9 (permalink)
Junior Member
 
Join Date: 10-06-07
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

TAMARA is liked by many
embed tag

anybody how i validate



<div id="flashbox"><embed type="application/x-shockwave-flash" src="Teach%20My%20Toddler%20-%20The%20all-in-one%20learning%20system%20for%20toddlers%21_files/intro.swf" id="inside" name="inside" bgcolor="#ffffff" quality="high" height="368" width="541">
</div><!--close flashbox-->
TAMARA is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-26-2008, 07:13 AM   #10 (permalink)
Junior Member
 
Join Date: 08-26-08
Location: London, United Kingdom
Posts: 7
iTrader: 0 / 0%
Latest Blog:
None

GSources is liked by many
Hello,

To embed a simple flash file into your site and keep it fully validated, you can use the following codes depending on the DOCTYPE that has been defined.

For HTML 4.01 Transitional:

Code:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie"> <param name="movie" value="path_to_file/file.swf"> </object>
For HTML 4.01 Strict (requires a container around code):

Code:
<div class="cFlashMovie"> <object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie"> <param name="movie" value="path_to_file/file.swf"> </object> </div>
If you do not wish to assign a CSS Class or ID to the Div, then just use
Code:
<div></div>
around the flash code. Alternatively, you may use various other containers such as
Code:
<p></p>
.

For XHTML 1.0 Transitional (requires self-closing end to param):

Code:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie"> <param name="movie" value="path_to_file/file.swf" /> </object>
For XHTML 1.0 Strict (requires a container around code):

Code:
<div class="cFlashMovie"> <object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie"> <param name="movie" value="path_to_file/file.swf" /> </object> </div>
Those are four validated flash embed codes for the most common DOCTYPES used in Web Development. These will validate fine as long as the rest of your code is good. Hopefully this post helps people in the future.
GSources is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML and Flash Aliya Coding Forum 5 11-11-2007 06:26 AM
flash based on an html page zoran Web Design Lobby 1 01-12-2007 06:37 AM
Flash or Html franklin Webmaster Revenue 26 08-24-2004 09:08 PM
&amp; in URLS for HTML validation thing2b Web Design Lobby 4 06-28-2004 11:01 AM
html/flash kwvarga Coding Forum 4 06-03-2004 10:59 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:44 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.