« January 2006 | Main | March 2006 »
February 23, 2006
Associative Arrays?
Found this in a file I've been helping with and it struck me as odd, I've never seen this syntax, didn't know you even do this and figured because all the code was dumped into the fla first frame, it was forgiven by the compiler:
data_array=[];
data_array.name="Stacey";
data_array.id="666";
trace(data_array.name);
trace(typeof(data_array));
trace(data_array instanceof Array);
trace(data_array instanceof Object);
-------------------------
I thought it was a serious ASWTF. And i still can't see why you would want to use an associative array. And at first, I was confused about why both the instanceof Array and Object brough back true, but 2 seconds later it dawned on me - inheritance.
What would be the benefits of using an associative array like this as opposed to a simple object? Are there any?
Things you learn while digging through code.
Posted by bitch at 02:49 PM | Comments (5)
February 15, 2006
Valentines Day a la Bitch
Just when you thought the most useless holiday known to mankind was going to suck worse than it possibly commercially could... you get prezzies like this:


Big shout out to my students - that was really sweet.
Posted by bitch at 02:53 PM | Comments (4)
Osama Bin Codin'
I've discoved the true identities of one Tony MacDonnell.
Steve aptly coined the title of this picture of Tony which I loaded up to my flickr account - how else can you possibly describe it?

To cover up his true identity, he assumes yet another disguise:
That of the code Ninja - full of programmatic stealth:


Pics like this make me glad I work here.
Posted by bitch at 02:24 PM | Comments (0)
February 03, 2006
Adding to the Flex Change list
Adding to the items that Jesse Warden and Darron Schall have posted about in regards to changes in the Flex beta/as - here's one i discovered today:
Previously you did this for web services:
var service:WebService=new WebService();
service.wsdl="http://www.mywebservice/services/getitBitch.cfc?wsdl";
service.addEventListener("load",onWSDLLoad);
service.fetchWSDL();
//----------------------------------------
NOW you need to do this:
import mx.rpc.soap.*;
import mx.rpc.soap.LoadEvent ;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent ;
var service:WebService=new WebService();
service.wsdl="http://www.mywebservice/services/getitBitch.cfc?wsdl";
service.addEventListener(LoadEvent.LOAD,onWSDLLoad);
service.addEventListener(FaultEvent.FAULT,onWSDLLoadFault);
service.loadWSDL();
////-------------------------------
The changes totally make sense, but it didn't stop me from nearly dropping a load in my pants when my application was broke :(
Posted by bitch at 04:57 PM | Comments (1)
Hoppin on the Flex bandwagon
More shiznit on Flex from yet another questionable and highly unreliable source. Yes i said shiznit- could be a result of overexposure to Jesse's highly infectious lingual improvisations.
I never used flex before version 2. I had no idea what it had to offer, and never considered it a viable solution for many projects simply because of the hefty price tag that put the big in big ticket purchase.
I jumped on the bandwagon a bit late - I started to use Flex extensively when the 2.0 alpha came out. And now, I can't imagine returning to that state of ignorance where I sluffed it off.
So, in a nutshell, here's my raves:
1. The component set is wicked - and anyone having dabbled in the v1 and v2 components in Flash and who know the inner workings of the framework - will be loving the Flex component framework. Its much more consistent and entirely more robust. Cell editors- yay! Item renderers, yay! The List and Collection interfaces make manipulating and filtering the dataProvider bit incredibly easy - without half the code you'd need before.
2. Skinning components - once again, pretty fan-f**king tastic. Use a style sheet, embed the graphics and pretty much voila. I nearly pee'd myself when I discovered how easy it was, and how good I could make stuff look without getting messy about it.
3.The editor is finally robust and makes using the Flash authoring AS editor seem like a visit to shantytown. Code collapsing - auto insert, etc, etc - its probably one of the better indications that Flash/AS is growing up. I still find a couple things a bit buggy but its nice to have an intergrated development environment as opposed to using an external editor, and using yet another external compiler.
4. AS3. Worlds of improvement. Extensive use of interfaces. A fundamental reorganization of many of the classes. Some people worry about the learning curve, but once you hop in and get over some of the minor hurdles ( how do I create an event that has custom props?, how can I detect a double click, what happened to asfunction... ) then its a pretty decent transistion. The display list for me is the best - it totally solves problems like trying to get bitmap data from a MC that you don't necessarily want shown and have to shove far off the stage.
5. Organization. It encourages and enforces it. I love when I can collapse a folder structure in the project view and see all the items that belong to the project. Its a minor thing, but it helps. And i love being able to create a new as class and it stubs it out for me. No need for the flash extension. Despite the wretched learning curve, I find that I'm being more productive overall in the flex environment.
Using Flex and as3 makes me feel like i grew up deprived as a Flash developer, but too innocent to understand what I was being deprived of.
Since the release of the alpha, we have in shop at Teknision created a couple of pretty robust Flex applications. One being an application that takes care of project management in terms of time tracking. We ported a version from Flash to Flex. Hell, I learned Coldfusion to write the CFC's as the previous incarnation used ASP, something I am way more comfortable with. But writing the components turned out to be easy. And hooking into them, even easier.
One thing that we have talked about in the shop, would be the ability to give the designer more control. Let them create a layout in Fireworks ( or Photoshop?) that allows them to skin the components. They can drag a combobox frame from an objects palette onto the canvas and dictate what the states, etc would look like. When they export the file, it would create the MXML layout and perhaps a stylesheet that would embed the images etc. Designers would now be empowered - no more battling over blurry fonts ( sorry Steve :) ) or alignment issues. Developers would grab that stubbed out mxml and start the business logic. Just a thought.
Anyways, yes,I too am on the flex bandwagon.
Posted by bitch at 05:13 AM | Comments (5)