Getting Thumbnails for YouTube Videos

Posted by | Posted in Resources | Posted on 12-05-2010

Youtube generates 3 thumbnails for their videos, just swap out <video id> with your video's id.

http://img.youtube.com/vi/<video id>/1.jpg

http://img.youtube.com/vi/<video id>/2.jpg

http://img.youtube.com/vi/<video id>/3.jpg

QATool + Banner workflow

Posted by | Posted in Flash, Random, Resources, Technology | Posted on 24-02-2010

I have recently had some banner work for a client and had to present multiple banners.  I coincidentally came across this. Here is an example of the tool in action. Pretty close to the perfect solution for banner presentation for your clients.  Installation is super easy. For mac all you do is run these commands in terminal

  1. sudo gem update --system
  2. gem sources --add http://gems.codeendeavor.com
  3. sudo gem install builder
  4. gem install roo
  5. gem install spreadsheet
  6. gem install nokogiri
  7. gem install rubyzip
  8. gem install google-spreadsheet-ruby
  9. gem install qatool

If you have any problems just use sudo in front of the command.  After you create your banners you can use this little tool, which will open a terminal window that corresponds to where you are in finder.  After that just type qatool and you're done! Super easy.

Great Flash WordPress Plugin

Posted by | Posted in Resources, Wordpress | Posted on 23-05-2009

If you have a wordpress blog and frequently embed SWF files you will need this: Kimili WordPress plugin.  It comes complete with a button for the WordPress posting page, which launches a window that will help you very quickly embed SWF files.  Very handy.

Motion Blurs for Tweening engines

Posted by | Posted in Actionscript 3.0, Flash, Flex, Resources | Posted on 17-03-2009

I've been using TweenMax for a while but I always want to add motion blurs to everything.  I've seen a few approaches where you would detect if the movie is moving and just apply a generic blur, but I didn't like those.  Here is a little utility class that comes in handy.  It will apply horizontal and vertical blurs perfectly but since there are no real directional blurs in Flash, I've cancelled the diagonal blurring since it will only blur out the ball completely.  To add that just surround the statements on lines 23-24 with a Math.abs. This class makes it really easy to add motion blurs to tween with code that looks like

TweenMax.to(mc, 0.4, {x: 1000, onUpdate: BlurHelper.blur, onUpdateParams: [mc]});

With the BlurHelper class below

package
{
	import flash.filters.BlurFilter;
 
	public class BlurHelper {
 
		private static var _items:Array = new Array();
		private static var modx:Number = 0.5;
		private static var mody:Number = 0.5;
 
		public static function blur(aItem:*):void
		{
 
			var bl:BlurFilter = new BlurFilter();
 
			if(_items[aItem.name] == null)
			{
				_items[aItem.name] = new Object();
				_items[aItem.name].ox 	= 0;
				_items[aItem.name].oy 	= 0;
			}
 
			bl.blurX = (aItem.x - _items[aItem.name].ox)/modx;
			bl.blurY = (aItem.y - _items[aItem.name].oy)/mody;
 
			_items[aItem.name].ox = aItem.x;
			_items[aItem.name].oy = aItem.y;
 
			aItem.filters = [bl];
 
		}
 
		public static function killBlur(aItem:*):void
		{
			aItem.filters = new Array();
		}
	}
}

Flex Resources

Posted by | Posted in Actionscript 3.0, Flex, Resources | Posted on 01-09-2008

HERE

Smart and Useful Site

Posted by | Posted in Random, Resources | Posted on 01-09-2008

alltop.com, man this has got everything... pretty cool.  I thought aggregating RSS feeds from other sources would be illegal for commercial use, but I guess not.  In which case, I think I might build one of these.

Quick and easy CAPTCHA with all the options

Posted by | Posted in PHP, Resources | Posted on 13-04-2008

I've been looking for a quick and easy to use captcha solution, but I found a bunch of tutorials and difficult, or overly complicated implementations. I wanted all the options such as:

1.) random colors for the text and background, with the ability to still read the text
2.) rotated text with random fonts
3.) random shapes drawn in the background
4.) use of ttf fonts
5.) the ability to refresh the image
6.) control over how many letters to use and how many shapes to draw

So after some research, I decided to combine a bunch of approaches and came up with this one script file to use captcha. All you need is the captcha.php script and the fonts folder, which contains all the fonts that are used. The features I have are all of the above. There are variables in the script to allow you to customize it any way you want:

//The maximum number of letters to use in the captcha
$maxLetters         = 5;
//The name of the session variable where the captcha string will be stored
$sessionVarName     = "captcha_string";
//The width of the captcha image
$imageWidth         = 200;
//The height of the captcha image
$imageHeight         = 50;
//The number of random lines to draw in the background of the captcha image
$numberOfLines         = 10;
//The number of random elipses to draw in the background of the captcha image
$numberOfElipses     = 10;
//The type of image to output, can be jpg, gif, or png
$imageType            = "jpg";
 
//The font array, which contains fonts that will be picked at random
$fonts = array();
$fonts[0] = "fonts/arial.ttf";
$fonts[1] = "fonts/tiza.ttf";
$fonts[2] = "fonts/pointy.ttf";

To add fonts just drop the ttf file in the fonts folder and add an entry to the array. To implement this is very simple all you need is this:

 
<!--
<img src="captcha.php" id="captchaImage" class="captchaImage"/>
<script> 
document.write("
<a href='#' 
onclick='document.getElementById(\"captchaImage\").src=\"captcha.php\"; 
return false;' style='outline: none;'><img src='refresh.gif' border='0'/>
</a>"); 
</script>
<br/>
<label for="captchaText" class="captchaLabel">CAPTCHA:</label>
<input type="text" id="captchaText" name="captchaText" class="captchaText"/>
-->
 

I also threw in a little utility file you can use (captchaUtil.php), it has one function,which looks like this:

 
outputCaptchaFields(
     $captchaLabel = "CAPTCHA:",
     $imageClass = "",
     $labelClass = "",
     $inputClass = "",
     $imageID = "captchaImage",
     $labelID = "captchaLabel",
     $inputID = "captchaText",
     $refreshImage="refresh.gif"
)
 

and will output the captcha fields for you. The parameters are self-explanatory.

Very simple and straightforward.

http://blog.shalomfriss.com/wp-content/plugins/downloads-manager/img/icons/default.gif download: captcha.rar (691.08KB)
added: 14/04/2008
clicks: 310
description: A simple and powerful captcha implementation

Enjoy.

Free Design Templates

Posted by | Posted in Resources | Posted on 20-02-2007

http://www.smashingmagazine.com/2007/02/14/free-design-templates/

83 Word Press themes

Posted by | Posted in Resources | Posted on 20-02-2007

http://www.smashingmagazine.com/2007/02/09/83-beautiful-wordpress-themes-you-probably-havent-seen/

Cheat Sheets

Posted by | Posted in Resources | Posted on 20-02-2007

http://www.petefreitag.com/item/455.cfm