Recently I posted an article about Fixing validation error for embedded flash movies on site.

One of my friends asked how to embed a transparent Flash Movie. The answer lies below:

First of all embed the flash movie as I have mentioned in my earlier article. See: Fix for Validation Error for Embedding Flash Movies on your Site using Dreamweaver.

After you have finished the above process, follow the following steps:

  1. Search for the code:
    <script type=”text/javascript”>
    AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’400′,’height’,’250′,’src’,’banner’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,’movie’,’images/banner’ ); //end AC code
    </script>
  2. After ‘quality’,’high’, add ‘wmode’,’transparent’,
  3. Now search <object data=”c.swf?path=movie.swf” …>…</oject>
  4. Between this object tags insert <param name=”wmode” value=”transparent” />
  5. Save the file and upload it

You will get a transparent flash movie now.

Hope this helps those who are looking for it.

Fix WordPress search form (x)html validation errors

On September 14, 2010, in Web, by Bikas

A common problem with wordpress blogs or sites is that while validating the site we get validation error for the search form used in the site.

The error is for <form role=”search” method=”get” id=”searchform” action=”http://xadd..>..</form> where the validator does not validates role=”search”.

The step by step method to fix this issue is mentioned below:

  1. Login to your site through any ftp client where the wordpress site is installed.
  2. Search for the general-template.php file. It will be in the folder wp-includes.
  3. Open the file and search for the code $form = ‘<form role=”search” method=”get” id=”searchform” action=”‘ . home_url( ‘/’ ) . ‘” >
  4. Remove role=”search”, save the file and upload the file.

The search box will still work fine without any error. The positive thing is that you will not get any validation error due to your search form.

Recently I came upon a problem, which you guys must have already faced with is embedding a flash movie on to your site while supporting the web standards. While validating the site I got 7 validation errors and all of them was because I had embedded a Flash Movie to my site.

While searching for the fix, I came on to http://www.alistapart.com/articles/flashsatay/ whose solution really worked fine for me and I am really thankful to them. The solution is real easy and you can try for yourself following the steps mentioned below.

  1. First of all create a container flash file, exactly of the same height and width for the movie file you want to embed on your site. For example, if you want to embed a flash banner to your site and its width is 400px and height is 250px, your container movie’s width and height would be of 400px and 250px, respectively.Name the file c.fla. You can name it something else too; just for my convenience I am naming it c.fla
  2. on the first frame of the movie c.fla, write a script for calling your flash movie on to it, which will be something like the below:
    _root.loadMovie(“banner.swf”, “0”);

    flash script

    where banner.swf is your flash movie that you want to embed on your site.

  3. Now publish your container movie which in my case will be c.swf
  4. Now search for your flash embedded code that will be similar to the following:
    <script >
    AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’400′,’height’,’250′,’title’,’Banner’,’src’,’banner’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,’wmode’,’transparent’,’movie’,’images/banner’ ); //end AC code
    </script>
    <noscript>
    <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=”400″ height=”250″ title=”Banner”>
    <param value=” banner.swf” />
    <param value=”high” />
    <embed src=” banner.swf” width=”400″ height=”250″ quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” wmode=”transparent”></embed>
    </object>
    </noscript>
  5. Now we will edit this code a little so that we get our desired result. Search for the code written between the <object>…</object> tags, which will be similar to-
    <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=”400″ height=”250″ title=”Banner”>
    <param value=” banner.swf” />
    <param value=”high” />
    <embed src=” banner.swf” width=”400″ height=”250″ quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” wmode=”transparent”></embed>
    </object>
  6. Edit the code to be something like below:
    <object data=”c.swf?path=movie.swf” width=”400″ height=”250″ title=”Banner”>
    <param value=”c.swf?path=movie.swf” />
    <param value=”high” />
    </object>
  7. Be sure to remove the <embed> … </embed> tags and whatever is between them. Your final code should be something like the below mentioned:
    <script >
    AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’400′,’height’,’250′,’title’,’Banner’,’src’,’banner’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,’wmode’,’transparent’,’movie’,’images/banner’ ); //end AC code
    </script>
    <noscript>
    <object data=”c.swf?path=movie.swf” width=”400″ height=”250″ title=”Banner”>
    <param value=”c.swf?path=movie.swf” />
    <param value=”high” />
    </object>
    </noscript>
  8. Now you are ready to publish your site. Save the file and upload it along with the container movie that you created, in this case c.swf
  9. Check for validation.