Thursday, June 24, 2010

Flash Actionscript Tweening

function tween(mc, what, easeType, begin, end, time, then, onWhat) {
if (easeType == 1) {
myEase = Regular.easeInOut;
} else if (easeType == 2) {
myEase = Strong.easeInOut;
} else if (easeType == 3) {
myEase = Regular.easeOut;
} else if (easeType == 4) {
myEase = Strong.easeOut;
} else if (easeType == 5) {
myEase = Regular.easeIn;
} else if (easeType == 6) {
myEase = Strong.easeIn;
} else if (easeType == 7) {
myEase = None.easeNone;
} else if (easeType == 8) {
myEase = Back.easeOut;
}

var myTween:Tween = new Tween(mc, what, myEase, begin, end, time, false);
myTween.onMotionFinished = function() {
if (then != null) {
then.call();
}
//this.yoyo();
};

};

Friday, February 5, 2010

IE6: Removing Padding on Input Checkbox

If you've ever put a background on an input checkbox and viewed it in IE6, you'll notice there is padding around the checkbox. Other browsers don't have this padding, and it can ruin designs if not dealt with.

An easy way to get rid of the padding through CSS is by adding these styles to the checkbox:

margin:0; width:13px; height:13px; overflow:hidden;

Doing this will not affect any other browser (at least modern ones) and will fix your IE6 issues.

Thursday, February 4, 2010

Images in LABEL tag no clickable in IE

Internet Explorer doesn't allow your images that are within a LABEL tag to be clickable. There is a javascript hack fix for this that works for sure in IE6-8. Sometimes you need, for usability, to have your images work like text in the LABEL tag, this is how you can accomplish this in IE.

Note that all other browsers do this fine...