Tuesday, March 31, 2009

Will Users Switch Over To Windows 7?

After Windows Vista was released, some users decided to take the leap and stayed on in the Vista camp while others were forced there as it was pre-installed on their computers. In either case, the most popular OS running on PCs today is Windows XP which according to NetApplications Market Share is 63.5%.

Monday, March 30, 2009


I stumbled across a mock of TinyURL called HugeURL. They take any URL you can throw at them and they turn it into an obnoxiously long URL.

Just for giggles, check it out at http://www.hugeurl.com

ActionScript: Why can't you access a Button's children

Have you ever wondered why you have to use a MovieClip instead of a Button symbol type when you want to access the child elements? Here's the explanation...


The MovieClip class in ActionScript has the following inheritance tree:
MovieClip - Sprite - DisplayObjectContainer - InteractiveObject - DisplayObject - EventDispatcher - Object
The ability to interact with child elements of the movie clip come from the DisplayObjectContainer class, which has the numChildren property and the addChild, addChildAt, contains, getChildAt, getChildByName, getChildIndex, removeChild, removeChildAt, setChildIndex, swapChildren, and swapChildrenAt methods.


The SimpleButton class in ActionScript has the following inheritance tree:
SimpleButton - InteractiveObject - DisplayObject - EventDispatcher - Object
None of the classes in this hierarchy contain methods to deal with child elements.

Sunday, March 29, 2009

Where Dost Thou Point To?

I spent some time recently working with ActionScript 3 and Adobe Flash. One of the common issues encountered by novice ActionScript developers is that when loading resources, the path to the resources should be relative to the page on which the Flash Player is embedded, instead of from the SWF file.

If you have an ASP.NET web page, a master page, a user control and an SWF file, the relative path to the resource should be relative to the ASP.NET web page irrespective of where the Flash object is embedded (embedding the Flash object on the master page or user control doesn't change the fact that it is rendered as a part of the page).

First Views On Internet Explorer 8

I just installed Internet Explorer 8. Right after the install, I was taken to the Welcome to Internet Explorer 8 page which invited me to try the Accelerators feature. The first thing I did was to select the "One Microsoft Way, Redmond, WA 98052-7329" text on the welcome page, but that didn't seem to go too well - they seem to have a problem tracking my mouse cursor.

I got the Accelerators working with another page where I selected a bit of text on a page and got Internet Explorer 8 Accelerator to perform a Google Search for the selected text. The Translate Accelerator is pretty neat as it enables you to view the translated version of text in a WebSnap-like interface:

The Suggested Sites feature took a while to get started, but seems to be a great feature. I'm guessing Microsoft may be using it to find websites and gather statistics to add to the Windows Live search.

My overall experience with Internet Explorer 8 is pretty much the same as Internet Explorer 7 - the browser has all sorts of bells and whistles and feels really cool, but feels very sluggish even on Windows XP. Opening a new tab alone takes about two seconds while Firefox, my default browser, does it instantaneously. Web slices is a new feature that will send developers off to writing updates for their websites. The compatibility mode comes in pretty handy for older web apps that are IE-specific. It may take an update or two to get minor issues sorted out, but it is a welcome addition for web developers complaining about standard-compliance.

Internet Explorer 8

MS Internet Explorer 8 was released on 19th March, with lots of new features and better standard compliance. You can get a copy from the IE website.

Changes in IE8 include removal of the WBR tag and CSS Expressions. You can still use Compatibility Mode by including the following META tag onto your page:
<meta http-equiv="X-UA-Compatible" content="IE=7">

IE-specific HTML/CSS

I've been using IE specific CSS overrides in my CSS experiments for stuff that handles differently in IE and Firefox. When creating a Fieldset in IE, I get a rounded border. This apparently is the simplest way to get a rounded border in IE. I added the CSS attributes for the rounded border into the style sheet for Firefox. Now, the visual difference between the rendering in IE and in Firefox is the padding so I had to serve a different CSS to each browser.

I didn't want to maintain two entirely different CSS files loaded through server-side scripting and using Javascript to change stylesheets didn't really appeal to me so I went with IE's ability to execute code within HTML comments (conditional execution/rendering).

The comment looks like this:
<!--[if IE]><style type="text/css">@import "ie_fixes.css";</style><![endif]-->

Internet Explorer reads the "if IE" and makes the style tag a part of the document while Firefox treats it as an HTML comment.