segMin = .75; //minimum segment duration
segMax = 1.25; //maximum segment duration
minVal = 5;
maxVal = 10;
end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
s = random(minVal,maxVal);
endVal = [s,s];
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
s = random(minVal,maxVal);
startVal = [s,s]
ease(time,start,end,startVal,endVal)
Wednesday, September 28, 2011
Tuesday, June 14, 2011
Mobile Browser Detect
This is a great PHP script to detect the type of device that is visiting your site and redirecting to a different version. It detects all major phone operating systems (android, iphone, blackberry, windows, etc.). The script is free for non-profit and only $50 if your company is for profit.
Check it out: http://detectmobilebrowsers.mobi/
Monday, June 6, 2011
HTML5 Fonts
Great resource for generating CSS and all font files needed for HTML5 broswers:
http://www.fontsquirrel.com/fontface/generator
http://www.fontsquirrel.com/fontface/generator
MySQL Joins made Simple
Sometimes JOINs in MySQL can get confusing. This article will help make it super simple for you!
This is the simplest, most understood Join and is the most common. This query will return all of the records in the left table (table A) that have a matching record in the right table (table B).
Continue Reading: http://www.codeproject.com/KB/database/Visual_SQL_Joins.aspx?msg=3373088
Tuesday, February 1, 2011
Force IE6, IE7 and IE8 to be more compliant
Pretty cool project going on that forces older versions of IE to be more compliant. It relies on javascript to allow for some of the newer CSS styling (but not all). It even has a transparent PNG fix for IE 6.
Check it out here: http://code.google.com/p/ie7-js/
Target IE6 and IE7 with CSS
Very nice way to target IE6 or IE7 specifically within your CSS doc.
#myelement{ color: #999; /* shows in all browsers */
*color: #999; /* notice the * before the property - shows in IE7 and below */
_color: #999; /* notice the _ before the property - shows in IE6 and below */
}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();
};
};
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();
};
};
Subscribe to:
Posts (Atom)