RSS LinkedIn Twitter

Archive for the ‘Actionscript’ Category

Here’s a pair of methods I use to generate random usernames for an online test. They could be used to generate random strings for any purpose, though. len is the length of the random string you want returned. public static function generateRandomString(len:uint = 1, userAlphabet:String = “abcdefghijklmnopqrstuvwxyz”):String{ var alphabet:Array = userAlphabet.split(“”); var alphabetLength:int = alphabet.length; […]

Thursday, March 10th, 2011 at 21:08 0 comments

I finished my final Flex 3 project a couple months ago and have finally been able to start digging into Flex 4 for my current projects. There are two in particular that involve a number of input-type popups. The first thing I noticed about these popups (which were based on either Group or VGroup) was […]

Wednesday, December 15th, 2010 at 10:11 2 comments

Starting with certain versions in the 9.0’s of Flash player, socket communication in Flex began adding additional security measures. The one I am going to discuss in the post is the socket policy file. In short, the socket policy file is an XML file that is served by default from port 843 and contains information […]

Tuesday, February 9th, 2010 at 00:04 0 comments

One of my ongoing weekend projects is an AIR chat application, recently rechristened “JUICE” a.k.a. “John’s Ultimate Internet Chat Experience”. I realize that may only be the case for myself, but the project has been very educational and entertaining for me. The initial release used AIR/Flex as the front-end, ColdFusion and MySQL for the backend, […]

Tuesday, December 22nd, 2009 at 14:05 9 comments

I’m about ready to sleep on my ShortcutManager, I figured I might as well finish off the series. I added context to it, while still maintaining backward compatibility with the non-context enabled version. I don’t think I posted it, so it probably won’t matter so much to my readers. For those who haven’t read the […]

Wednesday, August 19th, 2009 at 19:43 2 comments

I’ve put some more thought into my shortcut manager, and have decided on a way to implement the shortcut context, as well as curb the Dictionary explosion that my previous architecture would have had. The new version uses one Dictionary to store all functions, the keyCode, combo keys, and context is all encoded into the […]

Wednesday, August 19th, 2009 at 17:07 0 comments

Strictly speaking, bit strings are not nearly as easy to understand as named boolean variables; but there are situations when they can simplify or eliminate the need for long boolean expressions. Consider my recent post about the ShortcutManager. There are three control keys that may or may not be pressed at any given time. This […]

Wednesday, August 19th, 2009 at 14:29 0 comments

Just for fun I wrote a simple ShortcutManager this evening, it turned out to be an interesting little project and taught me a few things about Functions. It’s by no means finished, I’ll detail a few planned improvements after I go over it’s usage. My goals were to have a static registry that the application […]

Tuesday, August 18th, 2009 at 22:08 0 comments

I won’t exactly be extending a SkinnableComponent in this post, I’ll be extending the Button (which extends SkinnableComponent) and creating a few new skins for it. Extending the SkinnableComponent is almost identical to extending the SkinnableContainer (see my previous post). You won’t need the contentGroup, of course. I wanted to illustrate the power of Flex’s […]

Monday, August 17th, 2009 at 23:05 0 comments

I’ve just created my first Flex 4 component, and loved doing it. It’s not entirely finished, but I wanted to share what I learned for those who may follow after me. In the component proper, some things to remember: 1. Extend SkinnableContainer. 2. Declare the skin states using metadata brackets. In my case: [as3][SkinState("collapsed")][SkinState("expanded")][/as3] 3. […]

Monday, August 17th, 2009 at 22:28 0 comments