| Write 100% validated Flash HTML code |
|
|
|
| Written by Waheed Akhtar |
| Thursday, 09 July 2009 06:56 |
|
Validating a website's HTML is something that can be done by following the rules of HTML/XHTML scripting. However, as a developer we face a lot of problems in validating common HTML codes that are in practice. To adjust these exceptions we have to sought out some short cuts or hacks. In this short article I will guide you to write 100% validated flash embedded HTML code. W3C standards are used for validating website HTMl/XHTML codes. W3C http://validator.w3.org/ In popular HTML editors like Dreamweaver, Front Page or any other you like, there is a standard code for inserting Flash movies or objects. Normally used flash html code<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="348" height="85"> This is not W3C valid HTML code. If this code is used in web page and tried to get validated from W3C, It will show you a lot of errors. If you search the internet for solution, then you will reach on different topics. However, it will be difficult to found exact W3C valid code that can be used everywhere. After some research with hit and try methods, I manage to make this code that we used in our client's website also. 100% validated flash html code
If this code is used to embed flash movie in webpage. It will pass the W3C validotor. Basically, if you try to observe the difference between above two codes. Validated code is a lot cleaner and simpler. There is an additional attribute data="Movie1.swf". Now that was for your flash movie code. What if you are using video embed code from YouTube. Normally used Youtube video codeThis video is "Wonderwall" song from Oasis. It's code will be like below <object width="425" height="344">
Now guess what?.... Youtube movie code is Not Valid. Yes, if this code is used directly in web page, code will not be validated from W3C. Validated Youtube video codeNow here is valid Youtube video code. <object type="application/x-shockwave-flash" data="http://www.youtube.com/v/6hzrDeceEKc&hl=en&fs=1&" width="560" height="340">
This code can be used as it is by just replacing the video "data" and "movie" URLs. From now on, write Flash code with ease and get validated your website from W3C. http://validator.w3.org/ Here are some reference websites, used to write this article. http://www.garybadger.com/youtube.html http://www.alistapart.com/articles/flashsatay
|
| Last Updated on Wednesday, 19 May 2010 06:48 |




thanks. a lot .. your code is w3c passed
pritpal