HellaTight.com Launch

November 2nd, 2007

I’m pleased to announce the launch of hellatight.com. I’ve spent the past year collaborating with the founders of Hella Tight to bring this site to life. The site is built in Actionscript 3 and Flex 2 with PHP for the core API’s. On top of the customer facing flash e-commerce site, I also created the custom hat builder + content management system and order tracking system all in AS3/Flex2.

Hella Tight is a Berkeley based premium hat company with a mission to produce a brand recognized for innovative and creative Bay Area style. Check out the screenshots below to watch the slideshow or visit the store.

HellaTight Slideshow

HellaTight Store

FileReference.upload() dispatches IO Error with HTTP Status 406

July 6th, 2007

I was working with FileReference to upload to an Apache server and the upload was successfully completing and dispatching the Event.COMPLETE but for some reason I was getting an IOErrorEvent.IO_ERROR after the upload. After attaching the HTTPStatusEvent listener, the status codes from the server was ‘406 (Not Acceptable)’.

Finally after some searching, I stumbled across the issue in the Livedocs here and here. Turns out, Flash sends out invalid multipart requests (missing a ‘:’ in the POST header) and servers with mod_security will scan these POST requests and block them.

The easiest solution to this is to create an .htaccess file with:

SECFILTERENGINE OFF
SECFILTERSCANPOST OFF

which will disable the mod_security scanning of POSTs.

However, this should be modified with caution as mod_security provides intrusion detection and prevention from attacks such as SQL injection attacks, cross-site scripting, path traversal attacks, etc.

Image Fill Preloader in AS3

December 12th, 2006

I came up with this idea for an image fill preloader that would initially be grayed out and would fill with the original colors as the progress continued.

Example (click the reload icon to restart):

Here’s the source code for the example from above.

Working with item renderers in Flex

December 8th, 2006

Components that implement the ListBase class all have the itemToItemRenderer() method. This method returns the corresponding item renderer instance for an object from the dataProvider:

var renderer:ItemRenderer = list.itemToItemRenderer(list.dataProvider[someIndex]) as ItemRenderer;

Keep in mind that item renderers only exist for objects that are within the viewable rows for the list. This method returns null for objects that are not visible.