SWFObject 2.2 Released

by Nathan 23. June 2009 08:09

 

SWFObject 2.2 has been released and has a number of new features.

1. Improved DomContentLoaded emulation for Internet Explorer
2. Dynamic library support
3. Callback method for embedding Flash content
4. No more embed tags
5. Improved Flash Player version detection for non-Internet Explorer browsers
6. Improved Adobe Express Install
7. Improved createCSS method
8. Detected user agent properties are now public via the swfobject.ua object
9. No more conditional compilation directives
10. The option to switch off SWFObject's default show/hide behavior

 More information found here

http://code.google.com/p/swfobject/wiki/whats_new

 

 

An example to implement with javascript  is:

         <div id="flashHeader" style="height:200px">

Alternative Content

        </div>

        <script type="text/javascript">
            swfobject.switchOffAutoHideShow();
            swfobject.embedSWF("flashFile.swf", "flashHeader", "800", "180", "9.0.0", "expressInstall.swf");
        </script>  
 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Flash

Selecting Default Values on Dropdown Lists

by Nathan 2. June 2009 10:17

If you would like your application to set the selected item in your dropdownlist to an item from a variable passed to it, or from the database

Here are some examples:

 

ASP.NET 

<asp:DropDownList ID="DropDownList1" runat="server"/><br />

DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue(value.ToString()));

 

VBScript ASP Example:

 

  response.write "<select size=""1"" name=""selectData"" id=""selectData"">"
  response.write "<option value='0'>-- Select  Data --</option>"
  do while not objRs.eof

      if (ContactType = objRS("Value")) then
          response.write "<option value='"+cstr(objRS("Value"))+"' selected>"+objRS("Description")+"</option>"
      else
          response.write "<option value='"+cstr(objRS("Value"))+"'>"+objRS("Description")+"</option>"
      end if

      objRs.MoveNext
  loop
  response.write "</select></font></p>"

 

If you have a lot of variables i suggest using a for loop:

 

    response.write "<select name='select1'>"

    Dim MyWebSiteArray
    PrefOddsArray = MyWebSiteArray("web design","design","website","nathan","baker")

    For each Item in MyWebSiteArray

   DatabaseValue = RS("ValueFromDatabase")


   if(DatabaseValue = Item)  then
        response.write "<option value="""+Item+""" selected>"+Item+"</option>\n"
    else
        response.write "<option value="""+Item+""">"+Item+"</option>\n"
    end if
    Next
    response.write "</select></td>"
    response.write "</tr>"

 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

ASP | ASP.NET

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

I am a Website Developer and Designer based in Sydney, Australia. I have experience in developing websites and applications using various languages including C#, VB, C++, Flash (ActionScript), SQL and Linux. You can see some of my projects at www.nathanbaker.com.au

Page List