pubDate Formatter

July 1st, 2009

 

Put in the day, month, and year, and this simple script will find the day of the week and output an RSS compliant string for the pubDate field. Just add the time and timezone and you are set!

 

Google Maps – DC Metro

June 25th, 2009

Scecon microsite

CSS, Google API, HTML

Map created to show the Metro lines in Washington, DC. I built this because, while the simplified map is nice, is doesn’t really give you a feel for how the lines are actually laid out geographically within the city.

Download the source code.

 

Flash VR Effect 2.0

April 17th, 2009

I have had a chance to mess around some more with the earlier VR effect I had posted. Since then, the powers of the universe have granted me access to Flash CS3 and thus, AS 3. You can see this new, uber powerful code being put to use on this very site! Check it out!

This differs from the original VR file in many ways. Take it away, bullet list!

  • Rebuilt using AS 3
  • Preloader
  • Rotation is now controlled by holding the mouse down and moving left or right rather than just moving to the left or right. This allows you to “pause” the VR by letting go of the mouse.
  • The speed can be controlled by changing a variable in the fla (dragSpeed; frame 2, line 2).

I am planning some more updates to this file in the future, including: loading from an XML, y-scrolling, and zooming. Joy!

Download the source code! [ 8K ]

 

ASP List Directory 2.0

October 28th, 2008

Building on the earlier example of listing all the files within a directory on a webpage, we can now add some nifty sorting features to make the experience all the better.

Just put both files in a directory with the rest of the files and you’re done! Easy as cakes.

Here is an example of the code in action.

View the source code!
Download the source code! [ 6k ]

 

Colors :: Hex to RGB and HSV

August 28th, 2008

Your HEX: #
Convert!

R G B H S V
/255 /255 /255 o % %

I created this simple little color converter using JavaScript. It’s main purpose is to convert numbers to a 0-1 scale, as that is what 3D Max uses, while Photoshop uses a 0-255 scale. I can’t do the math in my head, so I force my computer slave to do it for me. Hope it is useful to you too…

 

Flash VR Effect 1.0

October 31st, 2007

Today I am giving away a simple Flash VR file. You will need to create images at the various angles of your subject. Then simply import all of your images into this Flash file, adjust the speed to your tastes, and you will have a simple VR effect for the web or wherever.

Move your mouse to the right and the model will rotate counter-clockwise. Move the mouse to the left and the model will rotate clockwise.

Plan for further development include:

  • adding vertical rotation
  • smoother rotation
  • on the fly updating (no need to have Flash to edit the content)
  • a simple GUI

Model taken from 3dtotal.

All the ActionScript is on the first frame. It is as follows:

stop();

// Edit topSpeed to modify how fast the VR can rotate
var topSpeed:Number = 2;
var frameSpeed:Number;
var frame:Number = _root._currentframe;

// Functions, no need to edit these
onEnterFrame = function () {
	frameSpeed = Math.round(topSpeed*(_xmouse-Stage.width/2)/(Stage.width/2));
	newFrame = _root._currentframe+frameSpeed;
	if (newFrame>_root._totalframes) {
		newFrame = newFrame-_root._totalframes;
	} else if (newFrame<=0) {
		newFrame = _root._totalframes+newFrame;
	}
	gotoAndStop(newFrame);
	frame = _root._currentframe;
};

Download the source code! [ 1.5M ]

 

ASP List Directory 1.0

October 21st, 2007

There have been occasions where I have needed to just dump some files in a hidden directory of a website for internal use or to preview to a client. I don’t want to create a whole preview site for just this instance, and I want to keep directory browsing off for the rest of the site.

ASP offers some simple tools to list all the files in a specific folder and any sub-folders. The following code wasn’t written by me, credit goes to Mike Hall. I did however make some modifications to his original code. He had it set up in such a way as that you needed to manually enter which folders would be listed. I wanted something simpler. Something you could just drop in a folder on your site and it would automatically load and list all the files. I also didn’t want the index file to appear in this list.

Here is an example of the code in action.

View the source code!
Download the source code! [ 1k ]

Check out the updated version as well.