Asv3's Blog

October 8, 2009

text indent problem in Submit buttons on IE6

Filed under: css — Tags: , , , , — asv3 @ 2:24 pm

People often use Images for buttons in UI for visual feel and capability of pictures/images to convince the message within given space. Say, for example thumbs up and down buttons, to have then lied out in text take minimum 100px (width) each, where as using image buttons we can do that with 16×16 icon, hence we started using images as background for buttons and having same text with CSS text-indent to cover accessibility concerns. But here comes most nightmarish browser for front-enders, IE6, text-indent on submit buttons doesn’t work in IE6, but luckily we don’t have to change our approach or sweat over it, just add font-size:0 and line-height:0 for that button, you will achieve desired look and functionality.so that code look like this.

.image_submit_button{
background
: transparent url(image url); width:16px; height:16px; /* background position if you are using sprites */
font-size
:0; line-height:0/* add a ‘*’ before font-size/line-height if you want to hide this from other browsers */
}

September 12, 2009

MovieClip Properties

Filed under: flash — Tags: , , , , — asv3 @ 5:02 pm

In flash we can create 3 types of symbols.

1. MovieClip

2. Button

3. Graphic

Whenever we create a Symbol that Symbol will get added to the Library. Symbol in a Library is like master copy, we can drag Symbol from Library to create instance of the Symbol on stage. Here one thing we should remember is changes in library effect all instances on stag, where are changes to instances doesn’t. We can identify every instance of symbol with unique name called “Instance Name”.

MovieClip is the most used symbol in flash, in Flash almost every thing is a MovieClip. MovieClip is basically nothing but a container, similar to div in HTML, the only difference is it has it’s own time line. By that I mean, you can create n number of nesting MovieClips. Using property inspector we can assign an instance name for a MovieClip.

Flash doesn’t through error if you name two instances by same name, by default it assumes that name to the latest instance.

Button is used to define any click-able area. A Button is special kind of MovieClip, it has predefined 4 states.  Up, Over, Down, Hit.

Graphic is used to group shapes that doesn’t require it’s own time line.

Below are common properties of MovieClips which we can control using Actionscript.

  • x
  • y
  • width
  • height
  • scaleX
  • scaleY
  • rotation
  • alpha (transparency)

x, y take any negative or non negative integer, scaleX, scaleY, alpha take values between 0 and 1. width and height integers >= 0;

Create a free website or blog at WordPress.com.