Shawnblais.com v2

The Lab

Archive for the ‘AS3’ Category

Easy MySQL Query from FLash (AS3)

without comments

I recently had a project requiring extensive communication between Flex and a MySQL database. I looked around for solutions, AMFPHP looked good, but required some server side installation, and still required writing my SQL statements in a PHP page.

What I was really looking for, was an easy method to be able write my own SQL queries right inside of Flex, pass them to the server, and get back a result set, or error message. I didn’t find anything out there that quite fit the bill, so I built my own.

Click here for more info…

Written by Shawn

July 22nd, 2010 at 6:43 am

Posted in AS3

Tagged with , , , , , , ,

Error 2101: The source parameter must be a URL-encoded query string containing name/value pairs.

without comments

Stumbled upon this little error last night in Flash, and it was a bit of a PITA so I thought I’d post up a solution here.

Click here for more information…

Written by Shawn

July 13th, 2010 at 6:56 am

Posted in AS3

Tagged with , , , , , , ,

Firefox 3 Scroll Wheel Fix

without comments

There a bug in Firefox 3 which causes the MOUSE_WHEEL event to always fire twice, no matter what. Here’s the fix…

Click here for more info…

Written by Shawn

August 20th, 2009 at 10:02 am

Posted in AS3

FrameRate Monitor

without comments

Another utility class, this time a FrameRate monitor for easily getting the current frameRate of your movie.

Click here for more info…

Written by Shawn

August 19th, 2009 at 12:11 pm

Posted in AS3

ColorTween class

without comments

Here’s a very handy utility class to tween the tint of a MovieClip. It works by creating 2 color transform objects (based on a start and end color) and interpolates the colors in between. This uses GTween to handle the tweening of a dummy property, while the color is updated on the CHANGE event handler.

Click here to read more…

Written by Shawn

August 19th, 2009 at 12:04 pm

Posted in AS3

flipGallery 3D Source Code

without comments

This was pretty much my first real attempt at a PV3D project. Using an AS2 Cover Flow implementation as my target, I began redesigning it completely from scratch. The process was extremely enlightening, I learned a ton about both As3 and Papervsion, and I really think the end result is one of the best implementations I’ve seen. It’s extremely smooth, and able to handle upwards of 100 images with great performance.

Click here to read more…

Written by Shawn

August 19th, 2009 at 11:49 am

Posted in 3D, AS3

Scrollbar Class (AS3)

without comments

Here’s a generic ScrollBar class, which will take a movieclip and create a scrollbar out of it.

The class accepts 2 parameters, your source movieclip, and the callBack function which should be notified whenever the Scroller’s position has changed. It also features some external interface to change the position of the scroller from somewhere else in your code

Click here for more info…

Written by Shawn

August 19th, 2009 at 10:53 am

Posted in AS3