6 Replies Latest reply on Oct 13, 2009 8:53 AM by pziecina

    XHTML 1.0 Strict - Valid Flash implementation and wmode transparency

    914_6 Level 1

      Hi, i have to follow the XHTML 1.0 Strict DTD, and its not validating the standard <object classid> way of getting SWFs into DW. I did some research (and not simply asking for the WHOLE solution) and i came up with this.




      It converts your <object classid> tags into something that is XHTML Valid. Works fine, my test pages are not W3C valid.


      Great but all of my SWFs (and there are more than a hundred...) are using wmode set to transparency. That was working fine (i tested using Adobe Lab Browser) but once i used VALIDIFIER  for XHTML-comply my pages, transparency is gone for most of the Windows browsers.


      Here is the code using validifier:



      <!--[if !IE]> -->

        <object type="application/x-shockwave-flash" data="../../flash/V01.swf" width="694" height="385" wmode="transparent">

      <!-- <![endif]-->

      <!--[if IE]>

        <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="694" height="385">

          <param name="movie" value="../../flash/V01.swf" param name="wmode" value="transparent"/>

      <!--><!-- http://Validifier.com -->


      <!-- <![endif]-->



      Am i asking too much to have BOTH transparency and XHTML 1.0 Strict validation?


      BTW I know about Flash Satay, but i dont want to re-edit ALL of my Flash files.



        • 1. Re: XHTML 1.0 Strict - Valid Flash implementation and wmode transparency
          pziecina Adobe Community Professional



          Your IE conditional comments are badly formed and will cause validation errors. IECC's are similar to html comments and if they are incorrect then the validation will not know where 1 comment starts and the next one begins/ends.

          For info on IECC's, see - http://www.quirksmode.org/css/condcom.html.

          And normal html comments - http://www.w3schools.com/tags/tag_comment.asp.



          • 3. Re: XHTML 1.0 Strict - Valid Flash implementation and wmode transparency
            914_6 Level 1

            Hi PZ, first thanks for helping. This code and comments validated fine in XHTML 1.0 Strict on the W3C validator. I just checked it again.


            Then if badly formed, what would you suggest? I have three hundred Flash files and dont want to open them all and use the Flash Satay method. Beside, this method suggests this:


            Isnt this As2 with all those underscores and level????

            Am i wrong assuming that most people simply ignore the validator errors when it comes to lash <object classid> problem? Been told so on this same exact forum last week.


            Thanks again.

            • 4. Re: XHTML 1.0 Strict - Valid Flash implementation and wmode transparency
              pziecina Adobe Community Professional



              The code you are showing is the standard code used by dreamweaver for inserting flash, and the incorrect IECC format works and validates because it is closing (and often opening), in an order that does make sense for the code to validate, (but it is still incorrect).


              As for the validation errors, there is still some debate as to if they are actual errors, (along with the proprietary css extensions, e.g. -moz, -webkit). This is because even though they are (according to some), errors the xhtml strict specification does allow for them (and for the css prop extensions, in the css spec.).


              As you say most people ignore the validation errors when flash is used, one of the reason (in my opinion), is that unless you can write a full description of what the flash content is doing/saying then it is invalid for accessibility purposes anyway, and what is the point in having a page that validates in xhtml and css but fails in the WAI guidelines, as accessibility was (and remains), the original purpose for writing valid xhtml and css, and not browser compliance.



              • 5. Re: XHTML 1.0 Strict - Valid Flash implementation and wmode transparency
                914_6 Level 1

                Uhh! The code is incorrect but validates fine????


                How do you think we - mortals, can understand a single thing when we read such stunning truths....??? Ok, i take a deep breath.....


                So, if i get it right, either i convince my client that we CAN ignore those W3C warnings and use the standard Flash insertion, as used by DW




                i open my 300's or so Flash files and re-edit them à-la-Satay?????


                There MUST be another way other than edit all those Flash files! If not, someone, either at Adobe or at W3C, is not acting very cleverly..... My reading indicates that its a MAJOR problem (Flash vs XHTML 1.0 Strict) and neither Adobe or W3C came up with a simplier solution?


                BTW, Flash Satay on A-List-Apart dates fo 2002, isnt a bit old? And isnt it AS2????



                • 6. Re: XHTML 1.0 Strict - Valid Flash implementation and wmode transparency
                  pziecina Adobe Community Professional



                  As you say we as mere mortals cannot do anything. What most people do not realize is that the w3 specs. are written mainly for the purpose of browser and software developers, and even though we must try and use these specs. they are (and probably never will be), perfect. As for validation all I can suggest is to look at the errors (when you have them), and think "is that important", or "is that causing a problem", never read the errors and think that must be fixed, otherwise I will get an exclamation mark and not a correct indicator in the browser, if you can fix it do so, but do it for the right reasons.


                  As for convincing your client, there has been a lot of talk about validation over the last few years, but as I said the original purpose was accessibility, so unless they are going to implement the accessibility guidelines as well?


                  Now for flash satay, if you read the w3 guidelines for inserting flash (http://validator.w3.org/docs/help.html#faq-flash), you will see that they reference the flash satay method, and this is why I say validate but do not concentrate on validation, and as you correctly say, the article was written in 2002, (see also - http://www.ambience.sk/flash-valid.htm.).

                  An article that you may be interested in (shows various ways to include flash) is - http://perishablepress.com/press/2007/04/17/embed-flash-or-die-trying/. But if you have a large number of flash files, my recommendation is to leave the code as is, and update when (or maybe that should be, if), Adobe and/or W3 decide on a valid solution to the problem.


                  The good new is that (x)html 5's way to include flash does validate.


                  For info on how to read (and why you should not as a designer/developer), w3 specs - http://www.alistapart.com/articles/readspec/, a little old but still valid.